public function offsetSet($offset, $value)
	{
		if (is_null($offset))
		{
			if( ! $this->isCollection)
			{
				throw new Exception('You need to specify a valid key for model.');
			}

			$this->data[] = $value;
		} 
		else 
		{
			if($this->isCollection)
			{
				$this->data[$offset] = $value;
				return;
			}

			$this->data->{$offset} = $value;
		}
	}
public function offsetSet($offset, $value)
	{
		if (is_null($offset))
		{
			if( ! $this->isCollection)
			{
				throw new Exception('You need to specify a valid key for model.');
			}

			$this->data[] = $value;
		} 
		else 
		{
			if($this->isCollection)
			{
				$this->data[$offset] = $value;
				return;
			}

			$this->data->{$offset} = $value;
		}
	}
public function offsetSet ( $ offset , $ value ) { if ( is_null ( $ offset ) ) { if ( ! $ this -> isCollection ) { throw new Exception ( 'You need to specify a valid key for model.' ) ; } $ this -> data [ ] = $ value ; } else { if ( $ this -> isCollection ) { $ this -> data [ $ offset ] = $ value ; return ; } $ this -> data -> { $ offset } = $ value ; } }
Set data at specific offset

@param  string $offset
@param  string $value
@return mixed
Set data at specific offset