Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
Definition Class Reference

Server methods metadata. More...

Public Member Functions

 __construct ($methods=null)
 Constructor.
 
 setOverwriteExistingMethods ($flag)
 Set flag indicating whether or not overwriting existing methods is allowed.
 
 addMethod ($method, $name=null)
 Add method to definition.
 
 addMethods (array $methods)
 Add multiple methods.
 
 setMethods (array $methods)
 Set all methods at once (overwrite)
 
 hasMethod ($method)
 Does the definition have the given method?
 
 getMethod ($method)
 Get a given method definition.
 
 getMethods ()
 Get all method definitions.
 
 removeMethod ($method)
 Remove a method definition.
 
 clearMethods ()
 Clear all method definitions.
 
 toArray ()
 Cast definition to an array.
 
 count ()
 Countable: count of methods.
 
 current ()
 Iterator: current item.
 
 key ()
 Iterator: current item key.
 
 next ()
 Iterator: advance to next method.
 
 rewind ()
 Iterator: return to first method.
 
 valid ()
 Iterator: is the current index valid?
 

Protected Attributes

 $methods = []
 
 $overwriteExistingMethods = false
 

Detailed Description

Server methods metadata.

Constructor & Destructor Documentation

__construct (   $methods = null)

Constructor.

Parameters
null | array$methods

Member Function Documentation

addMethod (   $method,
  $name = null 
)

Add method to definition.

Parameters
array | \Zend\Server\Method\Definition$method
null | string$name
Returns
Exceptions
\Zend\Server\Exception\InvalidArgumentExceptionif duplicate or invalid method provided
addMethods ( array  $methods)

Add multiple methods.

Parameters
array$methodsArray of objects or arrays
Returns
clearMethods ( )

Clear all method definitions.

Returns
count ( )

Countable: count of methods.

Returns
int
current ( )

Iterator: current item.

Returns
Method
getMethod (   $method)

Get a given method definition.

Parameters
string$method
Returns
null|
getMethods ( )

Get all method definitions.

Returns
array Array of objects
hasMethod (   $method)

Does the definition have the given method?

Parameters
string$method
Returns
bool
key ( )

Iterator: current item key.

Returns
int|string
next ( )

Iterator: advance to next method.

Returns
Method
removeMethod (   $method)

Remove a method definition.

Parameters
string$method
Returns
rewind ( )

Iterator: return to first method.

Returns
void
setMethods ( array  $methods)

Set all methods at once (overwrite)

Parameters
array$methodsArray of objects or arrays
Returns
setOverwriteExistingMethods (   $flag)

Set flag indicating whether or not overwriting existing methods is allowed.

Parameters
mixed$flag
Returns
toArray ( )

Cast definition to an array.

Returns
array
valid ( )

Iterator: is the current index valid?

Returns
bool

Member Data Documentation

$methods = []
protected
$overwriteExistingMethods = false
protected