PhalconRest\Export\Documentation::addManyCollections PHP Method

addManyCollections() public method

public addManyCollections ( array $collections )
$collections array
    public function addManyCollections(array $collections)
    {
        /** @var ApiCollection $collection */
        foreach ($collections as $collection) {
            $this->addCollection($collection);
        }
    }

Usage Example

 public function documentation()
 {
     /** @var \Phalcon\Config $config */
     $config = $this->di->get(Services::CONFIG);
     $documentation = new Documentation($config->application->title, $config->hostName);
     $documentation->addManyCollections($this->application->getCollections());
     $documentation->addManyRoutes($this->application->getRouter()->getRoutes());
     return $this->createItemResponse($documentation, new DocumentationTransformer(), 'documentation');
 }