Changeset View
Changeset View
Standalone View
Standalone View
src/symbols/PhutilSymbolLoader.php
<?php | <?php | ||||
/** | /** | ||||
* Query and load Phutil classes, interfaces and functions. | * Query and load Phutil classes, interfaces and functions. | ||||
* | * | ||||
* `PhutilSymbolLoader` is a query object which selects symbols which satisfy | * `PhutilSymbolLoader` is a query object which selects symbols which satisfy | ||||
* certain criteria, and optionally loads them. For instance, to load all | * certain criteria, and optionally loads them. For instance, to load all | ||||
* classes in a library: | * classes in a library: | ||||
* | * | ||||
* ```lang=php | * ```lang=php | ||||
* $symbols = id(new PhutilSymbolLoader()) | * $symbols = (new PhutilSymbolLoader()) | ||||
* ->setType('class') | * ->setType('class') | ||||
* ->setLibrary('example') | * ->setLibrary('example') | ||||
* ->selectAndLoadSymbols(); | * ->selectAndLoadSymbols(); | ||||
* ``` | * ``` | ||||
* | * | ||||
* When you execute the loading query, it returns a dictionary of matching | * When you execute the loading query, it returns a dictionary of matching | ||||
* symbols: | * symbols: | ||||
* | * | ||||
▲ Show 20 Lines • Show All 437 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0