PHP Трейт Nestable\NestableTrait

Показать файл Открыть проект

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

Свойство Тип Описание
$toArray integer Array service.
$toDropdown integer Dropdown service.
$toHtml integer Html service.
$toJson integer Json string service.

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

Свойство Тип Описание
$_instance Query builder instance.
$nested mixed Start the nested process.
$parameters array Service parameters.
$source Soruce data.
$to integer Default service number (toArray).

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

Метод Описание
__call ( array $method, array $args ) : mixed if called method not exists in NestableService pass to parent __call method.
__callStatic ( array $method, array $args ) : mixed Create new instance and call the method.
delete ( ) : boolean | null Call the parent delete method
get ( ) : mixed Get the data from db to collection or default return.
nested ( integer $to = 1 ) : object Set the nest type.
renderAsArray ( ) : array Render as array tree.
renderAsDropdown ( ) : string Render as dropdown.
renderAsHtml ( ) : string Render as html.
renderAsJson ( ) : array Render as json string.
renderAsMultiple ( ) : string Render as multiple list box.

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

Метод Описание
getParameters ( ) : array Get the all service parameters.
getParentField ( ) : string Return the parent key name.
saveParameter ( string $method, mixed $value ) : object Save the service parameters.
to ( ) : mixed Pass data to nest methods.

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

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

if called method not exists in NestableService pass to parent __call method.
public __call ( array $method, array $args ) : mixed
$method array
$args array
Результат mixed

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

Create new instance and call the method.
public static __callStatic ( array $method, array $args ) : mixed
$method array
$args array
Результат mixed

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

Call the parent delete method
public delete ( ) : boolean | null
Результат boolean | null

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

Get the data from db to collection or default return.
public get ( ) : mixed
Результат mixed

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

Get the all service parameters.
protected getParameters ( ) : array
Результат array

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

Return the parent key name.
protected getParentField ( ) : string
Результат string

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

Set the nest type.
public static nested ( integer $to = 1 ) : object
$to integer
Результат object

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

Render as array tree.
public static renderAsArray ( ) : array
Результат array

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

Render as dropdown.
public static renderAsDropdown ( ) : string
Результат string

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

Render as html.
public static renderAsHtml ( ) : string
Результат string

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

Render as json string.
public static renderAsJson ( ) : array
Результат array

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

Render as multiple list box.
public static renderAsMultiple ( ) : string
Результат string

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

Save the service parameters.
protected saveParameter ( string $method, mixed $value ) : object
$method string Method name in NestableService
$value mixed
Результат object

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

Pass data to nest methods.
protected to ( ) : mixed
Результат mixed

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

$_instance защищенное статическое свойство

Query builder instance.
protected static $_instance

$nested защищенное статическое свойство

Start the nested process.
protected static mixed $nested
Результат mixed

$parameters защищенное статическое свойство

Service parameters.
protected static array $parameters
Результат array

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

Soruce data.
protected $source

$to защищенное статическое свойство

Default service number (toArray).
protected static int $to
Результат integer

$toArray публичное статическое свойство

Array service.
public static int $toArray
Результат integer

$toDropdown публичное статическое свойство

Dropdown service.
public static int $toDropdown
Результат integer

$toHtml публичное статическое свойство

Html service.
public static int $toHtml
Результат integer

$toJson публичное статическое свойство

Json string service.
public static int $toJson
Результат integer