Get class event name

@return string
328724
public static function name()
    {
        $class = get_called_class();
        if (!isset(self::$names[$class])) {
            self::$names[$class] = self::generateName($class);
        }

        return self::$names[$class];
    }
932568
protected function getResourceClass()
    {
        if (array_key_exists('class', $this->options)) {
            if ($this->options['class'] === false) {
                return $this->getName();
            } elseif (is_string($this->options['class'])) {
                return studly_case($this->options['class']);
            }
        }

        return studly_case($this->getNamespacedName());
    }
1049885
public function getEventDescription()
    {
        $event = array(
            'type' => null,
            'name' => null,
            'args' => null,
            'params' => null
        );
        
        if (is_string($this->value)) {
            $event['type'] = $this->value;
        } else {
            $event['type'] = isset($this->value['type']) ? $this->value['type'] : null;
            $event['name'] = isset($this->value['name']) ? $this->value['name'] : null;
            $event['args'] = isset($this->value['args']) ? $this->value['args'] : null;
            $event['params'] = isset($this->value['params']) ? $this->value['params'] : null;
        }
        
        return $event;
    }
1012702
public function getType()
    {
        $name = get_class($this);
        $name = explode('\\', $name);
        $name = $name[count($name) - 2];

        return $name;
    }
873759
protected function getEventName($event)
    {
        if (Assert::instanceOf($event, '\\One\\Event\\Event')) {
            return $event->getName();
        } elseif (Assert::string($event)) {
            return $event;
        }

        throw new InvalidArgumentException(
            '`Event` must be `string` or extends class `One\Event\Event`'
        );
    }
198677
private function getClassName()
    {
        if (null === $this->className) {
            $this->className = get_class($this);
        }

        return $this->className;
    }
828807
public function get_instance_name() {
        if ($this->plugin === 'core') {
            $string = get_string('allevents', 'tool_monitor');
        } else {
            if ($this->cmid == 0) {
                $string = get_string('allmodules', 'tool_monitor');
            } else {
                $cms = get_fast_modinfo($this->courseid);
                $cms = $cms->get_cms();
                if (isset($cms[$this->cmid])) {
                    $string = $cms[$this->cmid]->get_formatted_name(); // Instance name.
                } else {
                    // Something is wrong, instance is not present anymore.
                    $string = get_string('invalidmodule', 'tool_monitor');
                }
            }
        }

        return $string;
    }
1230348
public function getEvent() : ?string 
    {
        if ( ! $this->hasEvent()) {
            $this->setEvent($this->getDefaultEvent());
        }
        return $this->event;
    }
238327
public function getClass()
    {
        if (is_string($this->fn)) {
            return $this->fn;
        }
        $hash = sha1(mt_rand().microtime(true));
        return "sndsgd\\field\\rule\\Closure($hash)";
    }
721925
protected function getClassName()
    {
        $name = implode('', array_map('ucwords', $this->getSortedSingularTableNames()));

        $name = preg_replace_callback('/(\_)([a-z]{1})/', function ($matches) {
            return studly_case($matches[0]);
        }, $name);

        return "Create{$name}PivotTable";
    }
956421
public function getEventModel()
    {
        if ($this->eventModel === null) {
            $this->load->model('setting/event');
            /** @noinspection PhpUndefinedFieldInspection */
            $this->eventModel = $this->model_setting_event;
        }
        return $this->eventModel;
    }
24985
public function get_handler_classname() {
        global $CFG;

        if (!empty($CFG->sitepolicyhandler)) {
            $sitepolicyhandlers = $this->get_all_handlers();

            if (!isset($sitepolicyhandlers[$CFG->sitepolicyhandler])) {
                return default_handler::class;

            } else {
                return $sitepolicyhandlers[$CFG->sitepolicyhandler];
            }

        } else {
            return default_handler::class;
        }
    }
909720
protected static function getEventLoopName()
    {
        if (static::$eventLoopClass) {
            return static::$eventLoopClass;
        }

        $loop_name = '';
        foreach (static::$_availableEventLoops as $name=>$class) {
            if (extension_loaded($name)) {
                $loop_name = $name;
                break;
            }
        }

        if ($loop_name) {
            if (interface_exists('\React\EventLoop\LoopInterface')) {
                switch ($loop_name) {
                    case 'libevent':
                        static::$eventLoopClass = '\Workerman\Events\React\LibEventLoop';
                        break;
                    case 'event':
                        static::$eventLoopClass = '\Workerman\Events\React\ExtEventLoop';
                        break;
                    default :
                        static::$eventLoopClass = '\Workerman\Events\React\StreamSelectLoop';
                        break;
                }
            } else {
                static::$eventLoopClass = static::$_availableEventLoops[$loop_name];
            }
        } else {
            static::$eventLoopClass = interface_exists('\React\EventLoop\LoopInterface')? '\Workerman\Events\React\StreamSelectLoop':'\Workerman\Events\Select';
        }
        return static::$eventLoopClass;
    }
426969
public function getName()
    {
        if (!$this->isEmpty($this->name)) {
            return $this->name;
        }

        foreach (['getName', 'getOriginalName'] as $fn) {
            $name = call_user_func([$this->event, $fn]);

            if ($this->isEmpty($name) || $name === $this) {
                continue;
            }

            if ($name instanceof self) {
                return $name = $name->getName();
            }
        }

        return $this->name = $this->parseEventName();
    }
176562
public function _getName()
    {
        $moduleName = '\\' . get_class($this);

        if (strpos($moduleName, ModuleContainer::MODULE_NAMESPACE) === 0) {
            return substr($moduleName, strlen(ModuleContainer::MODULE_NAMESPACE));
        }

        return $moduleName;
    }
327666
public static function getEventNames($className)
    {
        $result = [];
        $reflection = new \ReflectionClass($className);
        foreach ($reflection->getConstants() as $name => $value) {
            if (!preg_match('/^EVENT/', $name)) {
                continue;
            }
            $result[$name] = $value;
        }
        return $result;
    }
1301939
public function getClass()
    {
        if (is_null($this->_class)) {
            $this->_class = $this->_getClassName();
        }
        return $this->_class;
    }