Return messages
@param mixed $status Message status to return
@return array
17005
public static function get ($status = FALSE)
	{
		
		// If no status return all messages
		
		if ($status === FALSE)
		{
			return self::$messages;
		}
		
		// Return messages for a specific status
		
		if (isset (self::$messages[$status]))
		{
			return self::$messages[$status];
		}
		else
		{
			return array ();
		}
		
	}
846991
public function getStatusMessage($status = null)
    {
        if (! $status) $status = $this->getStatus();

        if (! $status || ! isset($this->status_messages[$status])) throw new \LogicException("No such status. -> {$status}");

        return $this->status_messages[$status];
    }
773411
public function getMessages()
	{
		return array_merge($this->fatals, $this->errors, $this->warnings, $this->notices);
	}
70969
public function status($status = null)
    {
        if (null === $status) {
            return $this->status;
        }

        $this->status = $status;
        return $this;
    }
1206015
public function getByStatus($status)
    {
        $components = [];

        foreach ($this->all() as $name => $component) {
            if ($component->isStatus($status)) {
                $components[$name] = $component;
            }
        }

        return $components;
    }
1341070
public function getMessages()
    {
        if (empty($this->messages)) {
            $this->messages = [
                new IncomingMessage($this->event->get('text'), $this->event->get('msisdn'), $this->event->get('to'), $this->payload),
            ];
        }

        return $this->messages;
    }
1246966
public function getStatusMessage()
    {
        $code = $this->getStatusCode();

        if (empty($this->_status_message)) {
            $message = self::$status_messages[$code];
        } else {
            $message = $this->_status_message;
        }

        return $message;
    }
82671
public function getMessages($flush = true)
    {
        $result = $this->_messages;

        if($flush) {
            $this->_messages = array();
        }

        return $result;
    }
53029
public function getMessages()
    {
        $messages = $this->fromPrevious;

        foreach ($this->forNow as $key => $values) {
            if (!isset($messages[$key])) {
                $messages[$key] = [];
            }

            foreach ($values as $value) {
                array_push($messages[$key], $value);
            }
        }

        return $messages;
    }
1313368
public function status($status = null)
        {
            if (is_null($status)) {
                return $this->foundation->getStatusCode();
            } else {
                $this->foundation->setStatusCode($status);

                return $this;
            }
        }
899655
public function getStatus($status = null)
    {
        $statuses = array(
            100 => 'Continue',
            101 => 'Switching Protocols',
            200 => 'OK',
            201 => 'Created',
            202 => 'Accepted',
            203 => 'Non-Authoritative Information',
            204 => 'No Content',
            205 => 'Reset Content',
            206 => 'Partial Content',
            300 => 'Multiple Choices',
            301 => 'Moved Permanently',
            302 => 'Found',
            303 => 'See Other',
            304 => 'Not Modified',
            305 => 'Use Proxy',
            307 => 'Temporary Redirect',
            400 => 'Bad Request',
            401 => 'Unauthorized',
            402 => 'Payment Required',
            403 => 'Forbidden',
            404 => 'Not Found',
            405 => 'Method Not Allowed',
            406 => 'Not Acceptable',
            407 => 'Proxy Authentication Required',
            408 => 'Request Time-out',
            409 => 'Conflict',
            410 => 'Gone',
            411 => 'Length Required',
            412 => 'Precondition Failed',
            413 => 'Request Entity Too Large',
            414 => 'Request-URI Too Large',
            415 => 'Unsupported Media Type',
            416 => 'Requested range not satisfiable',
            417 => 'Expectation Failed',
            500 => 'Internal Server Error',
            501 => 'Not Implemented',
            502 => 'Bad Gateway',
            503 => 'Service Unavailable',
            504 => 'Gateway Time-out',
            505 => 'HTTP Version not supported'
        );

        if (!isset($status)) {
            return $statuses;
        }

        return isset($statuses[$status]) ? $statuses[$status] : '';
    }
942169
public function getMessage($messageId)
    {
        $this->buildCall('/get-sms-status/'.$messageId);

        return $this->makeMessage(json_decode($this->getRequest()->getBody()->getContents()));
    }
669977
public function getMessageInformation($id = '')
    {
        $message = [];
        if (is_array($this->messages) == true) {
            foreach($this ->messages as $msg) {
                if ($msg['index'] == $id) {
                    return $msg;
                }
            }
        }
        return $message;
    }
472049
protected function getStatusData($status, $messages = null, $msgKey = 'messages')
	{
		$data = ['status' => $status];

		if ($messages !== null) {
			if ($messages instanceof MessageProviderInterface) {
				$messages = $messages->getMessageBag();
			}

			if ($messages instanceof ArrayableInterface) {
				$messages = $messages->toArray();
			}

			$data[$msgKey] = (array) $messages;
		}

		return $data;
	}
1092373
public function fetchMessages($clear = true)
    {
        $messages = $this->messages;
        if ($clear) {
            $this->clear();
        }

        return $messages;
    }
1246746
public function messages(int $count = 200) : array
    {
        $messages = [];

        $messageFields = $this->info($count, true);

        foreach ($messageFields->threadEvents as $message) {
            $messages[] = new Message($this->client, $message->messageEventDetail, $this);
        }

        return $messages;
    }
343046
public function getStatusAsString($status)
    {
        $options = self::getStatusOptions();
        return isset($options[$status]) ? $options[$status] : '';
    }