This repository has been archived by the owner on Jul 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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
13 changed files
with
125 additions
and
105 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 |
---|---|---|
@@ -1,39 +1,7 @@ | ||
<?php | ||
|
||
namespace PhingService; | ||
|
||
use Zend\Module\Consumer\AutoloaderProvider, | ||
Zend\Module\Listener\ModuleResolverListener; | ||
|
||
class Module | ||
{ | ||
|
||
public function getConfig($env = null) | ||
{ | ||
return include __DIR__ . '/configs/module.config.php'; | ||
} | ||
|
||
public function getServiceConfiguration() | ||
{ | ||
return array( | ||
'factories' => array( | ||
'PhingService' => function ($sm) { | ||
$service = new \PhingService\Service(); | ||
|
||
$service->setOptions($sm->get('PhingService.serviceOptions')); | ||
$service->setPhingOptions($sm->get('PhingService.phingOptions')); | ||
|
||
return $service; | ||
}, | ||
'PhingService.serviceOptions' => function ($sm) { | ||
$config = $sm->get('config'); | ||
return new \PhingService\ServiceOptions($config['PhingService.serviceOptions']); | ||
}, | ||
'PhingService.phingOptions' => function ($sm) { | ||
$config = $sm->get('config'); | ||
return new \PhingService\PhingOptions($config['PhingService.phingOptions']); | ||
}, | ||
), | ||
); | ||
} | ||
} | ||
/** | ||
* This file is placed here for compatibility with Zendframework 2's ModuleManager. | ||
* It allows usage of this module even without composer. | ||
* The original Module.php is in 'src/BsbPhingService' in order to respect PSR-0 | ||
*/ | ||
require_once __DIR__ . '/src/BsbPhingService/Module.php'; |
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 |
---|---|---|
@@ -1,20 +1,25 @@ | ||
<?php | ||
|
||
return array( | ||
'PhingService.serviceOptions' => array( | ||
'phpBin' => null, /* will attempt auto-detection via exec 'which php' */ | ||
'phingPath' => null, /* will assume composer installation and attempt auto detect */ | ||
), | ||
'PhingService.phingOptions' => array( | ||
'bsbphingservice' => array( | ||
'service' => array( | ||
'phpBin' => null, /* will attempt auto-detection via exec 'which php' */ | ||
'phingPath' => null, /* will assume composer installation and attempt auto detect */ | ||
), | ||
'phing' => array( | ||
|
||
), | ||
), | ||
'controllers' => array( | ||
'invokables' => array( | ||
'phingservice.index' => 'PhingService\Controller\IndexController', | ||
'BsbPhingService\Controller\Index' => 'BsbPhingService\Controller\IndexController', | ||
), | ||
), | ||
'view_manager' => array( | ||
'template_path_stack' => array( | ||
'PhingService' => __DIR__ . '/../view', | ||
'template_map' => array( | ||
'bsb-phing-service/index/index' => __DIR__ . '/../view/index/index.phtml', | ||
), | ||
), | ||
); | ||
) | ||
); | ||
|
||
|
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,70 @@ | ||
<?php | ||
|
||
namespace BsbPhingService; | ||
|
||
use Zend\Loader\AutoloaderFactory; | ||
use Zend\Loader\StandardAutoloader; | ||
use Zend\ModuleManager\Feature\ServiceProviderInterface; | ||
use Zend\ModuleManager\Feature\ConfigProviderInterface; | ||
use Zend\ModuleManager\Feature\AutoloaderProviderInterface; | ||
|
||
use BsbPhingService\Options\Service as ServiceOptions; | ||
use BsbPhingService\Options\Phing as PhingOptions; | ||
|
||
class Module implements AutoloaderProviderInterface, ConfigProviderInterface, ServiceProviderInterface | ||
{ | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getAutoloaderConfig() | ||
{ | ||
return array( | ||
AutoloaderFactory::STANDARD_AUTOLOADER => array( | ||
StandardAutoloader::LOAD_NS => array( | ||
__NAMESPACE__ => __DIR__, | ||
), | ||
), | ||
); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getConfig($env = null) | ||
{ | ||
return include __DIR__ . '/../../configs/module.config.php'; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getServiceConfig() | ||
{ | ||
return array( | ||
'aliases' => array( | ||
|
||
), | ||
'factories' => array( | ||
'BsbPhingService' => function ($sm) { | ||
$service = new Service\Phing(); | ||
|
||
$service->setOptions($sm->get('BsbPhingService.serviceOptions')); | ||
$service->setPhingOptions($sm->get('BsbPhingService.phingOptions')); | ||
|
||
return $service; | ||
}, | ||
'BsbPhingService.serviceOptions' => function ($sm) { | ||
$config = $sm->get('config'); | ||
|
||
return new ServiceOptions($config['bsbphingservice']['service']); | ||
}, | ||
'BsbPhingService.phingOptions' => function ($sm) { | ||
$config = $sm->get('config'); | ||
|
||
return new PhingOptions($config['bsbphingservice']['phing']); | ||
}, | ||
), | ||
); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/PhingService/PhingOptions.php → src/BsbPhingService/Options/Phing.php
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
7 changes: 5 additions & 2 deletions
7
src/PhingService/Service.php → src/BsbPhingService/Service/Phing.php
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
File renamed without changes.