Support Joomla!

references:joomla.framework:base:jobject-tostring

Table of Contents

toString

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Base Class JObject Method toString Reference toString() Never Work in Progress

Object-to-string conversion. This function is empty and can be redefined by subclasses.

Syntax

string toString ()

Examples

In the base class, this function returns the name of the class to which the object belongs.

Example

$object = new JObject();
echo $object->toString();

Might produce:

Result

jobject

Note: In PHP 4 get_class() returns a user defined class name in lowercase, but in PHP 5 it will return the class name in it’s original notation.

In PHP 5 the above example would produce:

Result

JObject

Discussion

Full name:
E-Mail:
 
references/joomla.framework/base/jobject-tostring.txt (686 views) · Last modified: 2007/08/15 15:08