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/ParameterBag/ParameterBagInterface.php

70 lines
1.6 KiB
PHP
Raw Normal View History

2010-06-27 17:28:29 +01:00
<?php
/*
* This file is part of the Symfony package.
2010-06-27 17:28:29 +01:00
*
* (c) Fabien Potencier <fabien@symfony.com>
2010-06-27 17:28:29 +01:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
2010-06-27 17:28:29 +01:00
*/
namespace Symfony\Component\DependencyInjection\ParameterBag;
use Symfony\Component\DependencyInjection\Exception\NonExistentParameterException;
2010-06-27 17:28:29 +01:00
/**
* ParameterBagInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
2010-06-27 17:28:29 +01:00
*/
interface ParameterBagInterface
{
/**
* Clears all parameters.
*/
function clear();
2010-06-27 17:28:29 +01:00
/**
* Adds parameters to the service container parameters.
*
* @param array $parameters An array of parameters
*/
function add(array $parameters);
2010-06-27 17:28:29 +01:00
/**
* Gets the service container parameters.
*
* @return array An array of parameters
*/
function all();
2010-06-27 17:28:29 +01:00
/**
* Gets a service container parameter.
*
* @param string $name The parameter name
*
* @return mixed The parameter value
*
* @throws NonExistentParameterException if the parameter is not defined
2010-06-27 17:28:29 +01:00
*/
function get($name);
2010-06-27 17:28:29 +01:00
/**
* Sets a service container parameter.
*
2011-04-23 16:05:44 +01:00
* @param string $name The parameter name
* @param mixed $value The parameter value
2010-06-27 17:28:29 +01:00
*/
function set($name, $value);
2010-06-27 17:28:29 +01:00
/**
* Returns true if a parameter name is defined.
*
* @param string $name The parameter name
*
* @return Boolean true if the parameter name is defined, false otherwise
*/
function has($name);
2010-06-27 17:28:29 +01:00
}