Lines Matching full:this
28 $this->id = $id; //FIXME should it be cleaned?
29 $this->path = mediaFN($id, $rev);
30 $this->rev = $rev;
32 [$this->ext, $this->mime, $this->downloadable] = mimetype($this->path, false);
38 return $this->id;
44 return $this->rev;
50 return $this->path;
60 return noNS($this->id);
66 if (!$this->mime) return 'application/octet-stream';
67 return $this->mime;
73 return (string)$this->ext;
83 $ext = $this->getExtension();
89 * Should this file be downloaded instead being displayed inline?
95 return $this->downloadable;
101 return filesize($this->path);
107 return filemtime($this->path);
113 return is_writable($this->path);
119 return (str_starts_with($this->mime, 'image/'));
127 $this->width = 0;
128 $this->height = 0;
129 if (!$this->isImage()) return;
130 $info = getimagesize($this->path);
132 [$this->width, $this->height] = $info;
136 * Returns the width if this is a supported image, 0 otherwise
142 if ($this->width === null) $this->initSizes();
143 return $this->width;
147 * Returns the height if this is a supported image, 0 otherwise
153 if ($this->height === null) $this->initSizes();
154 return $this->height;
160 * @todo doing this for each file within a namespace is a waste, we need to cache this somehow
165 return auth_quickaclcheck(getNS($this->id) . ':*');
171 if ($this->meta === null) $this->meta = new JpegMeta($this->path);
172 return $this->meta;