Skip to content

phore/phore-cli-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phore Cli Helper

Boilerplate CLI Tool

Example

The Main Command

class MainCmd extends PhoreAbstractMainCmd
{

    public function invoke(CliContext $context)
    {
        $opts = $context->getOpts("i:");

        $context->dispatchMap([
            "import" => new ImportCmd(),
            "search" => new SearchCmd()
        ], $opts);
    }
}

The Subcommand

class SearchCmd extends PhoreAbstractCmd
{

    public function invoke(CliContext $context)
    {
        $opts = $context->getOpts();
        $context->ask("Do you want to continue?");

    }
}