ActionScheduler_WPCLI_Command::__construct
Construct.
Метод класса: ActionScheduler_WPCLI_Command{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$ActionScheduler_WPCLI_Command = new ActionScheduler_WPCLI_Command(); $ActionScheduler_WPCLI_Command->__construct( $args, $assoc_args );
- $args(string[]) (обязательный)
- Positional arguments.
- $assoc_args(массив) (обязательный)
- .
Код ActionScheduler_WPCLI_Command::__construct() ActionScheduler WPCLI Command:: construct WC 11.0.0
public function __construct( array $args, array $assoc_args ) {
if ( ! defined( 'WP_CLI' ) || ! constant( 'WP_CLI' ) ) {
/* translators: %s php class name */
throw new \Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'woocommerce' ), get_class( $this ) ) );
}
$this->args = $args;
$this->assoc_args = $assoc_args;
}