PHP Class Papi_Post_Store, papi

Inheritance: extends Papi_Core_Meta_Store
Show file Open project: wp-papi/papi Class Usage Examples

Protected Properties

Property Type Description
$post object The WordPress post.
$type string The meta type.

Public Methods

Method Description
__construct ( integer $id ) The constructor.
get_permalink ( ) : string Get the permalink for the page.
get_post ( ) : WP_Post Get the WordPress post object.
get_property ( string $slug, string $child_slug = '' ) : null | Papi_Core_Property Load property from page type.
get_status ( ) : string Get the post status of a page.
valid ( ) : boolean Check if the page has the post object and that it's not null.

Protected Methods

Method Description
prepare_load_value ( Papi_Core_Property $property, mixed $value ) : mixed Prepare load value.

Method Details

__construct() public method

The constructor.
public __construct ( integer $id )
$id integer

get_post() public method

Get the WordPress post object.
public get_post ( ) : WP_Post
return WP_Post

get_property() public method

Load property from page type.
public get_property ( string $slug, string $child_slug = '' ) : null | Papi_Core_Property
$slug string
$child_slug string
return null | Papi_Core_Property

get_status() public method

 @return string
public get_status ( ) : string
return string

prepare_load_value() protected method

Prepare load value.
protected prepare_load_value ( Papi_Core_Property $property, mixed $value ) : mixed
$property Papi_Core_Property
$value mixed
return mixed

valid() public method

Check if the page has the post object and that it's not null.
public valid ( ) : boolean
return boolean

Property Details

$post protected property

The WordPress post.
protected object $post
return object

$type protected property

The meta type.
protected string $type
return string