2016-02-05 06:24:54 -05:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2016-02-05 06:24:54 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2016-02-05 06:24:54 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCP\Console;
|
|
|
|
|
|
2019-10-16 06:36:03 -04:00
|
|
|
use OCP\EventDispatcher\Event;
|
2016-02-05 06:24:54 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class ConsoleEvent
|
|
|
|
|
*
|
|
|
|
|
* @since 9.0.0
|
|
|
|
|
*/
|
|
|
|
|
class ConsoleEvent extends Event {
|
2021-02-09 07:53:41 -05:00
|
|
|
/**
|
2024-02-14 14:48:27 -05:00
|
|
|
* @since 9.0.0
|
2021-02-09 07:53:41 -05:00
|
|
|
* @deprecated 22.0.0
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const EVENT_RUN = 'OC\Console\Application::run';
|
2016-02-05 06:24:54 -05:00
|
|
|
|
|
|
|
|
/** @var string */
|
|
|
|
|
protected $event;
|
|
|
|
|
|
|
|
|
|
/** @var string[] */
|
|
|
|
|
protected $arguments;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* DispatcherEvent constructor.
|
|
|
|
|
*
|
|
|
|
|
* @param string $event
|
|
|
|
|
* @param string[] $arguments
|
|
|
|
|
* @since 9.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function __construct($event, array $arguments) {
|
|
|
|
|
$this->event = $event;
|
|
|
|
|
$this->arguments = $arguments;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* @since 9.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getEvent() {
|
|
|
|
|
return $this->event;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string[]
|
|
|
|
|
* @since 9.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getArguments() {
|
|
|
|
|
return $this->arguments;
|
|
|
|
|
}
|
|
|
|
|
}
|