Download the PHP package gravatalonga/king without Composer
On this page you can find all versions of the php package gravatalonga/king. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gravatalonga/king
More information about gravatalonga/king
Files in gravatalonga/king
Package king
Short Description Base framework for my personal project, it can handle any kind of application
License MIT
Informations about the package king
King
Web Framework
Requirements | |
---|---|
PHP | >= 8.1 |
Installation
composer create-project gravatalonga/king project-folder
Configuration
- Copy file
.env.example
to.env
and configured them. And also you need to check config folder. - run
npm install
How is work
Service Provider
Service provider is way to bind dependencies or libraries into application, you also can do any sort of modification for already bound.
For creating a service provider you need to implement ServiceProvider
and implement two method.
Factories Method is for create new entry, must return an array key and value.
Extensions Method is for extended already bound entry it same as above.
Example:
Configuration
Each file exists on folder of config is loaded into container which name of file became key entry and content became value of entry.
Paths
Path bind into container are:
path.config
=> Config folder
path.public
=> Public folder
path.resource
=> Resources folder
path.storage
=> Storage folder
path.domain
=> Domain folder
path.base
=> Root folder
Create route
But you also can create routes in ServiceProvider
Service Provider
CommandBusServiceProvider
\League\Tactician\CommandBus
\League\Tactician\Container\ContainerLocator
DatabaseServiceProvider
\Doctrine\DBAL\Connection
database.connections
instance of\Gravatalonga\DriverManager\Manager
DotEnvServiceProvider
env
is instance of\Dotenv\Dotenv
LogServiceProvider
logger.manager
instance of\Gravatalonga\DriverManager\Manager
\Psr\Log\LoggerInterface
SlimServiceProvider
\Psr\Http\Message\ResponseFactoryInterface
\Slim\Interfaces\CallableResolverInterface
\Slim\Interfaces\RouteCollectorInterface
TwigServiceProvider
twig.loader
instance of\Twig\Loader\FilesystemLoader
twig.options
is array\Twig\Environment
Migration
- composer migrate
Fixing Style
- composer fix
All versions of king with dependencies
gravatalonga/king-foundation Version >=1.0.15
middlewares/whoops Version ^2.0
doctrine/migrations Version ^3.5