Ejemplo n.º 1
0
 /**
  * @param string                  $namespace
  * @param string                  $filename
  * @param int|null                $sequence
  * @param CM_Service_Manager|null $serviceManager
  */
 public function __construct($namespace, $filename, $sequence = null, CM_Service_Manager $serviceManager = null)
 {
     $namespace = (string) $namespace;
     $filename = (string) $filename;
     if (null !== $sequence) {
         $sequence = (int) $sequence;
     }
     if (null === $serviceManager) {
         $serviceManager = CM_Service_Manager::getInstance();
     }
     $this->_pathRelative = $this->_calculateRelativeDir($namespace, $filename, $sequence);
     $this->_namespace = $namespace;
     $this->setServiceManager($serviceManager);
     $filesystem = $serviceManager->getUserContent()->getFilesystem($this->getNamespace());
     parent::__construct($this->getPathRelative(), $filesystem);
 }