Create a new constraint

@param string $name
@param array $parameters  (optional)

@return Constraint
486971
public static function rule($operator, $parameters=[], $name=null)
    {
        return new Constraint($name ?: $operator, (array)$parameters, $operator);
    }
1304657
public function parameters(array $parameters)
    {
        foreach ($parameters as $parameter => $value) {
            if (property_exists($this->parameters, $parameter)) {
                $this->parameters->{$parameter} = $value;
            }
        }

        return $this;
    }
901225
protected function createDeclaration(array $parameters = []): ClassDeclaration
    {
        return $this->container->get(FactoryInterface::class)->make(
            $this->config->declarationClass(static::ELEMENT),
            [
                'name'    => $this->getClass(),
                'comment' => (string)$this->option('comment')
            ] + $parameters + $this->config->declarationOptions(static::ELEMENT)
        );
    }
88799
public function setParameters(array $parameters) {
		$this->parameters = [];
		foreach ($parameters as $parameter) {
			$this->addParameter($parameter);
		}

		return $this;
	}
351198
public function addParameter($name, $parameter)
  {
    if ($this->hasParameter($name)) {
      $this->parameters[$name]   = (array)$this->parameters[$name];
      $this->parameters[$name][] = $parameter;
    } else {
      $this->parameters[$name] = $parameter;
    }

    return $this->sortParameters();
  }
337804
public function route($name, $parameters = [])
    {
        $this->link_type = self::LINK_ROUTE;
        $this->link_value = [$name, $parameters];
        $this->checkActive();

        return $this;
    }
539963
public function registerParameters($parameters = [])
    {
        foreach ($parameters as $name => $value) {
            $this->registerParameter($name, $value);
        }

        return $this;
    }
261700
public function withParameters(array $parameters): self
    {
        $this->parameters = [];
        foreach ($parameters as $name => $value) {
            $this->withParameter($name, $value);
        }

        return $this;
    }
2541
public function addParameter($name, $parameter)
  {
    if ($this->isLocked()) {
      return $this->getObj()->addParameter($name, $parameter)->setLocked();
    } else {
      return parent::addParameter($name, $parameter);
    }
  }
622517
public function create(array $parameters = [])
    {
        $parameters = $this->optionResolver->resolve($parameters);

        $this->registerLoader();
        $this->setIgnoredNames();

        if (!$parameters['cache'] instanceof Cache) {
            throw new \InvalidArgumentException('"cache" has to be instance an instance of ' . Cache::class);
        }

        $reader = new CachedReader(
            new AnnotationReader(),
            $parameters['cache'],
            $parameters['debug']
        );

        if ($parameters['indexed'] === true) {
            return new IndexedReader($reader);
        }

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

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/new', $parameters, 'POST') : $supported;
    }
1080651
function initializeAxis( $parameters, $name )
    {
        $axis = array();
        if ( isset( $parameters[$name] ) )
            $axis = $parameters[$name];
        if ( !isset( $axis['alignment'] ) )
            $axis['alignment'] = self::ALIGN_AXIS_NONE;
        if ( !isset( $axis['placement'] ) )
            $axis['placement'] = self::PLACE_CONSTANT;
        if ( !isset( $axis['value'] ) )
            $axis['value'] = 0;
        return $axis;
    }
139119
protected function make(array $parameters = [])
    {
        $dependencies = $this->mockDependencies();
        $dependencies = array_merge($dependencies, $parameters);

        // Note: Must be defined in trait-using class
        $className = $this->className;

        return new $className(
            ...array_values($dependencies)
        );
    }
1037804
public function make(string $abstract, array $parameters = [])
    {
        try {
            if (! isset($this->resolving[$abstract])) {
                $this->resolving[$abstract] = $this->construct($abstract);
            }

            return $this->resolving[$abstract]($abstract, $parameters);
        } catch (ReflectionException $e) {
            throw new ContainerException("Fail while attempt to make '$abstract'", 0, $e);
        }
    }
632321
protected function addCommand($name, array $parameters = array())
    {
        $this->commands[] = $command = $this->createCommand($name, $parameters);

        return $command;
    }
731861
public function add(array $parameters)
    {
        foreach ($parameters as $identifier => $value) {
            $this->set($identifier, $value, false);
        }

        return $this;
    }
417372
public function createTable($name, array $options = [])
    {
        $schema = isset($options['schema']) ? new Schema($options['schema']) : null;

        $table = new TableApi($name, $schema, $this->manipulation, $this->actions);

        $primaryKey = isset($options['primary_key'])
            ? new PrimaryKey($options['primary_key'], $table)
            : new PrimaryKey(array(), $table);
        if (isset($options['primary_key_auto_increment']) && false === $options['primary_key_auto_increment']) {
            $primaryKey->disableAutoIncrement();
        }
        $table->addConstraint($primaryKey);

        if (isset($options['comment'])) {
            $table->setDescription($options['comment']);
        }
        $this->actions[] =  function () use ($table) {
             return $this->manipulation->create($table);
        };

        return $table;
    }