Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
interface.php
Aller à la documentation de ce fichier.
1 <?php
2 /**
3  * @package Joomla.Platform
4  * @subpackage Observer
5  *
6  * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
7  * @license GNU General Public License version 2 or later; see LICENSE
8  */
9 
10 defined('JPATH_PLATFORM') or die;
11 
12 /**
13  * Observer updater pattern implementation for Joomla
14  *
15  * @package Joomla.Platform
16  * @subpackage Observer
17  * @link http://docs.joomla.org/JObserverUpdater
18  * @since 3.1.2
19  */
21 {
22  /**
23  * Constructor
24  *
25  * @param JObservableInterface $observable The observable subject object
26  *
27  * @since 3.1.2
28  */
29  public function __construct(JObservableInterface $observable);
30 
31  /**
32  * Adds an observer to the JObservableInterface instance updated by this
33  * This method can be called fron JObservableInterface::attachObserver
34  *
35  * @param JObserverInterface $observer The observer object
36  *
37  * @return void
38  *
39  * @since 3.1.2
40  */
41  public function attachObserver(JObserverInterface $observer);
42 
43  /**
44  * Call all observers for $event with $params
45  *
46  * @param string $event Event name (function name in observer)
47  * @param array $params Params of event (params in observer function)
48  *
49  * @return void
50  *
51  * @since 3.1.2
52  */
53  public function update($event, $params);
54 
55  /**
56  * Enable/Disable calling of observers (this is useful when calling parent:: function
57  *
58  * @param boolean $enabled Enable (true) or Disable (false) the observer events
59  *
60  * @return boolean Returns old state
61  *
62  * @since 3.1.2
63  */
64  public function doCallObservers($enabled);
65 }