set the attributes on the class after validating them.

@param $parameters
168974
private function setParameters($parameters)
    {
        $this->domain = $this->validateConfiguration($parameters['domain']);
        $this->endpoint = $this->validateConfiguration($parameters['endpoint']);
        $this->access_token = $this->validateConfiguration($parameters['token']);
    }
677390
public function setParameters($parameters)
    {
        $this->parameters     = $parameters;
        $this->withParameters = !empty($this->parameters);

        return $this;
    }
848811
public function runControllerWithParameters($parameters = [])
    {
        $this->setParameters($this->toArray($parameters));


        foreach($this->callbacks as $callback){
            $this->app->call($callback);
        }
    }
1303555
public function initialize(array $parameters = array())
    {
        $this->parameters = new ParameterContainer;

        // set default parameters
        foreach ($this->getDefaultParameters() as $key => $value) {
            if (is_array($value)) {
                $this->parameters->set($key, reset($value));
            } else {
                $this->parameters->set($key, $value);
            }
        }

        Helper::initialize($this, $parameters);

        return $this;
    }
791094
public function put($parameters = null)
    {
        $this->setOption(CURLOPT_PUT, true);
        if ($parameters !== null) {
            $this->setParameters($parameters);
        }

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

        return $this;
    }
328611
public function setParameters($parameters)
    {
        // type check, error must never occur, bad code of it does
        if (!is_array($parameters)) {
            throw new Exception("Expected parameters array got something else");
        }

        $this->_parameters = $parameters;
        $this->setInitialized(false);
    }
1114113
public function setParameters(array $parameters, array $types = array())
    {
        foreach ($parameters as $parameter => $value) {
            if (isset($types[$parameter])) {
                $this->setParameter($parameter, $value, $types[$parameter]);
            } else {
                $this->setParameter($parameter, $value);
            }
        }

        return $this;
    }
779555
public function setAttributes(array $attributes = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$attributes', $attributes, __NAMESPACE__ . '\Pair');

        $this->attributes = $attributes;

        return $this;
    }
10821
public function setParameters($parameters)
    {
		$this->parameters = [];
		
		if(!is_array($parameters)){
			$parameters = Helpers::convertStringToArray($parameters, '|');
		}
        
        foreach ($parameters as $parameter) {
            $this->parameters[] = Helpers::eliminateDupilcates($parameter, "\\");
        }
    }
689720
protected function addParameter(array $parameters)
    {
        foreach ($parameters as $paramName => $paramValue) {
            $this->parameters[$paramName] = $paramValue;
            $this->parametersTypes[$paramName] = $this->inferType($paramValue);
        }
    }
1221996
public function addParameter(Parameter $parameter) {
        $parameters = $this->getParameters();
        $parameters[] = $parameter;
        $this->setParameters($parameters);
    }
70267
protected function doSetParameters(array $parameters)
    {
        foreach ($parameters as $name => $value) {
            $this->setParameter($name, $value);
        }
    }
100160
public function validateParameters(&$parameters)
    {
        if (!isset($parameters['username']))
        {
            throw new InvalidArgumentException(
                'The \'username\' parameter must be defined for the Password grant type',
                InvalidArgumentException::MISSING_PARAMETER
            );
        }
        elseif (!isset($parameters['password']))
        {
            throw new InvalidArgumentException(
                'The \'password\' parameter must be defined for the Password grant type',
                InvalidArgumentException::MISSING_PARAMETER
            );
        }
    }
531059
public function update(array $parameters = [])
    {
        json_decode(self::put("/photos/{$this->id}", ['query' => $parameters])->getBody(), true);
        parent::update($parameters);
    }
614083
public function setParameter($parameter, $value)
    {
        if (is_bool($value)) {
            $value = $value ? '1' : '0';
        }

        $this->parameters[$parameter] = $value;
    }
1294713
public function setAttributes($values){

        if(is_array($values)){
            foreach($values as $name => $value){
                $this->setAttribute($name, $value);
            }
        }else{
            throw new InvalidArgumentException('"values" must be an array');
        }

    }