Initialize the object with parameters.

@param array $parameters

@return $this
@throws \UniApi\Common\Exception\RuntimeException
181775
public function initialize(array $parameters = [])
        {
            if (null !== $this->response) {
                throw new RuntimeException('Request cannot be modified after it has been sent!');
            }

            $this->helper->initialize($this, $parameters);

            return $this;
        }
168974
private function setParameters($parameters)
    {
        $this->domain = $this->validateConfiguration($parameters['domain']);
        $this->endpoint = $this->validateConfiguration($parameters['endpoint']);
        $this->access_token = $this->validateConfiguration($parameters['token']);
    }
277980
private function prepareContext($parameters)
    {
        $new = array();
        foreach ($parameters as $name => $value) {
            if (is_array($value)) {
                $subNew = array();
                foreach ($value as $index => $subValue) {
                    $subNew[] = sprintf(
                        '<comment>%s</comment>: <comment>%s</comment>',
                        $index,
                        var_export($subValue, true)
                    );
                }
                $new[$name] = sprintf('[%s]', implode(', ', $subNew));

                continue;
            }
            if (!is_object($value) || method_exists($value, '__toString')) {
                $new[$name] = sprintf('<comment>%s</comment>', $value);

                continue;
            }

            $new[$name] = $value;
        }

        return $new;
    }
250669
public function create(array $parameters)
    {
        $supported = $this->isSupported('create');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/new', $parameters, 'POST') : $supported;
    }
1019040
public function setParametersAttribute($parameters)
    {
        if (is_array($parameters)) {
            $this->attributes['parameters'] = json_encode($parameters);
        } else {
            $this->attributes['parameters'] = $parameters;
        }
    }
124027
public static function resolve(array $parameters, $context = null)
    {
        $params = [];
        foreach ($parameters as $key => $value) {
            if ($value instanceof Reference) {
                $val = $value->getValue();
                if (isset($context[$val])) {
                    $params[$key] = $context[$val];
                } else {
                    throw new RuntimeException('Reference invalid context key "' . $val . '"');
                }
            } else {
                $params[$key] = $value;
            }
        }

        return $params;
    }
57495
public function setParameters(array $params)
    {
        foreach ($params as $name => $value) {
            $this->getParameterContainer()->add($name, $value);
        }
        return $this;
    }
208105
public function run(array $parameters)
    {
        $process = new Process(array_merge(['bin/console'], $parameters));
        $process->setTimeout(null);
        $process->setWorkingDirectory($this->kernel->getProjectDir());

        $exitCode = $process->run();

        if ($exitCode) {
            $error = $process->getErrorOutput();
            $this->logger->error($error);
        }
    }
750980
public function create(array $parameters = [])
    {
        if (isset($parameters['cache']) && $parameters['cache'] instanceof Cache) {
            $cache = $parameters['cache'];
        } else {
            $cache = new ApcCache();
        }

        $annotationReaderFactory = new AnnotationReaderFactory();
        $annotationReader = $annotationReaderFactory->create($parameters);

        return new ReflectionService($cache, $annotationReader);

    }
277166
public function initialize(Collection $parameters): DriverContract
    {
        $parameters->each(function ($value, $key) {
            $key = Str::camel($key);
            $this->$key = $value;
        });

        $this->client = $this->createClient();

        return $this;
    }
724009
public function render(array $parameters = array())
	{
		if ($this->templateName === null) {
			throw new \RuntimeException('Template name was not specified, nothing to render.');
		}

		$this->output(
				$this->templating->render(
						$this->templateName,
						array_merge($this->parameters, $parameters)
				)
		);
	}
87873
public function setParameters($parameters)
    {
        parent::setParameters($parameters);
        if ($parameters !== null) {
            for ($i = 0, $size = count($parameters); $i < $size; $i++) {
                $paramname = $parameters[$i]->getName();
                switch (strtolower($paramname)) {
                    case self::MILLIS_KEY:
                        $this->setMillis($parameters[$i]->getValue());
                        break;
                    case self::DATETIME_KEY:
                        $this->setDatetime($parameters[$i]->getValue());
                        break;
                    case self::CHECKDIRS_KEY:
                        $this->setCheckdirs($parameters[$i]->getValue());
                        break;
                    case self::GRANULARITY_KEY:
                        $this->setGranularity($parameters[$i]->getValue());
                        break;
                    case self::WHEN_KEY:
                        $this->setWhen($parameters[$i]->getValue());
                        break;
                    default:
                        $this->setError("Invalid parameter " . $paramname);
                } // switch
            }
        }
    }
12002
protected function addParameter(array $parameters)
    {
        foreach ($parameters as $paramName => $paramValue) {
            $parameter = new Parameter($paramName, $paramValue);
            $this->parameters->add($parameter);
        }
    }
1179637
public function build(array $parameters = array())
    {
        if (!isset($this->config['framework'])) {
            $this->config['framework'] = array();
        }

        // Core parameters set by PPI\Framework\App
        $parametersBag = new ParameterBag($parameters);
        $parametersBag->resolve();
        $this->setService('ApplicationParameters', $parametersBag);

        // Settings provided by the application itself on App boot, config provided by modules is not included
        $this->setService('ApplicationConfig', $parametersBag->resolveArray($this->config));

        if (false === $this->has('Logger')) {
            $this->setService('Logger', new NullLogger());
        }

        foreach (array(
            new Config\SessionConfig(),
            new Config\TemplatingConfig(),
        ) as $serviceConfig) {
            $serviceConfig->configureServiceManager($this);
        }

        return $this;
    }
657852
public function addDefaultBodyParameters($parameters)
    {
        foreach ($parameters as $name => $value) {
            $this->addDefaultBodyParameter($name, $value);
        }

        return $this;
    }
223707
public function initialize(AgaviContext $context, array $parameters = array())
	{
		parent::initialize($context, $parameters);

		$this->plugin_dir = $this->getParameter('plugin_dir', $this->plugin_dir);
	}
194605
public function removeParameters(array $parameters = null)
  {
    $this->parameters = array();

    if ($parameters) {
      $this->addParameters($parameters);
    }

    return $this;
  }