[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
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; 13 14 /** 15 * Reference represents a service reference. 16 * 17 * @author Fabien Potencier <fabien@symfony.com> 18 */ 19 class Reference 20 { 21 private $id; 22 private $invalidBehavior; 23 private $strict; 24 25 /** 26 * @param string $id The service identifier 27 * @param int $invalidBehavior The behavior when the service does not exist 28 * @param bool $strict Sets how this reference is validated 29 * 30 * @see Container 31 */ 32 public function __construct($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $strict = true) 33 { 34 $this->id = strtolower($id); 35 $this->invalidBehavior = $invalidBehavior; 36 $this->strict = $strict; 37 } 38 39 /** 40 * @return string The service identifier 41 */ 42 public function __toString() 43 { 44 return (string) $this->id; 45 } 46 47 /** 48 * Returns the behavior to be used when the service does not exist. 49 * 50 * @return int 51 */ 52 public function getInvalidBehavior() 53 { 54 return $this->invalidBehavior; 55 } 56 57 /** 58 * Returns true when this Reference is strict. 59 * 60 * @return bool 61 */ 62 public function isStrict() 63 { 64 return $this->strict; 65 } 66 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |