PHP Класс Papi_Core_Meta_Store, papi

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$id integer The WordPress meta id if it exists.

Защищенные свойства (Protected)

Свойство Тип Описание
$meta_values array Properties meta values.
$properties array Current properties.
$type string The meta type.
$type_class Papi_Core_Type The type class.

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

factory() публичный статический Метод

Get store from factory.
public static factory ( integer $post_id, string $type = 'post' ) : mixed
$post_id integer
$type string
Результат mixed

format_value() публичный Метод

Format property value from the property.
public format_value ( string $slug, mixed $value ) : mixed
$slug string
$value mixed
Результат mixed

get_property() абстрактный публичный Метод

Get property from entry type.
abstract public get_property ( string $slug, string $child_slug = '' ) : Papi_Core_Property
$slug string
$child_slug string
Результат Papi_Core_Property

get_property_meta_value() публичный Метод

Get property meta value.
public get_property_meta_value ( string $slug ) : mixed
$slug string
Результат mixed

get_property_option() публичный Метод

Get property option or default value.
public get_property_option ( string $slug, string $option, mixed $default = null ) : boolean
$slug string
$option string
$default mixed
Результат boolean

get_type() публичный Метод

Get meta type.
public get_type ( ) : string
Результат string

get_type_class() публичный Метод

Get type class.
public get_type_class ( ) : Papi_Core_Type
Результат Papi_Core_Type

get_value() публичный Метод

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
Результат mixed

load_value() публичный Метод

Load property value from the property.
public load_value ( string $slug ) : mixed
$slug string
Результат mixed

prepare_load_value() защищенный Метод

Prepare load value.
protected prepare_load_value ( Papi_Core_Property $property, mixed $value ) : mixed
$property Papi_Core_Property
$value mixed
Результат mixed

prepare_property() защищенный Метод

Prepare property before returning it.
protected prepare_property ( Papi_Core_Property $property ) : Papi_Core_Property
$property Papi_Core_Property
Результат Papi_Core_Property

property() защищенный Метод

Get current property.
protected property ( string $slug = '' ) : Papi_Core_Property
$slug string
Результат Papi_Core_Property

set_property_meta_value() публичный Метод

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

valid() абстрактный публичный Метод

Check if it's a valid store.
abstract public valid ( ) : boolean
Результат boolean

Описание свойств

$id публичное свойство

The WordPress meta id if it exists.
public int $id
Результат integer

$meta_values защищенное свойство

Properties meta values.
protected array $meta_values
Результат array

$properties защищенное свойство

Current properties.
protected array $properties
Результат array

$type защищенное свойство

The meta type.
protected string $type
Результат string

$type_class защищенное свойство

The type class.
protected Papi_Core_Type $type_class
Результат Papi_Core_Type