Elastic
[ class tree: Elastic ] [ index: Elastic ] [ all elements ]

Source for file group.php

Documentation is available at group.php

  1. <?php
  2. /**
  3.  * Groups contain multiple modules, and render only those modules.
  4.  * A group's views cannot be set.
  5.  * 
  6.  * @package Elastic
  7.  * @author Daryl Koopersmith
  8.  * 
  9.  * @todo add children manipulation functions
  10.  */
  11. class Group extends Module {
  12.     var $children;
  13.     
  14.     function __construct($id$children null{
  15.         parent::__construct$id );
  16.         $this->children = $children;
  17.         
  18.         parent::set_view''array($this,'_view') );
  19.     }
  20.     
  21.     /**
  22.      * The only group view: run all of its children.
  23.      *
  24.      * @return void 
  25.      * @author Daryl Koopersmith
  26.      */
  27.     function _view({
  28.         foreach($this->children as $child{
  29.             $child->run();
  30.         }
  31.     }
  32.     
  33.     /**
  34.      * Override set_view. Groups have only one view.
  35.      *
  36.      * @return void 
  37.      * @author Daryl Koopersmith
  38.      */
  39.     function set_view({}
  40.     
  41.     
  42.     /**
  43.      * Override remove_view. Groups have only one view.
  44.      *
  45.      * @return void 
  46.      * @author Daryl Koopersmith
  47.      */
  48.     function remove_view({}
  49. }
  50.  
  51. ?>

Documentation generated on Sat, 24 Oct 2009 17:17:45 -0500 by phpDocumentor 1.4.3