src/Shared/Extension/ExtensionAwareTrait.php
public function addExtension(
        ExtensionInterface $ext,
        /*# bool */ $forceOverride = false
    ) {
        foreach ($ext->methodsAvailable() as $method) {
            if (isset($this->extension_methods[$method]) &&
                !$forceOverride) {
                throw new LogicException(
                    Message::get(Message::MSG_EXTENSION_METHOD, $method),
                    Message::MSG_EXTENSION_METHOD
                );
            }
            $this->extension_methods[$method] = $ext;
        }
        $ext->boot($this);
        return $this;
    }
public function addExtension(
        ExtensionInterface $ext,
        /*# bool */ $forceOverride = false
    ) {
        foreach ($ext->methodsAvailable() as $method) {
            if (isset($this->extension_methods[$method]) &&
                !$forceOverride) {
                throw new LogicException(
                    Message::get(Message::MSG_EXTENSION_METHOD, $method),
                    Message::MSG_EXTENSION_METHOD
                );
            }
            $this->extension_methods[$method] = $ext;
        }
        $ext->boot($this);
        return $this;
    }
public function addExtension ( ExtensionInterface $ ext , /*# bool */ $ forceOverride = false ) { foreach ( $ ext -> methodsAvailable ( ) as $ method ) { if ( isset ( $ this -> extension_methods [ $ method ] ) && ! $ forceOverride ) { throw new LogicException ( Message :: get ( Message :: MSG_EXTENSION_METHOD , $ method ) , Message :: MSG_EXTENSION_METHOD ) ; } $ this -> extension_methods [ $ method ] = $ ext ; } $ ext -> boot ( $ this ) ; return $ this ; }
{@inheritDoc}
{