protected function setObject(DataObject $object, $name = 'Object')
    {
        $this->{$name . 'ID'} = $object->ID;
        $this->{$name . 'Type'} = $object->ClassName;
    }
protected function setObject(DataObject $object, $name = 'Object')
    {
        $this->{$name . 'ID'} = $object->ID;
        $this->{$name . 'Type'} = $object->ClassName;
    }
protected function setObject ( DataObject $ object , $ name = 'Object' ) { $ this -> { $ name . 'ID' } = $ object -> ID ; $ this -> { $ name . 'Type' } = $ object -> ClassName ; }
Sets a data object for persisting by adding its id and type to the serialised vars

@param DataObject $object
@param string $name A name to give it, if you want to store more than one
Sets a data object for persisting by adding its id and type to the serialised vars