public function __construct($file = null) { $this->file = PSX_PATH_CACHE . '/' . ($file === null ? 'psx_openid.store' : $file); if (!FileObject::exists($this->file)) { FileObject::putContents($this->file, serialize(array())); } }
public function getFile() { if ($this->_file === null) { // check whether we have an absolute or relative path if ($this->mediaPath[0] == '/' || $this->mediaPath[1] == ':') { $file = $this->mediaPath; } else { $file = $this->_registry['media.path'] . '/' . $this->mediaPath; } if (!File::exists($file)) { throw new Exception('File not found', 404); } $this->_file = $file; } return $this->_file; }