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
<?php | |
namespace User\V1\Rest\User; | |
use ZF\ApiProblem\ApiProblem; | |
use ZF\Rest\AbstractResourceListener; | |
class UserResource extends AbstractResourceListener { | |
private $em; |
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
<?php | |
namespace User\V1\Rest\User; | |
use Zend\Paginator\Paginator; | |
use Zend\Paginator\Adapter\ArrayAdapter; | |
class UserCollection extends Paginator { | |
public function __construct($userCollection) { |
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
<?php | |
namespace User\V1\Rest\User; | |
class UserResourceFactory { | |
public function __invoke($services) { | |
$em = $services->get('Doctrine\ORM\EntityManager'); | |
return new UserResource($em); | |
} |
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
<?php | |
namespace User\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
*/ | |
class User { |
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
<?php | |
return array( | |
'doctrine' => array( | |
'connection' => array( | |
'orm_default' => array( | |
'driverClass' => 'Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver', | |
'params' => array( | |
'path' => 'data/database.sqlite' | |
) | |
) |
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
<?php | |
// namespace | |
use Zend\Mvc\Controller\AbstractActionController; | |
use ZF\ContentNegotiation\ViewModel; | |
class HealthCheckController extends AbstractActionController | |
{ | |
public function healthCheckAction() | |
{ |
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
{ | |
"name": "zendframework/skeleton-application", | |
"description": "Skeleton Application for ZF2", | |
"license": "BSD-3-Clause", | |
"keywords": [ | |
"framework", | |
"zf2" | |
], | |
"homepage": "http://framework.zend.com/", | |
"require": { |
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
<?php | |
/** | |
* Zend Framework (http://framework.zend.com/) | |
* | |
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | |
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
*/ |
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
<?php | |
/** | |
* Zend Framework (http://framework.zend.com/) | |
* | |
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | |
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
*/ |
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
<VirtualHost *:80> | |
ServerName sample.local | |
DocumentRoot /var/www/sample | |
<Directory /var/www/sample> | |
DirectoryIndex index.php | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> |