/[web]/planet/common/app/classes/PlanetError.php
ViewVC logotype

Contents of /planet/common/app/classes/PlanetError.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1619 - (show annotations) (download)
Mon Aug 13 10:45:23 2012 UTC (11 years, 8 months ago) by dams
File size: 460 byte(s)
- Import moonmoon
- Create repo per langs

1 <?php
2
3 class PlanetError
4 {
5 public $level;
6 public $message;
7
8 public function __construct($level, $message)
9 {
10 $this->level = (int) $level;
11 $this->message = $message;
12 }
13
14 public function toString($format = '%1$s : %2$s')
15 {
16 $levels = array(
17 1 => 'notice',
18 2 => 'warning',
19 3 => 'error',
20 );
21 return sprintf($format, $levels[$this->level], $this->message);
22 }
23 }

  ViewVC Help
Powered by ViewVC 1.1.30