-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the ContainerAware interface. The controller now implements it.
- Loading branch information
Showing
5 changed files
with
93 additions
and
9 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,44 @@ | ||
<?php | ||
|
||
/** | ||
* This file contains the ContainerAware interface. | ||
* | ||
* @author Matthias Loitsch <developer@ma.tthias.com> | ||
* @copyright Copyright (c) 2010, Matthias Loitsch | ||
* @package Config | ||
*/ | ||
|
||
/** | ||
* A class has to implement this interface to receive the container. | ||
*/ | ||
interface ContainerAware { | ||
|
||
/** | ||
* Has to call verifyRequiredServices() | ||
* | ||
* @param sfServiceContainer $container | ||
*/ | ||
public function setContainer($container); | ||
|
||
/** | ||
* @return sfServiceContainer | ||
*/ | ||
public function getContainer(); | ||
|
||
/** | ||
* Has to return a list of required services. | ||
* | ||
* @return array | ||
*/ | ||
public function getRequiredServices(); | ||
|
||
/** | ||
* Checks if all services are correctly implemented | ||
* | ||
* @param sfServiceContainer $container | ||
* @throws Exception if not everyting was ok. | ||
*/ | ||
public function verifyRequiredServices($container); | ||
|
||
|
||
} |
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
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
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
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