コード例 #1
0
ファイル: Config.php プロジェクト: pr-of-it/t4
 /**
  * Deletes config file
  * @return bool
  * @throws \T4\Core\Exception|\T4\Fs\Exception
  */
 public function delete()
 {
     if (empty($this->__path)) {
         throw new Exception('Empty path for config delete');
     }
     return Helpers::removeFile($this->__path);
 }
コード例 #2
0
ファイル: Service.php プロジェクト: gembux2012/ksp.dem
 public function deleteImage($item)
 {
     if ($item->image) {
         try {
             Helpers::removeFile(ROOT_PATH_PUBLIC . $item->image);
         } catch (\T4\Fs\Exception $e) {
             return false;
         }
     }
     return true;
 }
コード例 #3
0
ファイル: Photo.php プロジェクト: gembux2012/ksp.dem
 public function deleteImage($path)
 {
     if ($this->image) {
         try {
             $this->image = '';
             Helpers::removeFile(ROOT_PATH_PUBLIC . $path);
         } catch (\T4\Fs\Exception $e) {
             return false;
         }
     }
     return true;
 }