/** * 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; }
/** * 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); }