Get the column class.

@param bool $withOffset If true the offset class is added.

@return string
422480
public function getColumnClass(bool $withOffset = false): string
    {
        $class = (string) $this->horizontalConfig['control'];

        if ($withOffset) {
            $class .= ' ' . $this->horizontalConfig['offset'];
        }

        return $class;
    }
876554
function _FetchField($fieldOffset = -1)
	{
		$fld = new ADOFieldObject;
		$fieldOffset += 1;
		$fld->name = OCIcolumnname($this->_queryID, $fieldOffset);
		if (ADODB_ASSOC_CASE == ADODB_ASSOC_CASE_LOWER) {
			$fld->name = strtolower($fld->name);
		}
		$fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
		$fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
		if ($fld->type == 'NUMBER') {
			$sc = OCIColumnScale($this->_queryID, $fieldOffset);
			if ($sc == 0) {
				$fld->type = 'INT';
			}
		}
		return $fld;
	}
31459
public function offsetGet($offset)
	{
		if (array_key_exists($offset, $this->_data))
		{
			return $this->_data[$offset];
		}

		throw new \OutOfBoundsException('Property "'.$offset.'" not found for '.get_called_class().'.');
	}
504175
public function schemaToClassName(SchemaDescriptor $schema, $withMajor = false)
    {
        $className = StringUtils::toCamelFromSlug($schema->getId()->getMessage());
        if (!$withMajor) {
            return $className;
        }

        return "{$className}V{$schema->getId()->getVersion()->getMajor()}";
    }
1296094
public function getAllEndpoints($withHost = false, $forceReload = false)
    {
        $this->loadApiDefinition($forceReload);

        $host = empty($this->options['host']) ? '' : $this->options['host'];
        $prefix = self::PROXY_ROUTE;
        if (isset($this->options['prefix'])) {
            $prefix .= "/".$this->options['prefix'];
        }

        return !is_object($this->definition) ? [] : $this->definition->getEndpoints(
            $withHost,
            $prefix,
            $host,
            !empty($this->options['includeBasePath'])
        );
    }
1064098
public function getTable($withPrefix = true)
    {
        if (is_null($this->table)) {
            $classBasename = (new \ReflectionClass($this))->getShortName();
            $this->setTable(strtolower($classBasename));
        }

        if ($withPrefix) {
            return $this->getPrefix() . $this->table;
        }

        return $this->table;
    }
1081754
public function getOffsetFor($objectNumber)
    {
        foreach ($this->getReaders() as $reader) {
            $offset = $reader->getOffsetFor($objectNumber);
            if ($offset !== false) {
                return $offset;
            }
        }

        return false;
    }
880116
public function getColumnOffset() {
        // strrpos is weird, and the offset needs to be negative for what we
        // want (i.e., the last \n before $this->char). This needs to not have
        // one (to make it point to the next character, the one we want the
        // position of) added to it because strrpos's behaviour includes the
        // final offset byte.
        $lastLine = strrpos($this->data, "\n", $this->char - 1 - strlen($this->data));

        // However, for here we want the length up until the next byte to be
        // processed, so add one to the current byte ($this->char).
        if ($lastLine !== false) {
            $findLengthOf = substr($this->data, $lastLine + 1, $this->char - 1 - $lastLine);
        } else {
            $findLengthOf = substr($this->data, 0, $this->char);
        }

        // Get the length for the string we need.
        if (extension_loaded('iconv')) {
            return iconv_strlen($findLengthOf, 'utf-8');
        } elseif (extension_loaded('mbstring')) {
            return mb_strlen($findLengthOf, 'utf-8');
        } elseif (extension_loaded('xml')) {
            return strlen(utf8_decode($findLengthOf));
        } else {
            $count = count_chars($findLengthOf);
            // 0x80 = 0x7F - 0 + 1 (one added to get inclusive range)
            // 0x33 = 0xF4 - 0x2C + 1 (one added to get inclusive range)
            return array_sum(array_slice($count, 0, 0x80)) +
                   array_sum(array_slice($count, 0xC2, 0x33));
        }
    }
607879
public function column( $type )
    {
        $classPrefix = __CLASS__ . '\\Type\\';

        if ( is_string( $type ) &&
             class_exists( $classPrefix . ucfirst( $type ) ) )
        {
            $type = ucfirst( $type );
            $args = func_get_args();
            array_shift( $args );
        }
        else if ( is_callable( $type ) )
        {
            $args = func_get_args();
            $type = static::CALLBACK;
        }
        else
        {
            $type = ucfirst( (string) $type );
            $args = func_get_args();
            array_shift( $args );
        }

        $class = $classPrefix . $type;

        if ( ! class_exists( $class ) )
        {
            throw new \LogicException( 'RowSet-type does not exists: ' . $class );
        }

        $reflection = new \ReflectionClass( $class );
        $result     = $reflection->newInstanceArgs( $args );

        if ( $result instanceof HelperInterface )
        {
            $result->setView( $this->getView() );
        }

        return $result;
    }
