public function path($file = null)
    {
        $base_path = Composer::getRootPath();

        $pieces = explode('/', $file);

        # Add public to the path

        array_splice($pieces, 2, 0, 'public');

        $vendor_path = implode('/', $pieces);

        if(is_file($base_path.'/workbench/'. $vendor_path)){
            return $base_path.'/workbench/'. $vendor_path;
        } elseif(is_file($base_path.'/vendor/'. $vendor_path)){
            return $base_path.'/vendor/'. $vendor_path;
        } else {
            foreach($this->_paths as $path){
                $currentPath = $base_path.'/'.$path.'/'. $file;
                if (is_file($currentPath)) {
                    return $currentPath;
                }
            }
        }

        return false;
    }
public function path($file = null)
    {
        $base_path = Composer::getRootPath();

        $pieces = explode('/', $file);

        # Add public to the path

        array_splice($pieces, 2, 0, 'public');

        $vendor_path = implode('/', $pieces);

        if(is_file($base_path.'/workbench/'. $vendor_path)){
            return $base_path.'/workbench/'. $vendor_path;
        } elseif(is_file($base_path.'/vendor/'. $vendor_path)){
            return $base_path.'/vendor/'. $vendor_path;
        } else {
            foreach($this->_paths as $path){
                $currentPath = $base_path.'/'.$path.'/'. $file;
                if (is_file($currentPath)) {
                    return $currentPath;
                }
            }
        }

        return false;
    }
public function path ( $ file = null ) { $ base_path = Composer :: getRootPath ( ) ; $ pieces = explode ( '/' , $ file ) ; # Add public to the path array_splice ( $ pieces , 2 , 0 , 'public' ) ; $ vendor_path = implode ( '/' , $ pieces ) ; if ( is_file ( $ base_path . '/workbench/' . $ vendor_path ) ) { return $ base_path . '/workbench/' . $ vendor_path ; } elseif ( is_file ( $ base_path . '/vendor/' . $ vendor_path ) ) { return $ base_path . '/vendor/' . $ vendor_path ; } else { foreach ( $ this -> _paths as $ path ) { $ currentPath = $ base_path . '/' . $ path . '/' . $ file ; if ( is_file ( $ currentPath ) ) { return $ currentPath ; } } } return false ; }
Check file from registered path

@param null $file
@return string
Check file from registered path