PHP Класс Phalcon\Mvc\Model\Behavior\NestedSet

Наследование: extends Phalcon\Mvc\Model\Behavior, implements Phalcon\Mvc\Model\BehaviorInterface
Показать файл Открыть проект

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

Метод Описание
__construct ( $options = null )
ancestors ( integer $depth = null ) : Phalcon\Mvc\Model\ResultsetInterface Named scope. Gets ancestors for node.
append ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean Appends target to node as last child.
appendTo ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean Appends node to target as last child.
children ( ) : Phalcon\Mvc\Model\ResultsetInterface Named scope. Gets children for node (direct descendants only).
deleteNode ( ) : boolean Deletes node and it's descendants.
descendants ( integer $depth = null, boolean $addSelf = false ) : Phalcon\Mvc\Model\ResultsetInterface Named scope. Gets descendants for node.
getIsDeletedRecord ( ) : boolean Returns if the current node is deleted.
getIsNewRecord ( )
getOwner ( ) : Phalcon\Mvc\ModelInterface
insertAfter ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean Inserts node as next sibling of target.
insertBefore ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean Inserts node as previous sibling of target.
isDescendantOf ( Phalcon\Mvc\ModelInterface $subj ) : boolean Determines if node is descendant of subject node.
isLeaf ( ) : boolean Determines if node is leaf.
isRoot ( ) : boolean Determines if node is root.
missingMethod ( Phalcon\Mvc\ModelInterface $model, string $method, null $arguments = null ) : mixed | null | string Calls a method when it's missing in the model
moveAfter ( Phalcon\Mvc\ModelInterface $target ) : boolean Move node as next sibling of target.
moveAsFirst ( Phalcon\Mvc\ModelInterface $target ) : boolean Move node as first child of target.
moveAsLast ( Phalcon\Mvc\ModelInterface $target ) : boolean Move node as last child of target.
moveAsRoot ( ) : boolean Move node as new root.
moveBefore ( Phalcon\Mvc\ModelInterface $target ) : boolean Move node as previous sibling of target.
next ( ) : Phalcon\Mvc\ModelInterface Named scope. Gets next sibling of node.
notify ( string $eventType, Phalcon\Mvc\ModelInterface $model )
parent ( ) : Phalcon\Mvc\ModelInterface Named scope. Gets parent of node.
prepend ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean Prepends target to node as first child.
prependTo ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean Prepends node to target as first child.
prev ( ) : Phalcon\Mvc\ModelInterface Named scope. Gets previous sibling of node.
roots ( ) : Phalcon\Mvc\Model\ResultsetInterface Named scope. Gets root node(s).
saveNode ( array $attributes = null, array $whiteList = null ) : boolean Create root node if multiple-root tree mode. Update node if it's not new.
setIsDeletedRecord ( boolean $value ) Sets if the current node is deleted.
setOwner ( Phalcon\Mvc\ModelInterface $owner )

Приватные методы

Метод Описание
addNode ( Phalcon\Mvc\ModelInterface $target, integer $key, integer $levelUp, array $attributes = null ) : boolean
getDbHandler ( Phalcon\Mvc\ModelInterface $model ) : Phalcon\Db\AdapterInterface Gets DB handler.
makeRoot ( array $attributes, array $whiteList ) : boolean
moveNode ( Phalcon\Mvc\ModelInterface $target, integer $key, integer $levelUp ) : boolean
shiftLeftRight ( integer $key, integer $delta, Phalcon\Mvc\ModelInterface $model = null ) : boolean

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

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

public __construct ( $options = null )

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

Named scope. Gets ancestors for node.
public ancestors ( integer $depth = null ) : Phalcon\Mvc\Model\ResultsetInterface
$depth integer the depth.
Результат Phalcon\Mvc\Model\ResultsetInterface

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

Appends target to node as last child.
public append ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
$attributes array list of attributes.
Результат boolean

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

Appends node to target as last child.
public appendTo ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
$attributes array list of attributes.
Результат boolean

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

Named scope. Gets children for node (direct descendants only).
public children ( ) : Phalcon\Mvc\Model\ResultsetInterface
Результат Phalcon\Mvc\Model\ResultsetInterface

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

Deletes node and it's descendants.
public deleteNode ( ) : boolean
Результат boolean

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

Named scope. Gets descendants for node.
public descendants ( integer $depth = null, boolean $addSelf = false ) : Phalcon\Mvc\Model\ResultsetInterface
$depth integer the depth.
$addSelf boolean If TRUE - parent node will be added to result set.
Результат Phalcon\Mvc\Model\ResultsetInterface

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

Returns if the current node is deleted.
public getIsDeletedRecord ( ) : boolean
Результат boolean whether the node is deleted.

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

public getIsNewRecord ( )

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

public getOwner ( ) : Phalcon\Mvc\ModelInterface
Результат Phalcon\Mvc\ModelInterface

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

Inserts node as next sibling of target.
public insertAfter ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
$attributes array list of attributes.
Результат boolean

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

Inserts node as previous sibling of target.
public insertBefore ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
$attributes array list of attributes.
Результат boolean

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

Determines if node is descendant of subject node.
public isDescendantOf ( Phalcon\Mvc\ModelInterface $subj ) : boolean
$subj Phalcon\Mvc\ModelInterface the subject node.
Результат boolean whether the node is descendant of subject node.

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

Determines if node is leaf.
public isLeaf ( ) : boolean
Результат boolean whether the node is leaf.

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

Determines if node is root.
public isRoot ( ) : boolean
Результат boolean whether the node is root.

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

Calls a method when it's missing in the model
public missingMethod ( Phalcon\Mvc\ModelInterface $model, string $method, null $arguments = null ) : mixed | null | string
$model Phalcon\Mvc\ModelInterface
$method string
$arguments null
Результат mixed | null | string

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

Move node as next sibling of target.
public moveAfter ( Phalcon\Mvc\ModelInterface $target ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
Результат boolean

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

Move node as first child of target.
public moveAsFirst ( Phalcon\Mvc\ModelInterface $target ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
Результат boolean

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

Move node as last child of target.
public moveAsLast ( Phalcon\Mvc\ModelInterface $target ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
Результат boolean

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

Move node as new root.
public moveAsRoot ( ) : boolean
Результат boolean

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

Move node as previous sibling of target.
public moveBefore ( Phalcon\Mvc\ModelInterface $target ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
Результат boolean

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

Named scope. Gets next sibling of node.
public next ( ) : Phalcon\Mvc\ModelInterface
Результат Phalcon\Mvc\ModelInterface

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

public notify ( string $eventType, Phalcon\Mvc\ModelInterface $model )
$eventType string
$model Phalcon\Mvc\ModelInterface

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

Named scope. Gets parent of node.
public parent ( ) : Phalcon\Mvc\ModelInterface
Результат Phalcon\Mvc\ModelInterface

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

Prepends target to node as first child.
public prepend ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
$attributes array list of attributes.
Результат boolean

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

Prepends node to target as first child.
public prependTo ( Phalcon\Mvc\ModelInterface $target, array $attributes = null ) : boolean
$target Phalcon\Mvc\ModelInterface the target
$attributes array List of attributes.
Результат boolean

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

Named scope. Gets previous sibling of node.
public prev ( ) : Phalcon\Mvc\ModelInterface
Результат Phalcon\Mvc\ModelInterface

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

Named scope. Gets root node(s).
public roots ( ) : Phalcon\Mvc\Model\ResultsetInterface
Результат Phalcon\Mvc\Model\ResultsetInterface

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

Create root node if multiple-root tree mode. Update node if it's not new.
public saveNode ( array $attributes = null, array $whiteList = null ) : boolean
$attributes array list of attributes.
$whiteList array whether to perform validation.
Результат boolean

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

Sets if the current node is deleted.
public setIsDeletedRecord ( boolean $value )
$value boolean whether the node is deleted.

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

public setOwner ( Phalcon\Mvc\ModelInterface $owner )
$owner Phalcon\Mvc\ModelInterface