Altax\Console\Application::registerBuiltinCommands PHP Method

registerBuiltinCommands() protected method

Register base commands
protected registerBuiltinCommands ( )
    protected function registerBuiltinCommands()
    {
        $finder = new Finder();
        $finder->files()->name('*Command.php')->in(__DIR__ . "/../Command/Builtin");
        foreach ($finder as $file) {
            if ($file->getFilename() === 'Command.php') {
                continue;
            }
            $class = "Altax\\Command\\Builtin\\" . $file->getBasename('.php');
            $r = new \ReflectionClass($class);
            $command = $r->newInstance();
            $this->add($command);
        }
    }