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 / bootstrap-example.php
Created June 20, 2011 11:42
Proem Bootstrap Example
<?php
/**
* This is just a running example of what a bootstrap file
* might look like to get an application built on top of
* Proem up and running.
*
* It's a good demo that gives me a design to work toward.
*/
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
sudo apt-get && sudo apt-get install
scp ~/.ssh/id_rsa.pub remote:/tmp/trq.pub
sudo su gitolite
gl-setup /tmp/trq.pub
Host remote
HostName some-remote-server.com
Port 1234
@trq
trq / gist:1600497
Created January 12, 2012 13:23
A simple PHP DI Container and Manager
<?php
class Foo
{
private $name;
public function __construct($name)
{
echo "Foo instantiated";
$this->name = $name;
@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
@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();
<?php
(new AutoLoader())
->registerNamespaces([
'Proem' => ['/myproem', 'lib']
]);