delboy1978uk / bone-controller
Controller package for Bone Framework
Installs: 1 188
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- php: ^8.2
- delboy1978uk/barnacle: ^2.3
- delboy1978uk/bone-db: ^1.2
- delboy1978uk/bone-i18n: ^1.2
- delboy1978uk/bone-log: ^1.3
- delboy1978uk/bone-server: ^1.2
- delboy1978uk/bone-view: ^1.7
- delboy1978uk/session: ^1.6
- jms/serializer: ^3.32
- laminas/laminas-diactoros: ^3.3
- psr/log: ^3.0
Requires (Dev)
- delboy1978uk/bone-doctrine: v2.3
- delboy1978uk/dev-tools: ^v1.0
- roave/security-advisories: dev-latest
README
Controller package for Bone Framework
installation
bone-controller is part of the core functionality of delboy1978uk/bone
, and as such will already be installed in your
app.
usage
The Bone\Controller\Controller
comes with a serializer, view engine, translator, and site config info. Just extend it in your own
class to get these features, and in your package registration class, pass it through Bone\Controller\Init
:
$controller = new YourController(); return Init::controller($controller, $c); // where $c is the container
The Init
class is a convenience class which checks for the following, and populates from the DI container.
In your own controller, implement the Interface and use the Trait:
use Bone\BoneDoctrine\EntityManagerAwareInterface; use Bone\BoneDoctrine\Traits\HasEntityManagerTrait; class MyController implements EntityManagerAwareInterface { use HasEntityManagerTrait; }