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 | |
/** | |
* Phing task to generate a Zend Framework style autoloader classmap file | |
* | |
* This task requires ZF 2.x to be in your include_path. You can run phing like | |
* so to enforce this: | |
* | |
* $ export PHP_COMMAND="php -d include_path=.:<path to zf library>:<path to pear>" | |
* $ phing ... |
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 Application\Event; | |
use Zend\EventManager\StaticEventManager, | |
Zend\EventManager\EventDescription, | |
Application\Event\Exception\ForbiddenException, | |
Application\Event\Exception\UnexpectedValueException, | |
Humus\Di\Locator; |
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; | |
use League\Fractal\Pagination\CursorInterface; | |
use League\Fractal\Pagination\PaginatorInterface; | |
use League\Fractal\Resource\ResourceInterface; | |
use League\Fractal\Serializer\JsonApiSerializer; | |
class CustomJsonApiSerializer extends SerializerAbstract |
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
$config; // array with di configuration | |
if (APPLICATION_ENV == 'development' || !class_exists('Application\Context') { | |
$di = new Zend\Di\Di($config); | |
$generator = new Generator($di); | |
$generator->setNamespace('Application') | |
->setContainerClass('Context'); | |
$file = $generator->getCodeGenerator(); | |
$file->setFilename(__DIR__ . '/../Application/Context.php'); | |
$file->write(); |
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 Application; | |
use Zend\Di\Di; | |
class Context extends Di | |
{ | |
public function newInstance($name, array $params = array(), $isShared = true) |
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 | |
// our test cases | |
interface A {} | |
class B implements A {} | |
class C extends B {} | |
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
Verifying that +prolic is my blockchain ID. https://onename.com/prolic |
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
A minor patch to the aggregate repository is needed for this! see: https://github.com/prooph/event-store/pull/154 | |
<?php | |
abstract class User extends \Prooph\EventSourcing\AggregateRoot | |
{ | |
protected $type; | |
public function type() | |
{ |
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 | |
require 'vendor/autoload.php'; | |
$amqpLibConnection = new \PhpAmqpLib\Connection\AMQPStreamConnection( | |
'localhost', | |
5672, | |
'guest', | |
'guest', | |
'/humus-amqp-test' |
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 | |
$connection1 = new \AMQPConnection(); | |
$connection1->connect(); | |
$connection2 = new \AMQPConnection(); | |
$connection2->connect(); | |
$channel1 = new \AMQPChannel($connection1); |
OlderNewer