Horde_ActiveSync_Message_Base::isGhosted PHP Method

isGhosted() public method

A property is ghosted if it is NOT listed in the SUPPORTED list sent by the client AND is NOT present in the request data.
public isGhosted ( string $property ) : boolean
$property string The property to check
return boolean
    public function isGhosted($property)
    {
        // MS-ASCMD 2.2.3.168:
        // An empty SUPPORTED container indicates that ALL elements able to be
        // ghosted ARE ghosted. A *missing* SUPPORTED tag indicates that NO
        // fields are ghosted - any ghostable properties are always considered
        // NOT ghosted.
        if (empty($this->_supported)) {
            return false;
        }
        if (current($this->_supported) == Horde_ActiveSync::ALL_GHOSTED && empty($this->_exists[$property])) {
            return true;
        }
        return array_search($property, $this->_supported) === false && empty($this->_exists[$property]);
    }

Usage Example

Example #1
0
 /**
  * Determines if the property specified has been ghosted by the client.
  * A ghosted property 1) IS listed in the supported list and 2) NOT
  * present in the current message. If it's IN the supported list and NOT
  * in the current message, then it IS ghosted and the server should keep
  * the field's current value when performing any change action due to this
  * message.
  *
  * @param string $property  The property to check
  *
  * @return boolean
  */
 public function isGhosted($property)
 {
     $isGhosted = parent::isGhosted($property);
     if (!$isGhosted && $property == self::PICTURE && $this->_device->hasQuirk(Horde_ActiveSYnc_Device::QUIRK_NEEDS_SUPPORTED_PICTURE_TAG)) {
         return true;
     }
     return $isGhosted;
 }
All Usage Examples Of Horde_ActiveSync_Message_Base::isGhosted