Show
Ignore:
Timestamp:
12/02/2007 02:39:56 PM (12 months ago)
Author:
Shadowhand
Message:

Updated View to phpdoc comments.

Files:
1 modified

Legend:

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

    r1379 r1383  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    2  /** 
    3  * Class: View 
     2/** 
     3 * Loads and displays Kohana view files. Can also handle output of some binary 
     4 * files, such as image, Javascript, and CSS files. 
    45 * 
    5  * Kohana Source Code: 
    6  *  author    - Kohana Team 
    7  *  copyright - (c) 2007 Kohana Team 
    8  *  license   - <http://kohanaphp.com/license.html> 
     6 * $Id$ 
     7 * 
     8 * @package    Core 
     9 * @author     Kohana Team 
     10 * @copyright  (c) 2007 Kohana Team 
     11 * @license    http://kohanaphp.com/license.html 
    912 */ 
    1013class View_Core { 
     
    1821 
    1922        /** 
    20          * Constructor: __construct 
     23         * Attempts to load a view and pre-load view data. 
    2124         * 
    22          * Parameters: 
    23          *  name - view filename string 
    24          *  data - view data 
     25         * @param   string  view name 
     26         * @param   array   pre-load data 
     27         * @return  void 
    2528         */ 
    2629        public function __construct($name, $data = NULL) 
     
    4851                } 
    4952 
    50                 Log::add('debug', 'View Class Initialized ['.str_replace(DOCROOT, '', $this->kohana_filename).']'); 
     53                Log::add('debug', 'View Class Initialized ['.$name.']'); 
    5154        } 
    5255 
    5356        /** 
    54          * Method: set 
    55          *  Sets a view variable. 
     57         * Sets a view variable. 
    5658         * 
    57          * Parameters: 
    58          *  name  - variable name 
    59          *  value - variable contents 
    60          *  
    61          * Returns: 
    62          *  View object 
     59         * @param   string|array  name of variable or an array of variables 
     60         * @param   value         value when using a named variable 
     61         * @return  object 
    6362         */ 
    6463        public function set($name, $value = NULL) 
     
    7978 
    8079        /** 
    81          * Method: __set 
    82          *  Magically sets a view variable. 
     80         * Magically sets a view variable. 
    8381         * 
    84          * Parameters: 
    85          *  key   - variable name 
    86          *  value - variable contents 
     82         * @param   string   variable key 
     83         * @param   string   variable value 
     84         * @return  void 
    8785         */ 
    8886        public function __set($key, $value) 
     
    9593 
    9694        /** 
    97          * Method: __get 
    98          *  Magically gets a view variable. 
     95         * Magically gets a view variable. 
    9996         * 
    100          * Parameters: 
    101          *  key - variable name 
    102          *  
    103          * Returns: 
    104          *  The variable contents or NULL if the variable does not exist 
     97         * @param  string  variable key 
     98         * @return mixed   variable value if the key is found 
     99         * @return void    if the key is not found 
    105100         */ 
    106101        public function __get($key) 
     
    113108 
    114109        /** 
    115          * Method: __toString 
    116          *  Magically converts view object to string. 
     110         * Magically converts view object to string. 
    117111         * 
    118          * Returns: 
    119          *  The rendered view 
     112         * @return  string 
    120113         */ 
    121114        public function __toString() 
     
    125118 
    126119        /** 
    127          * Method: render 
    128          *  Renders a view. 
     120         * Renders a view. 
    129121         * 
    130          * Parameters: 
    131          *  print    - echo the output instead of returning it 
    132          *  renderer - user defined renderer callback 
    133          *  
    134          * Returns: 
    135          *  The rendered view if print is set to FALSE 
     122         * @param   boolean   set to TRUE to echo the output instead of returning it 
     123         * @param   callback  special renderer to pass the output through 
     124         * @return  string    if print is FALSE 
     125         * @return  void      if print is TRUE 
    136126         */ 
    137127        public function render($print = FALSE, $renderer = FALSE) 
     
    179169        } 
    180170 
    181 } // End View Class 
     171} // End View