https://github.com/aedart/athenaeum-support
[READ ONLY] Athenaeum Support package - see https://github.com/aedart/athenaeum
https://github.com/aedart/athenaeum-support
aware-of helpers properties utils
Last synced: 12 months ago
JSON representation
[READ ONLY] Athenaeum Support package - see https://github.com/aedart/athenaeum
- Host: GitHub
- URL: https://github.com/aedart/athenaeum-support
- Owner: aedart
- License: bsd-3-clause
- Created: 2020-01-16T19:11:11.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-28T08:52:26.000Z (over 1 year ago)
- Last Synced: 2024-11-28T09:34:03.228Z (over 1 year ago)
- Topics: aware-of, helpers, properties, utils
- Language: PHP
- Size: 333 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Athenaeum Support
Offers complementary components and helpers to [Laravel's Support package](https://packagist.org/packages/illuminate/support).
## Laravel Aware-of Helpers
Traits that offer [Getters and Setters](https://en.wikipedia.org/wiki/Mutator_method) helpers for some of Laravel's core packages.
These components allow you to manually set and retrieve a Laravel component, e.g. a configuration `Repository`.
Additionally, when no component instance has been specified, it will automatically default to whatever Laravel has bound in the [Service Container](https://laravel.com/docs/6.x/container).
You can think of these helpers as supplements, or alternatives to Laravel's native [Facades](https://laravel.com/docs/6.x/facades).
```php
use \Aedart\Support\Helpers\Config\ConfigTrait;
class MyApiService
{
use ConfigTrait;
public function __construct()
{
$config = $this->getConfig();
$url = $config->get('services.trucks-api.url');
// ... remaining not shown ...
}
}
```
## Aware-of Properties
In addition to the Laravel Aware-of Helpers, this package comes with an abundance of "aware-of xyz" helpers.
These are generated traits that offer getters and setter methods for various types properties.
They are mostly useful when creating DTOs.
```php
use \Aedart\Support\Properties\Strings\NameTrait;
use \Aedart\Support\Properties\Integers\AgeTrait;
class Person
{
use NameTrait;
use AgeTrait;
}
```
## Documentation
Please read the [official documentation](https://aedart.github.io/athenaeum/) for additional information.
## Repository
The mono repository is located at [github.com/aedart/athenaeum](https://github.com/aedart/athenaeum)
## Versioning
This package follows [Semantic Versioning 2.0.0](http://semver.org/)
## License
[BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause), Read the LICENSE file included in this package