protected function loadMigrationFields(DOMXPath $rootPath)
    {
        $fields = $rootPath->query(
            './value[@type="list" and @key="columns"]/value[@type="object" and @struct-name="db.mysql.Column"]'
        );

        if ($fields && $fields->length) {
            /** @var \DOMNode $field */
            foreach ($fields as $field) {
                $fieldName = $rootPath->query('./value[@key="name"]', $field)->item(0)->nodeValue;

                $this->addField($fieldName)->load($field, $rootPath);
            } // foreach
        } // if

        $this->addIndicesToFields($rootPath);

        return $this->addForeignKeys($rootPath);
    }
protected function loadMigrationFields(DOMXPath $rootPath)
    {
        $fields = $rootPath->query(
            './value[@type="list" and @key="columns"]/value[@type="object" and @struct-name="db.mysql.Column"]'
        );

        if ($fields && $fields->length) {
            /** @var \DOMNode $field */
            foreach ($fields as $field) {
                $fieldName = $rootPath->query('./value[@key="name"]', $field)->item(0)->nodeValue;

                $this->addField($fieldName)->load($field, $rootPath);
            } // foreach
        } // if

        $this->addIndicesToFields($rootPath);

        return $this->addForeignKeys($rootPath);
    }
protected function loadMigrationFields ( DOMXPath $ rootPath ) { $ fields = $ rootPath -> query ( './value[@type="list" and @key="columns"]/value[@type="object" and @struct-name="db.mysql.Column"]' ) ; if ( $ fields && $ fields -> length ) { /** @var \DOMNode $field */ foreach ( $ fields as $ field ) { $ fieldName = $ rootPath -> query ( './value[@key="name"]' , $ field ) -> item ( 0 ) -> nodeValue ; $ this -> addField ( $ fieldName ) -> load ( $ field , $ rootPath ) ; } // foreach } // if $ this -> addIndicesToFields ( $ rootPath ) ; return $ this -> addForeignKeys ( $ rootPath ) ; }
Returns the migration fields of the model.
@param DOMXPath $rootPath
@return TableMigration
Returns the migration fields of the model .