initTypes

Get the result types from the result handler.

@return ResultIterator $this
12993
protected function initTypes()
    {
        foreach ($this->result->getFieldNames() as $index => $name) {
            $type = $this->result->getFieldType($name);

            if ($type === null) {
                $type = 'text';
            }

            $this->types[$name] = $type;
            $this->converters[$name] = $this
                ->session
                ->getClientUsingPooler('converter', $type)
            ;
        }

        return $this;
    }
519343
protected function initFilters()
    {
        $initColumnSearch = $this->initColumnSearch;
        foreach ($this->columns as $c) {
            if (isset($c['sqlFilter'])) {
                $where_condition = $this->generateSQLColumnFilter($this->toSQLColumn($c, 2), $c['sqlFilter']);
                if (!$this->setHaving($where_condition, $c)) {
                    $initColumnSearch[] = $this->generateSQLColumnFilter($this->toSQLColumn($c, 2), $c['sqlFilter']);
                }
            }
        }

        return implode(' AND ', $initColumnSearch);
    }
1251958
public function getResultingType() : \Dms\Core\Persistence\Db\Schema\Type\Type
    {
        if ($this->type === self::AVG && $this->argument->getResultingType() instanceof Integer) {
            return new Decimal(30, 15);
        }

        return $this->argument->getResultingType();
    }
131646
public function getAJAXTypeHandlers()
    {
        if ($this->ajaxTypeHandlers != null) {
            return $this->ajaxTypeHandlers;
        }

        $this->ajaxTypeHandlers = array();

        /** @noinspection PhpUndefinedFieldInspection */
        if (!$this->configFile->AJAXTypeHandlers->getName()) {
            return $this->ajaxTypeHandlers;
        }


        /** @noinspection PhpUndefinedFieldInspection */
        foreach ($this->configFile->AJAXTypeHandlers->class as $handler) {
            $class_array = array("class_name" => (string)$handler);
            if (isset($handler['link'])) {
                $class_array['link'] = $this->rootPath . "/" . $handler['link'];
            }
            $this->ajaxTypeHandlers[] = $class_array;
        }
        return $this->ajaxTypeHandlers;
    }
970597
function GetPhpType()
	{
		$rt = $this->Type;
		switch ($this->Type)
		{
			case "smallint":
			case "bigint":
			case "tinyint":
			case "mediumint":
				$rt = "int";
				break;
			case "varchar":
			case "text":
			case "tinytext":
				$rt = "string";
				break;
			case "date":
			case "datetime":
				$rt = "date";
				break;
			case "decimal":
			case "float":
				$rt = "float";
				break;
			default;
				break;
		}

		return $rt;
	}
666110
function getTypes()
    {
        $t = array();
        foreach ($this->getElements('xrd:Type') as $elem) {
            $c = $this->parser->content($elem);
            if ($c) {
                $t[] = $c;
            }
        }
        return $t;
    }
1332407
private function _iterator()
    {
        if(!isset($this->_iterator))
            $this->_iterator = $this->_resultSet()->getIterator();

        return $this->_iterator;
    }
282548
public function getTypeHandlerLibraryInstance()
    {
        return $this->typeHandlerLib == null ? $this->typeHandlerLib = new TypeHandlerLibraryImpl($this) : $this->typeHandlerLib;
    }
1148374
protected function initializeResult()
    {
        /** @var ProcessorResult $result */
        $this->result = app(ProcessorResult::class);

        $this->result->setSuccess(false);
        $this->result->setErrors( app(MessageBag::class) );
        $this->result->setWarnings( app(MessageBag::class) );
    }
739300
public function init() {
		if ( ! post_type_exists( $this->post_type ) ) {
			$post_type = register_post_type( $this->post_type, $this->args );
			if ( is_wp_error( $post_type ) ) {
				return $post_type;
			}
		}
		if ( '' !== $this->title_placeholder ) {
			add_filter( 'enter_title_here', array( $this, 'update_placeholder' ) );
		}
	}
465958
public function getResultingType() : \Dms\Core\Persistence\Db\Schema\Type\Type
    {
        $selectedExpressions = $this->select->getAliasColumnMap();
        /** @var Expr $selectExpression */
        $selectExpression    = reset($selectedExpressions);

        return $selectExpression->getResultingType();
    }
768623
private function getType(): array
    {
        if (!$this->type || $this->is('customize_preview')) {
            $this->type = parent::type();
        }

        return $this->type;
    }
172857
public function getTypes()
    {
        $handlers = $this->getHandlers();

        $types = array();
        foreach ($handlers as $handler_id => $handler) {
            $types[$handler_id] = $handler['title'];
        }

        return $types;
    }
853888
protected function setDefaultDataTypes()
    {
        foreach ($this->_params as $key => $value) {
            switch (gettype($value)) {
                case "boolean":
                    $this->_types[$key] = 'boolean';
                    break;
                case "integer":
                    $this->_types[$key] = 'integer';
                    break;
                case "double":
                    $this->_types[$key] = 'float';
                    break;
                case "string":
                    $this->_types[$key] = 'string';
                    break;
                case "array":
                    $this->_types[$key] = 'array';
                    break;
                default:
                    $this->_types[$key] = null;
                    break;
            }
        }
    }
386954
protected function init(): void
    {
        $this->getGroupTags = static function (Type\Group $group) { return ['type-group-' . $group->id]; };
        $this->getGroupKeys = static function (Type\Group $group) {
            return [
                'ez-content-type-group-' . $group->id,
                'ez-content-type-group-' . $group->identifier . '-by-identifier',
            ];
        };

        $this->getTypeTags = static function (Type $type) { return ['type-' . $type->id]; };
        $this->getTypeKeys = static function (Type $type, int $status = Type::STATUS_DEFINED) {
            return [
                'ez-content-type-' . $type->id . '-' . $status,
                'ez-content-type-' . $type->identifier . '-by-identifier',
                'ez-content-type-' . $type->remoteId . '-by-remote',
            ];
        };
    }
324173
protected function getTypesCollection()
    {
        if (null === $this->types) {
            $this->types = new Collection(
                array($this->type),
                $this->docblock ? $this->docblock->getContext() : null
            );
        }
        return $this->types;
    }
1085827
private function initFilterTypes()
    {
        $this->filterTypes = [];

        foreach ($this->loadFilterTypes() as $type) {
            if (!$type instanceof FilterTypeInterface) {
                throw new UnexpectedTypeException($type, FilterTypeInterface::class);
            }

            $this->filterTypes[get_class($type)] = $type;
        }
    }