Esempio n. 1
0
 /**
  * Specify data which should be serialized to JSON
  * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
  * @return mixed data which can be serialized by <b>json_encode</b>,
  * which is a value of any type other than a resource.
  * @since 5.4.0
  */
 public function jsonSerialize()
 {
     $arr = parent::jsonSerialize();
     $vars = get_object_vars($this);
     return array_merge($vars, $arr);
 }
Esempio n. 2
0
 public static function evaluateError($error)
 {
     if ($error > TableModel::TABLE_PROPERTY_CONST_ADD) {
         $error -= TableModel::TABLE_PROPERTY_CONST_ADD;
         return TablePropertyModel::evaluateError($error);
     } else {
         if ($error == TableModel::ERROR_OBJECT_NAME_NOT_SET) {
             return "object name not set";
         } else {
             if ($error == TableModel::ERROR_PROPERTIES_NO_ARRAY) {
                 return "properties are no array";
             } else {
                 if ($error == TableModel::ERROR_TABLE_NAME_NOT_SET) {
                     return "table name not set";
                 }
             }
         }
     }
     return "unknown error";
 }