public function setVirtual(array $properties, $merge = false)
    {
        if ($merge === false) {
            $this->_virtual = $properties;

            return $this;
        }

        $properties = array_merge($this->_virtual, $properties);
        $this->_virtual = array_unique($properties);

        return $this;
    }
public function setVirtual(array $properties, $merge = false)
    {
        if ($merge === false) {
            $this->_virtual = $properties;

            return $this;
        }

        $properties = array_merge($this->_virtual, $properties);
        $this->_virtual = array_unique($properties);

        return $this;
    }
public function setVirtual ( array $ properties , $ merge = false ) { if ( $ merge === false ) { $ this -> _virtual = $ properties ; return $ this ; } $ properties = array_merge ( $ this -> _virtual , $ properties ) ; $ this -> _virtual = array_unique ( $ properties ) ; return $ this ; }
Sets the virtual properties on this entity.

@param array $properties An array of properties to treat as virtual.
@param bool $merge Merge the new properties with the existing. By default false.
@return $this
Sets the virtual properties on this entity .