Changeset 279

Show
Ignore:
Timestamp:
11/17/06 20:36:15
Author:
schst
Message:

Fixed signature of patPortal_Component Interface (thanks to Björn Kraus)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/patPortal/Component.php

    r275 r279  
    2121interface patPortal_Interface_Component 
    2222{ 
    23         public function __construct( $request ); 
     23        public function __construct($id, $params); 
    2424        public function render( $area, patPortal_Request $request, patPortal_Response $response ); 
    2525        public function setPage( patPortal_Page $page ); 
     
    9494    */ 
    9595    protected $boundComponents = array(); 
    96      
     96 
    9797   /** 
    9898    * event manager for all events that occur inside the area 
     
    108108    */ 
    109109    protected $persist = null; 
    110      
    111      
     110 
     111 
    112112    protected $access = array(); 
    113      
     113 
    114114   /** 
    115115        * create a new component 
     
    117117        * @access       public 
    118118        */ 
    119         public function __construct( $id, $params
     119        public function __construct($id, $params
    120120        { 
    121121        $this->id = $id; 
     
    137137                        return; 
    138138                } 
    139                  
     139 
    140140                $persistance = patPortal_Factory::getPersistence(); 
    141141                $persistance->storeComponent($this); 
    142142        } 
    143          
     143 
    144144   /** 
    145145        * render the component 
     
    208208        return false; 
    209209    } 
    210      
     210 
    211211   /** 
    212212    * get the id of the component this component is bound to 
     
    218218        return $this->boundToId; 
    219219    } 
    220      
     220 
    221221   /** 
    222222    * create the event manager 
     
    226226    * @param    string 
    227227    * @return   boolean 
    228     */  
     228    */ 
    229229    public function createEventManager(patPortal_EventManager $container) 
    230230    { 
     
    242242                return $this->eventManager; 
    243243        } 
    244      
     244 
    245245   /** 
    246246        * do some lazy initialization 
     
    275275                } 
    276276        } 
    277          
     277 
    278278   /** 
    279279    * string representation of the component 
     
    307307        $this->boundComponents = array(); 
    308308        $this->boundTo = null; 
    309          
     309 
    310310        return true; 
    311311    } 
     
    322322        return true; 
    323323    } 
    324      
     324 
    325325   /** 
    326326    * set the persistence mode 
     
    339339    * 
    340340    * @return   string 
    341     */    
     341    */ 
    342342    public function getPersist() 
    343343    { 
    344344        return $this->persist; 
    345345    } 
    346      
    347    /** 
    348     * get the unique id of the component  
     346 
     347   /** 
     348    * get the unique id of the component 
    349349    * 
    350350    * @return   string 
     
    354354        return $this->id; 
    355355    } 
    356      
     356 
    357357    public function setAccess($access) { 
    358358        $this->access = $access; 
    359359    } 
    360      
     360 
    361361   /** 
    362362    * Checks, whether the current component can be accessed by the user