Paradox/toolbox/CollectionManager.php
public function createCapConstraint($collection, $size)
    {
        try {
            $result = $this->_toolbox->getCollectionHandler()->createCapConstraint($collection, $size);

            return $this->_toolbox->parseIdForKey($result['id']);
        } catch (\Exception $e) {
            $normalised = $this->_toolbox->normaliseDriverExceptions($e);
            throw new CollectionManagerException($normalised['message'], $normalised['code']);
        }
    }
public function createCapConstraint($collection, $size)
    {
        try {
            $result = $this->_toolbox->getCollectionHandler()->createCapConstraint($collection, $size);

            return $this->_toolbox->parseIdForKey($result['id']);
        } catch (\Exception $e) {
            $normalised = $this->_toolbox->normaliseDriverExceptions($e);
            throw new CollectionManagerException($normalised['message'], $normalised['code']);
        }
    }
Create a cap constraint on a collection.
@param  string                     $collection The name of the collection.
@param  int                        $size       The size of the cap constraint.
@link http://www.arangodb.org/manuals/current/IndexCapHttp.html
@throws CollectionManagerException
@return int                        Id of the index created.