Rev 51 | Rev 54 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 51 | Rev 52 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | * Interface to be implemented if the model should be localizable
|
6 | * Interface to be implemented if the model should be localizable
|
7 | */
|
7 | */
|
8 | interface ILocalizable
|
8 | interface ILocalizable
|
9 | {
|
9 | {
|
10 | /**
|
10 | /**
|
11 | * Localizes this model. The actual implementation is left to the model class
|
11 | * Localizes this model. The actual implementation is left to
|
12 | * implementing this interface.
|
12 | * the model class implementing this interface.
|
13 | */
|
13 | */
|
14 | function localize(); |
14 | function localize (); |
15 | }
|
15 | }
|
16 | 16 | ||
17 | /**
|
17 | /**
|
Line 46... | Line 46... | ||
46 | * @return mixed
|
46 | * @return mixed
|
47 | */
|
47 | */
|
48 | public function __get($name) |
48 | public function __get ($name) |
49 | {
|
49 | {
|
50 | /* Support for Object-Relational Mappers */
|
50 | /* Support for Object-Relational Mappers */
|
51 | if (strpos($name, 'persistent') === 0) |
51 | // if (strpos($name, 'persistent') === 0)
|
52 | {
|
52 | // {
|
53 | $class = get_class($this); |
53 | // $class = get_class($this);
|
54 | return $class::${$name}; |
54 | // return $class::${$name};
|
55 | }
|
55 | // }
|
56 | 56 | ||
57 | $method = 'get' . ucfirst($name); |
57 | $method = 'get' . ucfirst($name); |
58 | 58 | ||
59 | if (method_exists($this, $method)) |
59 | if (method_exists($this, $method)) |
60 | {
|
60 | {
|