Initialize blueprints with its dynamic fields.

@return $this
323844
public function init()
    {
        foreach ($this->dynamic as $key => $data) {
            // Locate field.
            $path = explode('/', $key);
            $current = &$this->items;

            foreach ($path as $field) {
                if (\is_object($current)) {
                    // Handle objects.
                    if (!isset($current->{$field})) {
                        $current->{$field} = [];
                    }

                    $current = &$current->{$field};
                } else {
                    // Handle arrays and scalars.
                    if (!\is_array($current)) {
                        $current = [$field => []];
                    } elseif (!isset($current[$field])) {
                        $current[$field] = [];
                    }

                    $current = &$current[$field];
                }
            }

            // Set dynamic property.
            foreach ($data as $property => $call) {
                $action = 'dynamic' . ucfirst($call['action']);

                if (method_exists($this, $action)) {
                    $this->{$action}($current, $property, $call);
                }
            }
        }

        return $this;
    }
216305
public function initRelation()
    {
        switch ($this->direction)
        {
            case 'in':
                // Make them nodes
                $this->start = $this->asNode($this->related);
                $this->end   = $this->asNode($this->parent);
                // Setup relationship
                $this->relation = $this->makeRelationship($this->type, $this->relation, $this->parent, $this->attributes);
            break;

            case 'out':
                // Make them nodes
                $this->start = $this->asNode($this->parent);
                $this->end   = $this->asNode($this->related);
                // Setup relationship
                $this->relation = $this->makeRelationship($this->type, $this->parent, $this->related, $this->attributes);
            break;

            default:
                throw new NoEdgeDirectionException;
            break;
        }
    }
542171
private function initAttributes()
    {
        $attributeCollection = $this->attributeHelper->getAttributeCollection();
        $this->resourceModel->addIndexedFilterToAttributeCollection($attributeCollection);

        foreach ($attributeCollection as $attribute) {
            if ($this->canIndexAttribute($attribute)) {
                $attributeId = (int) $attribute->getId();
                $this->attributesById[$attributeId] = $attribute;
                $this->attributeIdsByTable[$attribute->getBackendTable()][] = $attributeId;

                $this->initField($attribute);
            }

            if ($attribute->getAttributeCode() === 'sku') {
                // SKU has no backend table.
                $this->initField($attribute);
            }
        }

        return $this;
    }
919103
private function initWorksheets()
    {
        foreach ($this->file->getAllSheets() as $index => $worksheet) {
            $this->sheets[$index] = new Sheet($worksheet);
        }

        return $this;
    }
267654
def populate(self, blueprint, documents):
        """"""

        # Finish the documents
        documents = self.finish(blueprint, documents)

        # Convert the documents to frame instances
        frames = []
        for document in documents:
            # Separate out any meta fields
            meta_document = {}
            for field_name in blueprint._meta_fields:
                meta_document[field_name] = document[field_name]
                document.pop(field_name)

            # Initialize the frame
            frame = blueprint.get_frame_cls()(document)

            # Apply any meta fields
            for key, value in meta_document.items():
                setattr(frame, key, value)

            frames.append(frame)

        # Insert the documents
        blueprint.on_fake(frames)
        frames = blueprint.get_frame_cls().insert_many(frames)
        blueprint.on_faked(frames)

        return frames
921941
public function initForeignKeys()
    {
        $elems = $this->node->xpath("value[@key='foreignKeys']");
        $this->foreignKeys = $this->getFormatter()->createForeignKeys($this, $elems[0]);

        return $this;
    }
1306479
protected function initializeObject()
    {
        $assetValidatorImplementationClassNames = $this->reflectionService->getAllImplementationClassNamesForInterface(AssetValidatorInterface::class);
        foreach ($assetValidatorImplementationClassNames as $assetValidatorImplementationClassName) {
            $this->addValidator($this->objectManager->get($assetValidatorImplementationClassName));
        }
    }
