Returns a type name of this attribute.

This type names can be implementation specific but should at least include the php types:
integer, string, boolean, float/double, datetime.

@param string $attributeName

@return string
346367
public function getTypeOfAttribute($attributeName)
    {
        return isset($this->propertyMetadata[$attributeName]) ?
            $this->propertyMetadata[$attributeName]->type : null;
    }
783564
final private static function getColumnType($fieldName) {
		
		$db = Database::getInstance();
		$column = $db->describeColumn(static::TABLE_NAME, $fieldName);
		
		if (is_null($column)) {
			return NULL;
		}
		
		// split the column Type to recognize field type and length
		preg_match('#^([\w]+)(\([^\)]+\))? ?(unsigned)?#i', $column->Type, $matches);
		
		$field = new \stdClass();
		
		$field->name	= $fieldName;
		$field->type	= $matches[1];
		$field->unsigned= (isset($matches[3]));
		$field->nullable= 'YES' == $column->Null ? TRUE : FALSE;
		$field->key		= $column->Key;
		$field->default	= $column->Default;
		$field->extra	= $column->Extra;

		if (isset($matches[2])) {
			if (in_array($field->type, ['enum','set'])) {
				$field->length = explode("','", substr($matches[2], 2, -2));
			} else {
				$field->length = explode(",", substr($matches[2], 1, -1));
			}
		} else {
			$field->length = NULL;
		}
		
		return $field;
		
	}
335456
public function getColumnType($tableName, $columnName) {
        $columns = $this->getTableColumns($tableName);
        foreach ($columns as $column) {
            if ($column['Field'] != $columnName)
                continue;
            $type = explode('(', $column['Type'], 2);
            return $type[0];
        }
        throw new \Exception("Column `$columnName` not found in table `$tableName`!");
    }
1097807
public function getTypeName()
    {
        if (isset($this->resourceType)) {
            return $this->resourceType;
        }
        $classInfo = explode("\\", get_class($this));
        return end($classInfo);
    }
784257
public Integer getIntObject(String attributeName) {
        String val = get(attributeName, null);
        if (val != null) {
            return Integer.valueOf(val);
        }
        return null;
    }
994542
public function getAttribute($attributeName)
    {
        // init
        $result = null;

        // action
        foreach ($this->attributes as $attribute) {
            if ($attribute->Name == $attributeName) {
                $result = $attribute;
                break;
            }
        }

        // --- result ---
        return $result;
    }
1020481
function attribute( $attributeName /*, $attributeList = false*/ )
    {
        if ( in_array( $attributeName,
                       array( 'development',
                              'name', 'summary', 'description',
                              'vendor', 'vendor-dir', 'priority', 'type',
                              'extension', 'source',
                              'version-number', 'release-number', 'release-timestamp',
                              'maintainers', 'documents', 'groups',
                              'simple-file-list', 'file-list',
                              'changelog', 'dependencies',
                              'install', 'uninstall',
                              'install_type',
                              'licence', 'state', 'settings-files' ) ) )
            return $this->Parameters[$attributeName];
        else if ( $attributeName == 'is_installed' )
            return $this->isInstalled;
        else if ( $attributeName == 'ezpublish-version' )
            return $this->Parameters['ezpublish']['version'];
        else if ( $attributeName == 'ezpublish-named-version' )
            return $this->Parameters['ezpublish']['named-version'];
        else if ( $attributeName == 'packaging-timestamp' )
            return $this->Parameters['packaging']['timestamp'];
        else if ( $attributeName == 'packaging-host' )
            return $this->Parameters['packaging']['host'];
        else if ( $attributeName == 'packaging-packager' )
            return $this->Parameters['packaging']['packager'];
        else if ( $attributeName == 'can_read' )
        {
            return $this->canRead();
        }
        else if ( $attributeName == 'can_export' )
        {
            return $this->canExport();
        }
        else if ( $attributeName == 'can_import' )
        {
            return $this->canImport();
        }
        else if ( $attributeName == 'can_install' )
        {
            return $this->canInstall();
        }
        else if ( $attributeName == 'file-count' )
        {
            return $this->fileCount();
        }
        else if ( $attributeName == 'thumbnail-list' )
        {
            return $this->thumbnailList( 'default' );
        }
        else if ( $attributeName == 'is_local' )
        {
            $repositoryInformation = $this->currentRepositoryInformation();
            return ( $repositoryInformation['type'] == 'local' );
        }

        eZDebug::writeError( "No such attribute: $attributeName for eZPackage", __METHOD__ );
        return null;
    }
14108
function attribute( $attributeName )
    {
        if ( in_array( $attributeName,
                       array( 'alternative_text',
                              'original_filename',
                              'is_valid' ) ) )
        {
            return $this->attributeFromOriginal( $attributeName );
        }
        $aliasName = $attributeName;
        return $this->imageAlias( $aliasName );
    }
