Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PHP FIG: A flipping quick overview - Symfony UK...

Avatar for Michael C. Michael C.
August 17, 2016

PHP FIG: A flipping quick overview - Symfony UK August 2016 Lightning Talk

N.B: I wrote this talk in 10 minutes before during it during the previous talk after a quick request to do it. Apologies for any errors.

Avatar for Michael C.

Michael C.

August 17, 2016
Tweet

More Decks by Michael C.

Other Decks in Technology

Transcript

  1. ME?

  2. $logger->alert( 'This is an alert level log message' ); PSR-3:

    LOGGING $logger->critical( 'This is a critical level log message', array('user' => $username) );
  3. PSR-6: CACHING $jakubLife = $cachePool->hasItem('jakubLife'); // FALSE $jakubZalas = $cachePool->getItem('jakubStatus');

    // CacheItem Object $jakubZalas->get(); // ‘Tired' $jakubZalas->set('Sleeping') $jakubZalas->expiresAfter('43200'); $cachePool->save($jakubZalas);
  4. HUGS interface Huggable { /** * Hugs this object. *

    * All hugs are mutual. An object that is hugged MUST in turn hug the * other object back by calling hug() on the first parameter. */ public function hug(Huggable $h); }
  5. PSR-11: CONTAINER INTERFACE /** * Describes the interface of a

    container that exposes methods to read its entries. */ interface ContainerInterface { /** * Finds an entry of the container by its identifier and returns it. * */ public function get($id); /** * Returns true if the container can return an entry for the given identifier. * Returns false otherwise. * */ public function has($id); }