1258607
public function initialize()
    {
        // attributes
        $this->setName('dealer_shedules_version');
        $this->setPhpName('DealerShedulesVersion');
        $this->setClassName('\\Dealer\\Model\\DealerShedulesVersion');
        $this->setPackage('Dealer.Model');
        $this->setUseIdGenerator(false);
        // columns
        $this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'dealer_shedules', 'ID', true, null, null);
        $this->addColumn('DEALER_ID', 'DealerId', 'INTEGER', true, null, null);
        $this->addColumn('DAY', 'Day', 'INTEGER', false, null, null);
        $this->addColumn('BEGIN', 'Begin', 'TIME', false, null, null);
        $this->addColumn('END', 'End', 'TIME', false, null, null);
        $this->addColumn('CLOSED', 'Closed', 'BOOLEAN', false, 1, false);
        $this->addColumn('PERIOD_BEGIN', 'PeriodBegin', 'DATE', false, null, null);
        $this->addColumn('PERIOD_END', 'PeriodEnd', 'DATE', false, null, null);
        $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
        $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
        $this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0);
        $this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
        $this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
        $this->addColumn('DEALER_ID_VERSION', 'DealerIdVersion', 'INTEGER', false, null, 0);
    }
193834
protected function initIterator()
    {
        // level 1 ezpFieldSet
        if ( $this->childrenFieldSets !== null )
        {
            $this->iteratorData = $this->childrenFieldSets[$this->activeLanguage]->fields;
            $this->iteratorPointer = array_keys( $this->iteratorData );
        }
        else
        {
            $this->iteratorData =  $this->fields;
            $this->iteratorPointer = array_keys( $this->iteratorData );
        }
    }
808301
protected static function initialize()
    {
        $class = static::class;

        if (static::$constants === null) {
            static::$constants = (new \ReflectionClass($class))->getConstants();

            foreach (static::names() as $name) {
                static::$lcKeyMap[strtolower($name)] = $name;
            }
        }
    }
752685
public function initIndices()
    {
        $elems = $this->node->xpath("value[@key='indices']");
        $this->indices = $this->getFormatter()->createIndices($this, $elems[0]);

        return $this;
    }
261059
protected function setup_fields() {
		foreach ( $this->prop( 'fields' ) as $args ) {
			$field = $this->builder
				->get_field( $args, $this )
				->set_option( 'context', $this->args( 'context' ) )
				->initialize();

			if ( ! $field->check_capabilities() ) {
				continue;
			}

			if ( 'hidden' === $args['type'] ) {
				$this->builder->add_hidden_field( $args, $this );
				continue;
			}

			$this->fields[ $field->get_id() ] = $field;
		}
	}
335408
protected function initChildren()
    {
        foreach ($this->datas as $name => $data) {
            $fields = $data->getDefinition()->getFieldNames();
            foreach ($fields as $field) {
                if ($data->getDefinition()->getType($field) == 'reference') {
                    $this->datas[$data->getDefinition()->getSubTypeField($field, 'reference', 'entity')]->getDefinition()->addChild($data->getDefinition()->getTable(), $field, $name);
                }
            }
        }
    }
1059617
public function init()
    {
        $children = array();
        foreach ($this->children as $child_widget) {
            $children[] = $this->remove($child_widget);
        }

        $fieldset = new SwatFieldset();
        $fieldset->id = $fieldset->getUniqueId();
        $prototype_id = $fieldset->id;

        foreach ($children as $child_widget) {
            $fieldset->add($child_widget);
        }

        $this->add($fieldset);

        parent::init();

        foreach ($this->replicators as $id => $title) {
            $fieldset = $this->getWidget($prototype_id, $id);
            $fieldset->title = $title;
        }
    }
763501
public function initialize() {
        $this->keepSnapshots(true);
        $this->setup(
            array(
                'exceptionOnFailedSave' => true, //Throw an exception instead of returning false from saves
                'notNullValidations' => false //Allow empty strings instead of the wtf new \Phalcon\Db\RawValue('""');
            )
        );
        //Sets to only update the fields that are changed
        $this->useDynamicUpdate(true);
    }
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);
    }
971389
function init() {
        if (is_null($this->conf)) {
            $this->conf = [];
        }
        
        $yp = parse_ini_file("yunpian.ini");
        foreach ($yp as $key => $value) {
            $this->conf[$key] = $value;
        }
        return $this;
    }