public function addInterface(CNabuProviderInterfaceDescriptor $nb_descriptor)
    {
        $interface_type = $nb_descriptor->getType();

        if (!array_key_exists($interface_type, $this->nb_interface_list)) {
            throw new ENabuProviderException(
                ENabuProviderException::ERROR_INTERFACE_TYPE_NOT_EXISTS,
                array(print_r($interface_type, true))
            );
        }

        $retval = $this->nb_interface_list[$interface_type]->addItem($nb_descriptor);
        if ($retval === false) {
            throw new ENabuProviderException(
                ENabuProviderException::ERROR_INTERFACE_ALREADY_REGISTERED, array($nb_descriptor->getClassName())
            );
        }

        return $retval;
    }
public function addInterface(CNabuProviderInterfaceDescriptor $nb_descriptor)
    {
        $interface_type = $nb_descriptor->getType();

        if (!array_key_exists($interface_type, $this->nb_interface_list)) {
            throw new ENabuProviderException(
                ENabuProviderException::ERROR_INTERFACE_TYPE_NOT_EXISTS,
                array(print_r($interface_type, true))
            );
        }

        $retval = $this->nb_interface_list[$interface_type]->addItem($nb_descriptor);
        if ($retval === false) {
            throw new ENabuProviderException(
                ENabuProviderException::ERROR_INTERFACE_ALREADY_REGISTERED, array($nb_descriptor->getClassName())
            );
        }

        return $retval;
    }
public function addInterface ( CNabuProviderInterfaceDescriptor $ nb_descriptor ) { $ interface_type = $ nb_descriptor -> getType ( ) ; if ( ! array_key_exists ( $ interface_type , $ this -> nb_interface_list ) ) { throw new ENabuProviderException ( ENabuProviderException :: ERROR_INTERFACE_TYPE_NOT_EXISTS , array ( print_r ( $ interface_type , true ) ) ) ; } $ retval = $ this -> nb_interface_list [ $ interface_type ] -> addItem ( $ nb_descriptor ) ; if ( $ retval === false ) { throw new ENabuProviderException ( ENabuProviderException :: ERROR_INTERFACE_ALREADY_REGISTERED , array ( $ nb_descriptor -> getClassName ( ) ) ) ; } return $ retval ; }
Adds an interface to the interfaces list.
@param CNabuProviderInterfaceDescriptor $nb_descriptor Descriptor instance of the interface.
@return bool Returns true if the interface is registered.
Adds an interface to the interfaces list .