public function append($selector, $value)
    {
        $oldValue = $this->get($selector);
        if ($oldValue) {
            if (!is_array($oldValue)) {
                $oldValue = (array) $oldValue;
            }
            $oldValue[] = $value;
            $value = $oldValue;
        }

        $this->set($selector, $value);
        return $this;
    }
public function append($selector, $value)
    {
        $oldValue = $this->get($selector);
        if ($oldValue) {
            if (!is_array($oldValue)) {
                $oldValue = (array) $oldValue;
            }
            $oldValue[] = $value;
            $value = $oldValue;
        }

        $this->set($selector, $value);
        return $this;
    }
public function append ( $ selector , $ value ) { $ oldValue = $ this -> get ( $ selector ) ; if ( $ oldValue ) { if ( ! is_array ( $ oldValue ) ) { $ oldValue = ( array ) $ oldValue ; } $ oldValue [ ] = $ value ; $ value = $ oldValue ; } $ this -> set ( $ selector , $ value ) ; return $ this ; }
If field not exist - set value.
If field exists and is not array - convert to array and append
If field -s array - append

@param string $selector
@param mixed $value
@return \Sokil\Mongo\Structure
If field not exist - set value . If field exists and is not array - convert to array and append If field - s array - append