Automattic\WooCommerce\Internal\DependencyManagement
RuntimeContainer::is_class_allowed()
Checks to see whether a class is allowed to be registered.
Метод класса: RuntimeContainer{}
Хуков нет.
Возвращает
true|false
. True if the class is allowed to be registered, false otherwise.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_class_allowed( $class_name ): bool;
- $class_name(строка) (обязательный)
- The class to check.
Код RuntimeContainer::is_class_allowed() RuntimeContainer::is class allowed WC 9.5.1
protected function is_class_allowed( string $class_name ): bool { return StringUtil::starts_with( $class_name, self::WOOCOMMERCE_NAMESPACE, false ); }