format('Y-m-d H:i:s').'] '.$message; } /** * Get all logged messages * * @static * @access public * @return array */ public static function getMessages() { return self::$messages; } /** * Remove all logged messages * * @static * @access public */ public static function deleteMessages() { self::$messages = array(); } /** * Set a different timezone * * @static * @see http://php.net/manual/en/timezones.php * @access public * @param string $timezone Timezone */ public static function setTimeZone($timezone) { self::$timezone = $timezone ?: self::$timezone; } /** * Get all messages serialized into a string * * @static * @access public * @return string */ public static function toString() { return implode(PHP_EOL, self::$messages).PHP_EOL; } }