public static function reflectionClassFromObjectOrClass($object_or_class)
    {
        $reflection = null;

        if (is_object($object_or_class)) {
            $reflection = new ReflectionObject($object_or_class);
        } elseif (class_exists($object_or_class)) {
            $reflection = new ReflectionClass($object_or_class);
        }

        return $reflection;
    }