-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpimple.api.php
45 lines (43 loc) · 985 Bytes
/
pimple.api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* @file
* API documentation for the Pimple module.
*/
/**
* hook_pimple_info() returns an array of containers and the
* constructor arguments and method calls required to configure
* the container.
*
* Use `values` to pass default values to the container.
*
* Use `providers` to attach service providers as in the example.
*
* @return array
*/
function hook_pimple_info() {
$info = array();
$info['my_container'] = array(
'class' => 'Pimple\\Container',
'values' => array(
'name' => 'pimple'
),
'providers' => array(
array(
'class' => 'Pimple\\Tests\\Fixtures\\PimpleServiceProvider',
'values' => array(
'pimple' => 'pimple2'
),
),
),
);
return $info;
}
/**
* hook_pimple_info_alter() allows other modules to modify
* the configuration of the container.
*
* @param $info
*/
function hook_pimple_info_alter(&$info) {
$info['my_container']['class'] = 'Silex\\Application';
}