class Sake extends Application (View source)

CLI application for running commands against a Silverstripe CMS project Boots up a full kernel, using the same configuration and database the web server uses.

Traits

Provides extensions to this object to integrate it with standard config API methods.

Config options

commands Command[]

Commands that can be run. These commands will be instantiated via the Injector.

command_loaders CommandLoaderInterface[]

Command loaders for dynamically adding commands to sake.

max_tasks_to_display int

Maximum number of tasks to display in the main command list.

hide_completion_command bool

Set this to true to hide the "completion" command.

Properties

Methods

public static 
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

public
mixed
uninherited(string $name)

Gets the uninherited value for the given config option

public
__construct(Kernel|null $kernel = null)

No description

public
string
getVersion()

No description

public
int
run(InputInterface|null $input = null, OutputInterface|null $output = null)

No description

public
array
all(string|null $namespace = null)

No description

public
bool
shouldHideTasks()

Check whether tasks should currently be hidden from the main command list

public
void
setIgnoreTaskLimit(bool $ignore)

Set whether the task limit should be ignored.

public
void
complete(CompletionInput $input, CompletionSuggestions $suggestions)

No description

protected
int
doRunCommand(Command $command, InputInterface $input, OutputInterface $output)

No description

protected
InputDefinition
getDefaultInputDefinition()

No description

protected
array
getDefaultCommands()

No description

Details

static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

Return Value

Config_ForClass

mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

__construct(Kernel|null $kernel = null)

No description

Parameters

Kernel|null $kernel

string getVersion()

No description

Return Value

string

int run(InputInterface|null $input = null, OutputInterface|null $output = null)

No description

Parameters

InputInterface|null $input
OutputInterface|null $output

Return Value

int

array all(string|null $namespace = null)

No description

Parameters

string|null $namespace

Return Value

array

bool shouldHideTasks()

Check whether tasks should currently be hidden from the main command list

Return Value

bool

void setIgnoreTaskLimit(bool $ignore)

Set whether the task limit should be ignored.

Used by the tasks command and completion to allow listing tasks when there's too many of them to list in the main command list.

Parameters

bool $ignore

Return Value

void

void complete(CompletionInput $input, CompletionSuggestions $suggestions)

No description

Parameters

CompletionInput $input
CompletionSuggestions $suggestions

Return Value

void

protected int doRunCommand(Command $command, InputInterface $input, OutputInterface $output)

No description

Parameters

Command $command
InputInterface $input
OutputInterface $output

Return Value

int

protected InputDefinition getDefaultInputDefinition()

No description

Return Value

InputDefinition

protected array getDefaultCommands()

No description

Return Value

array