public function offsetSet( $offset, $value ) {
        $temp = $this->values();

        if ( $this->has( $value ) === false ) {
            if ( is_null( $offset ) ) {
                $temp[] = $value;
            } else {
                $temp[ $offset ] = $value;
            }
        }

        $this->exchangeArray( $temp );

        $this->size = $this->count();
    }
public function offsetSet( $offset, $value ) {
        $temp = $this->values();

        if ( $this->has( $value ) === false ) {
            if ( is_null( $offset ) ) {
                $temp[] = $value;
            } else {
                $temp[ $offset ] = $value;
            }
        }

        $this->exchangeArray( $temp );

        $this->size = $this->count();
    }
public function offsetSet ( $ offset , $ value ) { $ temp = $ this -> values ( ) ; if ( $ this -> has ( $ value ) === false ) { if ( is_null ( $ offset ) ) { $ temp [ ] = $ value ; } else { $ temp [ $ offset ] = $ value ; } } $ this -> exchangeArray ( $ temp ) ; $ this -> size = $ this -> count ( ) ; }
The main setter for the Array functionality.

Ensures duplicates cant exist and updates the size property on value insert

@param  int|null $offset  The key to insert a value at
@param  mixed    $value   The value to insert
@return void
The main setter for the Array functionality .