traverseHierarchy() public method

Traverse the folder tree upwards to determine if a parent folder of the provided file path might be the Horde repository root.
public traverseHierarchy ( string $start ) : string | boolean
$start string Path to the file to start from.
return string | boolean The root path or false if it could not be determined.
Ejemplo n.º 1
0
 /**
  * Identify the repository root.
  *
  * @param Components_Helper_Root $helper The root helper.
  *
  * @return NULL
  */
 public function repositoryRoot(Components_Helper_Root $helper)
 {
     if (($result = $helper->traverseHierarchy($this->_directory)) === false) {
         $this->_errors[] = sprintf('Unable to determine Horde repository root from component path "%s"!', $this->_directory);
     }
     return $result;
 }