| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Registry that based find results on class existence.
| Author: | David de Boer |
| Author: | Márk Sági-Kazár |
| Author: | Tobias Nyholm |
| File Size: | 219 lines (7 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| findOneByType($type) X-Ref |
| Finds a class. return: string|\Closure param: string $type |
| getFromCache($type) X-Ref |
| Get a value from cache. return: string|null param: string $type |
| storeInCache($type, $class) X-Ref |
| Store a value in cache. param: string $type param: string $class |
| setStrategies(array $strategies) X-Ref |
| Set new strategies and clear the cache. param: string[] $strategies list of fully qualified class names that implement DiscoveryStrategy |
| getStrategies() X-Ref |
| Returns the currently configured discovery strategies as fully qualified class names. return: string[] |
| appendStrategy($strategy) X-Ref |
| Append a strategy at the end of the strategy queue. param: string $strategy Fully qualified class name of a DiscoveryStrategy |
| prependStrategy($strategy) X-Ref |
| Prepend a strategy at the beginning of the strategy queue. param: string $strategy Fully qualified class name to a DiscoveryStrategy |
| clearCache() X-Ref |
| No description |
| evaluateCondition($condition) X-Ref |
| Evaluates conditions to boolean. return: bool |
| instantiateClass($class) X-Ref |
| Get an instance of the $class. return: object param: string|\Closure $class a FQCN of a class or a closure that instantiate the class |
| safeClassExists($class) X-Ref |
| We need a "safe" version of PHP's "class_exists" because Magento has a bug (or they call it a "feature"). Magento is throwing an exception if you do class_exists() on a class that ends with "Factory" and if that file does not exits. This function catches all potential exceptions and makes sure to always return a boolean. return: bool param: string $class |
| Generated : Sat Jun 13 09:38:55 2026 | Cross-referenced by PHPXref |