-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38dfe52
commit f2ebf0c
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/* | ||
+------------------------------------------------------------------------+ | ||
| Phalcon Framework | | ||
+------------------------------------------------------------------------+ | ||
| Copyright (c) 2011-2017 Phalcon Team (https://phalconphp.com) | | ||
+------------------------------------------------------------------------+ | ||
| This source file is subject to the New BSD License that is bundled | | ||
| with this package in the file LICENSE.txt. | | ||
| | | ||
| If you did not receive a copy of the license and are unable to | | ||
| obtain it through the world-wide-web, please send an email | | ||
| to [email protected] so we can send you a copy immediately. | | ||
+------------------------------------------------------------------------+ | ||
*/ | ||
|
||
use Phalcon\DiInterface; | ||
use Phalcon\Di\ServiceProviderInterface; | ||
|
||
/** | ||
* SomeServiceProvider | ||
*/ | ||
class SomeServiceProvider implements ServiceProviderInterface | ||
{ | ||
public function register(DiInterface $di) | ||
{ | ||
require_once __DIR__ . DIRECTORY_SEPARATOR . 'SomeComponent.php'; | ||
|
||
$di['foo'] = function () { | ||
return 'bar'; | ||
}; | ||
|
||
$di['fooAction'] = function () { | ||
return new \SomeComponent('phalcon'); | ||
}; | ||
} | ||
} |