File "EntryReference.php"
Full path: /home/capoeirajd/www/wp-content/plugins/wp-migrate-db/vendor/php-di/php-di/src/DI/Definition/EntryReference.php
File
size: 889 B (889 B bytes)
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
namespace DeliciousBrains\WPMDB\Container\DI\Definition;
use DeliciousBrains\WPMDB\Container\DI\Definition\Helper\DefinitionHelper;
/**
* Represents a reference to a container entry.
*
* TODO should EntryReference and AliasDefinition be merged into a ReferenceDefinition?
*
* @author Matthieu Napoli <matthieu@mnapoli.fr>
*/
class EntryReference implements DefinitionHelper
{
/**
* Entry name.
* @var string
*/
private $name;
/**
* @param string $entryName Entry name
*/
public function __construct($entryName)
{
$this->name = $entryName;
}
/**
* @return string Entry name
*/
public function getName()
{
return $this->name;
}
/**
* {@inheritdoc}
*/
public function getDefinition($entryName)
{
return new AliasDefinition($entryName, $this->name);
}
}