Skip to content

Commit

Permalink
drop zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
kokspflanze committed Mar 20, 2017
1 parent d44ffb3 commit 2deee39
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 76 deletions.
2 changes: 0 additions & 2 deletions Module.php

This file was deleted.

16 changes: 9 additions & 7 deletions config/module.config.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

use Zend\Router\Http\Segment;
use Zend\ServiceManager\Factory\InvokableFactory;
use ZfcTicketSystem\Controller;
use ZfcTicketSystem\Entity;
use ZfcTicketSystem\Form;
use ZfcTicketSystem\Options;
use ZfcTicketSystem\View\Helper;
Expand All @@ -11,7 +13,7 @@
'router' => [
'routes' => [
'zfc-ticketsystem' => [
'type' => 'segment',
'type' => Segment::class,
'options' => [
'route' => '/panel/ticket[-:action[-:id]].html',
'constraints' => [
Expand All @@ -25,7 +27,7 @@
],
],
'zfc-ticketsystem-admin' => [
'type' => 'segment',
'type' => Segment::class,
'options' => [
'route' => '/admin/ticket[-:action[-:id]][-:type].html',
'constraints' => [
Expand Down Expand Up @@ -72,7 +74,7 @@
'doctrine' => [
'driver' => [
'application_entities' => [
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'class' => \Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
'cache' => 'array',
'paths' => [__DIR__ . '/../src/ZfcTicketSystem/Entity']
],
Expand All @@ -96,10 +98,10 @@
'zfc-ticket-system' => [
'auth_service' => 'user_auth_service',
'entity' => [
'ticket_category' => 'ZfcTicketSystem\Entity\TicketCategory',
'ticket_entry' => 'ZfcTicketSystem\Entity\TicketEntry',
'ticket_subject' => 'ZfcTicketSystem\Entity\TicketSubject',
'user' => 'SmallUser\Entity\User'
'ticket_category' => Entity\TicketCategory::class,
'ticket_entry' => Entity\TicketEntry::class,
'ticket_subject' => Entity\TicketSubject::class,
'user' => \SmallUser\Entity\User::class
],
],
'view_helpers' => [
Expand Down
14 changes: 1 addition & 13 deletions src/ZfcTicketSystem/Controller/AdminFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@

namespace ZfcTicketSystem\Controller;


use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\ServiceManager\Factory\FactoryInterface;
use ZfcTicketSystem\Service\TicketSystem;

class AdminFactory implements FactoryInterface
Expand All @@ -28,13 +25,4 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
);
}

/**
* @param ServiceLocatorInterface|AbstractPluginManager $serviceLocator
* @return AdminController
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
return $this($serviceLocator->getServiceLocator(), AdminController::class);
}

}
21 changes: 7 additions & 14 deletions src/ZfcTicketSystem/Controller/TicketSystemFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@

namespace ZfcTicketSystem\Controller;


use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\ServiceManager\Factory\FactoryInterface;
use ZfcTicketSystem\Service\TicketSystem;

class TicketSystemFactory implements FactoryInterface
{

/**
* @param ContainerInterface $container
* @param string $requestedName
* @param array|null $options
* @return TicketSystemController
*/
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$config = $container->get('config');
Expand All @@ -23,13 +25,4 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
);
}

/**
* @param ServiceLocatorInterface|AbstractPluginManager $serviceLocator
* @return TicketSystemController
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
return $this($serviceLocator->getServiceLocator(), TicketSystemController::class);
}

}
14 changes: 1 addition & 13 deletions src/ZfcTicketSystem/Service/CategoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

namespace ZfcTicketSystem\Service;


use Doctrine\ORM\EntityManager;
use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\ServiceManager\Factory\FactoryInterface;

class CategoryFactory implements FactoryInterface
{
Expand All @@ -27,14 +25,4 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
);
}

/**
* @param ServiceLocatorInterface $serviceLocator
* @return Category
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
/** @noinspection PhpParamsInspection */
return $this($serviceLocator, Category::class);
}

}
15 changes: 1 addition & 14 deletions src/ZfcTicketSystem/Service/TicketSystemFactory.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<?php


namespace ZfcTicketSystem\Service;


use Doctrine\ORM\EntityManager;
use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\ServiceManager\Factory\FactoryInterface;

class TicketSystemFactory implements FactoryInterface
{
Expand All @@ -28,14 +25,4 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
);
}

/**
* @param ServiceLocatorInterface $serviceLocator
* @return TicketSystem
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
/** @noinspection PhpParamsInspection */
return $this($serviceLocator, TicketSystem::class);
}

}
14 changes: 1 addition & 13 deletions src/ZfcTicketSystem/View/Helper/NewTicketFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@

namespace ZfcTicketSystem\View\Helper;


use Interop\Container\ContainerInterface;
use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\ServiceManager\Factory\FactoryInterface;

class NewTicketFactory implements FactoryInterface
{
Expand All @@ -24,13 +21,4 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
);
}

/**
* @param ServiceLocatorInterface|AbstractPluginManager $serviceLocator
* @return NewTicketWidget
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
return $this($serviceLocator->getServiceLocator(), NewTicketWidget::class);
}

}

0 comments on commit 2deee39

Please sign in to comment.