Deprecate hooks, emitter and Symfony dispatcher mechanisms
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
68d59915d6
commit
723f017b12
|
@ -23,6 +23,9 @@
|
||||||
|
|
||||||
namespace OC\Hooks;
|
namespace OC\Hooks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher
|
||||||
|
*/
|
||||||
abstract class BasicEmitter implements Emitter {
|
abstract class BasicEmitter implements Emitter {
|
||||||
use EmitterTrait;
|
use EmitterTrait;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ namespace OC\Hooks;
|
||||||
* interface for all classes that are able to emit events
|
* interface for all classes that are able to emit events
|
||||||
*
|
*
|
||||||
* @package OC\Hooks
|
* @package OC\Hooks
|
||||||
|
* @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
|
||||||
*/
|
*/
|
||||||
interface Emitter {
|
interface Emitter {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
|
|
||||||
namespace OC\Hooks;
|
namespace OC\Hooks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
|
||||||
|
*/
|
||||||
class PublicEmitter extends BasicEmitter {
|
class PublicEmitter extends BasicEmitter {
|
||||||
/**
|
/**
|
||||||
* @param string $scope
|
* @param string $scope
|
||||||
|
|
|
@ -1848,6 +1848,7 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
*
|
*
|
||||||
* @return EventDispatcherInterface
|
* @return EventDispatcherInterface
|
||||||
* @since 8.2.0
|
* @since 8.2.0
|
||||||
|
* @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher
|
||||||
*/
|
*/
|
||||||
public function getEventDispatcher() {
|
public function getEventDispatcher() {
|
||||||
return $this->query(\OC\EventDispatcher\SymfonyAdapter::class);
|
return $this->query(\OC\EventDispatcher\SymfonyAdapter::class);
|
||||||
|
|
|
@ -28,7 +28,11 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class OC_Hook{
|
|
||||||
|
/**
|
||||||
|
* @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
|
||||||
|
*/
|
||||||
|
class OC_Hook {
|
||||||
public static $thrownExceptions = [];
|
public static $thrownExceptions = [];
|
||||||
|
|
||||||
static private $registered = array();
|
static private $registered = array();
|
||||||
|
|
Loading…
Reference in New Issue