public function set($key, $value)
    {
        $this->checkRestriction($value);

        if (!is_null($key)) {
            $this->value[$key] = $value;
        } else {
            $this->value[] = $value;
        }

        return $this;
    }
public function set($key, $value)
    {
        $this->checkRestriction($value);

        if (!is_null($key)) {
            $this->value[$key] = $value;
        } else {
            $this->value[] = $value;
        }

        return $this;
    }
public function set ( $ key , $ value ) { $ this -> checkRestriction ( $ value ) ; if ( ! is_null ( $ key ) ) { $ this -> value [ $ key ] = $ value ; } else { $ this -> value [ ] = $ value ; } return $ this ; }
Define a key and associate a value to it

Associates a key with a value, overwriting a previous association if one exists.

@param mixed $key
@param mixed $value

@return $this
Define a key and associate a value to it