Initializes the validation matrix.

@author Benjamin Carl <opensource@clickalicious.de>

@return $this Instance for chaining
340766
protected function init()
    {
        // build the local matrix just once
        if (empty($this->errorCodeMatrix)) {
            // get type and order from Doozr_Form_Service_Validate so we don't need to define it manually again
            $typeMatrix = Doozr_Form_Service_Validator_Generic::getValidationTypeMatrix();

            // iterate over types and construct error-code-matrix of it
            foreach ($typeMatrix as $type => $order) {
                $this->errorCodeMatrix[$type] = ($order + 1);
            }
        }

        return $this;
    }
510670
public function initialize()
    {
        if (!$this->isInitialized()) {
            $this->getOriginalNodeNames();
            $fetchDepth = $this->fetchDepth > 0 ? $this->fetchDepth + 1 : -1;
            $childNodes = $this->getNode($fetchDepth)->getNodes($this->filter);
            $this->collection = new ArrayCollection($this->getChildren($childNodes));
            $this->initialized = self::INITIALIZED_FROM_PHPCR;
        }
    }
468417
public function init($input_dim, $option = [])
    {
        echo "$input_dim, $this->output_dim \n";
        $this->input_dim = $input_dim;
        for ($i = 0; $i < $this->output_dim; $i++) {
            for ($j = 0; $j < $input_dim; $j++) {
                $this->matrix[$i][$j] = self::nonzero_rand() / $input_dim;
            }
        }

        foreach ($option as $key => $val) {
            $this->{$key} = $val;
        }

        return $this;
    }
194347
private function initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            foreach ($params as $param) {
                if (self::LINES_KEY === $param->getName()) {
                    $this->lines = (int) $param->getValue();
                    continue;
                }
                if (self::SKIP_KEY === $param->getName()) {
                    $this->lines = (int) $param->getValue();
                    continue;
                }
            }
        }
    }
1073577
public function initialize()
    {
        if ($this->initialized) {
            return;
        }

        $this->initialized = true;
        $this->repository = app(RepositoryInterface::class);
        $this->repository->setClass($this->class);

        $model = $this->makeModel();
        parent::setModel($model);
        $this->getButtons()->setModel($model);

        parent::initialize();

        if (! $this->hasHtmlAttribute('enctype')) {

            // Recursive iterate subset of form elements
            // and if subset contains an upload element then add to for
            $this->recursiveIterateElements(function ($element) {
                if ($element instanceof Upload) {
                    $this->withFiles();

                    return true;
                }
            });
        }

        $this->getButtons()->setModelConfiguration(
            $this->getModelConfiguration()
        );
    }
116040
private function buildInitialize() {
        $method = new Object\Method();
        $method->setAccess('public');
        $method->setDescription('Initializer, only called once per page load');
        $method->setName('initialize');
        $method->setReturnType('void');
        $method->setContent(
            '$this->setConnectionService(\'' . $this->getConfiguration()->getConnectionService() . '\');
		parent::initialize();
' . $this->buildValidation() . '
' . $this->buildRelationshipsBuffer() . '
' . $this->buildUpdateSkips()
        );
        $this->getAbstractClass()->addMethod($method);
    }
115715
private function initialise()
    {
        for ($i = 0; $i < $this->size; $i++) {
            for ($j = 0; $j < $this->size; $j++) {
                $this->grid[$i][$j] = null;
            }

            $this->rowsAvailable[] = $i;
            $this->columnsAvailable[] = $i;
        }
    }
226701
public function initialize()
    {
        static::addFilterDefinition('required', array($this, 'filterRequired'));
        static::addFilterDefinition('string', array($this, 'filterString'));
        static::addFilterDefinition('boolean', array($this, 'filterBoolean'));
        static::addFilterDefinition('confirm', array($this, 'filterConfirm'));
        static::addFilterDefinition('validate_regexp', array($this, 'filterValidateRegexp'));
        static::addFilterDefinition('validate_url', array($this, 'filterValidateUrl'));
        static::addFilterDefinition('validate_date', array($this, 'filterValidateDate'));
        static::addFilterDefinition('php', array($this, 'filterPHP'));
        static::addFilterDefinition('max_length', array($this, 'filterMaxLength'));
        static::addFilterDefinition('min_length', array($this, 'filterMinLength'));
        static::$isInitialized = TRUE;
    }
