@param string $name
@param bool   $force
@param bool   $noprune

@return mixed 200

@throws Exception
511045
public function remove(string $name, bool $force = false, bool $noprune = false)
    {
        $data = [
            'force' => $force,
            'noprune' => $noprune,
        ];

        $url = self::$base_url.'/'.$name.'?'.http_build_query($data);

        return self::$curl->delete($url);
    }
748559
protected function get($name)
    {
        if ($this->modified === null) {
            $this->load();
        }

        if (false === array_key_exists($name, $this->properties)) {
            throw new Exception('Unknown property "' . $name . '"');
        }

        return $this->resolve($this->properties[$name], $name);
    }
199059
public function action($name)
    {
        $command = '\\App\\Consoles\\'.ucfirst($name).'ConsoleCommand';
        $command = class_exists($command) ? $command : '\\Micro\\Cli\\Consoles\\'.ucfirst($name).'ConsoleCommand';

        if (!class_exists($command)) {
            throw new Exception('Command `'.$name.'` not found');
        }

        /** @var ConsoleCommand $command */
        $command = new $command();
        $command->execute();

        $response = (new ResponseInjector)->build();
        $response = $response->withHeader('status', (string)(int)$command->result);

        $stream = $response->getBody();
        $stream->write($command->message);

        return $response->withBody($stream);
    }
1042066
public function clientGetByName($name)
  {
    foreach($this->clientList() as $client)
    {
      if($client["client_nickname"] == $name) return $client;
    }

    throw new Exception("invalid clientID", 0x200);
  }
461986
protected function getGetParamNonEmptyOrException ($name, $customExceptionMsg=null)
    {
        $value = $this->getGetParamOrException($name);

        if (empty($value)) {
            $eMsg = ($customExceptionMsg ? $customExceptionMsg : "URL GET parameter is empty: $name");
            throw new Exception($eMsg);
        }

        return $value;
    }
955890
public function getByName($name, $throwException = true)
    {
        foreach ($this as $element) {

            if (!$element instanceof Element\NamedElement) {
                throw new Exception\CollectionException();
            }

            if ($element->getName() === $name) {
                return $element;
            }
        }

        if ($throwException) {
            throw new Exception\NotFoundException();
        }

        return null;
    }
13686
public function GetElement($name)
    {
        $element = $this->Elements()->GetElement($name);
        if (!$element)
        {
            throw new \Exception(Trans('Core.Form.Error.ElementNotFound.Name_{0}', $name));
        }
        return $element;
    }
241544
public function getField($name, $throw = false)
    {
        $name = $this->convertToPrimaryKeyName($name);
        if (false === self::getMeta()->hasField($name)) {
            if ($throw) {
                throw new Exception('Unknown field');
            }

            return;
        }

        $field = self::getMeta()->getField($name);
        $field->setModel($this);

        return $field;
    }
473539
protected function createComponent($name)
    {
        $result = null;

        $config = $this->getComponentConfig($name);

        if ($config !== null && isset($config['class'])) {
            $result = new $config['class'];
            if (!($result instanceof \pwf\basic\interfaces\Component)) {
                throw new \Exception('Component must implement \'Component\' interface',
                500);
            }
            $result->loadConfiguration($config);
        }

        return $result;
    }
881598
protected function iget ($name)
	{
		
		// If the attribute doesn't exists
		
		if (!$this->attributeExists ($name))
		{
			throw new Exception (get_called_class () . '->' . $name . ' attribute does not exist!');
		}
		
		// If no attribute value is set
		
		if (!$this->attributeHasValue ($name))
		{
			
			// If there is a default set to value
			
			if (array_key_exists ('default', static::$attributes[$name]))
			{
				$this->iset ($name, static::$attributes[$name]['default'], FALSE);
			}
			
			// Else there is no value and no default
			
			else
			{
				throw new Exception (get_called_class () . '->' . $name . ' attribute isn\'t set and has no default value!');
			}
			
		}
		
		// Return value
		
		return $this->attributeValues[$name];
			
	}
