Checks the column type to ensure it has required settings
@param string $columnName
@param array $attrs
@return string The type column it is
768542
private function checkType($columnName, array $attrs) {
        if (in_array(strtolower($attrs['type']), array('string', 'referencemany'))) {
            return (isset($attrs['attrs']['size']) && strtolower($attrs['type']) !== 'referencemany') ? 'VARCHAR' : 'TEXT';
        }
        return strtoupper($attrs['type']);
    }
436864
public function attr($attr) {
		if($this->domnode === null)
			return null;
		return $this->domnode->getAttribute($attr);
	}
218659
protected function _checkedOptions($value, $selected, array $attrs)
    {
        $attrs['checked'] = false;
        if (is_array($selected)) {
            foreach ($selected as $val) {
                if ($value == $val) {
                    $attrs['checked'] = 'checked';
                    break;
                }
            }
        } else {
            if ($value == $selected) {
                $attrs['checked'] = 'checked';
            }
        }

        return $attrs;
    }
935184
public Class<?> attrType(String attr) {
		Table table = this.table();
		if (null != table) {
			return table.getColumnType(attr);
		}
		
		Method[] methods = this._getUsefulClass().getMethods();
		String methodName;
		for (Method method : methods) {
			methodName = method.getName();
			if (methodName.startsWith("set") && methodName.substring(3).toLowerCase().equals(attr)) {
				return method.getParameterTypes()[0];
			}
		}
		return null;
	}
1037319
public function hasColumn($columnName)
    {
        $columnName = $this->normalizeIdentifier($columnName);

        return isset($this->_columns[$columnName]);
    }
1254133
protected function getPhinxColumnOptionsAfter($attributes, $columnData, $columns)
    {
        $columnName = $columnData['COLUMN_NAME'];
        $after = null;
        foreach (array_keys($columns) as $column) {
            if ($column === $columnName) {
                break;
            }
            $after = $column;
        }
        if (!empty($after)) {
            $attributes[] = sprintf('\'after\' => \'%s\'', $after);
        }

        return $attributes;
    }
794156
private function isMethodIncluded($methodName, $attr)
    {
        if (empty($attr[self::CONFIG_INCLUDE]) || !is_array($attr[self::CONFIG_INCLUDE])) {
            return true;
        }
        
        return in_array($methodName, $attr[self::CONFIG_INCLUDE]);
    }
895746
public function buildInput($attrs)
    {
        $html = parent::buildInput($attrs);

        if (count($this->options)) {
            $html .= new Datalist($attrs['list'], $this->options);
        }

        return $html;
    }
625088
protected function getSelectColumns() {
		//obtain attributes from config
		if ($this->hasOption('query.attrs')) {
			$columns = [];
			
			foreach ($this->getOption('query.attrs') as $attr) {
				if ($attr instanceof Attr)
					$name = $attr->getName();				
				elseif (is_string($attr))
					$name = $attr;
				else
					throw new \InvalidArgumentException("Method 'attrs' expects a list of strings or instances of \eMapper\Query\Attr");
				
				if (!$this->entityProfile->hasProperty($name))
					throw new \InvalidArgumentException(sprintf("Attribute '%s' not found in class '%s'", $name, $this->entityProfile->getReflectionClass()->getName()));
				
				$column = $this->entityProfile->getProperty($name)->getColumn();
				if (!array_key_exists($column, $columns))
					$columns[$column] = new Column($column);
			}
			
			return $columns;
		}
	
		return $this->selectColumns;
	}
849911
protected function getMethodFromAttributes($attrs)
    {
        if (!is_array($attrs) || !isset($attrs['method'])) {
            return $this->getEventFromAttributes($attrs);
        }

        return $attrs['method'];
    }
605074
public static function script($src, array $attrs = [])
    {
        $attrs = array_merge([
            'src' => $src
        ], $attrs);

        return static::tag('script', null, $attrs);
    }
490681
public function __isset($columnName)
    {
        $columnName = $this->_transformColumn($columnName);
        return array_key_exists($columnName, $this->_data);
    }
486630
public function __isset($columnName) {
        // Check if native column from database.
        $result = parent::__isset($columnName);
        if (!$result) {
            // Check if "virtual" column added thru Garp modification.
            $result = array_key_exists($columnName, $this->_related) ||
                array_key_exists($columnName, $this->_virtual);
        }
        return $result;
    }
671605
public function addElement($attrs)
    {
        if (!$this->getPrefix($attrs['type'])) {
            $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type'];
        }
        $this->elements[$attrs['name']] = $attrs;
        $this->elements[$attrs['name']]['typeClass'] = 'element';

        $this->xdebug("addElement " . $attrs['name']);
        $this->appendDebug($this->varDump($this->elements[$attrs['name']]));
    }
397162
public function spansColumns(array $columnNames)
    {
        $columns         = $this->getColumns();
        $numberOfColumns = count($columns);
        $sameColumns     = true;

        for ($i = 0; $i < $numberOfColumns; $i++) {
            if (isset($columnNames[$i]) && $this->trimQuotes(strtolower($columns[$i])) === $this->trimQuotes(strtolower($columnNames[$i]))) {
                continue;
            }

            $sameColumns = false;
        }

        return $sameColumns;
    }
148303
protected function _attr_type(&$attributes)
	{
		switch (strtoupper($attributes['TYPE']))
		{
			case 'TINYINT':
				$attributes['TYPE'] = 'SMALLINT';
				$attributes['UNSIGNED'] = FALSE;
				return;
			case 'MEDIUMINT':
				$attributes['TYPE'] = 'INTEGER';
				$attributes['UNSIGNED'] = FALSE;
				return;
			case 'INTEGER':
				$attributes['TYPE'] = 'INT';
				return;
			case 'BIGINT':
				$attributes['TYPE'] = 'INT64';
				return;
			default: return;
		}
	}
1349675
protected function _attr($attributes = [])
    {
        $attribute = '';

        if( is_array($attributes) )
        {
            foreach( $attributes as $key => $values )
            {
                if( is_numeric($key) )
                {
                    $key = $values;
                }

                $attribute .= ' '.$key.':'.$values.';';
            }
        }

        return $attribute;
    }