| 1 |
<?php |
| 2 |
|
| 3 |
namespace WordProof\SDK\Helpers; |
| 4 |
|
| 5 |
use WordProof\SDK\WordPressSDK; |
| 6 |
|
| 7 |
class ReflectionHelper |
| 8 |
{ |
| 9 |
/** |
| 10 |
* @param class $instance The class from which to get the name. |
| 11 |
* @return false|string |
| 12 |
*/ |
| 13 |
public static function name($instance) |
| 14 |
{ |
| 15 |
if ($instance instanceof WordPressSDK) { |
| 16 |
$reflector = new \ReflectionClass($instance); |
| 17 |
return $reflector->getName(); |
| 18 |
} |
| 19 |
|
| 20 |
return false; |
| 21 |
} |
| 22 |
} |
| 23 |
|