getCleanPath() 공개 정적인 메소드

./' in a path, without actually checking the path
public static getCleanPath ( string $path ) : string
$path string
리턴 string
예제 #1
0
 private function findImage($src, $tag, Content $file, $callback)
 {
     //for protocol relative or http requests : keep the original one
     if (substr($src, 0, strlen('http')) === 'http' || substr($src, 0, strlen('//')) === '//') {
         return $src;
     }
     //Get the path to the file, relative to the root of the documentation
     $url = DauxHelper::getCleanPath(dirname($file->getUrl()) . '/' . $src);
     //Get any file corresponding to the right one
     $file = DauxHelper::getFile($this->tree, $url);
     if ($file === false) {
         return false;
     }
     $result = $callback($src, $this->getAttributes($tag), $file);
     return $result ?: $src;
 }