Support Joomla!

references:joomla.framework:application:jmodel-addincludepath

Table of Contents

addIncludePath

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Application Class JModel Method addIncludePath Reference addIncludePath() Never Work in Progress

Add a directory where JModel should search for models.

This is a static method and will return the updated array of include paths.

Syntax

array addIncludePath ( $path )

$path mixed is a string containing the path that should be added to the include path. This parameter is optional and if omitted no path will be added.

Examples

Example

jimport( 'joomla.application.component.model' );
print_r( JModel::addIncludePath() );
print_r( JModel::addIncludePath( JPATH_COMPONENT.DS.'models' ) );

might produce

Result

Array ( )
Array ( [0] => /var/www/joomla15/components/com_example/models )

 
references/joomla.framework/application/jmodel-addincludepath.txt (682 views) · Last modified: 2007/08/15 14:49