public static function getInput(IOInterface $io)
    {
        $ref = new \ReflectionClass($io);

        if ($ref->hasProperty('input')) {
            $prop = $ref->getProperty('input');
            $prop->setAccessible(true);
            $input = $prop->getValue($io);

            if ($input instanceof InputInterface) {
                return $input;
            }
        }

        return new ArgvInput();
    }
public static function getInput(IOInterface $io)
    {
        $ref = new \ReflectionClass($io);

        if ($ref->hasProperty('input')) {
            $prop = $ref->getProperty('input');
            $prop->setAccessible(true);
            $input = $prop->getValue($io);

            if ($input instanceof InputInterface) {
                return $input;
            }
        }

        return new ArgvInput();
    }
public static function getInput ( IOInterface $ io ) { $ ref = new \ ReflectionClass ( $ io ) ; if ( $ ref -> hasProperty ( 'input' ) ) { $ prop = $ ref -> getProperty ( 'input' ) ; $ prop -> setAccessible ( true ) ; $ input = $ prop -> getValue ( $ io ) ; if ( $ input instanceof InputInterface ) { return $ input ; } } return new ArgvInput ( ) ; }
Get the console input.

@param IOInterface $io The IO

@return InputInterface
Get the console input .