public function getMessages()
    {
        $messages = array();

        if (!empty($this->error)) {
            $messages[] = $this->error;
        }

        if (!empty($this->warning)) {
            $messages[] = $this->warning;
        }

        return $messages;
    }