protected static function prepare(Collection &$collection, $component)
    {
        $instance = new $component;

        $type = $instance->type();

        if (empty($type) === false) {
            $parameters = array($instance->get());

            $type === 'http' && $parameters = $instance->get();

            $class = array($collection, 'set' . ucfirst($type));

            call_user_func_array($class, $parameters);
        }

        return $instance;
    }
protected static function prepare(Collection &$collection, $component)
    {
        $instance = new $component;

        $type = $instance->type();

        if (empty($type) === false) {
            $parameters = array($instance->get());

            $type === 'http' && $parameters = $instance->get();

            $class = array($collection, 'set' . ucfirst($type));

            call_user_func_array($class, $parameters);
        }

        return $instance;
    }
protected static function prepare ( Collection & $ collection , $ component ) { $ instance = new $ component ; $ type = $ instance -> type ( ) ; if ( empty ( $ type ) === false ) { $ parameters = array ( $ instance -> get ( ) ) ; $ type === 'http' && $ parameters = $ instance -> get ( ) ; $ class = array ( $ collection , 'set' . ucfirst ( $ type ) ) ; call_user_func_array ( $ class , $ parameters ) ; } return $ instance ; }
Prepares the component and sets it to the collection.

@param  \Rougin\Slytherin\Component\Collection &$collection
@param  string                                 $component
@return \Rougin\Slytherin\Integration\IntegrationInterface
Prepares the component and sets it to the collection .