Documentation Menu

1.5 Template Project

The Joomla! Documentation Working Group is running a project to develop detailed reference and tutorial material on Joomla! 1.5 templates.  There is a project page on the documentation wiki where you can see the work in progress and help us by contributing your knowledge.

Who's Online

We have 11 guests online

Help Site License

The Joomla! Help Site content is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution NonCommercial ShareAlike 2.5. Some parts of this website may be subject to other licenses.
Home arrow Manual arrow 11. API Reference arrow [WORKING] mosBindArrayToObject

[WORKING] mosBindArrayToObject PDF Print E-mail

Last reviewed: Not reviewed


Copy the contents of an array into an object.

This function matches fields in the array with attributes of the same name in the object. If a field exists in the array but does not match an attribute in the object then it is ignored. If an attribute exists in the object but does not match an array field then it will be ignored. Object attributes whose name begins with an underscore character are always ignored.

Returns true if successful; false otherwise.


boolean mosBindObjectToArray ( array $array, object $obj [, string $ignore [, string $prefix
                                                                         [, boolean $stripSlashes ]]] )

is an associative array of key/value pairs to update.
is the object to be updated.
is a string. If a key name contains this string as a substring then the key/value pair will be ignored. This argument is optional and if omitted will default to an emtpy string.
is a prefix string. An array entry will bind to an object attribute only if the field name with the prefix string prepended to it also exists. This parameter is optional and if omitted will default to null.
is a flag. If true and magic_quotes_gpc is also true then slashes will be removed from the updated value placed in the object. If false or if magic_quotes_gpc is false then slashes will not be removed.  This parameter is optional and if omitted will default to true.

Defined in

(includes/joomla.php prior to Joomla 1.1)
(includes/mambo.php prior to Joomla 1.0)



Please report any errors on this page to the Developer Documentation Forum.

Last Updated ( Monday, 25 December 2006 )
< Prev   Next >