Tribe__Events__Pro__Service_Providers__RBE::make_engine( string $slug )
Builds and returns an instance of the engine for the specified slug.
Contents
Parameters
- $slug
-
(string) (Required) The slug of the engine to build.
Return
(mixed|Tribe__Events__Pro__Recurrence__Engines__Engine_Interface) The engine for the slug or the Null engine if the slug does not map to any existing engine.
Source
File: src/Tribe/Service_Providers/RBE.php
public function make_engine( $slug ) {
$engines_map = $this->get_engines_map();
if ( ! array_key_exists( $slug, $engines_map ) ) {
return new Tribe__Events__Pro__Recurrence__Engines__Null();
}
return $this->container->make( $engines_map[ $slug ] );
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |