code/abstract/CalendarAbstractView.php 1 location
|
@@ 28-37 (lines=10) @@
|
25 |
|
public function __construct($name, $number = 1) |
26 |
|
{ |
27 |
|
parent::__construct(); |
28 |
|
if (is_string($name)) { |
29 |
|
if (! in_array($name, self::$names)) { |
30 |
|
$this->name = $name; |
31 |
|
self::$names[] = $name; |
32 |
|
} else { |
33 |
|
user_error("CalendarAbstractView::__construct() : you cannot set the \$name attribute with the value '$name' because an other view with this name already exists", E_USER_ERROR); |
34 |
|
} |
35 |
|
} else { |
36 |
|
user_error('CalendarAbstractView::__construct() : you cannot set the $name attribute with a non string value', E_USER_ERROR); |
37 |
|
} |
38 |
|
if (is_int($number + 0)) { |
39 |
|
if ($number >= 1) { |
40 |
|
$this->number = $number; |
code/Calendar.php 1 location
|
@@ 50-59 (lines=10) @@
|
47 |
|
|
48 |
|
// 2) Name Setting |
49 |
|
|
50 |
|
if (is_string($name)) { |
51 |
|
if (! in_array($name, self::$names)) { |
52 |
|
$this->name = $name; |
53 |
|
self::$names[] = $name; |
54 |
|
} else { |
55 |
|
user_error("Calendar::__construct() : you cannot set the \$name attribute with the value '$name' because an other calendar with this name already exists", E_USER_ERROR); |
56 |
|
} |
57 |
|
} else { |
58 |
|
user_error('Calendar::__construct() : you cannot set the $name attribute with a non string value', E_USER_ERROR); |
59 |
|
} |
60 |
|
|
61 |
|
// 3) Views Setting |
62 |
|
|