Returns the web path of the file

@param bool $trim
@return string
513991
public function getWebPath($trim = false)
    {
        if ($trim) {
            return trim($this->web_path, FileManager::DS);
        } else {
            return $this->web_path;
        }
    }
327636
public static function getViewFilePath($path) {
        if (empty($path)) {
            return false;
        }

        if ((strpos($path, '/') !== false || strpos($path, '\\') !== false) && is_file($result = $path)) {
            return $result;
        }

        if (self::isRelativePath($path) && is_file($result = self::mapPath($path))) {
            return $result;
        }

        if (is_file($result = PHPMVC_VIEW_PATH . PHPMVC_VIEW . PHPMVC_DS . $path)) {
            return $result;
        }
       
        if (is_file($result = PHPMVC_SHARED_PATH . $path)) {
            return $result;
        }

        if (($result = self::appendPhpExtension($path)) !== false) {
            return self::getViewFilePath($result);
        }

        return false;
    }
359976
public function getPath($module)
    {
        $dir = $this->dir . DIRECTORY_SEPARATOR . $module;

        if (!is_dir($dir)) {
            return false;
        }

        $find = new Finder();
        $files = $find->files()
            ->in($dir)
            ->name('slender.*');

        if ($files->count() < 1) {
            return false;
        }

        $filesIterator = iterator_to_array($files->getIterator());
        $iterator = array_shift($filesIterator);

        return $iterator->getPath();
    }
63571
public function get($path, $sort = false)
    {
        $regexpPattern = sprintf('%s_[\d\w]{32}\.(%s)', md5($this->resolveFilePath($path)), implode('|', self::$supportedFormats));

        return $this->_find($regexpPattern, $sort);
    }
1138263
public static function prev(Bool $isPath = true) : String
    {
        if( ! isset($_SERVER['HTTP_REFERER']) )
        {
            return false;
        }
        
        $str = str_replace(URL::site(), '', $_SERVER['HTTP_REFERER']);

        if( $isPath === true )
        {
            return $str;
        }
        else
        {
            return Strings\Split::divide($str, '/', -1);
        }
    }
497510
public static function getCurrentPath()
    {
        if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
            $url = $_SERVER['HTTP_X_REWRITE_URL'];
        } elseif (isset($_SERVER['REQUEST_URI'])) {
            $url = $_SERVER['REQUEST_URI'];
        } elseif (isset($_SERVER['ORIG_PATH_INFO'])) {
            $url = $_SERVER['ORIG_PATH_INFO'] . (!empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '');
        } else {
            $url = '';
        }

        return strpos($url, '?') ? strstr($url, '?', true) : $url;
    }
797887
protected function getDynamicPath($fullPath) {
        // empty string makes FM to use connector path for preview instead of absolute path
        // COMMENTED: due to it prevents to build absolute URL when "serverRoot" is "false" and "fileRoot" is provided
        // as well as "previewUrl" value in the JSON configuration file is set to the correct URL
//        if(empty($this->dynamic_fileroot)) {
//            return '';
//        }
        $path = $this->dynamic_fileroot . '/' . $this->getRelativePath($fullPath);
        return $this->cleanPath($path);
    }
716303
public function getFormatWebPath($format = null)
    {
        if (!$format = $format ?: $this->defaultFormat) {
            return $this->getWebPath();
        }

        return ($formattedImage = $this->getFormattedImage($format))
            ? $formattedImage->getWebPath()
            : $this->getWebPath()
        ;
    }
845628
public function getPath()
    {
        $pathInfo = rawurldecode($this->getPathInfo());
        $path = '/' . trim($pathInfo, '/');

        return ($path == '/') ? '' : $path;
    }
567631
protected function getPathFromContent()
    {
        $pathFromContent = str_replace($this->getPathToContent(), '', $this->getFile()->getRealPath());

        return trim($pathFromContent, DIRECTORY_SEPARATOR);
    }
385830
private function getServiceFromPath($path)
    {
        /* Ensure the path is in a standard form, removing empty elements. */
        $path = implode('/', array_filter(array_map('trim', explode('/', $path)), 'strlen'));

        /* If using the basePath option, strip the basePath. Otherwise, the path becomes the basename of the URI. */
        if (isset($this->options[self::KEY_BASE_PATH])) {
            $basePathPosition = strpos($path, $this->options[self::KEY_BASE_PATH]);
            if (false !== $basePathPosition) {
                $path = substr($path, $basePathPosition + strlen($this->options[self::KEY_BASE_PATH]));
            }

            return trim(dirname($path), "/") . '/' .  basename($path, '.php'); /* For example, x/y/z/FooService */
        } else {
            return basename($path, '.php'); /* For example: FooService, from /x/y/z/FooService.php */
        }
    }
710767
public function getPath() : string
    {
        if ($this->fullPath !== null) {
            return $this->fullPath;
        }

        $path = $this->getSetting('path');

        if (is_dir($path)) {
            $this->verified = true;

            return $this->fullPath = realpath($path);
        }

        $pubPath = public_path(trim($path, '/'));

        $this->verified = is_dir($pubPath);

        return $this->fullPath = $pubPath;
    }
794036
protected function getFilePath()
    {
        $path = $this->cachePath . DIRECTORY_SEPARATOR . $this->cacheDirectory . DIRECTORY_SEPARATOR;
        $path = str_replace(['\\\\', '//'], [DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR], $path);

        return $path;
    }
675481
public static function realpath($path)
    {
        // check for stream uri
        if (preg_match('~^[a-z0-9-_.]+://~', $path)) {
            $stats = (file_exists($path))? stat($path) : false;
            if ($stats && isset($stats['realpath'])) {
                return $stats['realpath'];
            }

            return ($stats !== false) ? $path : false;
        }

        return realpath($path);
    }
1316763
public function text($path = '.', $trim = true)
    {
        $text = strval($this->first($path));

        return $trim ? trim($text) : $text;
    }
1113528
public function path($style = '')
    {
        if ($this->getAttribute('filename')) {
            return $this->getInterpolator()->interpolate($this->url, $style);
        }

        return '';
    }
1337388
public function getEntry($full = true)
    {
        $key = $full ? 'SCRIPT_FILENAME' : 'SCRIPT_NAME';

        $wdir = $this->getWorkingDirectory();

        $file = $this->getServerParam($key);

        if (strpos($file, $wdir) === 0) {
            $file = substr($file, strlen($wdir));
        }

        $file = trim($file, '.' . DIRECTORY_SEPARATOR);

        if ($full && $this->isCli()) {
            $file = $wdir . DIRECTORY_SEPARATOR . $file;
        }

        return $file;
    }