forked from obophp/obo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObject.php
More file actions
39 lines (32 loc) · 958 Bytes
/
Copy pathObject.php
File metadata and controls
39 lines (32 loc) · 958 Bytes
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
37
38
39
<?php
/**
* This file is part of framework Obo Development version (http://www.obophp.org/)
* @link http://www.obophp.org/
* @author Adam Suba, http://www.adamsuba.cz/
* @copyright (c) 2011 - 2013 Adam Suba
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
*/
namespace obo;
abstract class Object {
/**
* @return string
*/
final public static function className() {
return get_called_class();
}
/**
* @return Nette\Reflection\ClassType
*/
public static function getReflection() {
return new \Nette\Reflection\ClassType(get_called_class());
}
/**
* @param string $message
* @return boolean
*/
final public static function respondToMessage($message) {
if (self::getReflection()->hasMethod($message)) return true;
if (self::getReflection()->getExtensionMethod($message)) return true;
return false;
}
}