예제 #1
0
 /**
  * Attempts to find a file given a relative path
  *
  * @param \r8\Finder\Tracker $tracker $file The tracker to use when determining
  *      if a base/path combination is valid
  * @param String $base The base directory to look for the path in
  * @param String $path The path being looked for
  * @return \r8\Finder\Result|NULL Returns a result, or NULL if the file
  *      couldn't be found
  */
 public function find(\r8\Finder\Tracker $tracker, $base, $path)
 {
     if ($tracker->test($base, $path)) {
         return new \r8\Finder\Result($base, $path);
     } else {
         return NULL;
     }
 }
예제 #2
0
 /**
  * Constructor...
  *
  * @param String $path The path that the finder was looking for
  * @param \r8\Finder\Tracker $tracker The details of the Find atemp
  */
 public function __construct($path, \r8\Finder\Tracker $tracker)
 {
     parent::__construct("Finder was unable to locate file", 0);
     $this->addData("Search Path", (string) $path);
     $this->addData("Tested Paths", $tracker->getTested());
 }