parent
05ae9e78b1
commit
99f462bc10
@ -0,0 +1,33 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
/** |
||||
* Class HookResubscribe |
||||
* @var \SplObjectStorage $observers |
||||
*/ |
||||
class HookResubscribe extends HookEvent implements HookResubscribeEventInterface |
||||
{ |
||||
/** |
||||
* Constructor |
||||
*/ |
||||
protected function __construct() |
||||
{ |
||||
parent::__construct('HookResubscribe'); |
||||
} |
||||
|
||||
/** |
||||
* Update all the observers |
||||
* @param int $type |
||||
* |
||||
* @return int |
||||
*/ |
||||
public function notifyResubscribe($type) |
||||
{ |
||||
/** @var \HookResubscribeObserverInterface $observer */ |
||||
$this->eventData['type'] = $type; |
||||
foreach ($this->observers as $observer) { |
||||
$observer->hookResubscribe($this); |
||||
} |
||||
return 1; |
||||
} |
||||
} |
@ -0,0 +1,21 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
/** |
||||
* This file contains all Hook interfaces and their relation. |
||||
* They are used for Hook classes |
||||
* @package chamilo.library.hook |
||||
*/ |
||||
|
||||
/** |
||||
* Interface HookResubscribeEventInterface |
||||
*/ |
||||
interface HookResubscribeEventInterface extends HookEventInterface |
||||
{ |
||||
/** |
||||
* Update all the observers |
||||
* @param int $type |
||||
* |
||||
* @return int |
||||
*/ |
||||
public function notifyResubscribe($type); |
||||
} |
@ -0,0 +1,20 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
/** |
||||
* This file contains all Hook interfaces and their relation. |
||||
* They are used for Hook classes |
||||
* @package chamilo.library.hook |
||||
*/ |
||||
|
||||
/** |
||||
* Interface ResubscribeHookInterface |
||||
*/ |
||||
interface HookResubscribeObserverInterface extends HookObserverInterface |
||||
{ |
||||
/** |
||||
* @param HookResubscribeObserverInterface $hook |
||||
* |
||||
* @return int |
||||
*/ |
||||
public function hookResubscribe(HookResubscribeEventInterface $hook); |
||||
} |
Loading…
Reference in new issue