PHP Class ZF\Console\Route

Inheritance: extends Zend\Console\RouteMatcher\DefaultRouteMatcher
Show file Open project: zfcampus/zf-console Class Usage Examples

Protected Properties

Property Type Description
$description string
$matches null | array
$name string
$optionsDescription array
$route string
$shortDescription string

Public Methods

Method Description
__construct ( string $name, string $route, array $constraints = [], array $defaults = [], array $aliases = [], array $filters = null, array $validators = null )
getDescription ( ) : string
getMatchedParam ( string $param, mixed $default = null ) : mixed Retrieve a matched parameter
getMatches ( ) : null | array
getName ( ) : string
getOptionsDescription ( ) : array
getRoute ( ) : string
getShortDescription ( ) : string
isMatched ( ) : boolean
match ( array $params ) : array | null Override match()
matchedParam ( string $param ) : boolean Was the parameter matched?
setDescription ( string $description ) : self
setOptionsDescription ( array $descriptions ) : self
setShortDescription ( string $description ) : self

Method Details

__construct() public method

public __construct ( string $name, string $route, array $constraints = [], array $defaults = [], array $aliases = [], array $filters = null, array $validators = null )
$name string
$route string Route string to match
$constraints array Argument constraints (optional)
$defaults array Argument default values (optional)
$aliases array
$filters array Filters to use for specific arguments (optional)
$validators array Filters to use for specific arguments (optional)

getDescription() public method

public getDescription ( ) : string
return string

getMatchedParam() public method

Retrieve a matched parameter
public getMatchedParam ( string $param, mixed $default = null ) : mixed
$param string
$default mixed
return mixed

getMatches() public method

public getMatches ( ) : null | array
return null | array

getName() public method

public getName ( ) : string
return string

getOptionsDescription() public method

public getOptionsDescription ( ) : array
return array

getRoute() public method

public getRoute ( ) : string
return string

getShortDescription() public method

public getShortDescription ( ) : string
return string

isMatched() public method

public isMatched ( ) : boolean
return boolean

match() public method

If matched, set the matches in the route
public match ( array $params ) : array | null
$params array
return array | null

matchedParam() public method

Was the parameter matched?
public matchedParam ( string $param ) : boolean
$param string
return boolean

setDescription() public method

public setDescription ( string $description ) : self
$description string
return self

setOptionsDescription() public method

public setOptionsDescription ( array $descriptions ) : self
$descriptions array
return self

setShortDescription() public method

public setShortDescription ( string $description ) : self
$description string
return self

Property Details

$description protected property

protected string $description
return string

$matches protected property

protected null|array $matches
return null | array

$name protected property

protected string $name
return string

$optionsDescription protected property

protected array $optionsDescription
return array

$route protected property

protected string $route
return string

$shortDescription protected property

protected string $shortDescription
return string