2017 © Pedro Peláez
 

library symfony-traits

A collection of traits to inject symfony services

image

kuborgh/symfony-traits

A collection of traits to inject symfony services

  • Wednesday, June 15, 2016
  • by kuborgh-hgiesenow
  • Repository
  • 2 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

symfony-traits

Collection of traits to inject common symfony services, (*1)

Usage

Logger

use LoggerTrait;
...
try {
    doSomeStuff($id);
} catch (\Exception $exc) {
    // Log Exception text and type in context
    $logCtx = $this->logContextFromException($exc);
    // Add additional specific context
    $logCtx['id'] = $id;
    // Log away
    $this->logError('Error in doing some stuff', $logCtx);
}

The Versions

15/06 2016

dev-master

9999999-dev https://github.com/kuborgh/symfony-traits

A collection of traits to inject symfony services

  Sources   Download

MIT

by Hannes Giesenow

library trait symfony dependency-injection