|
Server : LiteSpeed System : Linux host 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 User : idnco5810 ( 1093) PHP Version : 8.2.29 Disable Function : NONE Directory : /home/idn98.co/public_html/wp-content/plugins/amp/vendor/ampproject/amp-toolbox/src/Cli/ |
Upload File : |
<?php
namespace AmpProject\Cli;
/**
* A command that is registered with the amp executable.
*
* @package AmpProject\Cli
*/
abstract class Command
{
/**
* Name of the command.
*
* This needs to be overridden in extending commands.
*
* @var string
*/
const NAME = '<unknown>';
/**
* Instance of the CLI executable that the command belongs to.
*
* @var Executable
*/
protected $cli;
/**
* Instantiate the command.
*
* @param Executable $cli Instance of the CLI executable that the command belongs to.
*/
public function __construct(Executable $cli)
{
$this->cli = $cli;
}
/**
* Get the name of the command.
*
* @return string Name of the command.
*/
public function getName()
{
return static::NAME;
}
/**
* Register the command.
*
* @param Options $options Options instance to register the command with.
*/
abstract public function register(Options $options);
/**
* Process the command.
*
* Arguments and options have been parsed when this is run.
*
* @param Options $options Options instance to process the command with.
*/
abstract public function process(Options $options);
}