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

WE HAVE PSR-8

WE HAVE PSR-8

PHPカンファレンス2017 懇親会LT 発表スライドです

Hisateru Tanaka

October 08, 2017
Tweet

More Decks by Hisateru Tanaka

Other Decks in Technology

Transcript

  1. <?php namespace Psr\Log; interface LoggerInterface { public function emergency($message, array

    $context = array()); public function alert($message, array $context = array()); public function critical($message, array $context = array()); public function error($message, array $context = array()); public function warning($message, array $context = array()); public function notice($message, array $context = array()); public function info($message, array $context = array()); public function debug($message, array $context = array()); public function log($level, $message, array $context = array()); }
  2. namespace Psr\Hug; /** * Defines a huggable object. * *

    A huggable object expresses mutual affection with another huggable object. */ 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. All objects MUST * implement a mechanism to prevent an infinite loop of hugging. * * @param Huggable $h * The object that is hugging this object. */ public function hug(Huggable $h); }
  3. namespace Psr\Hug; /** * Defines a huggable object. * *

    A huggable object expresses mutual affection with another huggable object. */ interface GroupHuggable extends Huggable { /** * Hugs a series of huggable objects. * * When called, this object MUST invoke the hug() method of every object * provided. The order of the collection is not significant, and this object * MAY hug each of the objects in any order provided that all are hugged. * * @param $huggables * An array or iterator of objects implementing the Huggable interface. */ public function groupHug($huggables); }