Interface zebkit.PathSearch <zebkit>

Interface that provides path search functionality for a tree-like structure.




public <Object> byPath (path, [cb])

Find children items or values with the passed path expression.


Parameters:
  • path <String>

    path expression. Path expression is simplified form of XPath-like expression. See FindInTree method to get more details.

  • [cb] <Function>

    function that is called every time a new children component has been found. If callback has not been passed then the method return first found item or null. If the callback has been passed as null then all found elements will be returned as array.


Returns: <Object>

found children item/property value or null if no children items were found


protected <Function> $matchPath

Method to match two element in tree.