Skip to content

Commit

Permalink
Added module AntonTonev
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Mar 8, 2013
1 parent ca70df7 commit 97dbf1c
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 0 deletions.
24 changes: 24 additions & 0 deletions AntonTonev/Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
namespace AlexanderAlexandrov;

class Module
{
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/autoload_classmap.php',
),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}

public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
}
}
2 changes: 2 additions & 0 deletions AntonTonev/autoload_classmap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
return array();
34 changes: 34 additions & 0 deletions AntonTonev/config/module.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
return array(
'controllers' => array(
'invokables' => array(
'AlexanderAlexandrov\Controller\Index' => 'AlexanderAlexandrov\Controller\IndexController',
),
),

// The following section is new and should be added to your file
'router' => array(
'routes' => array(
'alexander_alexandrov' => array(
'type' => 'segment',
'options' => array(
'route' => '/alexander-alexandrov[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'AlexanderAlexandrov\Controller\Index',
'action' => 'index',
),
),
),
),
),

'view_manager' => array(
'template_path_stack' => array(
'alexander_alexandrov' => __DIR__ . '/../view',
),
),
);
21 changes: 21 additions & 0 deletions AntonTonev/src/AlexanderAlexandrov/Controller/IndexController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace AlexanderAlexandrov\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class IndexController extends AbstractActionController
{
public function indexAction()
{
return new ViewModel();
}
}
1 change: 1 addition & 0 deletions AntonTonev/view/alexander-alexandrov/index/index.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>I am the index.phtml in AlexanderAlexandrov module</h1>
24 changes: 24 additions & 0 deletions module/AntonTonev/Module.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
namespace AntonTonev;

class Module
{
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/autoload_classmap.php',
),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}

public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
}
}
2 changes: 2 additions & 0 deletions module/AntonTonev/autoload_classmap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
return array();
34 changes: 34 additions & 0 deletions module/AntonTonev/config/module.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
return array(
'controllers' => array(
'invokables' => array(
'AntonTonev\Controller\Index' => 'AntonTonev\Controller\IndexController',
),
),

// The following section is new and should be added to your file
'router' => array(
'routes' => array(
'anton_tonev' => array(
'type' => 'segment',
'options' => array(
'route' => '/anton-tonev[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'AntonTonev\Controller\Index',
'action' => 'index',
),
),
),
),
),

'view_manager' => array(
'template_path_stack' => array(
'anton_tonev' => __DIR__ . '/../view',
),
),
);
21 changes: 21 additions & 0 deletions module/AntonTonev/src/AntonTonev/Controller/IndexController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace AntonTonev\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class IndexController extends AbstractActionController
{
public function indexAction()
{
return new ViewModel();
}
}
1 change: 1 addition & 0 deletions module/AntonTonev/view/anton-tonev/index/index.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>I am the index.phtml in AntonTonev module</h1>

0 comments on commit 97dbf1c

Please sign in to comment.