/** * Returns a publicly accessible URL for a file. * * WARNING: Access to the file may be restricted by further means, e.g. * some web-based authentication. You have to take care of this yourself. * * @param \TYPO3\CMS\Core\Resource\ResourceInterface $resourceObject The file or folder object * @param bool $relativeToCurrentScript Determines whether the URL returned should be relative to the current script, in case it is relative at all (only for the LocalDriver) * @return string */ public function getPublicUrl(\TYPO3\CMS\Core\Resource\ResourceInterface $resourceObject, $relativeToCurrentScript = FALSE) { $publicUrl = NULL; // Pre-process the public URL by an accordant slot $this->emitPreGeneratePublicUrl($resourceObject, $relativeToCurrentScript, array('publicUrl' => &$publicUrl)); // If slot did not handle the signal, use the default way to determine public URL if ($publicUrl === NULL) { $publicUrl = $this->driver->getPublicUrl($resourceObject, $relativeToCurrentScript); } return $publicUrl; }