1294450
public function set_lockfile($name=null) {
		
		if(!is_null($name) && $this->lockFile === $name && $this->is_lockfile_present()) {
			//do nothing.
		}
		else {
			if($this->is_lockfile_present()) {
				throw new exception(__METHOD__ .": cannot change lockfile name (to '". $name ."') when file exists (". $this->lockFile .")");
			}
			elseif(is_null($name)) {
				$name = self::defaultLockfile;
			}

			$this->lockFile = $name;
			try {
				if(!strpos($name, '\\') && !strpos($name, '/')) { //preg_match('/\//', $name) && !preg_match('/\\/', $name)) {
					$this->get_rwdir();
					$this->lockFile = $name;
				}
				else {
					throw new exception(__METHOD__ .": name (". $name .") has invalid characters");
				}
			}
			catch(exception $e) {
				throw new exception(__METHOD__ .": error while setting lockfile::: ". $e->getMessage());
			}
		}
		
		return($this->lockFile);
	}
849658
public function make($name, array $params = array(), $force = false)
    {
        if (isset($this->_ioc[$name])) {

            // If a singleton instance exists, return it
            if ($this->_ioc[$name]['instance'] && !$force)
                return $this->_ioc[$name]['instance'];

            // Include an instance of this object as the final argument
            $params[] = $this;

            // Call the stored container
            $result = call_user_func_array($this->_ioc[$name]['closure'], $params);

            // If this is supposed to be a singleton, store it
            if ($this->_ioc[$name]['singleton'])
                $this->_ioc[$name]['instance'] = $result;

            return $result;
        }

        return null;
    }
658553
public function create(string $name, array $params = array())
    {
        if (empty($name)) {
            throw new FactoryException ('create() requires a non-empty form name as first argument');
        }

        $className = $this->getFactoryNamespace() . '\\' . $name . $this->getFactoryPostfix();

        if (!class_exists($className)) {
            throw new FactoryException ('Form class "' . $className . '" does not exist');
        }

        $result = $this->createFormInstance($className, $params);

        return $result;
    }
839581
public function remove(string $name, bool $force = false)
    {
        return $this->curl->delete($this->base_url.'/'.$name.'?'.http_build_query([
                    'force' => $force,
                ]
            )
        );
    }
365644
public function set($name, $instance)
    {
        $this->checkLockAndValidateName($name);

        $has = $this->has($name);

        if ($has && !$this->allowOverride) {
            throw new Exception\NotAllowedException();
        }

        if ($has) {
            $this->remove($name);
        }

        $normalized = $this->normalizeName($name);
        $this->names[$normalized] = $name;
        $this->instances[$name] = $instance;

        return $this;
    }
594751
public function callStatic($name, array $arguments) {
		if(isset($this->statics[$name]))
			return call_user_func_array($this->statics[$name], $arguments);
		else {
			foreach($this->staticsCatchAll as $behavior) {
				$processed = false;
				$res = call_user_func_array([$behavior, 'staticCatchAll'], [$name, $arguments, &$processed]);
				if($processed)
					return $res;
			}

			if(method_exists($this, $name))
				return call_user_func_array([$this, $name], $arguments);

			throw new \Exception('Static method '.$name.' does not exist for entity '.$this->entityClass);
		}
	}
628224
private function _controllerFor($name)
	{
		if(isset($this->_controllers[$name]) && is_string($this->_controllers[$name]))
		{
			return $this->_controllerFor($this->_controllers[$name]);
		}
		else if(isset($this->_controllers[$name]) && is_object($this->_controllers[$name]))
		{
			return $this->_controllers[$name];
		}
		else if(isset($this->_controllerFactory))
		{
			return $this->_controllerFactory->resolve($name);
		}
		else
		{
			throw new Exception("No controller found for $name");
		}
	}