115978
protected static LineAndColumn getLineAndColumn(INode anyNode, int documentOffset) {
		INode rootNode = anyNode.getRootNode();
		int[] lineBreaks = getLineBreakOffsets(rootNode);
		String document = rootNode.getText();
		return getLineAndColumn(document, lineBreaks, documentOffset);
	}
947689
function _getClasses($offset)
	{
		$this->seek($offset);
		$ClassFormat = $this->read_ushort();
		$GlyphByClass = [];
		if ($ClassFormat == 1) {
			$StartGlyph = $this->read_ushort();
			$GlyphCount = $this->read_ushort();
			for ($i = 0; $i < $GlyphCount; $i++) {
				$startGlyphID = $StartGlyph + $i;
				$endGlyphID = $StartGlyph + $i;
				$class = $this->read_ushort();
				for ($g = $startGlyphID; $g <= $endGlyphID; $g++) {
					if ($this->glyphToChar[$g][0]) {
						$GlyphByClass[$class][] = unicode_hex($this->glyphToChar[$g][0]);
					}
				}
			}
		} else {
			if ($ClassFormat == 2) {
				$tableCount = $this->read_ushort();
				for ($i = 0; $i < $tableCount; $i++) {
					$startGlyphID = $this->read_ushort();
					$endGlyphID = $this->read_ushort();
					$class = $this->read_ushort();
					for ($g = $startGlyphID; $g <= $endGlyphID; $g++) {
						if ($this->glyphToChar[$g][0]) {
							$GlyphByClass[$class][] = unicode_hex($this->glyphToChar[$g][0]);
						}
					}
				}
			}
		}
		$gbc = [];
		foreach ($GlyphByClass as $class => $garr) {
			$gbc[$class] = implode('|', $garr);
		}

		return $gbc;
	}
1032478
public function getBaseClassMethods($indent, array &$result)
    {
        $type_getter_name = 'get' . Inflector::classify($this->type_field_name);
        $type_setter_name = 'set' . Inflector::classify($this->type_field_name);

        $id_getter_name = 'get' . Inflector::classify($this->name);
        $id_setter_name = 'set' . Inflector::classify($this->name);

        $instance_getter_name = 'get' . Inflector::classify($this->relation_name);
        $instance_setter_name = 'set' . Inflector::classify($this->relation_name);

        $type_hint = '\\' . ObjectInterface::class;

        $methods = [];

        $methods[] = '/**';
        $methods[] = ' * @param  bool' . str_pad('$use_cache', strlen($type_hint) + 7, ' ', STR_PAD_LEFT);
        $methods[] = ' * @return ' . $type_hint;
        $methods[] = ' */';
        $methods[] = 'public function ' . $instance_getter_name . '($use_cache = true)';
        $methods[] = '{';
        $methods[] = '    if ($id = $this->' . $id_getter_name . '()) {';
        $methods[] = '        return $this->pool->getById($this->' . $type_getter_name . '(), $id, $use_cache);';
        $methods[] = '    } else {';
        $methods[] = '        return null;';
        $methods[] = '    }';
        $methods[] = '}';
        $methods[] = '';

        if ($this->isRequired()) {
            $methods[] = '/**';
            $methods[] = ' * Set ' . $this->relation_name . '.';
            $methods[] = ' *';
            $methods[] = ' * @param  ' . $type_hint . ' $value';
            $methods[] = ' * @return $this';
            $methods[] = ' */';
            $methods[] = 'public function &' . $instance_setter_name . '(\\' . ObjectInterface::class . ' $value)';
            $methods[] = '{';
            $methods[] = '    if ($value instanceof \\' . ObjectInterface::class . ' && $value->isLoaded()) {';
            $methods[] = '        $this->' . $type_setter_name . '(get_class($value));';
            $methods[] = '        $this->' . $id_setter_name . '($value->getId());';
            $methods[] = '    } else {';
            $methods[] = '        throw new \InvalidArgumentException(' . var_export("Instance of '" . ObjectInterface::class . "' expected", true) . ');';
            $methods[] = '    }';
            $methods[] = '';
            $methods[] = '    return $this;';
            $methods[] = '}';
        } else {
            $methods[] = '/**';
            $methods[] = ' * Set ' . $this->relation_name . '.';
            $methods[] = ' *';
            $methods[] = ' * @param  ' . $type_hint . ' $value';
            $methods[] = ' * @return $this';
            $methods[] = ' */';
            $methods[] = 'public function &' . $instance_setter_name . '(\\' . ObjectInterface::class . ' $value = null)';
            $methods[] = '{';
            $methods[] = '    if ($value instanceof \\' . ObjectInterface::class . ') {';
            $methods[] = '        if ($value->isLoaded()) {';
            $methods[] = '            $this->' . $type_setter_name . '(get_class($value));';
            $methods[] = '            $this->' . $id_setter_name . '($value->getId());';
            $methods[] = '        } else {';
            $methods[] = '            throw new \InvalidArgumentException(' . var_export("Instance of '" . ObjectInterface::class . "' expected", true) . ');';
            $methods[] = '        }';
            $methods[] = '    } else {';
            $methods[] = '        $this->' . $type_setter_name . '(null);';
            $methods[] = '        $this->' . $id_setter_name . '(0);';
            $methods[] = '    }';
            $methods[] = '';
            $methods[] = '    return $this;';
            $methods[] = '}';
        }

        foreach ($methods as $line) {
            if ($line) {
                $result[] = "$indent$line";
            } else {
                $result[] = '';
            }
        }
    }
