This repository has been archived by the owner on Dec 7, 2019. It is now read-only.
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
c915bfa
commit 3e405e7
Showing
7 changed files
with
82 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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
<?php | |||
|
|||
namespace ZendSkeletonModule; | |||
|
|||
use Zend\Config\Config, | |||
Zend\Module\Manager, | |||
Zend\Loader\AutoloaderFactory; | |||
|
|||
class Module | |||
{ | |||
public function init(Manager $moduleManager) | |||
{ | |||
$this->initAutoloader(); | |||
} | |||
|
|||
public function initAutoloader() | |||
{ | |||
include __DIR__ . '/autoload_register.php'; | |||
} | |||
|
|||
public function getConfig($env = null) | |||
{ | |||
return new Config(include __DIR__ . '/configs/module.config.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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
<?php | |||
return array ( | |||
'ZendSkeletonModule\\Module' => __DIR__ . DIRECTORY_SEPARATOR . 'Module.php', | |||
'ZendSkeletonModule\\Controller\\SkeletonController' => __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'ZendSkeletonModule' . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . 'SkeletonController.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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
<?php | |||
return function ($class) { | |||
static $map; | |||
if (!$map) { | |||
$map = include __DIR__ . '/autoload_classmap.php'; | |||
} | |||
|
|||
if (!isset($map[$class])) { | |||
return false; | |||
} | |||
return include $map[$class]; | |||
}; |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
<?php | |||
spl_autoload_register(include __DIR__ . '/autoload_function.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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
<?php | |||
return array( | |||
'di' => array( | |||
'instance' => array( | |||
'alias' => array( | |||
'skeleton' => 'ZendSkeletonModule\Controller\SkeletonController', | |||
), | |||
'Zend\View\PhpRenderer' => array( | |||
'methods' => array( | |||
'setResolver' => array( | |||
'resolver' => 'Zend\View\TemplatePathStack', | |||
'options' => array( | |||
'script_paths' => array( | |||
'skeleton' => __DIR__ . '/../views', | |||
), | |||
), | |||
), | |||
), | |||
), | |||
), | |||
), | |||
); |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
<?php | |||
|
|||
namespace ZendSkeletonModule\Controller; | |||
|
|||
use Zend\Mvc\Controller\ActionController; | |||
|
|||
class SkeletonController extends ActionController | |||
{ | |||
public function indexAction() | |||
{ | |||
return array(); | |||
} | |||
} |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
<strong>Module:</strong> ZendSkeletonModule » | |||
<strong>Controller:</strong> Skeleton » | |||
<strong>Action:</strong> index |