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 (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']);

		return serialize($vars);
	}