-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(event): Introduce a new ConsoleEventV2 modern event to replace d…
…epreciated ConsoleEvent event Signed-off-by: Thomas Citharel <tcit@tcit.fr>
- Loading branch information
Showing
3 changed files
with
103 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
/** | ||
* @copyright Copyright (c) 2016, ownCloud, Inc. | ||
* | ||
* @author Arthur Schiwon <blizzz@arthur-schiwon.de> | ||
* @author Christoph Wurst <christoph@winzerhof-wurst.at> | ||
* @author Joas Schilling <coding@schilljs.com> | ||
* | ||
* @license AGPL-3.0 | ||
* | ||
* This code is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License, version 3, | ||
* as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License, version 3, | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
* | ||
*/ | ||
namespace OCP\Console; | ||
|
||
use OCP\EventDispatcher\Event; | ||
|
||
/** | ||
* Class ConsoleEvent | ||
* | ||
* @since 27.0.0 | ||
*/ | ||
class ConsoleEventV2 extends Event { | ||
/** @var string[] */ | ||
protected array $arguments; | ||
|
||
/** | ||
* DispatcherEvent constructor. | ||
* | ||
* @param string[] $arguments | ||
* @since 27.0.0 | ||
*/ | ||
public function __construct(array $arguments) { | ||
$this->arguments = $arguments; | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* @return string[] | ||
* @since 27.0.0 | ||
*/ | ||
public function getArguments(): array { | ||
return $this->arguments; | ||
} | ||
} |