TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject:
TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface TYPO3\CMS\Extbase\Persistence\ObjectMonitoringInterface t3lib_object_tests_initializable Tx_Extbase_DomainObject_AbstractDomainObject TYPO3\CMS\Extbase\DomainObject\AbstractEntity TYPO3\CMS\Extbase\DomainObject\AbstractValueObject ExtbaseTeam\BlogExample\Domain\Model\Blog ExtbaseTeam\BlogExample\Domain\Model\Comment ExtbaseTeam\BlogExample\Domain\Model\Person ExtbaseTeam\BlogExample\Domain\Model\Post OliverHader\IrreTutorial\Domain\Model\Content OliverHader\IrreTutorial\Domain\Model\Hotel OliverHader\IrreTutorial\Domain\Model\Offer OliverHader\IrreTutorial\Domain\Model\Price Tx_Extbase_DomainObject_AbstractEntity TYPO3\CMS\About\Domain\Model\Extension TYPO3\CMS\Belog\Domain\Model\Constraint TYPO3\CMS\Belog\Domain\Model\HistoryEntry TYPO3\CMS\Belog\Domain\Model\LogEntry TYPO3\CMS\Belog\Domain\Model\Workspace TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup TYPO3\CMS\Beuser\Domain\Model\Demand TYPO3\CMS\Documentation\Domain\Model\Document TYPO3\CMS\Documentation\Domain\Model\DocumentFormat TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder TYPO3\CMS\Extbase\Domain\Model\BackendUser TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup TYPO3\CMS\Extbase\Domain\Model\Category TYPO3\CMS\Extbase\Domain\Model\FileMount TYPO3\CMS\Extbase\Domain\Model\FrontendUser TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup TYPO3\CMS\Extbase\Tests\Fixture\Entity TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Model\Entity2 TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Model\Entity3 TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationCategory TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationSubcategory TYPO3\CMS\Extensionmanager\Domain\Model\Dependency TYPO3\CMS\Extensionmanager\Domain\Model\Extension TYPO3\CMS\Extensionmanager\Domain\Model\Mirrors TYPO3\CMS\Extensionmanager\Domain\Model\Repository TYPO3\CMS\Lang\Domain\Model\Extension TYPO3\CMS\Lang\Domain\Model\Language TYPO3\CMS\Lang\Domain\Model\LanguageSelectionForm TYPO3\CMS\Lang\Domain\Model\UpdateTranslationForm TYPO3\CMS\SysNote\Domain\Model\SysNote ExtbaseTeam\BlogExample\Domain\Model\Tag Tx_Extbase_DomainObject_AbstractValueObject TYPO3\CMS\Extbase\Tests\Fixture\ValueObject

Public Member Functions

 __wakeup ()
 
 initializeObject ()
 
 getUid ()
 
 setPid ($pid)
 
 getPid ()
 
 _setProperty ($propertyName, $propertyValue)
 
 _getProperty ($propertyName)
 
 _getProperties ()
 
 _hasProperty ($propertyName)
 
 _isNew ()
 
 _memorizeCleanState ($propertyName=NULL)
 
 _memorizePropertyCleanState ($propertyName)
 
 _getCleanProperties ()
 
 _getCleanProperty ($propertyName)
 
 _isDirty ($propertyName=NULL)
 
 _isClone ()
 
 _setClone ($clone)
 
 __clone ()
 
 __toString ()
 
- Public Member Functions inherited from TYPO3\CMS\Extbase\Persistence\ObjectMonitoringInterface
 _memorizeCleanState ()
 
 _isDirty ()
 

Protected Member Functions

 isPropertyDirty ($previousValue, $currentValue)
 

Protected Attributes

 $uid
 
 $_localizedUid
 
 $_languageUid
 
 $_versionedUid
 
 $pid
 

Private Attributes

 $_isClone = FALSE
 
 $_cleanProperties = array()
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! A generic Domain Object.

All Model domain objects need to inherit from either AbstractEntity or AbstractValueObject, as this provides important framework information.

Definition at line 21 of file AbstractDomainObject.php.

Member Function Documentation

◆ __clone()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::__clone ( )

Clone method. Sets the _isClone property.

Returns
void

Definition at line 317 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isClone().

◆ __toString()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::__toString ( )

Returns the class name and the uid of the object as string

Returns
string

Definition at line 326 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractValueObject\getValue().

◆ __wakeup()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::__wakeup ( )

This is the magic __wakeup() method. It's invoked by the unserialize statement in the reconstitution process of the object. If you want to implement your own __wakeup() method in your Domain Object you have to call parent::__wakeup() first!

Returns
void