415435
protected function initialize()
    {
        $class = \get_class($this);

        if (null === self::$loopDefinitions) {
            self::$loopDefinitions = \array_flip($this->container->getParameter('thelia.parser.loops'));
        }

        if (isset(self::$loopDefinitions[$class])) {
            $this->loopName = self::$loopDefinitions[$class];
        }

        if (!isset(self::$loopDefinitionsArgs[$class])) {
            $this->args = $this->getArgDefinitions()->addArguments($this->getDefaultArgs(), false);

            $eventName = $this->getDispatchEventName(TheliaEvents::LOOP_EXTENDS_ARG_DEFINITIONS);
            if (null !== $eventName) {
                $this->dispatcher->dispatch(
                    $eventName,
                    new LoopExtendsArgDefinitionsEvent($this)
                );
            };

            self::$loopDefinitionsArgs[$class] = $this->args;
        }

        $this->args = self::$loopDefinitionsArgs[$class];
    }
641802
protected function initialize()
    {
        if ($this->state->isInitialized()) {
            return;
        }

        if ($this->modeCAS) {
            $this->state->flag(MultiExecState::CAS);
        }

        if ($this->watchKeys) {
            $this->watch($this->watchKeys);
        }

        $cas = $this->state->isCAS();
        $discarded = $this->state->isDiscarded();

        if (!$cas || ($cas && $discarded)) {
            $this->call('MULTI');

            if ($discarded) {
                $this->state->unflag(MultiExecState::CAS);
            }
        }

        $this->state->unflag(MultiExecState::DISCARDED);
        $this->state->flag(MultiExecState::INITIALIZED);
    }
1043556
protected function initialize()
    {
        if ($this->initialized) {
            return;
        }

        foreach ($this->classes as $class) {
            $this->providers[] = new $class;
        }

        foreach ($this->providers as $provider) {
            if ($provider instanceof BuilderAwareInterface) {
                $provider->setSchemaBuilder($this->schemaBuilder);
            }
        }

        $this->initialized = true;
    }
579063
public function initialize()
    {
        if ($this->isInformationCached()) {

            $this->information = $this->retrieveInformationFromCache();

        } else {

            $this->information = $this->collector->collect();
        }

        $this->fillModelClassIndex();

        $this->initialized = true;

        return $this;
    }
901941
private function initAttributes() {
    if ($this->attributes == null) {
      $this->attributes = [];
      $this->attributes['byname'] = [];
      $this->attributes['refs'] = [];

      $attributes = $this->getAttributes();
      foreach ($attributes as $attribute) {
        $this->attributes['byname'][$attribute->getName()] = $attribute;
        if ($attribute instanceof ReferenceDescription) {
          $this->attributes['refs'][] = $attribute;
        }
      }
    }
  }
863976
private static function _initialize() 
    {
        for ($i=self::SINGULAR; $i <= self::IRREGULAR; $i++) {
            if (!array_key_exists($i, self::$_inflections)) {
                self::$_inflections[$i] = array();
            }
        }
    }
1271088
public function validate()
    {
        foreach ($this as $element) {

            if (
                $element instanceof ValidationAwareInterface ||
                $element instanceof ContainerInterface
            ) {
                $element->validate();
            }
        }
        return $this;
    }
559592
public function initManyToManyRelations()
    {
        if ($this->isManyToMany()) {
            $fk1 = $this->foreignKeys[0];
            $fk2 = $this->foreignKeys[1];
            $this->injectManyToMany($fk1, $fk2);
            $this->injectManyToMany($fk2, $fk1);
        }

        return $this;
    }
712777
public function validateRequired()
    {
        $this->validator_attributes[] = 'data-parsley-required';

        $this->field_required = true;

        $this->validator_checks['required'] = true;

        return $this;
    }