Class Papi_Porter
Papi Porter class that handle import and export
of properties data.
-
Papi_Container
implements
ArrayAccess
-
Papi_Porter
Methods summary
public
|
|
public
Papi_Porter
|
|
public
boolean
|
#
after( string $filter, Closure $closure, integer $priority = 10, integer $accepted_args = 2 )
Add after filter.
Parameters
- $filter
- $closure
- $priority
- $accepted_args
Returns
boolean
|
public
boolean
|
#
before( string $filter, Closure $closure, integer $priority = 10, integer $accepted_args = 2 )
Add before filter.
Parameters
- $filter
- $closure
- $priority
- $accepted_args
Returns
boolean
|
public
Papi_Porter
|
#
driver( string|Papi_Porter_Driver $driver )
Alias for add_driver or use_driver method.
Alias for add_driver or use_driver method.
Parameters
Returns
|
public
boolean
|
#
driver_exists( string $driver )
Check if a driver exists or not.
Check if a driver exists or not.
Parameters
Returns
boolean
|
public
array
|
#
export( mixed $post_id, boolean $only_values = false )
Export data from Papi. With or without all property options.
Export data from Papi. With or without all property options.
Parameters
Returns
array
|
public
mixed
|
#
fire_filter( array $options )
Fire filter.
Parameters
Returns
mixed
Throws
Exception if filter is missing from options array.
Exception if value is missing from options array.
|
protected
array
|
|
protected
mixed
|
#
get_value( array $options )
Get value that should be saved.
Get value that should be saved.
Parameters
Returns
mixed
|
public
boolean
|
#
import( mixed $options, array $fields = [] )
Import data to Papi.
Parameters
Returns
boolean
|
public
Papi_Porter
|
#
options( array $options = [] )
Add options per property.
Add options per property.
Parameters
Returns
|
public
Papi_Porter
|
#
use_driver( string $driver )
Change Porter driver.
Parameters
Returns
Throws
InvalidArgumentException if an argument is not of the expected type.
Exception if driver name does not exist.
|
Methods inherited from Papi_Container
bind(),
call_closure(),
exists(),
get_class_prefix(),
get_closure(),
is_singleton(),
make(),
offsetExists(),
offsetGet(),
offsetSet(),
offsetUnset(),
remove(),
singleton()
|