Skip to content

Instantly share code, notes, and snippets.

View trq's full-sized avatar

Tony R Quilkey trq

  • thorpesystems
  • Sydney, Australia
View GitHub Profile
@trq
trq / gist:5279318
Created March 31, 2013 02:56
Composer init and install
composer init --require=proem/proem:0.10.0-alpha6 -n && composer install --dev
<?php
$routes->group(['hostname' => '{username}.domain.com'], function() use ($routes) {
$routes->attach('user.home', new Route('/'));
$routes->attach('user.edit', new Route('/edit'));
});
use \Mockery as m;
class ChainEventTest extends \PHPUnit_Framework_TestCase
{
public function testCanInstantiate()
{
$this->assertInstanceOf('Proem\Filter\ChainEventInterface', m::mock('Proem\Filter\ChainEventInterface'));
}
public function testInAndOutAreCalledOnInit()
abstract class ChainEventAbstract implements ChainEventInterface
{
/**
* Define the method to be called on the way into the filter.
*
* @param Proem\Service\AssetManagerInterface $assets
*/
abstract public function in(AssetManagerInterface $assets);
/**
<?php
interface foo {
public function x();
}
interface bar {
public function y();
}
#!/bin/bash
RESTORE='\033[0m'
RED='\033[00;31m'
GREEN='\033[00;32m'
brew_php_link=$(ls -l /usr/local/bin/php | grep -Eo 'php([0-9]{1,2})')
current_php_version=$(php --version | head -n1 | awk '{print $2}')
Portage 2.2.2 (default/linux/amd64/2008.0, gcc-4.4.5, libc-0-r0, 2.6.32-042stab016.1 x86_64)
=================================================================
System uname: Linux-2.6.32-042stab016.1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.1.8
Portage Tree: /usr/portage
Portage HEAD: b1e527493d08bf2a016db6e1df1875fd95008734 /usr/portage/.git/refs/heads/funtoo.org
app-shells/bash: 4.1_p10
dev-lang/python: 2.6.6-r1
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.1.8-r2
sys-apps/openrc: 0.7.0
<?php
(new AutoLoader())
->registerNamespaces([
'Proem' => ['/myproem', 'lib']
]);
@trq
trq / gist:2055571
Created March 17, 2012 05:58
Proem Autoloader
<?php
require_once './lib/Proem/Autoloader.php';
use Proem\Autoloader;
(new AutoLoader())
->registerNamespace('Proem', './lib')
->register();
@trq
trq / gist:1656493
Created January 22, 2012 10:22
Filter Chain Event as Service Asset.
diff --git a/lib/Proem/Api/Bootstrap/Service/Asset/Dispatch.php b/lib/Proem/Api/Bootstrap/Service/Asset/Dispatch.php
new file mode 100644
index 0000000..5b1c194
--- /dev/null
+++ b/lib/Proem/Api/Bootstrap/Service/Asset/Dispatch.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * The MIT License