phpcr-utils/src/PHPCR/Util/TreeWalker.php

Show: PublicProtectedPrivateinherited
Table of Contents
This file is part of the PHPCR Utils

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

License
Apache Software License 2.0  
Link
http://phpcr.github.com/  

\PHPCR\Util\TreeWalker

Package: Default
TODO: this should base on the TraversingItemVisitor
Author
Daniel Barsotti  

Properties

>VPropertyprotected\PHPCR\Util\array() $nodeFilters = array()
Filters to apply to decide whether a node needs to be visited
Default valuearray()Details
Type
\PHPCR\Util\array()
>VPropertyprotected\PHPCR\ItemVisitorInterface $nodeVisitor
Visitor for nodes
>VPropertyprotected\PHPCR\Util\array() $propertyFilters = array()
Filters to apply to decide whether a property needs to be visited
Default valuearray()Details
Type
\PHPCR\Util\array()
>VPropertyprotected\PHPCR\ItemVisitorInterface $propertyVisitor
Visitor for properties

Methods

methodpublic__construct(\PHPCR\ItemVisitorInterface $nodeVisitor, \PHPCR\ItemVisitorInterface $propertyVisitor = null) : void

Instantiate a tree walker

Parameters
NameTypeDescription
$nodeVisitor\PHPCR\ItemVisitorInterface

The visitor for the nodes

$propertyVisitor\PHPCR\ItemVisitorInterface

The visitor for the nodes properties

methodpublicaddNodeFilter(\PHPCR\Util\TreeWalkerFilterInterface $filter) : void

Add a filter to select the nodes that will be traversed

Parameters
NameTypeDescription
$filter\PHPCR\Util\TreeWalkerFilterInterface
methodpublicaddPropertyFilter(\PHPCR\Util\TreeWalkerFilterInterface $filter) : void

Add a filter to select the properties that will be traversed

Parameters
NameTypeDescription
$filter\PHPCR\Util\TreeWalkerFilterInterface
methodprotectedmustVisitNode(\PHPCR\NodeInterface $node) : boolean

Return whether a node must be traversed or not

Parameters
NameTypeDescription
$node\PHPCR\NodeInterface
Returns
TypeDescription
boolean
methodprotectedmustVisitProperty(\PHPCR\PropertyInterface $property) : boolean

Return whether a node property must be traversed or not

Parameters
NameTypeDescription
$property\PHPCR\PropertyInterface
Returns
TypeDescription
boolean
methodpublictraverse(\PHPCR\NodeInterface $node, int $recurse = -1, int $level = 0) : void

Traverse a node

Parameters
NameTypeDescription
$node\PHPCR\NodeInterface
$recurseint

Max recursion level

$levelint

Recursion level

Documentation was generated by phpDocumentor 2.0.0a12.