[TYPO3-mvc] RFC: #8083 define default __toString method in Tx_Extbase_DomainObject_AbstractDomainObject

Martin Kutschker masi-no at spam-typo3.org
Thu Nov 11 09:13:12 CET 2010


Am 10.11.2010 23:21, schrieb Marc Bastian Heinrichs:
> Hi,
> 
>>> Solution:
>>> Add magic method __toString to return the uid
>>
>> What about [<class name>:<uid>]? The uid conveys very little information.
> 
> Here is the new Version with returning also the class name.

+1

Nitpick: if you enclose the whole return value in square brackets you will avoid ambiguities when
the string following starts with a digit.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list