public function setRawProperty( $rawName, $value,
                                    $priority = self::PRIORITY_NORMAL )
    {
        if ( is_array( $value ) )
        {
            $value = (object) $value;
        }

        if ( is_object( $value ) )
        {
            if ( isset( $value->priority ) )
            {
                $priority = $value->priority;
            }

            if ( isset( $value->value ) )
            {
                $value = $value->value;
            }
            else
            {
                $value = null;
            }
        }

        $rawName    = (string) $rawName;
        $value      = (string) $value;
        $priority   = ( (string) $priority ) ?: self::PRIORITY_NORMAL;

        if ( '' === $value )
        {
            return $this->removeRawProperty( $rawName );
        }

        $this->properties[$rawName] = array(
            'name'      => $rawName,
            'value'     => $value,
            'priority'  => $priority,
        );

        return $this;
    }