public function bind($name, $value, array $args = array())
{
try {
// strip off the schema
$key = $this->stripSchema($name);
// bind the value, if possible
if ($this->hasAttribute($key) === false) {
$this->setAttribute($key, array($value, $args));
return;
}
// throw an exeception if the name has already been bound
throw new \Exception(sprintf('A value with name %s has already been bound to naming directory %s', $name, $this->getIdentifier()));
} catch (\Exception $e) {
throw new NamingException(sprintf('Cant\'t bind %s to naming directory %s', $name, $this->getIdentifier()), null, $e);
}
}