Ejemplo n.º 1
0
 /**
  * Constructor
  * @param string $name
  * @param string $absolutePath
  */
 public function __construct($name, $absolutePath)
 {
     parent::__construct($name);
     if (!($this->absolutePath = \realpath($absolutePath)) or !\is_readable($this->absolutePath)) {
         throw new \Foundation\Exception("Unable to read '{$absolutePath}'.");
     }
     $this->fileContents = false;
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  * @param string $name
  * @param string $fileContents
  * @param string $lastModified
  */
 public function __construct($name, $fileContents, $lastModified = 'now')
 {
     parent::__construct($name);
     $this->fileContents = $fileContents;
     $this->lastModified = new \DateTime($lastModified);
 }