public function serialize(array $unserialized = null)
    {

        // initialize the array
        $attributes = array();

        if (is_array($unserialized)) {
            // serialize the key/value pairs into the array
            foreach ($unserialized as $attributeCode => $attributeValue) {
                $attributes[] = implode('=', array($attributeCode, $attributeValue));
            }
        }

        // serialize the array itself
        return $this->implode($attributes);
    }