This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DependencyInjection/Variable.php

50 lines
822 B
PHP
Raw Normal View History

2011-01-05 11:13:27 +00:00
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2011-01-05 11:13:27 +00:00
namespace Symfony\Component\DependencyInjection;
2011-01-17 22:28:59 +00:00
/**
* Represents a variable.
*
* $var = new Variable('a');
*
* will be dumped as
*
* $a
*
* by the PHP dumper.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
2011-01-05 11:13:27 +00:00
class Variable
{
private $name;
2011-01-05 11:13:27 +00:00
2011-02-13 18:06:41 +00:00
/**
* Constructor
*
2011-04-15 20:12:02 +01:00
* @param string $name
2011-02-13 18:06:41 +00:00
*/
2011-01-05 11:13:27 +00:00
public function __construct($name)
{
$this->name = $name;
}
2011-02-13 18:06:41 +00:00
/**
* Converts the object to a string
*
* @return string
*/
2011-01-05 11:13:27 +00:00
public function __toString()
{
return $this->name;
}
}