Permalink
Browse files

finalize some functions of the overlay interface

  • Loading branch information...
1 parent 76bae14 commit fe7f356e16bee572c4231246511795c537b81381 @bernard357 committed Dec 9, 2011
Showing with 9 additions and 4 deletions.
  1. +9 −4 overlays/overlay.php
View
@@ -132,13 +132,18 @@ function allows($type, $action) {
* $overlay = Overlay::bind('day without_past_dates');
* [/php]
*
+ * This function calls the member function initialize() to allow for additional
+ * generic initialization steps, if required. Example: loading of an external configuration
+ * file.
+ *
* @see articles/edit.php
+ * @see overlays/day.php
* @see sections/edit.php
*
* @param string overlay type
* @return a brand new instance
*/
- function bind($type) {
+ final public static function bind($type) {
global $context;
// sanity check
@@ -580,8 +585,8 @@ function &get_view_text($host=NULL, $options=NULL) {
* - read data from some sensor
* - build a cache of data useful to the overlay
*
- * Warning: this is a low-level function that is called before the initialization of
- * $this->anchor so you can't rely on this variable here.
+ * Warning: this is a low-level function that is called before the settings of
+ * $this->attributes and of $this->anchor so you can't rely on these variables here.
*
* To be overloaded into derived class
*
@@ -610,7 +615,7 @@ function initialize() {
* @param string reference of the containing page (e.g., 'article:123')
* @return a restored instance, or NULL
*/
- public static function load($host, $reference) {
+ final public static function load($host, $reference) {
global $context;
// no overlay yet

0 comments on commit fe7f356

Please sign in to comment.