/** * Implements JsonSerializable::jsonSerialize(). */ public function jsonSerialize() { $valid = !isset($this->color) || $this->validateColor($this->color); if (!$valid) { return NULL; } return parent::jsonSerialize(); }
/** * Implements JsonSerializable::jsonSerialize(). */ public function jsonSerialize() { $valid = (!isset($this->ignoreDocumentMargin) || $this->validateIgnoreDocumentMargin($this->ignoreDocumentMargin)) && (!isset($this->ignoreDocumentGutter) || $this->validateIgnoreDocumentGutter($this->ignoreDocumentGutter)) && (!isset($this->minimumHeight) || $this->validateMinimumHeight($this->minimumHeight)); if (!$valid) { return NULL; } return parent::jsonSerialize(); }
/** * Implements JsonSerializable::jsonSerialize(). */ public function jsonSerialize() { if (!isset($this->componentTextStyles['default'])) { $msg = "Document must have at least a \"default\" ComponentTextStyle."; $this->triggerError($msg); return NULL; } return parent::jsonSerialize(); }
/** * Implements JsonSerializable::jsonSerialize(). */ public function jsonSerialize() { $valid = (!isset($this->backgroundColor) || $this->validateBackgroundColor($this->backgroundColor)) && (!isset($this->opacity) || $this->validateOpacity($this->opacity)); if (!$valid) { return NULL; } return parent::jsonSerialize(); }
/** * Implements JsonSerializable::jsonSerialize(). */ public function jsonSerialize() { $valid = (!isset($this->textColor) || $this->validateTextColor($this->textColor)) && (!isset($this->textTransform) || $this->validateTextTransform($this->textTransform)) && (!isset($this->backgroundColor) || $this->validateBackgroundColor($this->backgroundColor)) && (!isset($this->verticalAlignment) || $this->validateVerticalAlignment($this->verticalAlignment)); if (!$valid) { return NULL; } return parent::jsonSerialize(); }
/** * Implements JsonSerializable::jsonSerialize(). */ public function jsonSerialize() { if (isset($this->rangeStart) && !isset($this->rangeLength)) { $msg = "If rangeStart is specified, rangeLength is required."; $this->triggerError($msg); return NULL; } return parent::jsonSerialize(); }