public function getFullPath($path, $type = null, $out = false)
    {
        if (@file_exists($path)) {
            return realpath($path);
        }
        
        $base = DirectoryHelper::slashDirname($this->getRootDirectory());
        if (in_array($type, array('asset', 'assets'))) {
            $base .= DirectoryHelper::slashDirname($this->getAssetsDirectory());
        } elseif ($type==='vendor') {
            $base .= DirectoryHelper::slashDirname($this->getVendorDirectory());
        } elseif ($type==='assets_vendor') {
            $base .= DirectoryHelper::slashDirname($this->getAssetsDirectory())
                . DirectoryHelper::slashDirname($this->getAssetsVendorDirectory());
        }
        $f = $base . $path;
        if (@file_exists($f)) {
            return $f;
        }
        if ($out) {
            return null;
        }
        if (!in_array($type, array('asset', 'assets'))) {
            $f = $this->getFullPath($path, 'asset', true);
            if (@file_exists($f)) {
                return $f;
            }
        }
        if ($type!=='vendor') {
            $f = $this->getFullPath($path, 'vendor', true);
            if (@file_exists($f)) {
                return $f;
            }
        }
    }
public function getFullPath($path, $type = null, $out = false)
    {
        if (@file_exists($path)) {
            return realpath($path);
        }
        
        $base = DirectoryHelper::slashDirname($this->getRootDirectory());
        if (in_array($type, array('asset', 'assets'))) {
            $base .= DirectoryHelper::slashDirname($this->getAssetsDirectory());
        } elseif ($type==='vendor') {
            $base .= DirectoryHelper::slashDirname($this->getVendorDirectory());
        } elseif ($type==='assets_vendor') {
            $base .= DirectoryHelper::slashDirname($this->getAssetsDirectory())
                . DirectoryHelper::slashDirname($this->getAssetsVendorDirectory());
        }
        $f = $base . $path;
        if (@file_exists($f)) {
            return $f;
        }
        if ($out) {
            return null;
        }
        if (!in_array($type, array('asset', 'assets'))) {
            $f = $this->getFullPath($path, 'asset', true);
            if (@file_exists($f)) {
                return $f;
            }
        }
        if ($type!=='vendor') {
            $f = $this->getFullPath($path, 'vendor', true);
            if (@file_exists($f)) {
                return $f;
            }
        }
    }
public function getFullPath ( $ path , $ type = null , $ out = false ) { if ( @ file_exists ( $ path ) ) { return realpath ( $ path ) ; } $ base = DirectoryHelper :: slashDirname ( $ this -> getRootDirectory ( ) ) ; if ( in_array ( $ type , array ( 'asset' , 'assets' ) ) ) { $ base .= DirectoryHelper :: slashDirname ( $ this -> getAssetsDirectory ( ) ) ; } elseif ( $ type === 'vendor' ) { $ base .= DirectoryHelper :: slashDirname ( $ this -> getVendorDirectory ( ) ) ; } elseif ( $ type === 'assets_vendor' ) { $ base .= DirectoryHelper :: slashDirname ( $ this -> getAssetsDirectory ( ) ) . DirectoryHelper :: slashDirname ( $ this -> getAssetsVendorDirectory ( ) ) ; } $ f = $ base . $ path ; if ( @ file_exists ( $ f ) ) { return $ f ; } if ( $ out ) { return null ; } if ( ! in_array ( $ type , array ( 'asset' , 'assets' ) ) ) { $ f = $ this -> getFullPath ( $ path , 'asset' , true ) ; if ( @ file_exists ( $ f ) ) { return $ f ; } } if ( $ type !== 'vendor' ) { $ f = $ this -> getFullPath ( $ path , 'vendor' , true ) ; if ( @ file_exists ( $ f ) ) { return $ f ; } } }
Get the absolute path in the package

@param string $path The relative path to complete
@param string $type Type of the original relative path (can be `asset`, `vendor` or `assets_vendor` - default is `null`)
@param bool $out Must we search in `assets` and `vendor` (if `false`) or not (if `true`)
@return string
Get the absolute path in the package