public function setIndexingProperty($key, $value)
    {
        // make sure to not interfere with existing indexing properties
        $this->loadIndexingProperties();

        $key = (string)$key; // Scalar typehints now!

        if (!is_string($value) && !is_int($value) && !is_float($value)) {
            throw new \InvalidArgumentException(
                'Cannot set indexing property "' . $key
                . '", its value must be string, integer or float, '
                . 'type given was "' . gettype($value) . '"',
                1323173209
            );
        }

        $this->indexingProperties[$key] = $value;
        $this->hasIndexingProperties = true;
    }
public function setIndexingProperty($key, $value)
    {
        // make sure to not interfere with existing indexing properties
        $this->loadIndexingProperties();

        $key = (string)$key; // Scalar typehints now!

        if (!is_string($value) && !is_int($value) && !is_float($value)) {
            throw new \InvalidArgumentException(
                'Cannot set indexing property "' . $key
                . '", its value must be string, integer or float, '
                . 'type given was "' . gettype($value) . '"',
                1323173209
            );
        }

        $this->indexingProperties[$key] = $value;
        $this->hasIndexingProperties = true;
    }
public function setIndexingProperty ( $ key , $ value ) { // make sure to not interfere with existing indexing properties $ this -> loadIndexingProperties ( ) ; $ key = ( string ) $ key ; // Scalar typehints now! if ( ! is_string ( $ value ) && ! is_int ( $ value ) && ! is_float ( $ value ) ) { throw new \ InvalidArgumentException ( 'Cannot set indexing property "' . $ key . '", its value must be string, integer or float, ' . 'type given was "' . gettype ( $ value ) . '"' , 1323173209 ) ; } $ this -> indexingProperties [ $ key ] = $ value ; $ this -> hasIndexingProperties = true ; }
Sets an indexing property for the item.

@param string $key Indexing property name
@param string|int|float $value Indexing property value
@throws \InvalidArgumentException when $value is not string, integer or float
Sets an indexing property for the item .