Download the PHP package thijmendf/groundwork without Composer
On this page you can find all versions of the php package thijmendf/groundwork. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thijmendf/groundwork
More information about thijmendf/groundwork
Files in thijmendf/groundwork
Package groundwork
Short Description Groundwork, a lightweight PHP Framework
License MIT
Informations about the package groundwork
Groundwork
A lightweight PHP framework
Note: Groundwork is still in its alpha state and will undergo heavy changes before a more stable release structure is implemented.
This is the core library for the Groundwork project. See the default Groundwork project for more information.
The framework uses various external packages such as, but not limited to:
- Twig for rendering templates.
- Symfony for HTTP request / response processing.
- Carbon for date / time.
- Altorouter for routes.
- TailwindCSS for styling. You'll have to install it with npm. (see package.json in the default project)
Installing
To install, run composer require thijmendf/groundwork
Initializing
In order to start the framework, send all http requests (except for requests for files such as assets) to a single php file inside a public folder. In there, simply require the following bootstrap code from your project root:
In that bootstrap file, you can use this code to start the framework:
And that's it. It'll automatically handle the requests and responses.
Default file structure
A project that implements this framework needs the following file structure:
Extending
You can also extend certain features by making a class in the /App/Extensions namespace. Extensions must implement the Groundwork/Extensions/Extension interface.
The following components can be extended:
App/Extensions/RendererFor adding twig functions, filters etc.App/Extensions/ConfigFor verifying .env configuration. New items can be verified by usingConfig::required()orConfig::optional().-
App/Extensions/BootstrapFor starting the framework and registering any container instances. New instances can be passed by using:$container->register('identifier', new TargetClass());or- As
$container->register('identifier', 'App/Namespaces/TargetClass');(orTargetClass::class).
Class paths mean the target class will only be instanced whenever it's requested (lazy loading).
- More coming soon.
Contributing
See Contributing on how to contribute to the project.
All versions of groundwork with dependencies
ext-mysqli Version *
ext-json Version *
ext-fileinfo Version *
altorouter/altorouter Version ^2.0
gladcodes/keygen Version ^1.1
intervention/image Version ^2.6
nesbot/carbon Version ^2.50
symfony/http-foundation Version ^5.3
symfony/mime Version ^5.3
symfony/var-dumper Version ^5.3
twig/twig Version ^3.3
symfony/dotenv Version 5.4.x-dev
phpmailer/phpmailer Version dev-master
psr/container Version ^2.0.2