| [ Indice ] |
Riferimento incrociato di Joomla! 1.5.14 - VM 1.1.4Servizio fornito da VMItalia |
[Vedi sorgente] [Stampa] [Statistiche Progetto]
(nessuna descrizione)
| Copyright: | Copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. |
| License: | GNU/GPL, see LICENSE.php |
| Version: | $Id: view.php 10381 2008-06-01 03:35:53Z pasamio $ |
| Dimensione file: | 689 righe (16 kb) |
| Incluso o richiesto: | 0 volte |
| Referenziato: | 0 volte |
| Inclusioni o richieste: | 0 files |
JView:: (20 metodi):
__construct()
display()
assign()
assignRef()
escape()
get()
getModel()
getLayout()
getName()
setModel()
setLayout()
setLayoutExt()
setEscape()
addTemplatePath()
addHelperPath()
loadTemplate()
loadHelper()
_setPath()
_addPath()
_createFileName()
| __construct($config = array() X-Ref |
| Constructor |
| display($tpl = null) X-Ref |
| Execute and display a template script. param: string $tpl The name of the template file to parse; |
| assign() X-Ref |
| Assigns variables to the view script via differing strategies. This method is overloaded; you can assign all the properties of an object, an associative array, or a single value by name. You are not allowed to set variables that begin with an underscore; these are either private properties for JView or private variables within the template script itself. <code> $view = new JView(); // assign directly $view->var1 = 'something'; $view->var2 = 'else'; // assign by name and value $view->assign('var1', 'something'); $view->assign('var2', 'else'); // assign by assoc-array $ary = array('var1' => 'something', 'var2' => 'else'); $view->assign($obj); // assign by object $obj = new stdClass; $obj->var1 = 'something'; $obj->var2 = 'else'; $view->assign($obj); </code> return: bool True on success, false on failure. |
| assignRef($key, &$val) X-Ref |
| Assign variable for the view (by reference). You are not allowed to set variables that begin with an underscore; these are either private properties for JView or private variables within the template script itself. <code> $view = new JView(); // assign by name and value $view->assignRef('var1', $ref); // assign directly $view->ref =& $var1; </code> param: string $key The name for the reference in the view. param: mixed &$val The referenced variable. return: bool True on success, false on failure. |
| escape($var) X-Ref |
| Escapes a value for output in a view script. If escaping mechanism is one of htmlspecialchars or htmlentities, uses {@link $_encoding} setting. param: mixed $var The output to escape. return: mixed The escaped value. |
| get( $property, $default = null ) X-Ref |
| Method to get data from a registered model or a property of the view param: string The name of the method to call on the model, or the property to get param: string The name of the model to reference, or the default value [optional] return: mixed The return value of the method |
| getModel( $name = null ) X-Ref |
| Method to get the model object param: string $name The name of the model (optional) return: mixed JModel object |
| getLayout() X-Ref |
| Get the layout. return: string The layout name |
| getName() X-Ref |
| Method to get the view name The model name by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor return: string The name of the model |
| setModel( &$model, $default = false ) X-Ref |
| Method to add a model to the view. We support a multiple model single view system by which models are referenced by classname. A caveat to the classname referencing is that any classname prepended by JModel will be referenced by the name without JModel, eg. JModelCategory is just Category. param: object $model The model to add to the view. param: boolean $default Is this the default model? return: object The added model |
| setLayout($layout) X-Ref |
| Sets the layout name to use param: string $template The template name. return: string Previous value |
| setLayoutExt( $value ) X-Ref |
| Allows a different extension for the layout files to be used param: string The extension return: string Previous value |
| setEscape($spec) X-Ref |
| Sets the _escape() callback. param: mixed $spec The callback for _escape() to use. |
| addTemplatePath($path) X-Ref |
| Adds to the stack of view script paths in LIFO order. param: string|array The directory (-ies) to add. return: void |
| addHelperPath($path) X-Ref |
| Adds to the stack of helper script paths in LIFO order. param: string|array The directory (-ies) to add. return: void |
| loadTemplate( $tpl = null) X-Ref |
| Load a template file -- first look in the templates folder for an override param: string $tpl The name of the template source file ... return: string The output of the the template script. |
| loadHelper( $hlp = null) X-Ref |
| Load a helper file param: string $tpl The name of the helper source file ... return: boolean Returns true if the file was loaded |
| _setPath($type, $path) X-Ref |
| Sets an entire array of search paths for templates or resources. param: string $type The type of path to set, typically 'template'. param: string|array $path The new set of search paths. If null or |
| _addPath($type, $path) X-Ref |
| Adds to the search path for templates and resources. param: string|array $path The directory or stream to search. |
| _createFileName($type, $parts = array() X-Ref |
| Create the filename for a resource param: string $type The resource type to create the filename for param: array $parts An associative array of filename information return: string The filename |
| Generato il: Mon Oct 19 20:29:27 2009 | Generato con PHPXref 0.7 |