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 | |
$env = getenv('APPLICATION_ENV'); | |
return [ | |
// modules, module listener options, etc. | |
'config_glob_paths' => [ | |
__DIR__.'/autoload/{,*.}{global,'.$env.',local}.php', | |
] | |
]l |
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 My\Namespace; | |
final class InvoiceNumber | |
{ | |
private $invoiceNumber; | |
private function __construct(){}; | |
public static function fromString($string) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 IbmiToolkit; | |
use Zend\Mvc\ModuleRouteListener; | |
use Zend\Mvc\MvcEvent; | |
class Module | |
{ | |
public function onBootstrap(MvcEvent $e) | |
{ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit bootstrap="../../../vendor/autoload.php" | |
backupGlobals="false" | |
backupStaticAttributes="false" | |
colors="true" | |
verbose="true"> | |
<testsuites> | |
<testsuite name="loadEntry"> | |
<sirectory suffix="Test.php">./LoadEntryTest</sirectory> |
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 | |
// /Module/IbmiToolkit/src/IbmiToolkit/Factory/ToolkitFactory.php | |
namespace IbmiToolkit\Factory; | |
use Zend\ServiceManager\FactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
/** | |
* Class ToolkitFactory |
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 | |
class PostMapper | |
{ | |
public function objectToDb(Post $post) | |
{ | |
return [ | |
'title' => $post->getTitle(), | |
'content' => $post->getContent() | |
]; | |
} |
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 | |
class CustomerId | |
{ | |
private $name; | |
private $address; | |
public function __construct($name, $address) | |
{ | |
$this->name = (string) $name; |
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
LoadModule ibm_ssl_module /QSYS.LIB/QHTTPSVR.LIB/QZSRVSSL.SRVPGM | |
# Enable compression | |
LoadModule deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM | |
# Specify content types to compress | |
AddOutputFilterByType DEFLATE application/x-httpd-php application/json text/css application/x-javascript application/javascript text/html | |
# Browser caching rules | |
ExpiresActive On |
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
<?xml version="1.0" encoding="utf-8"?> | |
<phpunit bootstrap="../Doctrine/Tests/TestInit.php" colors="true"> | |
<php> | |
<var name="db_type" value="ibm_db2"/> | |
<var name="db_host" value="myDbName" /> | |
<var name="db_username" value="WEBTEST" /> | |
<var name="db_password" value="WEBTEST" /> | |
<var name="db_name" value="DCTRNTST" /> | |
<var name="db_port" value="3306"/> |