src/TerminalObject/Router/Router.php
public function addExtension($key, $class)
    {
        $extension = new ExtensionCollection($key, $class);

        foreach ($extension->collection() as $obj_type => $collection) {
            foreach ($collection as $obj_key => $obj_class) {
                $this->{$obj_type}->addExtension($obj_key, $obj_class);
            }
        }
    }
public function addExtension($key, $class)
    {
        $extension = new ExtensionCollection($key, $class);

        foreach ($extension->collection() as $obj_type => $collection) {
            foreach ($collection as $obj_key => $obj_class) {
                $this->{$obj_type}->addExtension($obj_key, $obj_class);
            }
        }
    }
public function addExtension ( $ key , $ class ) { $ extension = new ExtensionCollection ( $ key , $ class ) ; foreach ( $ extension -> collection ( ) as $ obj_type => $ collection ) { foreach ( $ collection as $ obj_key => $ obj_class ) { $ this -> { $ obj_type } -> addExtension ( $ obj_key , $ obj_class ) ; } } }
Register a custom class with the router

@param string $key
@param string $class
Register a custom class with the router