PHP Classes

File: configs/services.json

Recommend this page to a friend!
  Classes of Cristian Radu   PHP Dependency Injection   configs/services.json   Download  
File: configs/services.json
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Dependency Injection
Access services using JSON configuration files
Author: By
Last change:
Date: 22 days ago
Size: 1,327 bytes
 

Contents

Class file image Download
{ "services": { "model": { "class": "\\KrisRo\\PhpDatabaseModel\\Model" }, "class_with_constructor_in_callable_string": { "class": "\\KrisRo\\PhpDatabaseModel\\Model::_construct" }, "class_with_specified_method_and_implicit_constructor": { "class": "\\KrisRo\\PhpDatabaseModel\\Database", "createConnection" : { "credentials" : "#database" } }, "model_with_specified_method_and_array_argument": { "class": "\\KrisRo\\Validator\\Validator", "createRegexRules" : { "rules": { "alphanumeric": "/^[a-z0-9\\-_]+$/i" } } }, "validator": { "class": "\\KrisRo\\Validator\\Validator", "_construct": { "rules": { "alphanumeric": "/^[a-z0-9\\-_]+$/i" } } }, "class_with_config_key_as_argument": { "class": "\\KrisRo\\Validator\\Validator", "_construct": { "rules": "#validator/rules" } }, "class_with_service_as_argument": { "class": "\\KrisRo\\PhpDatabaseModel\\Model", "_construct": { "credentialsOrPDO": "@pdo" } }, "pdo": { "class": "\\PDO", "_construct": { "dsn": "mysql:host=localhost;dbname=test", "username": "k", "password": "123456" } } } }