[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ -> Alias.php (source)

   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  class Alias
  15  {
  16      private $id;
  17      private $public;
  18  
  19      /**
  20       * @param string $id     Alias identifier
  21       * @param bool   $public If this alias is public
  22       */
  23      public function __construct($id, $public = true)
  24      {
  25          $this->id = strtolower($id);
  26          $this->public = $public;
  27      }
  28  
  29      /**
  30       * Checks if this DI Alias should be public or not.
  31       *
  32       * @return bool
  33       */
  34      public function isPublic()
  35      {
  36          return $this->public;
  37      }
  38  
  39      /**
  40       * Sets if this Alias is public.
  41       *
  42       * @param bool $boolean If this Alias should be public
  43       */
  44      public function setPublic($boolean)
  45      {
  46          $this->public = (bool) $boolean;
  47      }
  48  
  49      /**
  50       * Returns the Id of this alias.
  51       *
  52       * @return string The alias id
  53       */
  54      public function __toString()
  55      {
  56          return $this->id;
  57      }
  58  }


Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1