code/dispatcher/response/abstract.php
public function getTransport($transport, $config = array())
    {
        //Create the complete identifier if a partial identifier was passed
        if (is_string($transport) && strpos($transport, '.') === false)
        {
            $identifier = $this->getIdentifier()->toArray();

            if($identifier['package'] != 'dispatcher') {
                $identifier['path'] = array('dispatcher', 'response', 'transport');
            } else {
                $identifier['path'] = array('response', 'transport');
            }

            $identifier['name'] = $transport;
            $identifier = $this->getIdentifier($identifier);
        }
        else $identifier = $this->getIdentifier($transport);

        if (!isset($this->_transports[$identifier->name]))
        {
            $transport = $this->getObject($identifier, array_merge($config, array('response' => $this)));

            if (!($transport instanceof DispatcherResponseTransportInterface))
            {
                throw new \UnexpectedValueException(
                    "Transport handler $identifier does not implement DispatcherResponseTransportInterface"
                );
            }

            $this->_transports[$transport->getIdentifier()->name] = $transport;
        }
        else $transport = $this->_transports[$identifier->name];

        return $transport;
    }
public function getTransport($transport, $config = array())
    {
        //Create the complete identifier if a partial identifier was passed
        if (is_string($transport) && strpos($transport, '.') === false)
        {
            $identifier = $this->getIdentifier()->toArray();

            if($identifier['package'] != 'dispatcher') {
                $identifier['path'] = array('dispatcher', 'response', 'transport');
            } else {
                $identifier['path'] = array('response', 'transport');
            }

            $identifier['name'] = $transport;
            $identifier = $this->getIdentifier($identifier);
        }
        else $identifier = $this->getIdentifier($transport);

        if (!isset($this->_transports[$identifier->name]))
        {
            $transport = $this->getObject($identifier, array_merge($config, array('response' => $this)));

            if (!($transport instanceof DispatcherResponseTransportInterface))
            {
                throw new \UnexpectedValueException(
                    "Transport handler $identifier does not implement DispatcherResponseTransportInterface"
                );
            }

            $this->_transports[$transport->getIdentifier()->name] = $transport;
        }
        else $transport = $this->_transports[$identifier->name];

        return $transport;
    }
public function getTransport ( $ transport , $ config = array ( ) ) { //Create the complete identifier if a partial identifier was passed if ( is_string ( $ transport ) && strpos ( $ transport , '.' ) === false ) { $ identifier = $ this -> getIdentifier ( ) -> toArray ( ) ; if ( $ identifier [ 'package' ] != 'dispatcher' ) { $ identifier [ 'path' ] = array ( 'dispatcher' , 'response' , 'transport' ) ; } else { $ identifier [ 'path' ] = array ( 'response' , 'transport' ) ; } $ identifier [ 'name' ] = $ transport ; $ identifier = $ this -> getIdentifier ( $ identifier ) ; } else $ identifier = $ this -> getIdentifier ( $ transport ) ; if ( ! isset ( $ this -> _transports [ $ identifier -> name ] ) ) { $ transport = $ this -> getObject ( $ identifier , array_merge ( $ config , array ( 'response' => $ this ) ) ) ; if ( ! ( $ transport instanceof DispatcherResponseTransportInterface ) ) { throw new \ UnexpectedValueException ( "Transport handler $identifier does not implement DispatcherResponseTransportInterface" ) ; } $ this -> _transports [ $ transport -> getIdentifier ( ) -> name ] = $ transport ; } else $ transport = $ this -> _transports [ $ identifier -> name ] ; return $ transport ; }
Get a transport handler by identifier

@param   mixed $transport An object that implements ObjectInterface, ObjectIdentifier object
or valid identifier string
@param   array $config An optional associative array of configuration settings
@throws \UnexpectedValueException
@return DispatcherResponseAbstract
Get a transport handler by identifier