PHP Class Zend\Mvc\HttpMethodListener

Inheritance: extends Zend\EventManager\AbstractListenerAggregate
Show file Open project: zendframework/zend-mvc

Protected Properties

Property Type Description
$allowedMethods array
$enabled boolean

Public Methods

Method Description
__construct ( boolean $enabled = true, array $allowedMethods = [] )
attach ( Zend\EventManager\EventManagerInterface $events, $priority = 1 )
getAllowedMethods ( ) : array
isEnabled ( ) : boolean
onRoute ( MvcEvent $e ) : void | Zend\Http\Response
setAllowedMethods ( array $allowedMethods )
setEnabled ( boolean $enabled )

Method Details

__construct() public method

public __construct ( boolean $enabled = true, array $allowedMethods = [] )
$enabled boolean
$allowedMethods array

attach() public method

public attach ( Zend\EventManager\EventManagerInterface $events, $priority = 1 )
$events Zend\EventManager\EventManagerInterface

getAllowedMethods() public method

public getAllowedMethods ( ) : array
return array

isEnabled() public method

public isEnabled ( ) : boolean
return boolean

onRoute() public method

public onRoute ( MvcEvent $e ) : void | Zend\Http\Response
$e MvcEvent
return void | Zend\Http\Response

setAllowedMethods() public method

public setAllowedMethods ( array $allowedMethods )
$allowedMethods array

setEnabled() public method

public setEnabled ( boolean $enabled )
$enabled boolean

Property Details

$allowedMethods protected property

protected array $allowedMethods
return array

$enabled protected property

protected bool $enabled
return boolean