public function serialize()
 {
     $response = parent::serialize();
     $response['operator'] = $this->type;
     $response['value'] = $this->value;
     return $response;
 }
 public function serialize()
 {
     $response = parent::serialize();
     if (count($this->nodes) === 0) {
         return $response;
     }
     $response['children'] = array_map(function (ValidationNode $child) {
         return $child->serialize();
     }, $this->nodes);
     return $response;
 }
 public static function serializeNode(ValidationNode $node)
 {
     return $node->serialize();
 }
 public function deserialize($data)
 {
     $this->entry = ValidationNode::deserializeNode($data);
     $this->meta->deserialize($data['meta']);
 }
 public function deserialize($data)
 {
     parent::deserialize($data);
     $this->profile = Engine::get()->getValidationProfile($data['external']);
 }