You are here

public function ProxyGenerator::setPlaceholder in Plug 7

Sets a placeholder to be replaced in the template.

Parameters

string $name:

string|callable $placeholder:

Throws

InvalidArgumentException

File

lib/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php, line 234

Class

ProxyGenerator
This factory is used to generate proxy classes. It builds proxies from given parameters, a template and class metadata.

Namespace

Doctrine\Common\Proxy

Code

public function setPlaceholder($name, $placeholder) {
  if (!is_string($placeholder) && !is_callable($placeholder)) {
    throw InvalidArgumentException::invalidPlaceholder($name);
  }
  $this->placeholders[$name] = $placeholder;
}