Skip to content

Instantly share code, notes, and snippets.

@macnibblet
Created June 29, 2012 11:29
Show Gist options
  • Save macnibblet/3017468 to your computer and use it in GitHub Desktop.
Save macnibblet/3017468 to your computer and use it in GitHub Desktop.
<?php
/**
* @author Antoine Hedgecock <antoine@pmg.se>
*/
/**
* @namespace
*/
namespace Facebook;
/**
* @cateory Facebook
*/
class Module
{
public function onBootstrap($e)
{
$sm = $e->getApplication()
->getServiceManager();
$sm->get('view_manager')
->getHelperManager()
->setFactory('Facebook\View\Helper\Facebook', function($sm) {
$helper = new View\Helper\Facebook();
$helper->setService($sm->get('facebook_service'));
return $helper;
});
}
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
array(
// Facebook doesn't comply to PSR-0 loading...
'Facebook' => __DIR__ . '/../../vendor/Facebook/src/facebook.php'
)
),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment