Fix checkRpItemsPosition
[ryzomcore.git] / web / public_php / webtt / cake / libs / overloadable_php5.php
blobed27493b919fee62104179b2b15911a76a5c5cf1
1 <?php
2 /**
3 * Overload abstraction interface. Merges differences between PHP4 and 5.
5 * PHP versions 4 and 5
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
10 * Licensed under The MIT License
11 * Redistributions of files must retain the above copyright notice.
13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://cakephp.org CakePHP(tm) Project
15 * @package cake
16 * @subpackage cake.cake.libs
17 * @since CakePHP(tm) v 1.2
18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
21 /**
22 * Overloadable class selector
24 * Load the interface class based on the version of PHP.
26 * @package cake
27 * @subpackage cake.cake.libs
29 class Overloadable extends Object {
31 /**
32 * Overload implementation. No need for implementation in PHP5.
34 * @access public
36 function overload() { }
38 /**
39 * Magic method handler.
41 * @param string $method Method name
42 * @param array $params Parameters to send to method
43 * @return mixed Return value from method
44 * @access private
46 function __call($method, $params) {
47 if (!method_exists($this, 'call__')) {
48 trigger_error(sprintf(__('Magic method handler call__ not defined in %s', true), get_class($this)), E_USER_ERROR);
50 return $this->call__($method, $params);
54 /**
55 * Overloadable2 class selector
57 * Load the interface class based on the version of PHP.
59 * @package cake
61 class Overloadable2 extends Object {
63 /**
64 * Overload implementation. No need for implementation in PHP5.
66 * @access public
68 function overload() { }
70 /**
71 * Magic method handler.
73 * @param string $method Method name
74 * @param array $params Parameters to send to method
75 * @return mixed Return value from method
76 * @access private
78 function __call($method, $params) {
79 if (!method_exists($this, 'call__')) {
80 trigger_error(sprintf(__('Magic method handler call__ not defined in %s', true), get_class($this)), E_USER_ERROR);
82 return $this->call__($method, $params);
85 /**
86 * Getter.
88 * @param mixed $name What to get
89 * @param mixed $value Where to store returned value
90 * @return boolean Success
91 * @access private
93 function __get($name) {
94 return $this->get__($name);
97 /**
98 * Setter.
100 * @param mixed $name What to set
101 * @param mixed $value Value to set
102 * @return boolean Success
103 * @access private
105 function __set($name, $value) {
106 return $this->set__($name, $value);