Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2218 from acrobat/sf4-prepare-generators
[GeneratorBundle] Prepare generators for sf4 support
- Loading branch information
Showing
9 changed files
with
158 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<?php | ||
|
||
namespace Kunstmaan\GeneratorBundle\Helper; | ||
|
||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; | ||
use Symfony\Component\HttpKernel\Bundle\BundleInterface; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class Sf4AppBundle implements BundleInterface | ||
{ | ||
private $projectDir; | ||
|
||
public function __construct($projectDir) | ||
{ | ||
$this->projectDir = $projectDir; | ||
} | ||
|
||
/** | ||
* Boots the Bundle. | ||
*/ | ||
public function boot() | ||
{ | ||
//no-op | ||
} | ||
|
||
/** | ||
* Shutdowns the Bundle. | ||
*/ | ||
public function shutdown() | ||
{ | ||
//no-op | ||
} | ||
|
||
/** | ||
* Builds the bundle. | ||
* | ||
* It is only ever called once when the cache is empty. | ||
*/ | ||
public function build(ContainerBuilder $container) | ||
{ | ||
//no-op | ||
} | ||
|
||
/** | ||
* Returns the container extension that should be implicitly loaded. | ||
* | ||
* @return ExtensionInterface|null The default extension or null if there is none | ||
*/ | ||
public function getContainerExtension() | ||
{ | ||
//no-op | ||
} | ||
|
||
/** | ||
* Returns the bundle name (the class short name). | ||
* | ||
* @return string The Bundle name | ||
*/ | ||
public function getName() | ||
{ | ||
return 'App'; | ||
} | ||
|
||
/** | ||
* Gets the Bundle namespace. | ||
* | ||
* @return string The Bundle namespace | ||
*/ | ||
public function getNamespace() | ||
{ | ||
return 'App'; | ||
} | ||
|
||
/** | ||
* Gets the Bundle directory path. | ||
* | ||
* The path should always be returned as a Unix path (with /). | ||
* | ||
* @return string The Bundle absolute path | ||
*/ | ||
public function getPath() | ||
{ | ||
return $this->projectDir . '/src'; | ||
} | ||
|
||
/** | ||
* Sets the container. | ||
*/ | ||
public function setContainer(ContainerInterface $container = null) | ||
{ | ||
//no-op | ||
} | ||
|
||
/** | ||
* Returns the bundle name that this bundle overrides. | ||
* | ||
* Despite its name, this method does not imply any parent/child relationship | ||
* between the bundles, just a way to extend and override an existing | ||
* bundle. | ||
* | ||
* @return string The Bundle name it overrides or null if no parent | ||
* | ||
* @deprecated This method is deprecated as of 3.4 and will be removed in 4.0. | ||
*/ | ||
public function getParent() | ||
{ | ||
//no-op | ||
} | ||
} |
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
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