Class FOFModel

Description

FrameworkOnFramework Model class. The Model is the worhorse. It performs all

of the business logic based on its state and then returns the raw (processed) data to the caller, or modifies its own state. It's important to note that the model doesn't get data directly from the request (this is the Controller's business) and that it doesn't output anything (that the View's business).

  • since: 1.0

Located in /libraries/fof/model/model.php (line 22)

JObject
   |
   --FOFModel
Direct descendents
Class Description
 class PostinstallModelMessages Model class to manage postinstall messages
Variable Summary
Method Summary
 static array addIncludePath ([mixed $path = ''], [string $prefix = ''])
 static void addTablePath (mixed $path)
 static FOFModel &getAnInstance (string $type, [string $prefix = ''], [array $config = array()])
 static FOFModel &getTmpInstance (string $type, [string $prefix = ''], [array $config = array()])
 static string _createFileName (string $type, [array $parts = array()])
 FOFModel __construct ([type $config = array()])
 boolean addBehavior (string $name, [array $config = array()])
 FOFModel applyAccessFiltering ([integer $userID = null])
 boolean buildCountQuery ()
 JDatabaseQuery buildQuery ([boolean $overrideLimits = false])
 boolean checkin ()
 boolean checkout ()
 void cleanCache ([string $group = null], [integer $client_id = 0])
 boolean copy ()
 boolean delete ()
 mixed findFormFilename (string $source, [array $paths = array()])
 FOFTable &getFirstItem ([boolean $overrideLimits = false])
 mixed getForm ([array $data = array()], [boolean $loadData = true], [boolean $source = null])
 string getHash ()
 integer getId ()
 array getIds ()
 FOFTable &getItem ([integer $id = null])
 array &getItemList ([boolean $overrideLimits = false], [string $group = ''])
 array &getList ([boolean $overrideLimits = false], [string $group = ''])
 string getName ()
 string getReorderWhere ()
 mixed getState ([string $key = null], [mixed $default = null], [string $filter_type = 'raw'])
 FOFTable getTable ([string $name = ''], [string $prefix = null], [array $options = array()])
 string getTableAlias ()
 array getTableFields ()
 integer getTotal ()
 The getUserStateFromRequest (string $key, string $request, [string $default = null], [string $type = 'none'], [boolean $setUserState = true])
 boolean hit ()
 boolean isCheckedOut ()
 mixed loadForm (string $name, [string $source = null], [array $options = array()], [boolean $clear = false], [string $xpath = false])
 array loadFormData ()
 boolean move (string $dirn)
 boolean onAfterCopy (FOFTable &$table)
 boolean onAfterDelete (integer $id)
 void onAfterGetItem (FOFTable &$record)
 boolean onAfterHit (FOFTable &$table)
 viod onAfterLoadForm (FOFForm $form, string &$name, string &$source, array &$options)
 boolean onAfterMove (FOFTable &$table)
 viod onAfterPreprocessForm (FOFForm $form, array &$data)
 boolean onAfterPublish (FOFTable &$table)
 boolean onAfterReorder (FOFTable &$table)
 boolean onAfterSave (FOFTable &$table)
 boolean onBeforeCopy (FOFTable &$table)
 boolean onBeforeDelete (integer &$id, FOFTable &$table)
 boolean onBeforeHit (FOFTable &$table)
 viod onBeforeLoadForm (string &$name, string &$source, array &$options)
 boolean onBeforeMove (FOFTable &$table)
 viod onBeforePreprocessForm (FOFForm $form, array &$data)
 boolean onBeforePublish (FOFTable &$table)
 boolean onBeforeReorder (FOFTable &$table)
 boolean onBeforeSave (array &$data, FOFTable &$table)
 void onProcessList (array &$resultArray)
 void populateSavestate ([integer $defaultSaveState = -999])
 void populateState ()
 void preprocessForm (FOFForm $form, mixed &$data, [string $group = 'content'])
 boolean publish ([integer $publish = 1], [integer $user = null])
 boolean reorder ()
 boolean save (array|object $data)
 FOFModel &savestate (boolean $newState)
 void setDbo (JDatabaseDriver $db)
 FOFModel setId ([integer $id = 0])
 FOFModel setIds (array $idlist)
 FOFModel setInput ($input $input)
 mixed setState (string $property, [mixed $value = null])
 mixed validateForm (FOFForm $form, array $data, [string $group = null])
 FOFTable &_createTable (string $name, [string $prefix = 'Table'], [array $config = array()])
 array &_getList (string $query, [integer $limitstart = 0], [integer $limit = 0], [string $group = ''])
 integer _getListCount (string $query)
 object The _real_getState ([string $property = null], [mixed $default = null])
 FOFModel __call (string $name, mixed $arguments)
 mixed __get (string $name)
 void __set (string $name, mixed $value)
Variables
FOFConfigProvider $configProvider = null (line 183)

An instance of FOFConfigProvider to provision configuration overrides

  • access: protected
array $default_behaviors = array('filters') (line 197)

Default behaviors to apply to the model

  • access: protected
string $event_after_delete = 'onContentAfterDelete' (line 44)

The event to trigger after deleting the data.

  • access: protected
string $event_after_save = 'onContentAfterSave' (line 50)

The event to trigger after saving the data.

  • access: protected
string $event_before_delete = 'onContentBeforeDelete' (line 56)

The event to trigger before deleting the data.

  • access: protected
string $event_before_save = 'onContentBeforeSave' (line 62)

The event to trigger before saving the data.

  • access: protected
string $event_change_state = 'onContentChangeState' (line 68)

The event to trigger after changing the published state of the data.

  • access: protected
string $event_clean_cache = null (line 76)

The event to trigger when cleaning cache.

  • since: 12.2
  • access: protected
int $id = null (line 88)

The first row ID passed to the model's state

  • access: protected
array $id_list = array() (line 82)

Stores a list of IDs passed to the model's state

  • access: protected
array $input = array() (line 94)

Input variables, passed on from the controller, in an associative array

  • access: protected
array $list = null (line 100)

The list of records made available through getList

  • access: protected
FOFModelDispatcherBehavior $modelDispatcher = null (line 190)

FOFModelDispatcherBehavior for dealing with extra behaviors

  • access: protected
string $name (line 108)

The model (base) name

  • since: 12.2
  • access: protected
string $option = null (line 116)

The URL option for the component.

  • since: 12.2
  • access: protected
FOFTable $otable = null (line 122)

The table object, populated when saving data

  • access: protected
JPagination $pagination = null (line 128)

Pagination object

  • access: protected
FOFTable $record = null (line 134)

The table object, populated when retrieving data

  • access: protected
string $state (line 142)

A state object

  • since: 12.2
  • access: protected
string $table = null (line 148)

The name of the table to use

  • access: protected
int $total = null (line 154)

Total rows based on the filters set in the model's state

  • access: protected
object $_db (line 38)

Database Connector

  • since: 12.2
  • access: protected
array $_formData = array() (line 176)

The data to load into a form

  • since: 2.0
  • access: protected
array $_forms = array() (line 168)

Array of form objects.

  • since: 2.0
  • access: protected
bool $_savestate = null (line 160)

Should I save the model's state in the session?

  • access: protected
boolean $__state_set = null (line 30)

Indicates if the internal state has been set

  • since: 12.2
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
static addIncludePath (line 444)

Add a directory where FOFModel should search for models. You may either pass a string or an array of directories.

  • return: An array with directory elements. If prefix is equal to '', all directories are returned.
  • since: 12.2
  • access: public
static array addIncludePath ([mixed $path = ''], [string $prefix = ''])
  • mixed $path: A path or array[sting] of paths to search.
  • string $prefix: A prefix for models.
static addTablePath (line 490)

Adds to the stack of model table paths in LIFO order.

  • since: 12.2
  • access: public
static void addTablePath (mixed $path)
  • mixed $path: The directory as a string or directories as an array to add.
static getAnInstance (line 209)

Returns a new model object. Unless overriden by the $config array, it will try to automatically populate its state from the request variables.

  • access: public
static FOFModel &getAnInstance (string $type, [string $prefix = ''], [array $config = array()])
  • string $type: Model type, e.g. 'Items'
  • string $prefix: Model prefix, e.g. 'FoobarModel'
  • array $config: Model configuration variables
static getTmpInstance (line 404)

Returns a new instance of a model, with the state reset to defaults

  • access: public
static FOFModel &getTmpInstance (string $type, [string $prefix = ''], [array $config = array()])
  • string $type: Model type, e.g. 'Items'
  • string $prefix: Model prefix, e.g. 'FoobarModel'
  • array $config: Model configuration variables
static _createFileName (line 505)

Create the filename for a resource

  • return: The filename
  • since: 12.2
  • access: protected
static string _createFileName (string $type, [array $parts = array()])
  • string $type: The resource type to create the filename for.
  • array $parts: An associative array of filename information.
Constructor __construct (line 524)

Public class constructor

  • access: public
FOFModel __construct ([type $config = array()])
  • type $config: The configuration array

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
addBehavior (line 356)

Adds a behavior to the model

  • return: True if the behavior is found and added
  • access: public
boolean addBehavior (string $name, [array $config = array()])
  • string $name: The name of the behavior
  • array $config: Optional Behavior configuration
applyAccessFiltering (line 2078)

Applies view access level filtering for the specified user. Useful to filter a front-end items listing.

  • return: Reference to self
  • access: public
FOFModel applyAccessFiltering ([integer $userID = null])
  • integer $userID: The user ID to use. Skip it to use the currently logged in user.
buildCountQuery (line 1958)

Builds the count query used in getTotal()

  • access: public
boolean buildCountQuery ()
buildQuery (line 1868)

Builds the SELECT query

  • access: public
JDatabaseQuery buildQuery ([boolean $overrideLimits = false])
  • boolean $overrideLimits: Are we requested to override the set limits?

Redefined in descendants as:
checkin (line 1448)

Checks in the current item

  • access: public
boolean checkin ()
checkout (line 1430)

Checks out the current item

  • access: public
boolean checkout ()
cleanCache (line 2974)

Clean the cache

  • access: protected
void cleanCache ([string $group = null], [integer $client_id = 0])
  • string $group: The cache group
  • integer $client_id: The ID of the client
clearInput (line 988)

Clears the input array.

  • access: public
FOFModel clearInput ()
clearState (line 976)

Clears the model state, but doesn't touch the internal lists of records, record tables or record id variables. To clear these values, please use reset().

  • access: public
FOFModel clearState ()
copy (line 1305)

Copy one or more records

  • return: True on success
  • access: public
boolean copy ()
delete (line 1349)

Deletes one or several items

  • return: True on success
  • access: public
boolean delete ()
findFormFilename (line 2247)

Guesses the best candidate for the path to use for a particular form.

  • return: A string if the path and filename of the form to load is found, false otherwise.
  • since: 2.0
  • access: public
mixed findFormFilename (string $source, [array $paths = array()])
  • string $source: The name of the form file to load, without the .xml extension.
  • array $paths: The paths to look into. You can declare this to override the default FOF paths.
getClone (line 1968)

Clones the model object and returns the clone

  • access: public
FOFModel &getClone ()
getDbo (line 2909)

Method to get the database driver object

  • access: public
JDatabaseDriver getDbo ()
getFirstItem (line 1141)

A cross-breed between getItem and getItemList. It runs the complete query, like getItemList does. However, instead of returning an array of ad-hoc objects, it binds the data from the first item fetched on the list to an instance of the table object and returns that table object instead.

  • access: public
FOFTable &getFirstItem ([boolean $overrideLimits = false])
  • boolean $overrideLimits: Should I override set limits?
getForm (line 2101)

A method for getting the form from the model.

  • return: A FOFForm object on success, false on failure
  • since: 2.0
  • access: public
mixed getForm ([array $data = array()], [boolean $loadData = true], [boolean $source = null])
  • array $data: Data for the form.
  • boolean $loadData: True if the form is to load its own data (default case), false if not.
  • boolean $source: The name of the form. If not set we'll try the form_name state variable or fall back to default.
getHash (line 1720)

Returns a hash for this component and view, e.g. "foobar.items.", used for determining the keys of the variables which will be placed in the session storage.

  • return: The hash
  • access: public
string getHash ()
getId (line 910)

Returns the currently set ID

  • access: public
integer getId ()
getIds (line 946)

Returns the list of IDs for batch operations

  • return: An array of integers
  • access: public
array getIds ()
getItem (line 1041)

Returns a single item. It uses the id set with setId, or the first ID in the list of IDs for batch operations

  • return: A copy of the item's FOFTable array
  • access: public
FOFTable &getItem ([integer $id = null])
  • integer $id: Force a primary key ID to the model. Use null to use the id from the state.
getItemList (line 1110)

Returns a list of items

  • access: public
array &getItemList ([boolean $overrideLimits = false], [string $group = ''])
  • boolean $overrideLimits: Should I override set limits?
  • string $group: The group by clause
getList (line 1097)

Alias for getItemList

  • access: public
array &getList ([boolean $overrideLimits = false], [string $group = ''])
  • boolean $overrideLimits: Should I override set limits?
  • string $group: The group by clause
getName (line 2924)

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: The name of the model
  • throws: Exception
  • access: public
string getName ()
getPagination (line 1586)

Get a pagination object

  • access: public
JPagination getPagination ()
getReorderWhere (line 1856)

Creates the WHERE part of the reorder query

  • access: public
string getReorderWhere ()
getSavedTable (line 1339)

Returns the table object after the last save() operation

  • access: public
FOFTable getSavedTable ()
getState (line 1656)

Get a filtered state variable

  • return: The variable's value
  • access: public
mixed getState ([string $key = null], [mixed $default = null], [string $filter_type = 'raw'])
  • string $key: The name of the state variable
  • mixed $default: The default value to use
  • string $filter_type: Filter type
getTable (line 1773)

Method to get a table object, load it if necessary.

  • return: A FOFTable object
  • access: public
FOFTable getTable ([string $name = ''], [string $prefix = null], [array $options = array()])
  • string $name: The table name. Optional.
  • string $prefix: The class prefix. Optional.
  • array $options: Configuration array for model. Optional.
getTableAlias (line 1948)

Get the alias set for this model's table

  • return: The table alias
  • access: public
string getTableAlias ()
getTableFields (line 1926)

Returns a list of the fields of the table associated with this model

  • access: public
array getTableFields ()
getTotal (line 1610)

Get the number of all items

  • access: public
integer getTotal ()
getUserStateFromRequest (line 1739)

Gets the value of a user state variable.

  • return: request user state.
  • access: protected
The getUserStateFromRequest (string $key, string $request, [string $default = null], [string $type = 'none'], [boolean $setUserState = true])
  • string $key: The key of the user state variable.
  • string $request: The name of the variable passed in a request.
  • string $default: The default value for the variable if not found. Optional.
  • string $type: Filter for the variable, for valid values see JFilterInput::clean(). Optional.
  • boolean $setUserState: Should I save the variable in the user state? Default: true. Optional.
hit (line 1484)

Increments the hit counter

  • access: public
boolean hit ()
isCheckedOut (line 1466)

Tells you if the current item is checked out or not

  • access: public
boolean isCheckedOut ()
loadForm (line 2149)

Method to get a form object.

  • return: FOFForm object on success, False on error.
  • see: FOFForm
  • since: 2.0
  • access: protected
mixed loadForm (string $name, [string $source = null], [array $options = array()], [boolean $clear = false], [string $xpath = false])
  • string $name: The name of the form.
  • string $source: The form source. Can be XML string if file flag is set to false.
  • array $options: Optional array of options for the form creation.
  • boolean $clear: Optional argument to force load a new form.
  • string $xpath: An optional xpath to search for the fields.
loadFormData (line 2327)

Method to get the data that should be injected in the form.

  • return: The default data is an empty array.
  • since: 2.0
  • access: protected
array loadFormData ()
move (line 1514)

Moves the current item up or down in the ordering list

  • return: True on success
  • access: public
boolean move (string $dirn)
  • string $dirn: The direction and magnitude to use (2 means move up by 2 positions, -3 means move down three positions)
onAfterCopy (line 2722)

This method runs after a record has been copied

  • return: True to allow the copy
  • access: protected
boolean onAfterCopy (FOFTable &$table)
  • FOFTable &$table: The table instance of the record which was copied
onAfterDelete (line 2663)

This method runs after a record with key value $id is deleted

  • return: Return false to raise an error, true otherwise
  • access: protected
boolean onAfterDelete (integer $id)
  • integer $id: The id of the record which was deleted
onAfterGetItem (line 2497)

This method runs after an item has been gotten from the database in a read operation. You can modify it before it's returned to the MVC triad for further processing.

  • access: protected
void onAfterGetItem (FOFTable &$record)
  • FOFTable &$record: The table instance we fetched
onAfterHit (line 2806)

This method runs after a record has been hit

  • return: True to allow the operation
  • access: protected
boolean onAfterHit (FOFTable &$table)
  • FOFTable &$table: The table instance of the record which was hit
onAfterLoadForm (line 2447)

Allows the manipulation after the form is loaded

  • access: public
viod onAfterLoadForm (FOFForm $form, string &$name, string &$source, array &$options)
  • FOFForm $form: A FOFForm object.
  • string &$name: The name of the form.
  • string &$source: The form source. Can be XML string if file flag is set to false.
  • array &$options: Optional array of options for the form creation.
onAfterMove (line 2848)

This method runs after a record has been moved

  • return: True to allow the operation
  • access: protected
boolean onAfterMove (FOFTable &$table)
  • FOFTable &$table: The table instance of the record which was moved
onAfterPreprocessForm (line 2471)

Allows data and form manipulation after preprocessing the form

  • access: public
viod onAfterPreprocessForm (FOFForm $form, array &$data)
  • FOFForm $form: A FOFForm object.
  • array &$data: The data expected for the form.
onAfterPublish (line 2764)

This method runs after a record has been published

  • return: True to allow the operation
  • access: protected
boolean onAfterPublish (FOFTable &$table)
  • FOFTable &$table: The table instance of the record which was published
onAfterReorder (line 2890)

This method runs after a table is reordered

  • return: True to allow the operation
  • access: protected
boolean onAfterReorder (FOFTable &$table)
  • FOFTable &$table: The table instance which was reordered
onAfterSave (line 2576)

This method runs after the data is saved to the $table.

  • access: protected
boolean onAfterSave (FOFTable &$table)
  • FOFTable &$table: The table which was saved
onBeforeCopy (line 2701)

This method runs before a record is copied

  • return: True to allow the copy
  • access: protected
boolean onBeforeCopy (FOFTable &$table)
  • FOFTable &$table: The table instance of the record being copied
onBeforeDelete (line 2613)

This method runs before the record with key value of $id is deleted from $table

  • access: protected
boolean onBeforeDelete (integer &$id, FOFTable &$table)
  • integer &$id: The ID of the record being deleted
  • FOFTable &$table: The table instance used to delete the record
onBeforeHit (line 2785)

This method runs before a record is hit

  • return: True to allow the operation
  • access: protected
boolean onBeforeHit (FOFTable &$table)
  • FOFTable &$table: The table instance of the record being hit
onBeforeLoadForm (line 2433)

Allows the manipulation before the form is loaded

  • access: public
viod onBeforeLoadForm (string &$name, string &$source, array &$options)
  • string &$name: The name of the form.
  • string &$source: The form source. Can be XML string if file flag is set to false.
  • array &$options: Optional array of options for the form creation.
onBeforeMove (line 2827)

This method runs before a record is moved

  • return: True to allow the operation
  • access: protected
boolean onBeforeMove (FOFTable &$table)
  • FOFTable &$table: The table instance of the record being moved
onBeforePreprocessForm (line 2459)

Allows data and form manipulation before preprocessing the form

  • access: public
viod onBeforePreprocessForm (FOFForm $form, array &$data)
  • FOFForm $form: A FOFForm object.
  • array &$data: The data expected for the form.
onBeforePublish (line 2743)

This method runs before a record is published

  • return: True to allow the operation
  • access: protected
boolean onBeforePublish (FOFTable &$table)
  • FOFTable &$table: The table instance of the record being published
onBeforeReorder (line 2869)

This method runs before a table is reordered

  • return: True to allow the operation
  • access: protected
boolean onBeforeReorder (FOFTable &$table)
  • FOFTable &$table: The table instance being reordered
onBeforeSave (line 2520)

This method runs before the $data is saved to the $table. Return false to stop saving.

  • return: Return false to prevent saving, true to allow it
  • access: protected
boolean onBeforeSave (array &$data, FOFTable &$table)
  • array &$data: The data to save
  • FOFTable &$table: The table to save the data to
onProcessList (line 2484)

This method can be overriden to automatically do something with the list results array. You are supposed to modify the list which was passed in the parameters; DO NOT return a new array!

  • access: protected
void onProcessList (array &$resultArray)
  • array &$resultArray: An array of objects, each row representing a record

Redefined in descendants as:
populateSavestate (line 2039)

Initialises the _savestate variable

  • access: public
void populateSavestate ([integer $defaultSaveState = -999])
  • integer $defaultSaveState: The default value for the savestate
populateState (line 2066)

Method to auto-populate the model state.

This method should only be called once per instantiation and is designed to be called on the first call to the getState() method unless the model configuration flag to ignore the request is set.

  • since: 12.2
  • access: protected
void populateState ()
preprocessForm (line 2352)

Method to allow derived classes to preprocess the form.

  • see: FOFFormField
  • throws: Exception if there is an error in the form event.
  • since: 2.0
  • access: protected
void preprocessForm (FOFForm $form, mixed &$data, [string $group = 'content'])
  • FOFForm $form: A FOFForm object.
  • mixed &$data: The data expected for the form.
  • string $group: The name of the plugin group to import (defaults to "content").
publish (line 1386)

Toggles the published state of one or several items

  • return: True on success
  • access: public
boolean publish ([integer $publish = 1], [integer $user = null])
  • integer $publish: The publishing state to set (e.g. 0 is unpublished)
  • integer $user: The user ID performing this action
reorder (line 1555)

Reorders all items in the table

  • access: public
boolean reorder ()
reset (line 956)

Resets the model, like it was freshly loaded

  • access: public
FOFModel reset ()
resetSavedState (line 1026)

Resets the saved state for this view

  • access: public
FOFModel resetSavedState ()
save (line 1169)

Binds the data to the model and tries to save it

  • return: True on success
  • access: public
boolean save (array|object $data)
  • array|object $data: The source data array or object
savestate (line 2025)

Sets the model state auto-save status. By default the model is set up to save its state to the session.

  • return: Reference to self
  • access: public
FOFModel &savestate (boolean $newState)
  • boolean $newState: True to save the state, false to not save it.
setDbo (line 2948)

Method to set the database driver object

  • access: public
void setDbo (JDatabaseDriver $db)
setId (line 896)

Sets the ID and resets internal data

  • access: public
FOFModel setId ([integer $id = 0])
  • integer $id: The ID to use
setIds (line 922)

Sets a list of IDs for batch operations from an array and resets the model

  • access: public
FOFModel setIds (array $idlist)
  • array $idlist: An array of item IDs to be set to the model's state
setIDsFromRequest (line 863)

Sets the list of IDs from the request data

  • access: public
FOFModel setIDsFromRequest ()
setInput (line 1003)

Set the internal input field

  • access: public
FOFModel setInput ($input $input)
  • $input $input
setState (line 2961)

Method to set model state variables

  • return: The previous value of the property or null if not set.
  • access: public
mixed setState (string $property, [mixed $value = null])
  • string $property: The name of the property.
  • mixed $value: The value of the property to set or null.
validateForm (line 2388)

Method to validate the form data.

  • return: Array of filtered data if valid, false otherwise.
  • see: JFormRule
  • see: JFilterInput
  • since: 2.0
  • access: public
mixed validateForm (FOFForm $form, array $data, [string $group = null])
  • FOFForm $form: The form to validate against.
  • array $data: The data to validate.
  • string $group: The name of the field group to validate.
_createTable (line 1821)

Method to load and return a model object.

  • return: Table object or boolean false if failed
  • access: protected
FOFTable &_createTable (string $name, [string $prefix = 'Table'], [array $config = array()])
  • string $name: The name of the view
  • string $prefix: The class prefix. Optional.
  • array $config: The configuration array to pass to the table
_getList (line 1754)

Returns an object list

  • return: Array of objects
  • access: protected
array &_getList (string $query, [integer $limitstart = 0], [integer $limit = 0], [string $group = ''])
  • string $query: The query
  • integer $limitstart: Offset from start
  • integer $limit: The number of records
  • string $group: The group by clause
_getListCount (line 1642)

Returns a record count for the query

  • return: Number of rows for query
  • since: 12.2
  • access: protected
integer _getListCount (string $query)
  • string $query: The query.
_real_getState (line 1699)

Method to get model state variables

  • return: property where specified, the state object where omitted
  • since: 12.2
  • access: protected
object The _real_getState ([string $property = null], [mixed $default = null])
  • string $property: Optional parameter name
  • mixed $default: Optional default value
__call (line 2009)

Magic caller; allows to use the name of model state keys as methods to set their values.

  • return: Reference to self
  • access: public
FOFModel __call (string $name, mixed $arguments)
  • string $name: The name of the state variable to set
  • mixed $arguments: The value to set the state variable to
__get (line 1982)

Magic getter; allows to use the name of model state keys as properties

  • return: The value of the variable
  • access: public
mixed __get (string $name)
  • string $name: The name of the variable to get
__set (line 1995)

Magic setter; allows to use the name of model state keys as properties

  • access: public
void __set (string $name, mixed $value)
  • string $name: The name of the variable
  • mixed $value: The value to set the variable to

Inherited Methods

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 15:08:34 +0100 by phpDocumentor 1.4.3