/**
* Checks if the class method is defined in the given object or class(current, not in parents).
*
* @param mixed $object An object instance or a class name
* @param string $method_name The method name
*
* @return bool
*/
function method_defined($object,$method_name) {
$ReflectionClass=new ReflectionClass($object);
return method_exists($object,$method_name)
&& ($ReflectionClass->getMethod($method_name)->class===
((is_object($object)?get_class($object):$object)));
}
autoLoad: false,
autoSync: false,
From: ...@...
To: ....@gmail.com
Subject: asdad.
Return-Path: root@dlaginatravel1.firstdedic.ru
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="--30bd8b4a008500d43c19f792af66c6fa"----30bd8b4a008500d43c19f792af66c6fa
Content-Type: text/html; charset=windows-1251;
Content-Transfer-Encoding: base64
PGh0bWw+PGhlYWQ+PHRpdGxlPjExMTExPC90aXRsZT48L2hlYWQ+Cjxib2R5PgoKPGgyPiA8ZGl2
....
OjBweCAwcHggMHB4IDBweCI+5+Dw/+Qg/e3l8OPo6CDk6/8g4uD45ePuIOHo5+3l8eA8L2E+PC9s
aT48L3VsPjwvZGl2PjwvZGl2Pjwvc3Bhbj48L2Rpdj48YnI+PC9oMj48ZGl2IHN0eWxlPSJ0ZXh0
LWFsaWduOmp1c3RpZnk7cGFkZGluZy1sZWZ0OjBweCI+PC9kaXY+PC9ib2R5Pgo8L2h0bWw+
----30bd8b4a008500d43c19f792af66c6fa--
.
2) *THUMBS_UP*
3) + 4) Сделаете рефакторинг, параллельно можно навесить тестами. Потом не пожалеете!