Lines Matching defs:file
91 protected $file;
103 // try local file first
104 $file = self::IMGDIR . $svg;
105 if(!file_exists($file)) {
106 // try media file
107 $file = mediaFN($svg);
108 if(file_exists($file)) {
113 $file = getCacheName($svg, '.svg');
114 if (!file_exists($file)) {
115 io_download(self::CDNBASE . $svg, $file);
121 if(!file_exists($file)) $this->abort(404);
123 $this->file = $file;
131 $file = $this->file;
135 $cachekey = md5($file . serialize($params) . $conf['template'] . filemtime(__FILE__));
139 http_cached($cache->cache, $cache->useCache(array('files' => array($file, __FILE__))));
141 $content = $this->embedSVG($file);
143 $content = $this->generateSVG($file, $params);
149 * Generate a new SVG based on the input file and the parameters
151 * @param string $file the SVG file to load
155 protected function generateSVG($file, $params) {
157 $xml = simplexml_load_file($file, SvgNode::class);
170 * @param string $file the SVG file to load
173 protected function embedSVG($file) {
175 $xml = simplexml_load_file($file, SvgNode::class);