public function getPathRelativeToDirectory($path)
    {
        // Get the last segment of the directory as asset paths will be relative to this
        // path. We can then replace this segment with nothing in the assets path.
        $directoryLastSegment = substr($this->path, strrpos($this->path, '/') + 1);

        return trim(preg_replace('/^'.$directoryLastSegment.'/', '', $path), '/');
    }
public function getPathRelativeToDirectory($path)
    {
        // Get the last segment of the directory as asset paths will be relative to this
        // path. We can then replace this segment with nothing in the assets path.
        $directoryLastSegment = substr($this->path, strrpos($this->path, '/') + 1);

        return trim(preg_replace('/^'.$directoryLastSegment.'/', '', $path), '/');
    }
public function getPathRelativeToDirectory ( $ path ) { // Get the last segment of the directory as asset paths will be relative to this // path. We can then replace this segment with nothing in the assets path. $ directoryLastSegment = substr ( $ this -> path , strrpos ( $ this -> path , '/' ) + 1 ) ; return trim ( preg_replace ( '/^' . $ directoryLastSegment . '/' , '' , $ path ) , '/' ) ; }
Get a path relative from the current directory's path.

@param  string  $path
@return string
Get a path relative from the current directory s path .