PHP Класс Papi_Core_Type, papi

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

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

Свойство Тип Описание
$name string The name of the core type.
$sort_order integer The sort order of the core type.
$type string The type name. Used for WP CLI.

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

Свойство Тип Описание
$_class_name string The page type class name.
$_file_path string The file path of the core type file.

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

Метод Описание
__construct ( string $file_path = '' ) The constructor.
allowed ( ) : boolean Determine if the entry type is allowed.
boot ( ) Boot page type.
get_class_name ( ) : string Get the page type class name with namespace if exists.
get_file_path ( ) : string Get the page type file pat.h
get_id ( ) : string Get the page type identifier.
get_type ( ) : string Get type name.
has_name ( ) : boolean Check so we have a name on the page type.
match_id ( string $id ) : boolean Check if the the given identifier match the page type identifier.
new_class ( ) : null | object Create a new instance of the page type file.

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

Метод Описание
get_meta ( ) : array Get meta data from type class and merge with the parent meta data.
setup_actions ( ) Setup actions.
setup_file ( string $file_path ) Load the file and setup file path, file name and class name properties.
setup_filters ( ) Setup filters.
setup_meta_data ( ) Setup meta data.

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

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

Load a core type by the file.
public __construct ( string $file_path = '' )
$file_path string

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

Determine if the entry type is allowed.
public allowed ( ) : boolean
Результат boolean

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

Boot page type.
public boot ( )

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

Get the page type class name with namespace if exists.
public get_class_name ( ) : string
Результат string

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

Get the page type file pat.h
public get_file_path ( ) : string
Результат string

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

Get the page type identifier.
public get_id ( ) : string
Результат string

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

Get meta data from type class and merge with the parent meta data.
protected get_meta ( ) : array
Результат array

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

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

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

Check so we have a name on the page type.
public has_name ( ) : boolean
Результат boolean

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

Check if the the given identifier match the page type identifier.
public match_id ( string $id ) : boolean
$id string
Результат boolean

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

Create a new instance of the page type file.
public new_class ( ) : null | object
Результат null | object

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

Setup actions.
protected setup_actions ( )

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

Load the file and setup file path, file name and class name properties.
protected setup_file ( string $file_path )
$file_path string

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

Setup filters.
protected setup_filters ( )

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

Setup meta data.
protected setup_meta_data ( )

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

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

The page type class name.
protected string $_class_name
Результат string

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

The file path of the core type file.
protected string $_file_path
Результат string

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

The name of the core type.
public string $name
Результат string

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

The sort order of the core type.
public int $sort_order
Результат integer

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

The type name. Used for WP CLI.
public string $type
Результат string