src/Application/Application.php
public function executeUnitExtenders(string $unit)
    {
        $extenders = $this->getService('unit-extenders');

        if (!is_array($extenders)) {
            return;
        }

        foreach ($extenders as $extender) {
            if (!class_exists($extender)) {
                continue;
            }

            /** @var Resolver $resolver */
            $resolver = $this->getService('resolver');

            try {
                $resolver->resolve(
                    $extender,
                    Extender::EXECUTE_METHOD,
                    $this
                );
            } catch (Base $e) {
                $this->getService('response-handler')
                    ->setContent(new Content($e->getMessage()))
                    ->send();
            }
        }
    }
public function executeUnitExtenders(string $unit)
    {
        $extenders = $this->getService('unit-extenders');

        if (!is_array($extenders)) {
            return;
        }

        foreach ($extenders as $extender) {
            if (!class_exists($extender)) {
                continue;
            }

            /** @var Resolver $resolver */
            $resolver = $this->getService('resolver');

            try {
                $resolver->resolve(
                    $extender,
                    Extender::EXECUTE_METHOD,
                    $this
                );
            } catch (Base $e) {
                $this->getService('response-handler')
                    ->setContent(new Content($e->getMessage()))
                    ->send();
            }
        }
    }
public function executeUnitExtenders ( string $ unit ) { $ extenders = $ this -> getService ( 'unit-extenders' ) ; if ( ! is_array ( $ extenders ) ) { return ; } foreach ( $ extenders as $ extender ) { if ( ! class_exists ( $ extender ) ) { continue ; } /** @var Resolver $resolver */ $ resolver = $ this -> getService ( 'resolver' ) ; try { $ resolver -> resolve ( $ extender , Extender :: EXECUTE_METHOD , $ this ) ; } catch ( Base $ e ) { $ this -> getService ( 'response-handler' ) -> setContent ( new Content ( $ e -> getMessage ( ) ) ) -> send ( ) ; } } }
Execute unit extenders

@param string $unit
Execute unit extenders