public static function toSerialize($resource) {
		if (!self::isArray($resource)) {
			$resource = self::toArray($resource);
		}

		return serialize($resource);
	}
public static function toSerialize($resource) {
		if (!self::isArray($resource)) {
			$resource = self::toArray($resource);
		}

		return serialize($resource);
	}
public static function toSerialize ( $ resource ) { if ( ! self :: isArray ( $ resource ) ) { $ resource = self :: toArray ( $ resource ) ; } return serialize ( $ resource ) ; }
Transforms a resource into a serialized form.

@access public
@param mixed $resource
@return string
@static
Transforms a resource into a serialized form .