You are here

class Alias in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Alias.php \Symfony\Component\DependencyInjection\Alias

Hierarchy

  • class \Symfony\Component\DependencyInjection\Alias

Expanded class hierarchy of Alias

14 files declare their use of Alias
AutoAliasServicePass.php in vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php
BackendCompilerPass.php in core/lib/Drupal/Core/DependencyInjection/Compiler/BackendCompilerPass.php
Contains \Drupal\Core\DependencyInjection\Compiler\BackendCompilerPass.
BackendCompilerPassTest.php in core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php
Contains \Drupal\Tests\Core\DependencyInjection\Compiler\BackendCompilerPassTest.
ContainerBuilderTest.php in vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php
DecoratorServicePass.php in vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php

... See full list

3 string references to 'Alias'
DataFieldRow::buildOptionsForm in core/modules/rest/src/Plugin/views/row/DataFieldRow.php
Provide a form for setting options.
InflectorTest::dataSampleWords in vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php
Singular & Plural test data. Returns an array of sample words.
PathController::adminOverview in core/modules/path/src/Controller/PathController.php
Displays the path administration overview page.

File

vendor/symfony/dependency-injection/Alias.php, line 14

Namespace

Symfony\Component\DependencyInjection
View source
class Alias {
  private $id;
  private $public;

  /**
   * Constructor.
   *
   * @param string $id     Alias identifier
   * @param bool   $public If this alias is public
   */
  public function __construct($id, $public = true) {
    $this->id = strtolower($id);
    $this->public = $public;
  }

  /**
   * Checks if this DI Alias should be public or not.
   *
   * @return bool
   */
  public function isPublic() {
    return $this->public;
  }

  /**
   * Sets if this Alias is public.
   *
   * @param bool $boolean If this Alias should be public
   */
  public function setPublic($boolean) {
    $this->public = (bool) $boolean;
  }

  /**
   * Returns the Id of this alias.
   *
   * @return string The alias id
   */
  public function __toString() {
    return $this->id;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Alias::$id private property
Alias::$public private property
Alias::isPublic public function Checks if this DI Alias should be public or not.
Alias::setPublic public function Sets if this Alias is public.
Alias::__construct public function Constructor.
Alias::__toString public function Returns the Id of this alias.