Zend\Mvc\Controller\AbstractRestfulController::patchList PHP Метод

patchList() публичный Метод

Not marked as abstract, as that would introduce a BC break (introduced in 2.2.0); instead, raises an exception if not implemented.
public patchList ( mixed $data ) : mixed
$data mixed
Результат mixed
    public function patchList($data)
    {
        $this->response->setStatusCode(405);
        return ['content' => 'Method Not Allowed'];
    }

Usage Example

Пример #1
0
 /**
  * Modify an entire resource collection
  *
  * @param  array|\Traversable $items
  * @return array|\Traversable
  */
 public function patchList($items)
 {
     //This isn't great code to have in a test class, but I seems the simplest without BC breaks.
     if (isset($items['name']) && $items['name'] == 'testDispatchViaPatchWithoutIdentifierReturns405ResponseIfPatchListThrowsException') {
         parent::patchList($items);
     }
     return $items;
 }