Revision #44 was created by rackycz on Apr 1, 2026, 8:55:48 PM.
packages
Content
[...]
First of all, learn what [PHP Standards Recommendations](https://en.wikipedia.org/wiki/PHP_Standard_Recommendation) by [Framework Interoperability Group (FIG)](https://www.php-fig.org/psr) are. It will help you understand why so many "weird" PSR imports are in the Yii3 code. In short: These interfaces help authors of different frameworks to write compatible classes so they can be reused in any other framework following these principles.
The Yii team split the functionalities into 135 packages which you should check in advance to know what is available. Their are listed [here](https://www.yiiframework.com/status/3.0) or the same is also [here](https://www.yiiframework.com/doc/api/3.0).
For example [log in](https://github.com/yiisoft/user) and [RBAC](https://github.com/yiisoft/rbac), which can be stored in [DB](https://github.com/yiisoft/rbac-db) or in [PHP files](https://github.com/yiisoft/rbac-php/). And many more like "active-record" (which is now finished),"form-model" or "boostrap5".
## invoke()
The `__invoke()` public method is called when you call the **instance** as a method. (Therefore the constructor was already executed)
```php
$obj = new MyObj(); // Now the __construct() is executed.
$obj(); // Now the __invoke() is executed (The instance is needed!)