You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.4 KiB
68 lines
1.4 KiB
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Commands;
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use LaravelZero\Framework\Commands\Command;
|
|
|
|
class TrashCommand extends Command
|
|
{
|
|
/**
|
|
* The signature of the command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'trash';
|
|
|
|
/**
|
|
* The description of the command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Command description';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function handle()
|
|
{
|
|
$options = new \App\Cfnpp\Options();
|
|
$options->setVariables(['A' => true]);
|
|
$options->setParameters(['LBType' => 'internal', 'Other' => true]);
|
|
|
|
$expr = new \App\Cfnpp\Expression\Expression('"internal" Other eq', $options);
|
|
|
|
if ($expr->isComplete())
|
|
{
|
|
echo 'Got value: '.PHP_EOL;
|
|
var_dump($expr->toArray());
|
|
}
|
|
else
|
|
{
|
|
echo 'Expression not resolved: '.PHP_EOL;
|
|
var_dump($expr->toCloudformation());
|
|
}
|
|
/*
|
|
$cfn = new \App\CloudFormation\Client();
|
|
$stack = $cfn->getStack('CloudBender');
|
|
if (!isset($stack))
|
|
throw new \Exception("Stack not found");
|
|
var_dump($stack->getId(), $stack->getName(), $stack->getStatus(), $stack->getStatusReason(), $stack->getParameters(), $stack->getOutputs());
|
|
*/
|
|
}
|
|
|
|
/**
|
|
* Define the command's schedule.
|
|
*
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
* @return void
|
|
*/
|
|
public function schedule(Schedule $schedule): void
|
|
{
|
|
// $schedule->command(static::class)->everyMinute();
|
|
}
|
|
}
|
|
|