Changeset 1383
- Timestamp:
- 12/02/2007 02:39:56 PM (10 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/View.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/View.php
r1379 r1383 1 1 <?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. 4 5 * 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 9 12 */ 10 13 class View_Core { … … 18 21 19 22 /** 20 * Constructor: __construct23 * Attempts to load a view and pre-load view data. 21 24 * 22 * Parameters:23 * name - view filename string24 * data - view data25 * @param string view name 26 * @param array pre-load data 27 * @return void 25 28 */ 26 29 public function __construct($name, $data = NULL) … … 48 51 } 49 52 50 Log::add('debug', 'View Class Initialized ['. str_replace(DOCROOT, '', $this->kohana_filename).']');53 Log::add('debug', 'View Class Initialized ['.$name.']'); 51 54 } 52 55 53 56 /** 54 * Method: set 55 * Sets a view variable. 57 * Sets a view variable. 56 58 * 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 63 62 */ 64 63 public function set($name, $value = NULL) … … 79 78 80 79 /** 81 * Method: __set 82 * Magically sets a view variable. 80 * Magically sets a view variable. 83 81 * 84 * Parameters:85 * key - variable name86 * value - variable contents82 * @param string variable key 83 * @param string variable value 84 * @return void 87 85 */ 88 86 public function __set($key, $value) … … 95 93 96 94 /** 97 * Method: __get 98 * Magically gets a view variable. 95 * Magically gets a view variable. 99 96 * 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 105 100 */ 106 101 public function __get($key) … … 113 108 114 109 /** 115 * Method: __toString 116 * Magically converts view object to string. 110 * Magically converts view object to string. 117 111 * 118 * Returns: 119 * The rendered view 112 * @return string 120 113 */ 121 114 public function __toString() … … 125 118 126 119 /** 127 * Method: render 128 * Renders a view. 120 * Renders a view. 129 121 * 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 136 126 */ 137 127 public function render($print = FALSE, $renderer = FALSE) … … 179 169 } 180 170 181 } // End View Class171 } // End View
