@param string $name

@throws EnvironmentException

@return bool
192056
public function exists(string $name): bool
    {
        $this->autoload();

        return \array_key_exists($name, $this->env);
    }
1138597
protected function getEnvName($name)
    {
        if (is_array($name)) {
            return array_map(array($this, __METHOD__), $name);
        } else {
            $prefix = $this->envVariablePrefix;
            if (!empty($prefix)) {
                $prefix .= '_';
            }

            return strtoupper($prefix . $name);
        }
    }
524737
public static function get(string $name, $default = null)
    {
        $value = getenv($name);

        if ($value === false) {
            return static::value($default);
        }

        switch (strtolower($value)) {
            case 'true':
            case '(true)':
                return true;

            case 'false':
            case '(false)':
                return false;

            case 'null':
            case '(null)':
                return null;
        }

        return static::sanitise($value);
    }
1226528
public function has($name)
    {
        if (! isset($this->instances[$name])) {
            return isset($this->registry[$name]);
        }

        return true;
    }
751829
public static function delete(String $name = NULL) : Bool
    {
        $name  = self::$settings['name']  ?? $name;
        $input = self::$settings['input'] ?? false;

        self::$settings = [];

        switch( $input )
        {
            case 'post'    : unset($_POST[$name]);    break;
            case 'get'     : unset($_GET[$name]);     break;
            case 'env'     : unset($_ENV[$name]);     break;
            case 'server'  : unset($_SERVER[$name]);  break;
            case 'request' : unset($_REQUEST[$name]); break;
        }

        return true;
    }
721335
public static function has(string $name)
    {
        $names = Imi::parseDotRule($name);
        if (isset($names[0]))
        {
            $first = array_shift($names);
            if(isset(static::$configs[$first]))
            {
                return null !== static::$configs[$first]->get($names, null);
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }
1274701
public function hasConstant($name) {
        $hasConstant = false;
        if(array_key_exists($name, $this->getConstants())) {
            $hasConstant = true;
        }

        return $hasConstant;
    }
732848
public function exists($name)
    {
        $loader = $this->environment->getLoader();

        try {
            $loader->getSource((string) $name);
        } catch (\Twig_Error_Loader $e) {
            return false;
        }

        return true;
    }
614609
public function hasMethod($name) {
		try {
			$method = new ReflectionMethod($this, $name);
			if (!$method->isPublic() || substr($name, 0, 1) === '_') {
				return false;
			}
			if ($method->getDeclaringClass()->name === 'Shell') {
				return false;
			}
			$installerCommands = $this->ConfigInstaller->getListInstallerCommands(false);
			$defaultCommands = ['main' => null];
			$commands = $installerCommands + $defaultCommands;
			if (!array_key_exists($name, $commands)) {
				return false;
			}

			return true;
		} catch (ReflectionException $e) {
			return false;
		}

		return true;
	}
22965
public function hasExtension($name)
    {
        return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]);
    }
244291
public function has(string $name): bool
    {
        return isset($this->stack[$this->normalizeName($name)]);
    }
675587
public function hasField($name)
    {
        $result = false;
        foreach ($this->fields as $key => $fields) {
            if (isset($fields[$name])) {
                $result = true;
                break;
            }
        }
        return $result;
    }
558497
public function exists($name)
    {
        if ($name instanceof Template) {
            return true;
        }

        $loader = $this->environment->getLoader();

        if ($loader instanceof ExistsLoaderInterface || method_exists($loader, 'exists')) {
            return $loader->exists((string) $name);
        }

        try {
            // cast possible TemplateReferenceInterface to string because the
            // EngineInterface supports them but LoaderInterface does not
            $loader->getSourceContext((string) $name)->getCode();
        } catch (LoaderError $e) {
            return false;
        }

        return true;
    }
794605
public function has($name)
    {
        /** @var Setting $setting */
        $setting = $this->repo->findOneBy(['name.name' => $name]);

        if ($setting) {
            return true;
        }

        return false;
    }
372490
public function getEnvironment($name)
    {
        if (isset($this->environments[$name])) {
            return $this->environments[$name];
        }

        // check the environment exists
        if (!$this->getConfig()->hasEnvironment($name)) {
            throw new \InvalidArgumentException(sprintf(
                'The environment "%s" does not exist',
                $name
            ));
        }

        // create an environment instance and cache it
        $envOptions = $this->getConfig()->getEnvironment($name);
        $envOptions['version_order'] = $this->getConfig()->getVersionOrder();

        $environment = new Environment($name, $envOptions);
        $this->environments[$name] = $environment;
        $environment->setCommand($this->getCommand());

        return $environment;
    }
744697
public static function is($environment = null)
    {
        $current = Configure::read('Environment.name');

        if (! $environment) {
            return $current;
        }

        return $current === $environment;
    }
1165679
public function setup($environment = null, $default = 'development')
    {
        if (Configure::read('Environment.setup')) {
            return false;
        }

        $current = $this->currentEnvironment($environment, $default);

        if (!isset($this->environments[$current])) {
            throw new Exception(sprintf('Environment %s does not exist.', $current));
        }

        $config = array_merge(
            $this->environments[$current]['config'],
            ['Environment.name' => $current]
        );
        foreach ($config as $param => $value) {
            Configure::write($param, $value);
        }

        if (is_callable($this->environments[$current]['callable'])) {
            $this->environments[$current]['callable']();
        }

        Configure::write('Environment.setup', true);

        return true;
    }