示例#1
0
 /**
  * Implements JsonSerializable::jsonSerialize().
  */
 public function jsonSerialize()
 {
     $valid = !isset($this->color) || $this->validateColor($this->color);
     if (!$valid) {
         return NULL;
     }
     return parent::jsonSerialize();
 }
示例#2
0
 /**
  * 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();
 }
示例#3
0
 /**
  * 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();
 }
示例#4
0
 /**
  * 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();
 }
示例#5
0
 /**
  * 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();
 }
示例#6
0
 /**
  * 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();
 }