コード例 #1
0
ファイル: Writer.php プロジェクト: yashb/generator
 /**
  * Fires a log event.
  *
  * @param  string  $level
  * @param  array   $parameters
  * @return void
  */
 protected function fireLogEvent($level, $message, array $context = array())
 {
     // If the event dispatcher is set, we will pass along the parameters to the
     // log listeners. These are useful for building profilers or other tools
     // that aggregate all of the log messages for a given "request" cycle.
     if (isset($this->dispatcher)) {
         $this->dispatcher->fire('illuminate.log', compact('level', 'message', 'context'));
     }
 }
コード例 #2
0
ファイル: Extension.php プロジェクト: sohailaammarocs/lfc
 /**
  * Fires an event for the extension.
  *
  * @param  string  $name
  * @return mixed
  */
 protected function fireEvent($name)
 {
     if (!isset(static::$dispatcher)) {
         return;
     }
     return static::$dispatcher->fire("extension.{$name}", array($this));
 }