Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update filenames, Add files for each hook interface - refs BT#9092
- Loading branch information
Daniel Barreto
committed
Feb 6, 2015
1 parent
3b36808
commit d8ee7e4
Showing
21 changed files
with
344 additions
and
284 deletions.
There are no files selected for viewing
File renamed without changes.
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,19 @@ | ||
<?php | ||
/* For licensing terms, see /license.txt */ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
/** | ||
* This file contains all Hook interfaces and their relation. | ||
* They are used for Hook classes | ||
* @package chamilo.library.hook | ||
*/ | ||
|
||
/** | ||
* Interface HookAdminBlockEventInterface | ||
*/ | ||
interface HookAdminBlockEventInterface extends HookEventInterface | ||
{ | ||
/** | ||
* @param int $type | ||
* @return int | ||
*/ | ||
public function notifyAdminBlock($type); | ||
} |
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,19 @@ | ||
<?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 HookAdminBlockObserverInterface | ||
*/ | ||
interface HookAdminBlockObserverInterface extends HookObserverInterface | ||
{ | ||
/** | ||
* @param HookAdminBlockEventInterface $hook | ||
* @return int | ||
*/ | ||
public function hookAdminBlock(HookAdminBlockEventInterface $hook); | ||
} |
File renamed without changes.
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,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 HookCreateUserEventInterface | ||
*/ | ||
interface HookCreateUserEventInterface extends HookEventInterface | ||
{ | ||
/** | ||
* Update all the observers | ||
* @param int $type | ||
* @return int | ||
*/ | ||
public function notifyCreateUser($type); | ||
} |
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,19 @@ | ||
<?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 CreateUserHookInterface | ||
*/ | ||
interface HookCreateUserObserverInterface extends HookObserverInterface | ||
{ | ||
/** | ||
* @param HookCreateUserEventInterface $hook | ||
* @return int | ||
*/ | ||
public function hookCreateUser(HookCreateUserEventInterface $hook); | ||
} |
File renamed without changes.
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,72 @@ | ||
<?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 HookEventInterface | ||
*/ | ||
interface HookEventInterface | ||
{ | ||
/** | ||
* Attach an HookObserver | ||
* @link http://php.net/manual/en/splsubject.attach.php | ||
* @param \HookObserverInterface| $observer <p> | ||
* The <b>HookObserver</b> to attach. | ||
* </p> | ||
* @return void | ||
*/ | ||
public function attach(HookObserverInterface $observer); | ||
|
||
/** | ||
* Detach an HookObserver | ||
* @link http://php.net/manual/en/splsubject.detach.php | ||
* @param \HookObserverInterface| $observer <p> | ||
* The <b>HookObserver</b> to detach. | ||
* </p> | ||
* @return void | ||
*/ | ||
public function detach(HookObserverInterface $observer); | ||
|
||
/** | ||
* Return the singleton instance of Hook event. | ||
* @return HookEventInterface|null | ||
*/ | ||
public static function create(); | ||
|
||
|
||
/** | ||
* Return an array containing all data needed by the hook observer to update | ||
* @return array | ||
*/ | ||
public function getEventData(); | ||
|
||
/** | ||
* Set an array with data needed by hooks | ||
* @param array $data | ||
* @return $this | ||
*/ | ||
public function setEventData(array $data); | ||
|
||
/** | ||
* Return the event name refer to where hook is used | ||
* @return string | ||
*/ | ||
public function getEventName(); | ||
|
||
|
||
/** | ||
* Clear all hookObservers without detach them | ||
* @return mixed | ||
*/ | ||
public function clearAttachments(); | ||
|
||
/** | ||
* Detach all hook observers | ||
* @return $this | ||
*/ | ||
public function detachAll(); | ||
} |
Oops, something went wrong.
Don't need to add 2 documentation blocks. Add more descriptive information. The same for all files.