Definition at line 67 of file AbstractDomainObject.php.

◆ _getCleanProperties()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_getCleanProperties ( )

Returns a hash map of clean properties and $values.

Returns
array

Definition at line 225 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$_cleanProperties.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isDirty().

◆ _getCleanProperty()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_getCleanProperty (   $propertyName)

Returns the clean value of the given property. The returned value will be NULL if the clean state was not memorized before, or if the clean value is NULL.

Parameters
string$propertyNameThe name of the property to be memorized.
Returns
mixed The clean property value or NULL

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 236 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isDirty().

◆ _getProperties()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_getProperties ( )

Returns a hash map of property names and property values. Only for internal use.

Returns
array The properties

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 143 of file AbstractDomainObject.php.

◆ _getProperty()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_getProperty (   $propertyName)

Returns the property value of the given property name. Only for internal use.

Parameters
string$propertyName
Returns
mixed The propertyValue

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 134 of file AbstractDomainObject.php.

◆ _hasProperty()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_hasProperty (   $propertyName)

Returns the property value of the given property name. Only for internal use.

Parameters
string$propertyName
Returns
boolean TRUE bool true if the property exists, FALSE if it doesn't exist or NULL in case of an error.

Definition at line 159 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_setProperty().

◆ _isClone()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_isClone ( )

Returns TRUE if the object has been clonesd, cloned, FALSE otherwise.

Returns
boolean TRUE if the object has been cloned

Definition at line 296 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$_isClone.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\__clone(), and TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_setClone().

◆ _isDirty()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_isDirty (   $propertyName = NULL)

Returns TRUE if the properties were modified after reconstitution

Parameters
string$propertyNameAn optional name of a property to be checked if its value is dirty
Exceptions

Definition at line 247 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getCleanProperties(), TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_getCleanProperty(), and TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\isPropertyDirty().

◆ _isNew()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_isNew ( )

Returns TRUE if the object is new (the uid was not set, yet). Only for internal use

Returns
boolean

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 168 of file AbstractDomainObject.php.

◆ _memorizeCleanState()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_memorizeCleanState (   $propertyName = NULL)

Register an object's clean state, e.g. after it has been reconstituted from the database.

Parameters
string$propertyNameThe name of the property to be memorized. If omitted all persistable properties are memorized.
Returns
void

Definition at line 179 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_memorizePropertyCleanState().

◆ _memorizePropertyCleanState()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_memorizePropertyCleanState (   $propertyName)

Register an properties's clean state, e.g. after it has been reconstituted from the database.

Parameters
string$propertyNameThe name of the property to be memorized. If omittet all persistable properties are memorized.
Returns
void

Definition at line 202 of file AbstractDomainObject.php.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_memorizeCleanState().

◆ _setClone()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_setClone (   $clone)

Setter whether this Domain Object is a clone of another one. NEVER SET THIS PROPERTY DIRECTLY. We currently need it to make the _isDirty check inside AbstractEntity work, but it is just a work- around right now.

Parameters
boolean$clone

Definition at line 308 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isClone().

◆ _setProperty()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::_setProperty (   $propertyName,
  $propertyValue 
)

Reconstitutes a property. Only for internal use.

Parameters
string$propertyName
mixed$propertyValue
Returns
boolean

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 120 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_hasProperty().

◆ getPid()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::getPid ( )

Getter for the pid.

Returns
integer The pid or NULL if none set yet.

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 105 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$pid.

◆ getUid()

◆ initializeObject()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::initializeObject ( )

Definition at line 70 of file AbstractDomainObject.php.

◆ isPropertyDirty()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::isPropertyDirty (   $previousValue,
  $currentValue 
)
protected

Checks the $value against the $cleanState.

Parameters
mixed$previousValue
mixed$currentValue
Returns
boolean

Definition at line 273 of file AbstractDomainObject.php.

References $result.

Referenced by TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\_isDirty().

◆ setPid()

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::setPid (   $pid)

Setter for the pid.

Parameters
integer | NULL$pid
Returns
void

Implements TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

Definition at line 92 of file AbstractDomainObject.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\$pid.

Member Data Documentation

◆ $_cleanProperties

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_cleanProperties = array()
private

◆ $_isClone

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_isClone = FALSE
private

◆ $_languageUid

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_languageUid
protected

Definition at line 36 of file AbstractDomainObject.php.

◆ $_localizedUid

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_localizedUid
protected

Definition at line 31 of file AbstractDomainObject.php.

◆ $_versionedUid

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_versionedUid
protected

Definition at line 41 of file AbstractDomainObject.php.

◆ $pid

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$pid
protected

◆ $uid

TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$uid
protected