P %BUBCBTF P P P P P 03. P P P P $BDIF P P P P P 7JFXIFMQFST P P P P P 'PSNWBMJEBUJPO P P P P P -PHHJOH P P P P P $43'QSPUFDUJPO P P P P P 5FTUTVQQPSU P P P P P %FCVH6* P P P P *:3rd party
$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()); } ྫ 143-PHHFS*OUFSGBDF
an object so that the object can retrieve its own dependencies. This means the container is used as a Service Locator which is a pattern that is generally discouraged.
$object->setLogger($container->get('logger')); return $object; }); class Foo { public function setLogger(LoggerInterface $logger) public function bar() } ੜ ༻ ˞͜ΕઃఆϑΝΠϧͳͷͰػೳ࣮Ͱ͋Γ·ͤΜ