[TYPO3-mvc] How to pass null to a setter that expects an object

Sebastian Kurfürst sebastian at typo3.org
Fri Jan 15 06:02:21 CET 2010


Hi,


> /**
>  * set the favorite property
>  * @param Tx_Myext_Domain_Model_Property $property Your favortite
>  */
> public function setFavorite(Tx_Myext_Domain_Model_Property $property) {
>     $this->favorite = $property;
> }
Try
public function setFavorite(Tx_Myext_Domain_Model_Property $property =
NULL) {
}

Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list