module/Customize/src/Grid/Customize/Model/Rule/Structure.php
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;
    }
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;
    }
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 ; }
Set raw property

@param string $rawName
@param mixed $value
@param string $priority
@return \Customize\Model\Rule\Structure
Set raw property