Skip to content

Instantly share code, notes, and snippets.

View pboethig's full-sized avatar

Peter Böthig pboethig

  • München
View GitHub Profile
@pboethig
pboethig / custom_event.yml
Created December 30, 2016 10:58
symfony 3 eventlisteners
services:
thumbnail.finedata.created:
class: Mittax\MediaConverterBundle\Event\Listener\Thumbnail\FineDataCreated
tags:
- { name: kernel.event_listener, event: thumbnail.finedata.created, priority: 1 }
@pboethig
pboethig / formatToMimeTypeMap.php
Last active December 17, 2016 15:46
a mimetype to format map
<?php
/**
* Created by PhpStorm.
* User: pboethig
* Date: 17.12.16
* Time: 16:09
*/
namespace Mittax\MediaConverterBundle\ValueObjects;
/**
* Created by pboethig on 07.12.16.
*/
import Test from './sum';
test('1 + 2 = 3', ()=>
{
var inst = new Test(1,2);
inst.sum(1,2)
class Test {
constructor(x, y) {
this.x = x;
this.y = y;
}
sum(a, b) {
return a+b;
}
}
{
"presets": ["es2015"]
}
{
"name": "ject",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "jest"
},
"author": "",
"license": "ISC",
<?php
namespace Mittax\WsseBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files.
*
$container = new ContainerBuilder();
$extension = new MittaxWsseExtension();
$container->registerExtension($extension);
$container->loadFromExtension($extension->getAlias());
$container->compile();
$salt = $this->_getContainer()->getParameter('mittax.wsse.salt');
mittax_wsse:
salt: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
<?php
namespace Mittax\WsseBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;