示例#1
0
 public function offsetSet($offset, $value)
 {
     if (false === $this->checkType($this->getKeyType(), $offset)) {
         throw new \InvalidArgumentException('Key must be of type ' . $this->getKeyType() . '; key is ' . $this->toolValueToString($offset));
     }
     if (false === $this->checkType($this->getValueType(), $value)) {
         throw new \InvalidArgumentException('Value must be of type ' . $this->getValueType() . '; value is ' . $this->toolValueToString($value));
     }
     parent::offsetSet($offset, $value);
 }
示例#2
0
 /**
  * Constructs a new NamedParameterMap object
  *
  * @param array $namedParameters The named parameters supported
  * @param array $data
  */
 public function __construct(array $namedParameters, array $data = [])
 {
     $this->namedParameters = $this->filterNamedParameters($namedParameters);
     parent::__construct($data);
 }