public static function factory($prefix, $name = null)
    {
        $calledClass = get_called_class();

        /** @var \PhalconRest\Api\ApiCollection $collection */
        $collection = new $calledClass($prefix);

        if ($name) {
            $collection->name($name);
        }

        return $collection;
    }