1177888
@Override
	public Class<?> getColumnClass(int columnIndex) {
		switch (columnIndex) {
		case 0:
			return Boolean.class;
		case 1:
			return String.class;
		case 2:
			return String.class;
		case 3:
			return Integer.class;
		}
		return null;
	}
980248
public function getTableFields($table, $withPrefix = false)
    {
        $fullTable = $withPrefix ? $table : $this->getTable($table);
        if (isset($this->tableFields[$fullTable])) {
            return $this->tableFields[$fullTable];
        } else {
            $fields = array();
            switch ($this->driver) {
                case 'mysql':
                    $tableInfo = $this->fetchAll("SHOW COLUMNS FROM $fullTable");
                    $fields = $this->filter($tableInfo, 'Field');
                    break;

                case 'sqlite':
                    $tableInfo = $this->fetchAll("PRAGMA table_info($fullTable)");
                    $fields = $this->filter($tableInfo, 'name');
                    break;

                case 'pgsql':
                    $tableInfo = $this->fetchAll(
                        "SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS
                        WHERE table_catalog = ? AND table_name = ?
                        ORDER BY dtd_identifier ASC",
                        array($this->dbname, $fullTable)
                    );
                    $fields = $this->filter($tableInfo, 'column_name');
            }
            if (empty($fields)) {
                // For SQLite and PostgreSQL
                throw new \PDOException(sprintf('Table or view "%s" not found', $fullTable));
            }
            return $this->tableFields[$table] = $fields;
        }
    }
684829
public function GetOffset($Comment) {
      $this->FireEvent('BeforeGetOffset');
      
      if (is_numeric($Comment)) {
         $Comment = $this->GetID($Comment);
      }

      $this->SQL
         ->Select('c.CommentID', 'count', 'CountComments')
         ->From('Comment c')
         ->Where('c.DiscussionID', GetValue('DiscussionID', $Comment));

      $this->SQL->BeginWhereGroup();

      // Figure out the where clause based on the sort.
      foreach ($this->_OrderBy as $Part) {
         //$Op = count($this->_OrderBy) == 1 || isset($PrevWhere) ? '=' : '';
         list($Expr, $Value) = $this->_WhereFromOrderBy($Part, $Comment, '');

         if (!isset($PrevWhere)) {
            $this->SQL->Where($Expr, $Value);
         } else {
            $this->SQL->BeginWhereGroup();
            $this->SQL->OrWhere($PrevWhere[0], $PrevWhere[1]);
            $this->SQL->Where($Expr, $Value);
            $this->SQL->EndWhereGroup();
         }

         $PrevWhere = $this->_WhereFromOrderBy($Part, $Comment, '==');
      }

      $this->SQL->EndWhereGroup();

      return $this->SQL
         ->Get()
         ->FirstRow()
         ->CountComments;
   }
891748
public function getLeftColumnName(bool $withTableName = false): string
    {
        return ($withTableName) ? $this->addTableName($this->leftColumnName) : $this->leftColumnName;
    }
1360100
public function alignOffset($offset = 0)
    {
        // Return value
        if (empty($offset)) {
            return $this->alignOffset;
        }

        // Set value
        $this->alignOffset = $offset;

        return $this;
    }