PHP Class Papi_Porter, papi

Inheritance: extends Papi_Container
Afficher le fichier Open project: wp-papi/papi Class Usage Examples

Protected Properties

Свойство Type Description
$driver Papi_Porter_Driver The driver that should be used.

Méthodes publiques

Méthode Description
__construct ( ) The constructor.
add_driver ( Papi_Porter_Driver $driver ) : Papi_Porter Add Porter Driver.
after ( string $filter, Closure $closure, integer $priority = 10, integer $accepted_args = 2 ) : boolean Add after filter.
before ( string $filter, Closure $closure, integer $priority = 10, integer $accepted_args = 2 ) : boolean Add before filter.
driver ( string | Papi_Porter_Driver $driver ) : Papi_Porter Alias for add_driver or use_driver method.
driver_exists ( string $driver ) : boolean Check if a driver exists or not.
export ( mixed $post_id, boolean $only_values = false ) : array Export data from Papi. With or without all property options.
fire_filter ( array $options ) : mixed Fire filter.
import ( mixed $options, array $fields = [] ) : boolean Import data to Papi.
options ( array $options = [] ) : Papi_Porter Add options per property.
use_driver ( string $driver ) : Papi_Porter Change Porter driver.

Méthodes protégées

Méthode Description
get_import_options ( mixed $options ) : array Get import options.
get_value ( array $options ) : mixed Get value that should be saved.

Method Details

__construct() public méthode

The constructor.
public __construct ( )

add_driver() public méthode

Add Porter Driver.
public add_driver ( Papi_Porter_Driver $driver ) : Papi_Porter
$driver Papi_Porter_Driver
Résultat Papi_Porter

after() public méthode

Add after filter.
public after ( string $filter, Closure $closure, integer $priority = 10, integer $accepted_args = 2 ) : boolean
$filter string
$closure Closure
$priority integer
$accepted_args integer
Résultat boolean

before() public méthode

Add before filter.
public before ( string $filter, Closure $closure, integer $priority = 10, integer $accepted_args = 2 ) : boolean
$filter string
$closure Closure
$priority integer
$accepted_args integer
Résultat boolean

driver() public méthode

Alias for add_driver or use_driver method.
public driver ( string | Papi_Porter_Driver $driver ) : Papi_Porter
$driver string | Papi_Porter_Driver
Résultat Papi_Porter

driver_exists() public méthode

Check if a driver exists or not.
public driver_exists ( string $driver ) : boolean
$driver string
Résultat boolean

export() public méthode

Export data from Papi. With or without all property options.
public export ( mixed $post_id, boolean $only_values = false ) : array
$post_id mixed
$only_values boolean
Résultat array

fire_filter() public méthode

Fire filter.
public fire_filter ( array $options ) : mixed
$options array
Résultat mixed

get_import_options() protected méthode

Get import options.
protected get_import_options ( mixed $options ) : array
$options mixed
Résultat array

get_value() protected méthode

Get value that should be saved.
protected get_value ( array $options ) : mixed
$options array
Résultat mixed

import() public méthode

Import data to Papi.
public import ( mixed $options, array $fields = [] ) : boolean
$options mixed
$fields array
Résultat boolean

options() public méthode

Add options per property.
public options ( array $options = [] ) : Papi_Porter
$options array
Résultat Papi_Porter

use_driver() public méthode

Change Porter driver.
public use_driver ( string $driver ) : Papi_Porter
$driver string
Résultat Papi_Porter

Property Details

$driver protected_oe property

The driver that should be used.
protected Papi_Porter_Driver $driver
Résultat Papi_Porter_Driver