Return the Type used to serialize individual association values.

@return Type
508777
public function getSerializationType()
    {
        switch ($this->association) {
            case self::ASSOCIATION_TYPE_EMBED_ONE:
            case self::ASSOCIATION_TYPE_EMBED_MANY:
                return TypeFactory::getType(Type::MAP);
            case self::ASSOCIATION_TYPE_REFERENCE_ONE:
            case self::ASSOCIATION_TYPE_REFERENCE_MANY:
                return $this->getReferenceSerializationType();
        }

        throw new \BadMethodCallException;
    }
1120083
public function getType() : ?string
    {
        if (null === $this->type) {
            $success = null;

            try {
                $type = $this->getItem('browscap.type', false, $success);
            } catch (InvalidArgumentException $e) {
                $this->logger->error(new \InvalidArgumentException('an error occured while reading the data type from the cache', 0, $e));
                $type = null;
            }

            if (null !== $type && $success) {
                $this->type = $type;
            }
        }

        return $this->type;
    }
191839
public function serialize() {
		return $this->map(function( $val ) {
			if ( $val instanceof Serializes ) {
				$val = $val->serialize();
			}

			return $val;
		})->to_array();
	}
21698
public function getAtomizedValueType()
	{
		if ( $this->IsNode )
		{
			switch ( $this->TypeCode )
			{
				case XmlTypeCode::Text:
				case XmlTypeCode::ProcessingInstruction:
				case XmlTypeCode::Comment:
				case XmlTypeCode::UntypedAtomic:
					return Types::$UntypedAtomicType;

				default:

					if ( ! is_null( $this->SchemaType ) )
						return $this->SchemaType->Datatype->ValueType;
					else if ( ! is_null( $this->SchemaElement ) )
					{
						if ( ! is_null( $this->SchemaElement->ElementSchemaType ) && ! is_null( $this->SchemaElement->ElementSchemaType->Datatype ) )
							return $this->SchemaElement->ElementSchemaType->Datatype->ValueType;
					}
					else if ( ! is_null( $this->SchemaAttribute ) )
					{
						if ( ! is_null( $this->SchemaAttribute->AttributeSchemaType ) && ! is_null( $this->SchemaAttribute->AttributeSchemaType->Datatype ) )
							return $this->SchemaAttribute->AttributeSchemaType->Datatype->ValueType;
					}
					return Types::$UntypedAtomicType;
			}
		}
		else
			return $this->ItemType;
	}
1232228
public function serialize()
    {
        $str = 'BEGIN:'.$this->name."\r\n";

        /**
         * Gives a component a 'score' for sorting purposes.
         *
         * This is solely used by the childrenSort method.
         *
         * A higher score means the item will be lower in the list.
         * To avoid score collisions, each "score category" has a reasonable
         * space to accomodate elements. The $key is added to the $score to
         * preserve the original relative order of elements.
         *
         * @param int   $key
         * @param array $array
         *
         * @return int
         */
        $sortScore = function ($key, $array) {
            if ($array[$key] instanceof Component) {
                // We want to encode VTIMEZONE first, this is a personal
                // preference.
                if ('VTIMEZONE' === $array[$key]->name) {
                    $score = 300000000;

                    return $score + $key;
                } else {
                    $score = 400000000;

                    return $score + $key;
                }
            } else {
                // Properties get encoded first
                // VCARD version 4.0 wants the VERSION property to appear first
                if ($array[$key] instanceof Property) {
                    if ('VERSION' === $array[$key]->name) {
                        $score = 100000000;

                        return $score + $key;
                    } else {
                        // All other properties
                        $score = 200000000;

                        return $score + $key;
                    }
                }
            }
        };

        $children = $this->children();
        $tmp = $children;
        uksort(
            $children,
            function ($a, $b) use ($sortScore, $tmp) {
                $sA = $sortScore($a, $tmp);
                $sB = $sortScore($b, $tmp);

                return $sA - $sB;
            }
        );

        foreach ($children as $child) {
            $str .= $child->serialize();
        }
        $str .= 'END:'.$this->name."\r\n";

        return $str;
    }
425217
public function serialize()
    {
        return serialize([
            'key' => $this->key,
            'value' => $this->value,
            'expires' => $this->expires,
            'hit' => $this->hit
        ]);
    }
363917
public function serialize() {
		return $this->map(function( $element ) {
			if ( $element instanceof Serializes ) {
				return $element->serialize();
			}

			return $element;
		} )->to_array();
	}
307874
public function getMutualType()
    {
        $btAttribute = $this->mutualTypeAttribute;
        if (is_string($btAttribute) && !empty($btAttribute)) {
            return $this->$btAttribute;
        }
        return static::$mutualTypeNormal;
    }
246024
public function serialize()
    {
        try {
            $this->data = $this->data ?: Serializer::getData($this->closure, true);

            return Serialize::encode($this->data, Serializer::getSerializeType());
        } catch (\Exception $e) {
            \trigger_error('Serialization of closure failed: ' . $e->getMessage());
            // Note: The serialize() method of Serializable must return a string
            // or null and cannot throw exceptions.
            return null;
        }
    }
915757
public static function getTypeModel(){
        $type = base64_decode(Session::get(md5(Request::getArea().Request::getController().Request::getAction())));
        if($type == null)
            return 'stdClass';

        return $type;
    }
1017672
public function serialize()
    {
        $result = [
            'code' => $this->getCode(),
            'message' => $this->getMessage(),
            'errors' => $this->getErrors()
        ];

        $result['data'] = $this->getVariables();

        if ($result['data'] instanceof Traversable) {
            $result['data'] = ArrayUtils::iteratorToArray($result['data']);
        }

        if (null !== $this->jsonpCallback) {
            return $this->jsonpCallback . '(' . Json::encode($result) . ');';
        }

        return Json::encode($result);
    }
655362
public function serializeAttributes()
    {
        foreach ($this->attributes as $key => $attribute) {
            $attribute = is_numeric($key) ? $attribute : $key;
            $value = $this->owner->getAttribute($attribute);
            switch ($this->type) {
                case static::TYPE_JSON :
                    $value = json_encode($value);
                    break;
                case static::TYPE_PHP :
                    $value = serialize($value);
                    break;
                default: throw new Exception("Unknown type: ". $this->type);
            }
            $this->owner->setAttribute($attribute, $value);
        }
    }
1272016
public function serialize()
    {
        if($this->__converter instanceof IListConverter)
        {
            return $this->__converter->toArray($this);
        }
        else
        {
            return $this->toArray();
        }
    }
380910
protected function getType(): string
    {
        return join('|', array_filter([
            $this->traversable,
            isset($this->subtype) ? $this->subtype . '[]' : null
        ])) ?: 'array';
    }
500478
public static function serialize () {
		$data = [];
		foreach (static::$multitonInstances as $name => $instance) {
			$data[$name] = serialize($instance);
		}
		return serialize($data);
	}
431172
public function serialize()
    {
        SerializableClosure::enterContext();
        $object = serialize([
            'resolver' => $this->resolver,
            'collection' => $this->collection,
        ]);
        SerializableClosure::exitContext();

        return $object;
    }
1068583
public function serialize()
    {
        $data = array();

        $private_properties = array(
            'row_wrapper_class',
            'index_field',
            'objects',
            'objects_by_index',
            'options'
        );

        foreach ($private_properties as $property) {
            $data[$property] = $this->$property;
        }

        return serialize($data);
    }