====== _addPath ======
{#JAPI Joomla.Framework Application JController::_addPath #}
Adds to the search path for models and views.
This method is protected and should only be called by methods in classes derived from JController.
===== Syntax =====
void _addPath ( **$type**, **$path** )
| **$type** | string | The path type (e.g. 'model', 'view'. |
| **$path** | mixed | is either a string containing the path to be added to the search list or an array of strings containing paths to be added. |
===== Examples =====
$controller = new JController();
print_r( $controller->_path );
$controller->_addPath( 'view', JPATH_COMPONENT .DS. 'otherviews' );
print_r( $controller->_path );
might produce (note that neither _addPath or _path should not be accessed directly and are only used here for demonstration purposes)
Array
(
[model] => Array
(
[0] => /var/www/trunk/administrator/components/com_weblinks/models/
)
[view] => Array
(
[0] => /var/www/trunk/administrator/components/com_weblinks/views/
)
)
Array
(
[model] => Array
(
[0] => /var/www/trunk/administrator/components/com_weblinks/models/
)
[view] => Array
(
[0] => /var/www/trunk/administrator/components/com_weblinks/otherviews/
[1] => /var/www/trunk/administrator/components/com_weblinks/views/
)
)
----
~~DISCUSSION~~