lithium\data\Entity::serialize()

public method

Prepares, enables and executes serialization of the object.

Note: because of the limitations outlined below custom handlers and schema are ignored with serialized objects.

Properties that hold anonymous functions are also skipped. Some of these can almost be reconstructed (_handlers) others cannot (_methodFilters and schema).

Returns

string

Serialized properties of the object.

Source

	public function serialize() {
		$vars = get_object_vars($this);
		unset($vars['_schema']);
		unset($vars['_config']['schema']);
		unset($vars['_handlers']);
		unset($vars['_methodFilters']);

		return serialize($vars);
	}