forked from xrow/bootstrap-bundle
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
Showing
7 changed files
with
180 additions
and
25 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
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,40 @@ | ||
<?php | ||
namespace xrow\bootstrapBundle\Model; | ||
|
||
use Symfony\Component\DependencyInjection\Container; | ||
use Sensio\Bundle\GeneratorBundle\Model\Bundle as GeneratorBundle; | ||
/** | ||
* Represents a bundle being built. | ||
*/ | ||
class Bundle extends GeneratorBundle | ||
{ | ||
private $namespace; | ||
|
||
private $name; | ||
|
||
private $targetDirectory; | ||
|
||
private $configurationFormat; | ||
|
||
private $isShared; | ||
|
||
private $testsDirectory; | ||
public function __construct($namespace, $name, $targetDirectory, $configurationFormat, $isShared) | ||
{ | ||
$this->namespace = $namespace; | ||
$this->name = $name; | ||
$this->targetDirectory = $targetDirectory; | ||
$this->configurationFormat = $configurationFormat; | ||
$this->isShared = $isShared; | ||
$this->testsDirectory = $this->getTargetDirectory().'/Tests'; | ||
} | ||
/** | ||
* Returns the directory where the bundle will be generated. | ||
* | ||
* @return string | ||
*/ | ||
public function getTargetDirectory() | ||
{ | ||
return rtrim($this->targetDirectory, '/').'/'.trim( strtolower(strtr($this->namespace, '\\', '/') ), '/'); | ||
} | ||
} |
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