Server methods metadata

package Default

 Methods

Constructor

__construct(null|array $methods = null

Parameters

$methods

nullarray

Add method to definition

addMethod(array|\Zend\Server\Method\Definition $method, null|string $name = null) : \Zend\Server\Definition

Parameters

$method

array\Zend\Server\Method\Definition

$name

nullstring

Exceptions

\Zend\Server\Exception\InvalidArgumentException if duplicate or invalid method provided

Returns

\Zend\Server\Definition

Add multiple methods

addMethods(array $methods) : \Zend\Server\Definition

Parameters

$methods

array

Array of \Zend\Server\Method\Definition objects or arrays

Returns

\Zend\Server\Definition

Clear all method definitions

clearMethods() : \Zend\Server\Definition

Returns

\Zend\Server\Definition

Countable: count of methods

count() : integer

Returns

integer

Iterator: current item

current() : \Zend\Server\Method\Definition

Returns

\Zend\Server\Method\Definition

Get a given method definition

getMethod(string $method) : null | \Zend\Server\Method\Definition

Parameters

$method

string

Returns

null\Zend\Server\Method\Definition

Get all method definitions

getMethods() : array

Returns

arrayArray of \Zend\Server\Method\Definition objects

Does the definition have the given method?

hasMethod(string $method) : boolean

Parameters

$method

string

Returns

boolean

Iterator: current item key

key() : integer | string

Returns

integerstring

Iterator: advance to next method

next() : \Zend\Server\Method\Definition

Returns

\Zend\Server\Method\Definition

Remove a method definition

removeMethod(string $method) : \Zend\Server\Definition

Parameters

$method

string

Returns

\Zend\Server\Definition

Iterator: return to first method

rewind() : void

Set all methods at once (overwrite)

setMethods(array $methods) : \Zend\Server\Definition

Parameters

$methods

array

Array of \Zend\Server\Method\Definition objects or arrays

Returns

\Zend\Server\Definition

Set flag indicating whether or not overwriting existing methods is allowed

setOverwriteExistingMethods(mixed $flag) : \Zend\Server\Definition

Parameters

$flag

mixed

Returns

\Zend\Server\Definition

Cast definition to an array

toArray() : array

Returns

array

Iterator: is the current index valid?

valid() : boolean

Returns

boolean

 Properties

 

Array of \Zend\Server\Method\Definition objects

$methods : array

Default

array()
 

Whether or not overwriting existing methods is allowed

$overwriteExistingMethods : boolean

Default

false