PHP 클래스 Zend\Mvc\Controller\Plugin\AcceptableViewModelSelector

상속: extends Zend\Mvc\Controller\Plugin\AbstractPlugin
파일 보기 프로젝트 열기: zendframework/zend-mvc

보호된 프로퍼티들

프로퍼티 타입 설명
$defaultMatchAgainst Array Default array to match against.
$defaultViewModelName Default ViewModel
$event Zend\Mvc\MvcEvent
$request Zend\Http\Request

공개 메소드들

메소드 설명
__invoke ( array $matchAgainst = null, boolean $returnDefault = true, Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null &$resultReference = null ) : Zend\View\Model\ModelInterface | null Detects an appropriate viewmodel for request.
getDefaultMatchAgainst ( ) : array | null Get the default Accept Types and View Model combinations to match against if none are specified.
getDefaultViewModelName ( ) : string Set the default View Model (name) to return if no match could be made
getViewModel ( array $matchAgainst = null, boolean $returnDefault = true, Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null &$resultReference = null ) : Zend\View\Model\ModelInterface | null Detects an appropriate viewmodel for request.
getViewModelName ( array $matchAgainst = null, boolean $returnDefault = true, Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null &$resultReference = null ) : Zend\View\Model\ModelInterface | null Detects an appropriate viewmodel name for request.
match ( array $matchAgainst = null ) : Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null Detects an appropriate viewmodel name for request.
setDefaultMatchAgainst ( array $matchAgainst = null ) : AcceptableViewModelSelector Set the default Accept Types and View Model combinations to match against if none are specified.
setDefaultViewModelName ( string $defaultViewModelName ) : AcceptableViewModelSelector Set the default View Model (name) to return if no match could be made

보호된 메소드들

메소드 설명
extractViewModelName ( Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart $res ) : string Extract the viewmodel name from a match
getEvent ( ) : MvcEvent Get the event
getRequest ( ) : Zend\Http\Request Get the request
injectViewModelName ( string $modelAcceptString, string $modelName ) : string Inject the viewmodel name into the accept header string

메소드 상세

__invoke() 공개 메소드

Detects an appropriate viewmodel for request.
public __invoke ( array $matchAgainst = null, boolean $returnDefault = true, Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null &$resultReference = null ) : Zend\View\Model\ModelInterface | null
$matchAgainst array (optional) The Array to match against
$returnDefault boolean (optional) If no match is available. Return default instead
$resultReference Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null (optional) The object that was matched
리턴 Zend\View\Model\ModelInterface | null

extractViewModelName() 보호된 메소드

Extract the viewmodel name from a match
protected extractViewModelName ( Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart $res ) : string
$res Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart
리턴 string

getDefaultMatchAgainst() 공개 메소드

Get the default Accept Types and View Model combinations to match against if none are specified.
public getDefaultMatchAgainst ( ) : array | null
리턴 array | null

getDefaultViewModelName() 공개 메소드

Set the default View Model (name) to return if no match could be made
public getDefaultViewModelName ( ) : string
리턴 string

getEvent() 보호된 메소드

Get the event
protected getEvent ( ) : MvcEvent
리턴 Zend\Mvc\MvcEvent

getRequest() 보호된 메소드

Get the request
protected getRequest ( ) : Zend\Http\Request
리턴 Zend\Http\Request

getViewModel() 공개 메소드

Detects an appropriate viewmodel for request.
public getViewModel ( array $matchAgainst = null, boolean $returnDefault = true, Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null &$resultReference = null ) : Zend\View\Model\ModelInterface | null
$matchAgainst array (optional) The Array to match against
$returnDefault boolean (optional) If no match is available. Return default instead
$resultReference Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null (optional) The object that was matched
리턴 Zend\View\Model\ModelInterface | null

getViewModelName() 공개 메소드

Detects an appropriate viewmodel name for request.
public getViewModelName ( array $matchAgainst = null, boolean $returnDefault = true, Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null &$resultReference = null ) : Zend\View\Model\ModelInterface | null
$matchAgainst array (optional) The Array to match against
$returnDefault boolean (optional) If no match is available. Return default instead
$resultReference Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null (optional) The object that was matched.
리턴 Zend\View\Model\ModelInterface | null Returns null if $returnDefault = false and no match could be made

injectViewModelName() 보호된 메소드

Inject the viewmodel name into the accept header string
protected injectViewModelName ( string $modelAcceptString, string $modelName ) : string
$modelAcceptString string
$modelName string
리턴 string

match() 공개 메소드

Detects an appropriate viewmodel name for request.
public match ( array $matchAgainst = null ) : Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null
$matchAgainst array (optional) The Array to match against
리턴 Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null The object that was matched

setDefaultMatchAgainst() 공개 메소드

Set the default Accept Types and View Model combinations to match against if none are specified.
public setDefaultMatchAgainst ( array $matchAgainst = null ) : AcceptableViewModelSelector
$matchAgainst array (optional) The Array to match against
리턴 AcceptableViewModelSelector provides fluent interface

setDefaultViewModelName() 공개 메소드

Set the default View Model (name) to return if no match could be made
public setDefaultViewModelName ( string $defaultViewModelName ) : AcceptableViewModelSelector
$defaultViewModelName string The default View Model name
리턴 AcceptableViewModelSelector provides fluent interface

프로퍼티 상세

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

Default array to match against.
protected Array $defaultMatchAgainst
리턴 Array

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

Default ViewModel
protected $defaultViewModelName

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

protected MvcEvent,Zend\Mvc $event
리턴 Zend\Mvc\MvcEvent

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

protected Request,Zend\Http $request
리턴 Zend\Http\Request