AwsInspector\CommandRegistry::getCommands PHP Method

getCommands() public static method

public static getCommands ( )
    public static function getCommands()
    {
        return [new \AwsInspector\Command\Profile\ListCommand(), new \AwsInspector\Command\Profile\EnableCommand(), new \AwsInspector\Command\Profile\DisableCommand(), new \AwsInspector\Command\Ec2\ListCommand(), new \AwsInspector\Command\Ec2\SshCommand(), new \AwsInspector\Command\Ec2\TerminateCommand(), new \AwsInspector\Command\Agent\AddIdentityCommand(), new \AwsInspector\Command\CloudwatchLogs\SetRetentionCommand(), new \AwsInspector\Command\CloudwatchLogs\DeleteLogGroupCommand(), new \AwsInspector\Command\CloudwatchLogs\ShowLogGroupsCommand(), new \AwsInspector\Command\CloudwatchLogs\TailCommand(), new \AwsInspector\Command\CloudwatchLogs\AddLambdaTriggerCommand(), new \AwsInspector\Command\CloudwatchLogs\DeleteLambdaTriggerCommand(), new \AwsInspector\Command\Clean\CleanSnapshotsCommand()];
    }

Usage Example

#!/usr/bin/env php
<?php 
$i = 0;
do {
    $autoloader = __DIR__ . str_repeat('/..', $i) . '/vendor/autoload.php';
    $i++;
} while ($i < 6 && !is_file($autoloader));
require_once $autoloader;
use Symfony\Component\Console\Application;
$app = new Application('AwsInspector', '@package_version@');
foreach (\AwsInspector\CommandRegistry::getCommands() as $command) {
    $app->add($command);
}
$app->run();
CommandRegistry