PHP Class Papi_Core_Meta_Store, papi

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

Méthodes publiques

Свойство Type Description
$id integer The WordPress meta id if it exists.

Protected Properties

Свойство Type Description
$meta_values array Properties meta values.
$properties array Current properties.
$type string The meta type.
$type_class Papi_Core_Type The type class.

Méthodes publiques

Méthode Description
factory ( integer $post_id, string $type = 'post' ) : mixed Get store from factory.
format_value ( string $slug, mixed $value ) : mixed Format property value from the property.
get_property ( string $slug, string $child_slug = '' ) : Papi_Core_Property Get property from entry type.
get_property_meta_value ( string $slug ) : mixed Get property meta value.
get_property_option ( string $slug, string $option, mixed $default = null ) : boolean Get property option or default value.
get_type ( ) : string Get meta type.
get_type_class ( ) : Papi_Core_Type Get type class.
get_value ( integer $id = null, string $slug = null, mixed $default = null, string $type = 'post' ) : mixed Get value.
load_value ( string $slug ) : mixed Load property value from the property.
set_property_meta_value ( string $slug, mixed $value ) Set property meta value.
valid ( ) : boolean Check if it's a valid store.

Méthodes protégées

Méthode Description
prepare_load_value ( Papi_Core_Property $property, mixed $value ) : mixed Prepare load value.
prepare_property ( Papi_Core_Property $property ) : Papi_Core_Property Prepare property before returning it.
property ( string $slug = '' ) : Papi_Core_Property Get current property.

Method Details

factory() public static méthode

Get store from factory.
public static factory ( integer $post_id, string $type = 'post' ) : mixed
$post_id integer
$type string
Résultat mixed

format_value() public méthode

Format property value from the property.
public format_value ( string $slug, mixed $value ) : mixed
$slug string
$value mixed
Résultat mixed

get_property() abstract public méthode

Get property from entry type.
abstract public get_property ( string $slug, string $child_slug = '' ) : Papi_Core_Property
$slug string
$child_slug string
Résultat Papi_Core_Property

get_property_meta_value() public méthode

Get property meta value.
public get_property_meta_value ( string $slug ) : mixed
$slug string
Résultat mixed

get_property_option() public méthode

Get property option or default value.
public get_property_option ( string $slug, string $option, mixed $default = null ) : boolean
$slug string
$option string
$default mixed
Résultat boolean

get_type() public méthode

Get meta type.
public get_type ( ) : string
Résultat string

get_type_class() public méthode

Get type class.
public get_type_class ( ) : Papi_Core_Type
Résultat Papi_Core_Type

get_value() public méthode

Get value.
public get_value ( integer $id = null, string $slug = null, mixed $default = null, string $type = 'post' ) : mixed
$id integer
$slug string
$default mixed
$type string
Résultat mixed

load_value() public méthode

Load property value from the property.
public load_value ( string $slug ) : mixed
$slug string
Résultat mixed

prepare_load_value() protected méthode

Prepare load value.
protected prepare_load_value ( Papi_Core_Property $property, mixed $value ) : mixed
$property Papi_Core_Property
$value mixed
Résultat mixed

prepare_property() protected méthode

Prepare property before returning it.
protected prepare_property ( Papi_Core_Property $property ) : Papi_Core_Property
$property Papi_Core_Property
Résultat Papi_Core_Property

property() protected méthode

Get current property.
protected property ( string $slug = '' ) : Papi_Core_Property
$slug string
Résultat Papi_Core_Property

set_property_meta_value() public méthode

Set property meta value.
public set_property_meta_value ( string $slug, mixed $value )
$slug string
$value mixed

valid() abstract public méthode

Check if it's a valid store.
abstract public valid ( ) : boolean
Résultat boolean

Property Details

$id public_oe property

The WordPress meta id if it exists.
public int $id
Résultat integer

$meta_values protected_oe property

Properties meta values.
protected array $meta_values
Résultat array

$properties protected_oe property

Current properties.
protected array $properties
Résultat array

$type protected_oe property

The meta type.
protected string $type
Résultat string

$type_class protected_oe property

The type class.
protected Papi_Core_Type $type_class
Résultat Papi_Core_Type