code: public function setLastPost($lastPost)
      {
          if ($lastPost == 0) {
              $this->_lastPost = "";
          } elseif ($lastPost !== "" and $lastPost !== "NULL" and $lastPost !== null) {
              if ($lastPost instanceof DateTime) {
                  $this->_lastPost = $lastPost;
              } else {
                  $this->_lastPost = new DateTime($lastPost);
              }
          }
          return $this;
      }
docs: Set Last Post
  
  @param Date $lastPost