src/main/php/ConsoleApp.php
protected static function getBindingsForApp(string $className): array
    {
        $bindings   = parent::getBindingsForApp($className);
        $bindings[] = function(Binder $binder)
        {
            $binder->bind(InputStream::class)
                   ->named('stdin')
                   ->toInstance(ConsoleInputStream::forIn());
            $binder->bind(OutputStream::class)
                   ->named('stdout')
                   ->toInstance(ConsoleOutputStream::forOut());
            $binder->bind(OutputStream::class)
                   ->named('stderr')
                   ->toInstance(ConsoleOutputStream::forError());
        };
        return $bindings;
    }
protected static function getBindingsForApp(string $className): array
    {
        $bindings   = parent::getBindingsForApp($className);
        $bindings[] = function(Binder $binder)
        {
            $binder->bind(InputStream::class)
                   ->named('stdin')
                   ->toInstance(ConsoleInputStream::forIn());
            $binder->bind(OutputStream::class)
                   ->named('stdout')
                   ->toInstance(ConsoleOutputStream::forOut());
            $binder->bind(OutputStream::class)
                   ->named('stderr')
                   ->toInstance(ConsoleOutputStream::forError());
        };
        return $bindings;
    }
protected static function getBindingsForApp ( string $ className ) : array { $ bindings = parent :: getBindingsForApp ( $ className ) ; $ bindings [ ] = function ( Binder $ binder ) { $ binder -> bind ( InputStream :: class ) -> named ( 'stdin' ) -> toInstance ( ConsoleInputStream :: forIn ( ) ) ; $ binder -> bind ( OutputStream :: class ) -> named ( 'stdout' ) -> toInstance ( ConsoleOutputStream :: forOut ( ) ) ; $ binder -> bind ( OutputStream :: class ) -> named ( 'stderr' ) -> toInstance ( ConsoleOutputStream :: forError ( ) ) ; } ; return $ bindings ; }
creates list of bindings from given class

@internal
@param   string  $className    full qualified class name of class to create an instance of
@return  \stubbles\ioc\module\BindingModule[]
creates list of bindings from given class