exists() публичный статический Метод

Checks if the given file exists.
public static exists ( string $path ) : boolean
$path string
Результат boolean
Пример #1
0
 protected function tearDown()
 {
     if (Files::exists($this->controllerPath)) {
         Files::delete($this->controllerPath);
     }
     parent::tearDown();
 }
Пример #2
0
 protected function tearDown()
 {
     Config::revertProperty("global", "prefix_system");
     if (Files::exists($this->path)) {
         unlink($this->path);
     }
     parent::tearDown();
 }
Пример #3
0
 public function getControllerContents()
 {
     $controllerPath = $this->getControllerPath();
     if (Files::exists($controllerPath)) {
         return file_get_contents($controllerPath);
     }
     return '';
 }
Пример #4
0
 public static function tearDownAfterClass()
 {
     Config::overrideProperty('debug')->with(true);
     Config::overrideProperty('language')->with('en');
     Config::overridePropertyArray(array('global', 'prefix_system'), '');
     if (Files::exists('/tmp/SampleConfigFile.php')) {
         unlink('/tmp/SampleConfigFile.php');
     }
 }
Пример #5
0
 public static function loadLabels()
 {
     if (!self::$_labels) {
         $language = self::getLanguage();
         $path = Path::join(ROOT_PATH, 'locales', $language . '.php');
         if (!Files::exists($path)) {
             throw new Exception('Cannot find declared language file: ' . $language);
         }
         /** @noinspection PhpIncludeInspection */
         self::$_labels = (require $path);
     }
     return self::$_labels;
 }
Пример #6
0
 public function isActionExists($actionFile)
 {
     return Files::exists(Path::join($this->getViewPath(), $actionFile));
 }
Пример #7
0
 private function verifyExists($viewPath, $viewName)
 {
     if (!Files::exists($viewPath)) {
         throw new ViewException('No view found [' . $viewName . '] at: ' . $viewPath);
     }
 }