Beispiel #1
0
 public static function dump()
 {
     $error_messages = Hint::get(Hint::ERROR);
     if (count($error_messages) > 0) {
         return array('status' => 'error', 'errors' => $error_messages);
     } else {
         return array('status' => 'success', 'result' => Hint::get(Hint::SUCCESS));
     }
 }
Beispiel #2
0
	/**
	 * Hints
	 *
	 * @return array
	 */
	public function hints()
	{
		$data = array();

		if (($messages = Hint::get(null, null, true)) !== null)
		{
			foreach ($messages as $message)
			{
				$data[] = array
				(
					'type' => $message['type'],
					'text' => $message['text'],
				);
			}
		}
		return $data;
	}