/**
  * Constructor.
  *
  * @param null|mixed[] $json The json string being decoded
  */
 public function __construct($json = null)
 {
     parent::__construct($json);
     $this->communityOwnedDate = Util::setIfDateTimeExists($json, 'community_owned_date');
     $this->lockedDate = Util::setIfDateTimeExists($json, 'lockedDate');
     $this->tags = Util::setIfArrayExists($json, 'tags');
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param null|mixed[] $json The json string being decoded
  */
 public function __construct($json = null)
 {
     parent::__construct($json);
     $this->id = Util::setIfIntegerExists($json, 'post_id');
     $this->postType = Util::isEqual($json, 'post_type', [self::POST_TYPE_ANSWER, self::POST_TYPE_QUESTION]);
 }