comparison vendor/symfony/dependency-injection/Compiler/LoggingFormatter.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 1fec387a4317
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\DependencyInjection\Compiler;
13
14 /**
15 * Used to format logging messages during the compilation.
16 *
17 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
18 */
19 class LoggingFormatter
20 {
21 public function formatRemoveService(CompilerPassInterface $pass, $id, $reason)
22 {
23 return $this->format($pass, sprintf('Removed service "%s"; reason: %s.', $id, $reason));
24 }
25
26 public function formatInlineService(CompilerPassInterface $pass, $id, $target)
27 {
28 return $this->format($pass, sprintf('Inlined service "%s" to "%s".', $id, $target));
29 }
30
31 public function formatUpdateReference(CompilerPassInterface $pass, $serviceId, $oldDestId, $newDestId)
32 {
33 return $this->format($pass, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $serviceId, $oldDestId, $newDestId));
34 }
35
36 public function formatResolveInheritance(CompilerPassInterface $pass, $childId, $parentId)
37 {
38 return $this->format($pass, sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId));
39 }
40
41 public function format(CompilerPassInterface $pass, $message)
42 {
43 return sprintf('%s: %s', get_class($pass), $message);
44 }
45 }