Changeset 1533

Show
Ignore:
Timestamp:
12/14/07 11:24:55 (9 months ago)
Author:
Shadowhand
Message:

Added View::instance(), to allow View factories.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/View.php

    r1527 r1533  
    2222 
    2323    /** 
     24     * Creates a new View using the given parameters. 
     25     * 
     26     * @param   string  view name 
     27     * @param   array   pre-load data 
     28     * @param   string  type of file: html, css, js, etc. 
     29     */ 
     30    public static function instance($name, $data = NULL, $type = NULL) 
     31    { 
     32        return new View($name, $data, $type); 
     33    } 
     34 
     35    /** 
    2436     * Attempts to load a view and pre-load view data. 
    2537     * 
     
    2739     * @param   string  view name 
    2840     * @param   array   pre-load data 
     41     * @param   string  type of file: html, css, js, etc. 
     42     * @return  void 
    2943     */ 
    3044    public function __construct($name, $data = NULL, $type = NULL)