Pheasant\Collection::offsetSet PHP Method

offsetSet() public method

public offsetSet ( $offset, $value )
    public function offsetSet($offset, $value)
    {
        if (empty($this->_add) && is_null($offset)) {
            throw new \BadMethodCallException('Add not supported');
        } else {
            if (is_null($offset)) {
                return call_user_func($this->_add, $value);
            } else {
                throw new \BadMethodCallException('Set not supported');
            }
        }
    }