@param string $name

@throws UndefinedEnvironmentException
481520
public function set($name)
    {
        if (!array_key_exists($name, $this->environments)) {
            throw new UndefinedEnvironmentException($name);
        }

        $this->current = $name;
        $this->environments[$name]->run();
    }
1361850
protected function createRoutes(string $name): void
    {
        $apiFile = base_path($this->moduleName().'/'.$name.'/Routes/api.php');
        if (! $this->files->exists($apiFile)) {
            $this->files->put($apiFile, $this->files->get(__DIR__.'/stubs/routes/api.stub'));
        }

        $webFile = base_path($this->moduleName().'/'.$name.'/Routes/web.php');
        if (! $this->files->exists($webFile)) {
            $this->files->put($webFile, $this->files->get(__DIR__.'/stubs/routes/web.stub'));
        }
    }
1210831
protected function setTagItem(string $name): void
    {
        if (!empty($this->tag)) {
            foreach ($this->tag as $tag) {
                $tagName = $this->getTagKey($tag);
                if ($this->handler->has($tagName)) {
                    $this->handler->append($tagName, ',' . $name);
                } else {
                    $this->handler->set($tagName, $name);
                }
            }

            $this->tag = null;
        }
    }
1305427
public function createEnvironment($name)
    {
        if (false == $this->vagrentExists($name)) {
            $msg = self::VAGRANT_FILE_NAME." not found in {$name}, skipping";
            $this->printLn($msg, 'error');
            return;
        }
        $environments       = $this->getEnvironments();
        $changed            = false;
        if (false == $this->environmentExists($name)) {
            $environments[] = $name;
            $changed        = true;
            $this->printLn("Environment {$name} created");
        }
        if (true == $changed) {
            $this->setEnvironments($environments);
            $environments   = array_reverse($environments);
            $this->setEnvironments($environments);
        } else {
            $message = "Environment {$name} already exists, skipping";
            $this->printLn($message, 'notice', false);
        }
        return $this;
    }
711926
public function load($name)
    {
        if (null === ($path = $this->path($name)))
            return;
        if ($this->fileExists && (!file_exists($path))) {
            return;
        }
        include_once $path;
    }
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;
    }
151435
protected function createConfigFile(string $name): void
    {
        $file = base_path($this->moduleName().'/'.$name.'/Config/config.php');
        if (! $this->files->exists($file)) {
            $this->files->put($file, $this->files->get(__DIR__.'/stubs/config.stub'));
        }
    }
1033721
private function insertContextInAllowedExtensions($name)
    {
        if (!array_key_exists($name, $this->contexts)) {
            throw new \Exception('The context '.$name.' is not defined.');
        }

        $this->allowedExtensions = array_merge($this->contexts[$name], $this->allowedExtensions);
    }
142650
public static function setEnvironmentVariable($name, $value = null)
        {
            list($name, $value) = static::normaliseEnvironmentVariable($name, $value);

            // Don't overwrite existing environment variables if we're immutable
            // Ruby's dotenv does this with `ENV[key] ||= value`.
            if (true === static::$immutable && false === is_null(static::findEnvironmentVariable($name))) {
                return;
            }

            putenv("$name=$value");

            $_ENV[$name] = $value;
            $_SERVER[$name] = $value;
        }
629777
public function setName(string $name) : void
    {
        if (empty($name)) {
            throw new InvalidArgumentException('Empty field name is not allowed');
        }

        $this->_name = $name;
    }
850796
public function setName($name)
    {
        $this->name = $name;
        if ($this->node) {
            $this->node->name = $name;
        }
    }
1083423
protected function resolveUnknown(/*# string */ $name)
    {
        // warn if reference unknown
        $this->throwError(
            Message::get(Message::CONFIG_REFERENCE_UNKNOWN, $name),
            Message::CONFIG_REFERENCE_UNKNOWN
        );

        return null;
    }
1282737
public function execUp(string $name): void{
        DB::connection('default')->table('migrations')->insert(['name' => $name]);
        $this->up();
    }
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;
	}
307042
private function bakeTable(string $name) : void
    {
        $this->pathFragment = 'Model/Table/';

        $this->bake($name, 'Model/table', ['name' => $name, 'table' => Inflector::underscore($name)], 'Table');
    }
985418
public function removeEnvironment($name)
    {
        $removed = false;
        $environments = $this->getEnvironments();
        if (true == in_array($name, $environments)) {
            if (($key = array_search($name, $environments)) !== false) {
                $this->printLn("Removing environment {$name}");
                unset($environments[$key]);
                $removed = true;
            }
        }
        if (false == $removed) {
            $this->printLn("environment {$name} not found or removed");
        }
        $this->setEnvironments($environments);
        return $this;
    }
1003167
public function setVariable(string $name, $value = null): void
    {
        [$name, $value] = $this->normaliseVariable($name, $value);

        $this->attributes[$name] = $value;

        if (!$this->setter || ($this->immutable && !is_null($this->getVariable($name)))) {
            return;
        }

        putenv("{$name}={$value}");
        $_ENV[$name] = $value;
        $_SERVER[$name] = $value;
    }