PHP 클래스 Visithor\Generator\UrlGenerator

파일 보기 프로젝트 열기: visithor/visithor 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$urlChainFactory Visithor\Factory\UrlChainFactory UrlChain factory
$urlFactory Visithor\Factory\UrlFactory Url factory

공개 메소드들

메소드 설명
__construct ( UrlFactory $urlFactory, UrlChainFactory $urlChainFactory ) Construct
generate ( array $config ) : UrlChain Given a configuration array, generates a chain of urls

보호된 메소드들

메소드 설명
createUrlChainFromConfig ( array $config, array $defaultHTTPCodes, array $defaultOptions ) : Url[] Given a config array, create an URLChain instance filled with all defined URL instances.
getDefaultHTTPCodes ( array $config ) : string[] Get default http Codes
getDefaultOptions ( array $config ) : array Get default options
getUrlHTTPCodesFromConfig ( mixed $urlConfig, array $defaultHTTPCodes ) : string[] Get url HTTP Codes given its configuration
getUrlInstanceFromConfig ( mixed $urlConfig, array $defaultHTTPCodes, array $defaultOptions, array $profiles ) : URL Get Url instance given its configuration
getUrlOptionsFromConfig ( mixed $urlConfig, array $defaultOptions ) : string[] Get url options
getUrlPathFromConfig ( mixed $urlConfig ) : string Build the url given the configuration data

메소드 상세

__construct() 공개 메소드

Construct
public __construct ( UrlFactory $urlFactory, UrlChainFactory $urlChainFactory )
$urlFactory Visithor\Factory\UrlFactory Url factory
$urlChainFactory Visithor\Factory\UrlChainFactory UrlChain factory

createUrlChainFromConfig() 보호된 메소드

Given a config array, create an URLChain instance filled with all defined URL instances.
protected createUrlChainFromConfig ( array $config, array $defaultHTTPCodes, array $defaultOptions ) : Url[]
$config array Configuration
$defaultHTTPCodes array Array of HTTP Codes
$defaultOptions array Default options
리턴 Visithor\Model\Url[] Array of URL instances

generate() 공개 메소드

Given a configuration array, generates a chain of urls
public generate ( array $config ) : UrlChain
$config array Configuration
리턴 Visithor\Model\UrlChain Chain of URL instances

getDefaultHTTPCodes() 보호된 메소드

Get default http Codes
protected getDefaultHTTPCodes ( array $config ) : string[]
$config array Configuration
리턴 string[] Array of HTTP Codes

getDefaultOptions() 보호된 메소드

Get default options
protected getDefaultOptions ( array $config ) : array
$config array Configuration
리턴 array Default options

getUrlHTTPCodesFromConfig() 보호된 메소드

Get url HTTP Codes given its configuration
protected getUrlHTTPCodesFromConfig ( mixed $urlConfig, array $defaultHTTPCodes ) : string[]
$urlConfig mixed Url configuration
$defaultHTTPCodes array Array of HTTP Codes
리턴 string[] Set of HTTP Codes

getUrlInstanceFromConfig() 보호된 메소드

Get Url instance given its configuration
protected getUrlInstanceFromConfig ( mixed $urlConfig, array $defaultHTTPCodes, array $defaultOptions, array $profiles ) : URL
$urlConfig mixed Url configuration
$defaultHTTPCodes array Array of HTTP Codes
$defaultOptions array Default options
$profiles array Profiles
리턴 URL Url instance

getUrlOptionsFromConfig() 보호된 메소드

Get url options
protected getUrlOptionsFromConfig ( mixed $urlConfig, array $defaultOptions ) : string[]
$urlConfig mixed Url configuration
$defaultOptions array Default options
리턴 string[] Set of HTTP Codes

getUrlPathFromConfig() 보호된 메소드

Build the url given the configuration data
protected getUrlPathFromConfig ( mixed $urlConfig ) : string
$urlConfig mixed Url configuration
리턴 string Route path

프로퍼티 상세

$urlChainFactory 보호되어 있는 프로퍼티

UrlChain factory
protected UrlChainFactory,Visithor\Factory $urlChainFactory
리턴 Visithor\Factory\UrlChainFactory

$urlFactory 보호되어 있는 프로퍼티

Url factory
protected UrlFactory,Visithor\Factory $urlFactory
리턴 Visithor\Factory\UrlFactory