PHP Class TQ\Vcs\StreamWrapper\AbstractPathFactory

Inheritance: implements PathFactoryInterface
ファイルを表示 Open project: teqneers/php-stream-wrapper-for-git Class Usage Examples

Protected Properties

Property Type Description
$map RepositoryRegistry The repository registry
$protocol string The registered protocol

Public Methods

Method Description
__construct ( string $protocol, RepositoryRegistry $map = null ) Creates a path factory
createPathInformation ( string $streamUrl ) : PathInformation Returns the path information for a given stream URL
getRegistry ( ) : RepositoryRegistry Returns the repository registry
parsePath ( string $streamUrl ) : array Returns path information for a given stream path

Protected Methods

Method Description
createRepositoryForPath ( string $path ) : TQ\Vcs\Repository\RepositoryInterface Creates a new Repository instance for the given path
getRepository ( array $pathInfo ) : TQ\Vcs\Repository\RepositoryInterface Returns the repository for the given path information

Method Details

__construct() public method

Creates a path factory
public __construct ( string $protocol, RepositoryRegistry $map = null )
$protocol string The protocol (such as "vcs")
$map RepositoryRegistry The repository registry

createPathInformation() public method

Returns the path information for a given stream URL
public createPathInformation ( string $streamUrl ) : PathInformation
$streamUrl string The URL given to the stream function
return PathInformation The path information representing the stream URL

createRepositoryForPath() abstract protected method

Creates a new Repository instance for the given path
abstract protected createRepositoryForPath ( string $path ) : TQ\Vcs\Repository\RepositoryInterface
$path string The path
return TQ\Vcs\Repository\RepositoryInterface

getRegistry() public method

Returns the repository registry
public getRegistry ( ) : RepositoryRegistry
return RepositoryRegistry

getRepository() protected method

Returns the repository for the given path information
protected getRepository ( array $pathInfo ) : TQ\Vcs\Repository\RepositoryInterface
$pathInfo array An array containing information about the path
return TQ\Vcs\Repository\RepositoryInterface

parsePath() public method

Returns path information for a given stream path
public parsePath ( string $streamUrl ) : array
$streamUrl string The URL given to the stream function
return array An array containing information about the path

Property Details

$map protected_oe property

The repository registry
protected RepositoryRegistry,TQ\Vcs\StreamWrapper $map
return RepositoryRegistry

$protocol protected_oe property

The registered protocol
protected string $protocol
return string