Server/Definition.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Server
- Version
- $Id$
\Zend_Server_Definition
Package: Zend_Server
Server methods metadata
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Todo
- Implement iterator
Properties
array $_methods = array()
Array of Zend_Server_Method_Definition objects
Default value
array()
Details- Type
- array
Methods
__construct(null | array $methods = null) : void
Constructor
Parameters
Name | Type | Description |
---|---|---|
$methods | null | array |
addMethod(array | \Zend_Server_Method_Definition $method, null | string $name = null) : \Zend_Server_Definition
Add method to definition
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$method | array | \Zend_Server_Method_Definition | |
$name | null | string |
Type | Description |
---|---|
\Zend_Server_Definition |
Exception | Description |
---|---|
\Zend_Server_Exception | if duplicate or invalid method provided |
addMethods(array $methods) : \Zend_Server_Definition
Add multiple methods
Parameters
Returns
Name | Type | Description |
---|---|---|
$methods | array | Array of Zend_Server_Method_Definition objects or arrays |
Type | Description |
---|---|
\Zend_Server_Definition |
clearMethods() : \Zend_Server_Definition
Clear all method definitions
Returns
Type | Description |
---|---|
\Zend_Server_Definition |
getMethod(string $method) : null | \Zend_Server_Method_Definition
Get a given method definition
Parameters
Returns
Name | Type | Description |
---|---|---|
$method | string |
Type | Description |
---|---|
null | \Zend_Server_Method_Definition |
getMethods() : array
Get all method definitions
Returns
Type | Description |
---|---|
array | Array of Zend_Server_Method_Definition objects |
hasMethod(string $method) : bool
Does the definition have the given method?
Parameters
Returns
Name | Type | Description |
---|---|---|
$method | string |
Type | Description |
---|---|
bool |
removeMethod(string $method) : \Zend_Server_Definition
Remove a method definition
Parameters
Returns
Name | Type | Description |
---|---|---|
$method | string |
Type | Description |
---|---|
\Zend_Server_Definition |
setMethods(array $methods) : \Zend_Server_Definition
Set all methods at once (overwrite)
Parameters
Returns
Name | Type | Description |
---|---|---|
$methods | array | Array of Zend_Server_Method_Definition objects or arrays |
Type | Description |
---|---|
\Zend_Server_Definition |
setOverwriteExistingMethods(mixed $flag) : void
Set flag indicating whether or not overwriting existing methods is allowed
Parameters
Name | Type | Description |
---|---|---|
$flag | mixed |