[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/joomla/application/component/ -> model.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
License: GNU/GPL, see LICENSE.php
Version: $Id: model.php 14401 2010-01-26 14:10:00Z louis $
File Size: 353 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JModel:: (14 methods):
  __construct()
  getInstance()
  setState()
  getState()
  getDBO()
  setDBO()
  getName()
  getTable()
  addIncludePath()
  addTablePath()
  _getList()
  _getListCount()
  _createTable()
  _createFileName()


Class: JModel  - X-Ref

Base class for a Joomla Model

Acts as a Factory class for application specific objects and
provides many supporting API functions.

__construct($config = array()   X-Ref
Constructor


getInstance( $type, $prefix = '', $config = array()   X-Ref
Returns a reference to the a Model object, always creating it

param: string    The model type to instantiate
param: string    Prefix for the model class name. Optional.
param: array    Configuration array for model. Optional.
return: mixed    A model object, or false on failure

setState( $property, $value=null )   X-Ref
Method to set model state variables

param: string    The name of the property
param: mixed    The value of the property to set
return: mixed    The previous value of the property

getState($property = null)   X-Ref
Method to get model state variables

param: string    Optional parameter name
return: object    The property where specified, the state object where omitted

getDBO()   X-Ref
Method to get the database connector object

return: object JDatabase connector object

setDBO(&$db)   X-Ref
Method to set the database connector object

param: object    $db    A JDatabase based object
return: void

getName()   X-Ref
Method to get the model 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

getTable($name='', $prefix='Table', $options = array()   X-Ref
Method to get a table object, load it if necessary.

param: string The table name. Optional.
param: string The class prefix. Optional.
param: array    Configuration array for model. Optional.
return: object    The table

addIncludePath( $path='' )   X-Ref
Add a directory where JModel should search for models. You may
either pass a string or an array of directories.

param: string    A path to search.
return: array    An array with directory elements

addTablePath($path)   X-Ref
Adds to the stack of model table paths in LIFO order.

param: string|array The directory (-ies) to add.
return: void

_getList( $query, $limitstart=0, $limit=0 )   X-Ref
Returns an object list

param: string The query
param: int Offset
param: int The number of records
return: array

_getListCount( $query )   X-Ref
Returns a record count for the query

param: string The query
return: int

_createTable( $name, $prefix = 'Table', $config = array()   X-Ref
Method to load and return a model object.

param: string    The name of the view
param: string  The class prefix. Optional.
return: mixed    Model object or boolean false if failed

_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



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1