Source of file Method.php
Size: 1,631 Bytes - Last Modified: 2013-07-09T11:29:53+02:00
/home/theseer/Downloads/Symfony/vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/Configuration/Method.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 | <?php namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * The Method class handles the @Method annotation parts. * * @author Fabien Potencier <fabien@symfony.com> * @Annotation */ class Method extends ConfigurationAnnotation { /** * An array of restricted HTTP methods. * * @var array */ protected $methods = array(); /** * Returns the array of HTTP methods. * * @return array */ public function getMethods() { return $this->methods; } /** * Sets the HTTP methods. * * @param array|string $methods An HTTP method or an array of HTTP methods */ public function setMethods($methods) { $this->methods = is_array($methods) ? $methods : array($methods); } /** * Sets the HTTP methods. * * @param array|string $methods An HTTP method or an array of HTTP methods */ public function setValue($methods) { $this->setMethods($methods); } /** * Returns the annotation alias name. * * @return string * @see ConfigurationInterface */ public function getAliasName() { return 'method'; } /** * Only one cache directive is allowed * * @return Boolean * @see ConfigurationInterface */ public function allowArray() { return false; } } |