Ejemplo n.º 1
0
 public static function pathParse($fileFullPath)
 {
     $file = File::create();
     $regexp = sprintf(File::REGEXP_FILEFULLPATH, File::REGEXP_INVALID_CHARS, File::REGEXP_INVALID_CHARS);
     if (preg_match($regexp, $fileFullPath, $matches) != 0) {
         $file->path = str_replace(':', DS, $matches[1]);
         $file->name = str_replace("\\", DS, $matches[2]);
         $file->extension = $matches[3];
     } else {
         throw new Exception('Invalid file path/name', 666);
     }
     $file->fullName = str_replace("\\", '/', PATH_VIEW . $file->path . $file->name . '.' . $file->extension);
     $file->doesItExists();
     return $file;
 }
Ejemplo n.º 2
0
 public function setFooter($fileFooter)
 {
     $this->fileFooter = File::pathParse($fileFooter);
 }