public function addSource($adapter, Request $request = null)
    {
        if ($request === null) {
            $request = new Request();
        }

        $this->addDefinition(
            'sources',
            array((is_callable($adapter) ? new CallbackAdapter($adapter, null) : $adapter), $request)
        );

        return $this;
    }
public function addSource($adapter, Request $request = null)
    {
        if ($request === null) {
            $request = new Request();
        }

        $this->addDefinition(
            'sources',
            array((is_callable($adapter) ? new CallbackAdapter($adapter, null) : $adapter), $request)
        );

        return $this;
    }
public function addSource ( $ adapter , Request $ request = null ) { if ( $ request === null ) { $ request = new Request ( ) ; } $ this -> addDefinition ( 'sources' , array ( ( is_callable ( $ adapter ) ? new CallbackAdapter ( $ adapter , null ) : $ adapter ) , $ request ) ) ; return $ this ; }
Adds a source instruction to a procedure.

@param SourceAdapterInterface|callable $adapter Source adapter
@param Request                         $request Request sent to source adapter

@return $this
Adds a source instruction to a procedure .