969781
protected function getTypeForClassName($className)
    {
        if (empty($this->rootNamespace)) {
            return $className;
        }
        return $this->stripNamespace($this->rootNamespace, $className);
    }
563003
protected function _registerType($typename)
    {
        // Known type - return its AS name
        if (isset($this->_typesMap[$typename])) {
            return $this->_typesMap[$typename];
        }

        // Standard types
        if (in_array($typename, array('void', 'null', 'mixed', 'unknown_type'))) {
            return 'Unknown';
        }

        // Arrays
        if ('array' == $typename) {
            return 'Unknown[]';
        }

        if (in_array($typename, array('int', 'integer', 'bool', 'boolean', 'float', 'string', 'object', 'Unknown', 'stdClass'))) {
            return $typename;
        }

        // Resolve and store AS name
        $asTypeName = $this->_phpTypeToAS($typename);
        $this->_typesMap[$typename] = $asTypeName;

        // Create element for the name
        $typeEl = $this->_xml->createElement('type');
        $typeEl->setAttribute('name', $asTypeName);
        $this->_addClassAttributes($typename, $typeEl);
        $this->_types->appendChild($typeEl);

        return $asTypeName;
    }
160143
public function getAsActualType($key)
    {
        $type = $this->getType($key);
        $value = null;
        switch ($type) {
            case self::BOOLEAN: {
                $value = $this->getBoolean($key);
                break;
            }
            case self::INT: {
                $value = $this->getInt($key);
                break;
            }
            case self::FLOAT: {
                $value = $this->getFloat($key);
                break;
            }
            case self::STRING: {
                $value = $this->getString($key);
                break;
            }
            case self::DATE: {
                $value = $this->getDate($key);
                break;
            }
            case self::XML: {
                $value = $this->getXML($key);
                break;
            }
            case self::DATA: {
                $value = $this->getData($key);
                break;
            }
            case self::DATA_ARRAY: {
                $value = $this->getArray($key);
                break;
            }
            case self::OBJECT: {
                $value = $this->getArray($key);
                break;
            }
        }

        return $value;
    }
560273
protected function formatAttribute($attributeName)
    {
        if (in_array($attributeName, $this->camelizedAttributes)) {
            return preg_replace_callback(
                '/(^|_|\.)+(.)/', function ($match) {
                    return ('.' === $match[1] ? '_' : '').strtoupper($match[2]);
                }, $attributeName
            );
        }

        return $attributeName;
    }
742568
private function getType($value): string
    {
        if (is_array($value)) {
            if ($value !== array_values($value)) {
                return self::DATATYPE_OBJECT;
            }

            return self::DATATYPE_ARRAY;
        }

        if (is_bool($value)) {
            return self::DATATYPE_BOOLEAN;
        }

        if (is_string($value)) {
            return self::DATATYPE_STRING;
        }

        if (is_int($value) || is_float($value)) {
            return self::DATATYPE_NUMBER;
        }

        if (null === $value) {
            return self::DATATYPE_NULL;
        }

        throw new \InvalidArgumentException(
            sprintf(
                'Value needs to be of type array|bool|string|int|float|null, %s given',
                is_object($value) ? get_class($value) : gettype($value)
            )
        );
    }
118935
protected function getType($value)
    {
        if (is_object($value)) {
            return get_class($value);
        } else {
            return gettype($value) === 'double' ? 'float' : gettype($value);
        }
    }
480941
public function getAttribute(string $attributeName) : array
    {
        if ($this->isEmpty()) {
            return [];
        }

        $entries = $this->toArray();
        if (!array_key_exists($attributeName, $entries[0])) {
            throw new InvalidAttributeException($attributeName);
        }

        return array_column($entries, $attributeName);
    }
969879
public static function transformToValidMemberName($attributeName)
    {
        $attributeName = \str_replace(self::$forbiddenMemberNameCharacters, '', $attributeName);

        $attributeName = \ltrim($attributeName, \implode('', self::$forbiddenAsFirstOrLastCharacter));
        $attributeName = \rtrim($attributeName, \implode('', self::$forbiddenAsFirstOrLastCharacter));

        return $attributeName;
    }
997964
protected function getTypeOf($value): string
    {
        $type = gettype($value);

        switch ($type) {
            case 'integer':
            case 'boolean':
            case 'string':
                return $type;
            case 'double':
                return 'float';
            case 'array':
                return count(array_filter(array_keys($value), 'is_string')) > 0 ? 'assoc' : 'array';
            case 'object':
                return $value instanceof Traversable ? 'array' :
                    ($value instanceof DateTime ? DateTime::class : 'object');
            default:
                return $type;
        }
    }