PHP Class TQ\Vcs\StreamWrapper\PathInformation

Inheritance: implements TQ\Vcs\StreamWrapper\PathInformationInterface
Show file Open project: teqneers/php-stream-wrapper-for-git

Protected Properties

Property Type Description
$arguments array Additional arguments
$fullPath string The absolute path to the resource
$localPath string Lazy instantiated
$ref string The version ref
$repository TQ\Vcs\Repository\RepositoryInterface The repository
$url string The URL

Public Methods

Method Description
__construct ( TQ\Vcs\Repository\RepositoryInterface $repository, string $url, string $fullPath, string $ref, array $arguments ) Creates a new path information instance from a given URL
getArgument ( string $argument ) : string | null Returns the given argument from the argument collection
getArguments ( ) : array Returns the additional arguments given
getFullPath ( ) : string Returns the absolute path to the resource
getLocalPath ( ) : string Returns the relative path to the resource based on the repository path
getRef ( ) : string Returns the version ref
getRepository ( ) : TQ\Vcs\Repository\RepositoryInterface Returns the repository instance
getRepositoryPath ( ) : string Returns the absolute repository path
getUrl ( ) : string Returns the URL
hasArgument ( string $argument ) : boolean Checks if the given argument exists

Method Details

__construct() public method

Creates a new path information instance from a given URL
public __construct ( TQ\Vcs\Repository\RepositoryInterface $repository, string $url, string $fullPath, string $ref, array $arguments )
$repository TQ\Vcs\Repository\RepositoryInterface The repository instance
$url string The URL
$fullPath string The absolute path to the resource
$ref string The version ref
$arguments array The additional arguments given

getArgument() public method

Returns the given argument from the argument collection
public getArgument ( string $argument ) : string | null
$argument string The argument name
return string | null The argument value or NULL if the argument does not exist

getArguments() public method

Returns the additional arguments given
public getArguments ( ) : array
return array

getFullPath() public method

Returns the absolute path to the resource
public getFullPath ( ) : string
return string

getLocalPath() public method

Returns the relative path to the resource based on the repository path
public getLocalPath ( ) : string
return string

getRef() public method

Returns the version ref
public getRef ( ) : string
return string

getRepository() public method

Returns the repository instance
public getRepository ( ) : TQ\Vcs\Repository\RepositoryInterface
return TQ\Vcs\Repository\RepositoryInterface

getRepositoryPath() public method

Returns the absolute repository path
public getRepositoryPath ( ) : string
return string

getUrl() public method

Returns the URL
public getUrl ( ) : string
return string

hasArgument() public method

Checks if the given argument exists
public hasArgument ( string $argument ) : boolean
$argument string The argument name
return boolean

Property Details

$arguments protected property

Additional arguments
protected array $arguments
return array

$fullPath protected property

The absolute path to the resource
protected string $fullPath
return string

$localPath protected property

Lazy instantiated
protected string $localPath
return string

$ref protected property

The version ref
protected string $ref
return string

$repository protected property

The repository
protected RepositoryInterface,TQ\Vcs\Repository $repository
return TQ\Vcs\Repository\RepositoryInterface

$url protected property

The URL
protected string $url
return string