PhalconRest\Api::mount PHP Метод

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

public mount ( Phalcon\Mvc\Micro\CollectionInterface $collection )
$collection Phalcon\Mvc\Micro\CollectionInterface
    public function mount(CollectionInterface $collection)
    {
        if ($collection instanceof ApiCollection) {
            $collectionName = $collection->getName();
            if (!is_null($collectionName)) {
                $this->collectionsByName[$collectionName] = $collection;
            }
            $this->collectionsByIdentifier[$collection->getIdentifier()] = $collection;
            /** @var ApiEndpoint $endpoint */
            foreach ($collection->getEndpoints() as $endpoint) {
                $fullIdentifier = $collection->getIdentifier() . ' ' . $endpoint->getIdentifier();
                $this->endpointsByIdentifier[$fullIdentifier] = $endpoint;
            }
        }
        return parent::mount($collection);
    }