Repository URL to install this package:
|
Version:
1.0.1 ▾
|
<?php
namespace ZF2Bbcode\Factory;
use Zend\ServiceManager\FactoryInterface;
use Decoda\Decoda;
use Decoda\Hook\EmoticonHook;
class BbcodeDecodaFactory implements FactoryInterface
{
public function createService(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
{
$viewHelperManager = $serviceLocator->get('ViewHelperManager');
$basePath = $viewHelperManager->get('basePath');
$url = $basePath();
$bbcode = new Decoda();
$bbcode->defaults();
$bbcode->addHook(new EmoticonHook(array('path' => $url . '/images/emoticons/')));
return $bbcode;
}
}
?>