PHP Class Phalcon\Mvc\Model\Behavior\NestedSet

Inheritance: extends Phalcon\Mvc\Model\Behavior, implements Phalcon\Mvc\Model\BehaviorInterface
Afficher le fichier Open project: phalcon/incubator

Méthodes publiques

Méthode Description
__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 )

Private Methods

Méthode Description
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

Method Details

__construct() public méthode

public __construct ( $options = null )

ancestors() public méthode

Named scope. Gets ancestors for node.
public ancestors ( integer $depth = null ) : Phalcon\Mvc\Model\ResultsetInterface
$depth integer the depth.
Résultat Phalcon\Mvc\Model\ResultsetInterface

append() public méthode

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.
Résultat boolean

appendTo() public méthode

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.
Résultat boolean

children() public méthode

Named scope. Gets children for node (direct descendants only).
public children ( ) : Phalcon\Mvc\Model\ResultsetInterface
Résultat Phalcon\Mvc\Model\ResultsetInterface

deleteNode() public méthode

Deletes node and it's descendants.
public deleteNode ( ) : boolean
Résultat boolean

descendants() public méthode

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.
Résultat Phalcon\Mvc\Model\ResultsetInterface

getIsDeletedRecord() public méthode

Returns if the current node is deleted.
public getIsDeletedRecord ( ) : boolean
Résultat boolean whether the node is deleted.

getIsNewRecord() public méthode

public getIsNewRecord ( )

getOwner() public méthode

public getOwner ( ) : Phalcon\Mvc\ModelInterface
Résultat Phalcon\Mvc\ModelInterface

insertAfter() public méthode

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.
Résultat boolean

insertBefore() public méthode

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.
Résultat boolean

isDescendantOf() public méthode

Determines if node is descendant of subject node.
public isDescendantOf ( Phalcon\Mvc\ModelInterface $subj ) : boolean
$subj Phalcon\Mvc\ModelInterface the subject node.
Résultat boolean whether the node is descendant of subject node.

isLeaf() public méthode

Determines if node is leaf.
public isLeaf ( ) : boolean
Résultat boolean whether the node is leaf.

isRoot() public méthode

Determines if node is root.
public isRoot ( ) : boolean
Résultat boolean whether the node is root.

missingMethod() public méthode

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
Résultat mixed | null | string

moveAfter() public méthode

Move node as next sibling of target.
public moveAfter ( Phalcon\Mvc\ModelInterface $target ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
Résultat boolean

moveAsFirst() public méthode

Move node as first child of target.
public moveAsFirst ( Phalcon\Mvc\ModelInterface $target ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
Résultat boolean

moveAsLast() public méthode

Move node as last child of target.
public moveAsLast ( Phalcon\Mvc\ModelInterface $target ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
Résultat boolean

moveAsRoot() public méthode

Move node as new root.
public moveAsRoot ( ) : boolean
Résultat boolean

moveBefore() public méthode

Move node as previous sibling of target.
public moveBefore ( Phalcon\Mvc\ModelInterface $target ) : boolean
$target Phalcon\Mvc\ModelInterface the target.
Résultat boolean

next() public méthode

Named scope. Gets next sibling of node.
public next ( ) : Phalcon\Mvc\ModelInterface
Résultat Phalcon\Mvc\ModelInterface

notify() public méthode

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

parent() public méthode

Named scope. Gets parent of node.
public parent ( ) : Phalcon\Mvc\ModelInterface
Résultat Phalcon\Mvc\ModelInterface

prepend() public méthode

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.
Résultat boolean

prependTo() public méthode

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.
Résultat boolean

prev() public méthode

Named scope. Gets previous sibling of node.
public prev ( ) : Phalcon\Mvc\ModelInterface
Résultat Phalcon\Mvc\ModelInterface

roots() public méthode

Named scope. Gets root node(s).
public roots ( ) : Phalcon\Mvc\Model\ResultsetInterface
Résultat Phalcon\Mvc\Model\ResultsetInterface

saveNode() public méthode

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.
Résultat boolean

setIsDeletedRecord() public méthode

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

setOwner() public méthode

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