Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sikessem/core
The core of @Sikessem.
https://github.com/sikessem/core
core dependency-injection di-container inversion-of-control ioc ioc-container ioc-framework kernel object-values sikessem strict-types type-safe typed-php
Last synced: about 1 month ago
JSON representation
The core of @Sikessem.
- Host: GitHub
- URL: https://github.com/sikessem/core
- Owner: sikessem
- License: mit
- Created: 2023-11-27T22:39:28.000Z (about 1 year ago)
- Default Branch: 0.x
- Last Pushed: 2024-11-11T09:05:08.000Z (about 1 month ago)
- Last Synced: 2024-11-11T10:19:47.803Z (about 1 month ago)
- Topics: core, dependency-injection, di-container, inversion-of-control, ioc, ioc-container, ioc-framework, kernel, object-values, sikessem, strict-types, type-safe, typed-php
- Language: PHP
- Homepage:
- Size: 250 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![sikessem-logo]][sikessem-link]
[![php-icon]][php-link]
[![packagist-version-icon]][packagist-version-link]
[![packagist-download-icon]][packagist-download-link]
[![license-icon]][license-link]
[![actions-icon]][actions-link]
[![pr-icon]][pr-link]
[![twitter-icon]][twitter-link][sikessem-logo]: https://github.com/sikessem/art/blob/HEAD/images/sikessem.svg
[sikessem-link]: https://github.com/sikessem "Sikessem"[actions-icon]: https://github.com/sikessem/capsule/workflows/Tests/badge.svg
[actions-link]: https://github.com/sikessem/capsule/actions "Capsule status"[php-icon]: https://img.shields.io/badge/PHP-ccc.svg?style=flat&logo=php
[php-link]: https://github.com/sikessem/capsule/search?l=php "PHP code"[packagist-version-icon]: https://img.shields.io/packagist/v/sikessem/capsule
[packagist-version-link]: https://packagist.org/packages/sikessem/capsule "Capsule Releases"[packagist-download-icon]: https://img.shields.io/packagist/dt/sikessem/capsule
[packagist-download-link]: https://packagist.org/packages/sikessem/capsule "Capsule Downloads"[pr-icon]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?color=brightgreen
[pr-link]: [contrib-link] "PRs welcome!"[twitter-icon]: https://img.shields.io/twitter/follow/sikessem_tweets.svg?label=@Sikessem_tweets
[twitter-link]: https://twitter.com/intent/follow?screen_name=sikessem_tweets "Ping Sikessem"[license-icon]: https://img.shields.io/badge/license-MIT-blue.svg
[license-link]: https://github.com/sikessem/capsule/blob/HEAD/LICENSE "Capsule License"
[conduct-link]: https://github.com/sikessem/capsule/blob/HEAD/CODE_OF_CONDUCT.md
[contrib-link]: https://github.com/sikessem/capsule/blob/HEAD/CONTRIBUTING.md
[discuss-link]: https://github.com/sikessem/community/discussions***
# An Efficient Dependency Injector and Encapsulator
Capsule is a library that uses a Container to manage dependencies and objects in an organized and centralized way, thus facilitating encapsulation.
## π Contents
- [An Efficient Dependency Injector and Encapsulator](#an-efficient-dependency-injector-and-encapsulator)
- [π Contents](#-contents)
- [π Requirements](#-requirements)
- [β‘οΈ Installation](#οΈ-installation)
- [π§βπ» Usage](#-usage)
- [π Contribution](#-contribution)
- [Code of Conduct](#code-of-conduct)
- [π₯ Contributing Guide](#-contributing-guide)
- [ποΈ Good First Issues](#οΈ-good-first-issues)
- [π¬ Discussions](#-discussions)
- [π Security Reports](#-security-reports)
- [π License](#-license)## π Requirements
> - **Requires [PHP 8.1+](https://php.net/releases/)** (at least 8.1.14 recommended to avoid potential bugs).
> - **Requires [Composer v2+](https://getcomposer.org/)** to manage PHP dependencies.## β‘οΈ Installation
Install [Capsule](https://packagist.org/packages/sikessem/capsule) using [Composer](https://getcomposer.org/):
- By adding the `sikessem/capsule` dependency to your `composer.json` file:
```json
{
"require" : {
"sikessem/capsule": "^0.5"
}
}
```- Or by including the dependency:
```bash
composer require sikessem/capsule --no-dev
```## π§βπ» Usage
1. Define your custom components using Capsule's interfaces and traits:
```php
setName($name);
}
}
``````php
name;
}public function setName(string $name): void
{
$this->name = $name;
}
}
```2. You can use your components as below:
```php
name); // Returns trueecho $capsule->name; // Prints "Sikessem"
unset($capsule->name); // Does nothing
isset($capsule->name); // Returns true
$capsule->value = 'value'; // Throws an exception
$capsule->name = 'value'; // Set name to "value"
echo $capsule->name; // Prints "value"
$capsule->on('hello', function (?string $name = null) {
return 'Hello '.($name ?? 'Sikessem').'!';
});echo $capsule->hello(); //Prints "Hello Sikessem!"
```## π Contribution
The main purpose of this repository is to continue evolving Sikessem. We want to make contributing to this project as easy and transparent as possible, and we are grateful to the community for contributing bug fixes and improvements. Read below to learn how you can take part in improving Sikessem.
## [π· Code of Conduct][conduct-link]
Sikessem has adopted a Code of Conduct that we expect project participants to adhere to.
Please read the [full text][conduct-link] so that you can understand what actions will and will not be tolerated.## π₯ [Contributing Guide][contrib-link]
Read our [**Contributing Guide**][contrib-link] to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Sikessem.
## ποΈ Good First Issues
We have a list of [good first issues][gfi] that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.
[gfi]: https://github.com/sikessem/core/labels/good%20first%20issue
## π¬ Discussions
Larger discussions and proposals are discussed in [**Sikessem's GitHub discussions**][discuss-link].
## π Security Reports
If you discover a security vulnerability within [any of Sikessem's projects][sikessem-link], please email [SIGUI KessΓ© Emmanuel](https://sigui.ci) at [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed.
## π License
The Sikessem Skeleton is open-sourced software licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE][license-link] file for details.
***
Made with β€οΈ by @siguici.