[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
wordpress/private-apis – the utilities to enable private cross-package exports of private APIs. This "implementation.js" file is needed for the sake of the unit tests. It exports more than the public API of the package to aid in testing.
File Size: | 234 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
lock(object, privateData) X-Ref |
Binds private data to an object. It does not alter the passed object in any way, only registers it in an internal map of private data. The private data can't be accessed by any other means than the `unlock` function. param: {any} object The object to bind the private data to. param: {any} privateData The private data to bind to the object. |
unlock(object) X-Ref |
Unlocks the private data bound to an object. It does not alter the passed object in any way, only returns the private data paired with it using the `lock()` function. return: {any} The private data bound to the object. param: {any} object The object to unlock the private data from. |
allowCoreModule(name) X-Ref |
Private function to allow the unit tests to allow a mock module to access the private APIs. param: {string} name The name of the module. |
resetAllowedCoreModules() X-Ref |
Private function to allow the unit tests to set a custom list of allowed modules. |
resetRegisteredPrivateApis() X-Ref |
Private function to allow the unit tests to reset the list of registered private apis. |
Generated : Sun Dec 22 08:20:01 2024 | Cross-referenced by PHPXref |