You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class MyAwesomeClass {
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
}
$awesomeInstance = new MyAwesomeClass();
$awesomeInstance->setLogger(new class implements LoggerInterface {
public function log($message)
{
file_put_contents('log.txt', $message);
}
});