Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders
AbstractInterfaceServiceProvider::provides()
Determine whether this service provides the given alias.
Метод класса: AbstractInterfaceServiceProvider{}
Хуков нет.
Возвращает
true|false
.
Использование
$AbstractInterfaceServiceProvider = new AbstractInterfaceServiceProvider(); $AbstractInterfaceServiceProvider->provides( $alias ): bool;
- $alias(строка) (обязательный)
- The alias to check.
Код AbstractInterfaceServiceProvider::provides() AbstractInterfaceServiceProvider::provides WC 9.6.1
public function provides( string $alias ): bool { $provides = parent::provides( $alias ); if ( $provides ) { return true; } static $implements = array(); if ( empty( $implements ) ) { foreach ( $this->provides as $class ) { $implements_more = class_implements( $class ); if ( $implements_more ) { $implements = array_merge( $implements, $implements_more ); } } $implements = array_unique( $implements ); } return array_key_exists( $alias, $implements ); }