Beispiel #1
0
 /**
  * getParentPath
  *
  * @param File $file
  * @access private
  * @return string parent path
  */
 private function getParentPath(File $file)
 {
     $path = $file->getPathname();
     if (strlen($path) < 2) {
         return '';
     }
     $parentPath = substr($path, 0, strrpos($path, '/', -2));
     return $parentPath;
 }
Beispiel #2
0
 /**
  * transform
  *
  * @param File $entity
  * @param SplFileInfo $file
  * @access private
  * @return File
  */
 private function transform(File $entity, SplFileInfo $file)
 {
     return $entity->setPathname($file->getRelativePathname())->setName($file->getFilename());
 }