- return substr($path, strlen($GLOBALS['imagestore']['basedir']));
- }
-
- protected function getImageUrl($path)
- {
- if (isset($_SERVER['HTTPS'])) {
- } else {
- $protocol = 'http';
- }
- return $protocol . '://' . $_SERVER['HTTP_HOST']
- . '/image?path=' . urlencode($this->getRelPath($path));
- }
-
- protected function getFirstImage(\SplFileInfo $dirInfo)
- {
- $it = $this->getImageIterator($dirInfo);
- $it->rewind();
- return $it->current();