예제 #1
0
 /**
  * @param FileAccessorInterface $fileAccessor
  * @return bool
  */
 public function check(FileAccessorInterface $fileAccessor)
 {
     $fileAccessor->changeDir($this->path);
     $files = $fileAccessor->listFiles();
     return in_array($this->fileName, $files);
 }
예제 #2
0
 /**
  * @param FileAccessorInterface $fileAccessor
  * @return bool
  */
 public function check(FileAccessorInterface $fileAccessor)
 {
     $fileAccessor->changeDir($this->path);
     $content = $fileAccessor->showFile($this->fileName);
     return preg_match($this->regex, $content);
 }