Skip to content

Instantly share code, notes, and snippets.

View htimur's full-sized avatar

Timur Khamrakulov htimur

  • Germany
View GitHub Profile
<?php
class CustomerControllerTest extends WebTestCase
{
private $client;
public function setUp() {
$this->client = static::createClient();
$this->logIn();
}
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<imports>
<import resource="admin.xml"/>
</imports>
<?php
namespace Yakimbi\EmilyBundle\EventListener;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Yakimbi\EmilyBundle\Entity\Customer;
use Yakimbi\EmilyBundle\Manager\CustomerManager;
class CustomerAccountNumberGeneratorListener
{
<?php
namespace Yakimbi\EmilyBundle\EventListener;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Yakimbi\EmilyBundle\Entity\Customer;
use Yakimbi\EmilyBundle\Manager\CustomerManager;
class CustomerAccountNumberGeneratorListener
{

#rg\injektor

rg\injektor is a sophisticated dependency injection container for PHP that was inspired by Guice. Unlike other reflection based containers rg\injektor includes a factory class generator that you can use to prevent the use of reflection on production.

Build Status

#Prerequisites

name := "MongoDB Replica Set oplog tailing with Akks Streams"
version := "1.0"
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.1.5",
"org.mongodb.scala" %% "mongo-scala-driver" % "1.1.0",
"com.typesafe.akka" %% "akka-slf4j" % "2.4.2",
/*
* Copyright 2015 MongoDB, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
val collection: MongoCollection[Document] = _
val observable = collection.find(in("op", "i", "d", "u"))
.cursorType(CursorType.TailableAwait)
.noCursorTimeout(true)
val source: Source[Document, NotUsed] = _
import rxStreams.Implicits._
val collection: MongoCollection[Document] = _
val observable = collection.find(in("op", "i", "d", "u"))
.cursorType(CursorType.TailableAwait)
.noCursorTimeout(true)
val source: Source[Document, NotUsed] = Source.fromPublisher(observable)