src/Environaut/Command/Command.php
protected function autoload($class)
    {
        $class = str_replace('\\', DIRECTORY_SEPARATOR, $class);

        $autoload_dir = $this->getInput()->getOption('autoload-dir');
        if (empty($autoload_dir)) {
            $autoload_dir = $this->getCurrentWorkingDirectory();
        }

        $file_path = $autoload_dir . DIRECTORY_SEPARATOR . $class . '.php';

        if ($this->input->getOption('verbose')) {
            $this->output->write('<info>Autoloading</info>: ');
        }

        if (is_readable($file_path)) {
            if ($this->input->getOption('verbose')) {
                $this->output->writeln($file_path);
            }

            include_once($file_path);
        } else {
            $this->output->writeln('<error>Autoload error: "' . $file_path . '" not found!</error>' . PHP_EOL);
            // don't exit here to let other autoloaders get their chance
            //throw new \InvalidArgumentException('Could not include unreadable file: ' . $file_path);
        }
    }
protected function autoload($class)
    {
        $class = str_replace('\\', DIRECTORY_SEPARATOR, $class);

        $autoload_dir = $this->getInput()->getOption('autoload-dir');
        if (empty($autoload_dir)) {
            $autoload_dir = $this->getCurrentWorkingDirectory();
        }

        $file_path = $autoload_dir . DIRECTORY_SEPARATOR . $class . '.php';

        if ($this->input->getOption('verbose')) {
            $this->output->write('<info>Autoloading</info>: ');
        }

        if (is_readable($file_path)) {
            if ($this->input->getOption('verbose')) {
                $this->output->writeln($file_path);
            }

            include_once($file_path);
        } else {
            $this->output->writeln('<error>Autoload error: "' . $file_path . '" not found!</error>' . PHP_EOL);
            // don't exit here to let other autoloaders get their chance
            //throw new \InvalidArgumentException('Could not include unreadable file: ' . $file_path);
        }
    }
Autoloads the given class if it exists.

@param string $class class name like 'Foo\Bar\Baz'

@throws \InvalidArgumentException in case of errors (file