@param string $name

@throws DomainException
328271
public function deleteEnvironmentConfiguration(string $name)
    {
        if (array_key_exists($name, $this->environmentConfigurations)) {
            unset($this->environmentConfigurations[$name]);
        } else {
            throw new DomainException('There is no environment configuration with name' . $name);
        }
    }
919721
final public static function fromName(string $name): Enum
    {
        $constName = sprintf('%s::%s', static::class, $name);

        if (!defined($constName)) {
            $message = sprintf('%s is not a member constant of enum %s', $name, static::class);
            throw new DomainException($message);
        }

        return new static(constant($constName));
    }
1276235
public function output(string $name): void
	{
		$parent = $this->close();

		$output = current($this->blocks[$name]);

		unset($this->blocks[$name]);

		if(!empty($parent))
		{
			$output = str_replace('__PARENT__', $parent, $output);
		}

		echo $output;
	}
507512
public function referenceBegin($name): void
    {
        $this->client->sendBuffer .= $this->client->preparedToSendBuffer;
        $this->client->preparedToSendBuffer = null;
        $signature = sprintf('<H p="1" v="%s">', $name);
        $this->write($signature);
        $signature[6] = '2';
        $this->client->currentArgumentsFormat = $signature;
    }
933990
public function setTokenName(string $name)
    {
        if (empty($name)) {
            Throw new TokenException('Empty token name is not allowed.');
        }

        $this->name = $name;
    }
842208
public static function has($name) {
		if(empty($name)) {
			throw new InvalidArgumentException('Domain name can not be empty!');
		}
		if(!\App::$domain->has($name)) {
			return false;
		}
		$domain = \App::$domain->get($name);
		if(!$domain instanceof Domain) {
			return false;
		}
		return true;
	}
374303
public function getHelper($name)
    {
        if (empty($this->helpers[$name])) {
            $class = $this->findHelper($name);

            if ($class === false) {
                throw new \DomainException(sprintf('Helper: %s not found.', $name));
            }

            $this->helpers[$name] = new $class($this);
        }

        return $this->helpers[$name];
    }
373285
private function getPlan(string $name): Plan
    {
        if (empty($this->plans[$name])) {
            throw new Exception\DomainException(
                sprintf(
                    'Invalid plan "%s" specified.',
                    $name
                )
            );
        }

        return new Plan($name, $this->plans[$name], $this->stepInterface);
    }
181781
public function setName($name)
    {
        $this->name = $name;

        if ($this->id === null) {
            $this->id = $name;
        }
    }
309427
private function removeConfig($name)
    {
        try {
            $this->configFactory->getEditable($name)->delete();
        } catch (\Exception $e) {
            throw new RuntimeException($e->getMessage());
        }
    }
378293
public function remove($name)
    {
        try {
            $this->fs->remove($this->rootPath . DIRECTORY_SEPARATOR . 'www' . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . $name);
        } catch (IOException $e) {
            throw new RuntimeException(
                sprintf('Unable to remove assets for plugin %s', $name), $e->getCode(), $e
            );
        }
    }
1024930
public function removeNamedRoute(string $name)
    {
        $route = $this->getNamedRoute($name);
        // no exception, route exists, now remove by id
        unset($this->routes[$route->getIdentifier()]);
    }
854210
public function setDomain(Domain $domain)
    {
        $this->domain = $domain;
        $this->domainId = $domain->getDomainId();
    }
178283
public function setName(string $name): void
	{
		if ($name === '') {
			throw new InvalidArgumentException;
		}
		if (Strings::match($name, '/[^A-Za-z0-9_]/')) {
			throw new InvalidArgumentException('Name contains invalid characters');
		}

		/* @var $repository AclRolesRepository */
		$repository = $this->getRepository();
		$role = $repository->getByName($name);
		if ($role !== null && $role !== $this) {
			throw new UniqueConstraintViolationException("Role '$name' exists");
		}
		$this->name = $name;
	}
947967
public function resolve($name)
    {
    	if (preg_match('#\.\.[\\\/]#', $name)) {
            throw new Exception\DomainException(
                'Requested asset may not include parent directory traversal ("../", "..\\" notation)'
            );
        }
        
    	// Check if we have paths
        if (!count($this->paths)) {
            //$this->lastLookupFailure = static::FAILURE_NO_PATHS;
            return null;
        }
        
        // TODO: Check cache!!!
        
        $files = array();
        foreach ($this->paths as $path) {
            $file = new SplFileInfo($path . $name);
            if ($file->isReadable()) {
                // Found! Return it.
                if (($filePath = $file->getRealPath()) === false && substr($path, 0, 7) === 'phar://') {
                    // Do not try to expand phar paths (realpath + phars == fail)
                    $filePath = $path . $name;
                    if (!file_exists($filePath)) {
                        break;
                    }
                }
                
                $files[] = $filePath;
            }
        }

        $count = count($files);
        if ($count > 1) {
        	$canAppend = $this->canAppend($name);
        	if ($canAppend) {
        		$content = '';
        		foreach ($files as $file) {
        			$fileContent = file_get_contents($file);
        			if ($fileContents) {
        				$content .= $fileContent;
        			}
        		}
        		return $content;
        	} else {
        		// TODO: Create an exception
        		throw new \Exception("Too many assets found.");
        	}
        } elseif($count === 1) {
        	$content = file_get_contents($files[0]);
        	if ($content) {
        		return $content;
        	}
        }
        
        return null;
    }
69309
private function checkName($name)
    {
        if ( ! is_string($name)) {
            throw new Exceptions\InvalidTypeException(
                'The name value must be a string, ' . gettype($name) . ' given'
            );
        }

        if ( ! isset($this->callbacks[$name])) {
            throw new Exceptions\InvalidCallbackNameException(
                "The callback name not found [{$name}]"
            );
        }
    }
1187534
public function setName(string $name = '') : void
    {
        if (empty($name)) {
            throw new RuntimeException('Panel name not found therefore the object cannot be created');
        }
        $this->name = $name;
    }