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;
    }
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;
    }
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 ; }
Returns collection with default values

@param string $prefix Prefix for the collection (e.g. /auth)
@param string $name Name for the collection (e.g. authentication) (optional)

@return static
Returns collection with default values