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;
            }
        }
    }