-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
80 additions
and
1 deletion.
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,70 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of ILIAS, a powerful learning management system | ||
* published by ILIAS open source e-Learning e.V. | ||
* | ||
* ILIAS is licensed with the GPL-3.0, | ||
* see https://www.gnu.org/licenses/gpl-3.0.en.html | ||
* You should have received a copy of said license along with the | ||
* source code, too. | ||
* | ||
* If this is not the case or you just want to try ILIAS, you'll find | ||
* us at: | ||
* https://www.ilias.de | ||
* https://github.com/ILIAS-eLearning | ||
* | ||
*********************************************************************/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ILIAS\Services\WOPI\Discovery; | ||
|
||
use ILIAS\Data\URI; | ||
|
||
/** | ||
* @author Fabian Schmid <[email protected]> | ||
*/ | ||
class NullAction extends Action | ||
{ | ||
/** @noinspection MagicMethodsValidityInspection */ | ||
public function __construct() | ||
{ | ||
} | ||
|
||
public function withId(int $id): self | ||
{ | ||
return $this; | ||
} | ||
|
||
public function getId(): int | ||
{ | ||
return 0; | ||
} | ||
|
||
public function getName(): string | ||
{ | ||
return 'Null'; | ||
} | ||
|
||
public function getExtension(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function getLauncherUrl(): URI | ||
{ | ||
return new URI(''); // this will fail, but a NullAction can't be used anyway | ||
} | ||
|
||
public function getUrlAppendix(): ?string | ||
{ | ||
return null; | ||
} | ||
|
||
public function getTargetExtension(): ?string | ||
{ | ||
return null; | ||
} | ||
|
||
} |