PHP 클래스 Baum\SetMapper

파일 보기 프로젝트 열기: gazsp/baum 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$childrenKeyName string Children key name.
$node Node Node instance for reference.

공개 메소드들

메소드 설명
__construct ( Node $node, $childrenKeyName = 'children' ) : void Create a new \Baum\SetBuilder class instance.
getChildrenKeyName ( ) : string Returns the children key name to use on the mapping array.
map ( $nodeList ) : boolean Maps a tree structure into the database. Unguards & wraps in transaction.
mapTree ( $nodeList ) : boolean Maps a tree structure into the database without unguarding nor wrapping inside a transaction.

보호된 메소드들

메소드 설명
deleteUnaffected ( $keys = [] )
firstOrNew ( $attributes )
getDataAttributes ( $attributes )
getSearchAttributes ( $attributes )
mapTreeRecursive ( array $tree, $parentKey = null, &$affectedKeys = [] ) : boolean Maps a tree structure into the database.
pruneScope ( )
wrapInTransaction ( Closure $callback )

메소드 상세

__construct() 공개 메소드

Create a new \Baum\SetBuilder class instance.
public __construct ( Node $node, $childrenKeyName = 'children' ) : void
$node Node
리턴 void

deleteUnaffected() 보호된 메소드

protected deleteUnaffected ( $keys = [] )

firstOrNew() 보호된 메소드

protected firstOrNew ( $attributes )

getChildrenKeyName() 공개 메소드

Returns the children key name to use on the mapping array.
public getChildrenKeyName ( ) : string
리턴 string

getDataAttributes() 보호된 메소드

protected getDataAttributes ( $attributes )

getSearchAttributes() 보호된 메소드

protected getSearchAttributes ( $attributes )

map() 공개 메소드

Maps a tree structure into the database. Unguards & wraps in transaction.
public map ( $nodeList ) : boolean
리턴 boolean

mapTree() 공개 메소드

Maps a tree structure into the database without unguarding nor wrapping inside a transaction.
public mapTree ( $nodeList ) : boolean
리턴 boolean

mapTreeRecursive() 보호된 메소드

Maps a tree structure into the database.
protected mapTreeRecursive ( array $tree, $parentKey = null, &$affectedKeys = [] ) : boolean
$tree array
리턴 boolean

pruneScope() 보호된 메소드

protected pruneScope ( )

wrapInTransaction() 보호된 메소드

protected wrapInTransaction ( Closure $callback )
$callback Closure

프로퍼티 상세

$childrenKeyName 보호되어 있는 프로퍼티

Children key name.
protected string $childrenKeyName
리턴 string

$node 보호되어 있는 프로퍼티

Node instance for reference.
protected Node,Baum $node
리턴 Node