1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php class Book extends ActiveRecord\Model { static $belongs_to = array('author'); static $has_one = array(); static $use_custom_get_name_getter = false;
public function upper_name() { return strtoupper($this->name); }
public function name() { return strtolower($this->name); }
public function get_name() { if (self::$use_custom_get_name_getter) return strtoupper($this->read_attribute('name')); else return $this->read_attribute('name'); }
public function get_upper_name() { return strtoupper($this->name); }
public function get_lower_name() { return strtolower($this->name); } }; ?>
|