icanboogie / icanboogie
High-performance micro-framework for PHP
Installs: 5 172
Dependents: 21
Suggesters: 0
Security: 0
Stars: 30
Watchers: 1
Forks: 4
Open Issues: 4
Requires
- php: >=7.2.5
- ext-json: *
- icanboogie/bind-event: ^5.0
- icanboogie/bind-http: ^5.0
- icanboogie/bind-prototype: ^5.0
- icanboogie/bind-routing: ^5.0
- icanboogie/config: ^1.2
- icanboogie/session: ^3.0
- icanboogie/storage: ^3.0
- psr/log: ^1.0
Requires (Dev)
- composer/composer: ^2.0
- phpstan/phpstan: ^0.12.63
Suggests
- icanboogie/bind-activerecord: ActiveRecord Object-relational mapping.
- icanboogie/bind-cldr: Provides internationalization to your application.
- icanboogie/bind-render: Provides a rendering API to your application.
- icanboogie/bind-view: Provides views to your application.
- icanboogie/i18n: Provides localization for your application and nice internationalization helpers.
- icanboogie/image: Provides image resizing, filling, and color resolving.
- icanboogie/module: Provides support to extend ICanBoogie using modules.
- icanboogie/operation: Operation oriented controllers API.
README
ICanBoogie is a high-performance micro-framework. It is written with speed, flexibility, and lightness in mind. ICanBoogie doesn't try to be an all-in-one do-it-all solution but provides the essential features to quickly and easily build web applications. It is easily extensible, and a variety of packages are available to complement its features with rendering, views, routing, operations, internationalization, translation, ActiveRecord, facets, mailer…
What does micro mean?
"Micro" means that the core features of ICanBoogie are kept to the essential; the core is simple but greatly extensible. For instance, ICanBoogie won't force an ORM on you, although its ActiveRecord implementation is pretty nice. In the same fashion, its routing mechanisms are quite agnostic and let you use your very own dispatcher if you want to.
Configuration and conventions
ICanBoogie and its components are usually very configurable and come with sensible defaults and a
few conventions. Configurations are usually located in "config" folders, while locale messages are
usually located in "locale" folders. Components configure themselves thanks to ICanBoogie's
Autoconfig feature, and often don't require more that a line in your composer.json
file.
Acknowledgement
MooTools, Ruby on Rails, and, of course, Bacara.
Summary
- Working with ICanBoogie
- The life and death of your application
- Multi-site support
- Autoconfig
- Configuring the application
- Events
- Bindings
Routes
The package provides a controller for the /api/ping
route, which may be used to renew a session,
if one existed in the first place. When the timer
query parameter is present, the controller
gives timing information as well.
<?php /** @var \ICanBoogie\Application $app */ use ICanBoogie\HTTP\Request; $request = Request::from('/api/ping?timer'); $app->run($request); // pong, in 4.875 ms (ready in 3.172 ms)
Helpers
The following helper functions are defined:
app()
: Returns the Application instance, or throws ApplicationNotInstantiated if it has not been instantiated yet.boot()
: Instantiates a Application instance with the autoconfig and boots it.
Installation
composer require icanboogie/icanboogie
The following packages are required, you might want to check them out:
- icanboogie/common
- icanboogie/inflector
- icanboogie/datetime
- icanboogie/prototype
- icanboogie/event
- icanboogie/http
- icanboogie/routing
The following packages can also be installed for additional features:
- icanboogie/render: A rendering API.
- icanboogie/view: Adds views to controllers.
- icanboogie/activerecord: ActiveRecord Object-relational mapping.
- icanboogie/cldr: Provides internationalization for your application.
- icanboogie/i18n: Provides localization for your application and additional internationalization helpers.
- icanboogie/image: Provides image resizing, filling, and color resolving.
- icanboogie/module: Provides framework extensibility using modules.
- icanboogie/operation: Operation oriented controllers API.
The following bindings are available to help in integrating components:
Continuous Integration
The project is continuously tested by GitHub actions.
Code of Conduct
This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you are expected to uphold this code.
Contributing
Please see CONTRIBUTING for details.