public function setStatus($status) { if (!in_array($status, array(self::STATUS_DRAFT, self::STATUS_PUBLISHED, self::STATUS_REVIEW))) { throw new \InvalidArgumentException("Invalid status"); } $this->status = $status; return $this; }