/*!
\return an array of attributes of the information collection by identifier.

Fetches information collection attributes and indexes by the
content class attribute identifier.
359951
function dataMap()
    {
        // Retrieve the indexed information collection attributes
        $informationCollectionAttributes = $this->informationCollectionAttributes();

        $retArray = array();

        // Loop through each attribute hashing the array with the
        // class attribute identifier associated with the information
        // collection attribute
        foreach ( $informationCollectionAttributes as $informationAttribute )
        {
            $contentClassAttribute = $informationAttribute->attribute( 'contentclass_attribute' );
            $id = $contentClassAttribute->attribute( 'identifier' );
            $retArray[$id] = $informationAttribute;
        }

        return $retArray;
    }
504992
public function getAttributes()
    {
        if ($this->_aAttributes === null) {
            // all attributes this article has
            $aArtAttributes = $this->getProduct()->getAttributes();

            //making a new array for backward compatibility
            $this->_aAttributes = false;

            if (count($aArtAttributes)) {
                foreach ($aArtAttributes as $sKey => $oAttribute) {
                    $this->_aAttributes[$sKey] = new stdClass();
                    $this->_aAttributes[$sKey]->title = $oAttribute->oxattribute__oxtitle->value;
                    $this->_aAttributes[$sKey]->value = $oAttribute->oxattribute__oxvalue->value;
                }
            }
        }

        return $this->_aAttributes;
    }
1255232
function objectAttributeContent( $contentObjectAttribute )
    {
        $dataText = $contentObjectAttribute->attribute( self::CLASS_LIST_FIELD );

        $content = array(
            "classes" => array(),
            "class_identifiers" => array(),
            "class_ids" => array()
        );

        if ( !empty( $dataText ) )
        {
            $classIdentifiers = explode( ",", $dataText );

            foreach ( $classIdentifiers as $classIdentifier )
            {
                $class = eZContentClass::fetchByIdentifier( $classIdentifier );
                if ( $class instanceof eZContentClass )
                {
                    $content["classes"][] = $class;
                    $content["class_identifiers"][] = $classIdentifier;
                    $content["class_ids"][] = (int) $class->attribute( "id" );
                }
            }
        }

        return $content;
    }
789339
public function getConnectionsAttribute()
    {
        $response = $this->discord->request(
            'GET',
            $this->discord->getConnectionsEndpoint(),
            $this->token
        );

        $collection = new Collection();

        foreach ($response as $raw) {
            $collection->push(
                $this->discord->buildPart(Connection::class, $this->token, $raw)
            );
        }

        return $collection;
    }
1153627
public function getAttributes()
    {
        if ($this->cachedAttributes != null) {
          return $this->cachedAttributes;
        }

        $entries = $this->_queryAssertion('/saml:AttributeStatement/saml:Attribute');
        $this->cachedAttributes = array();

        /** $entry DOMNode */
        foreach ($entries as $entry) {
            $attributeName = $entry->attributes->getNamedItem('Name')->nodeValue;

            // Keep only one value for each entry type
            foreach ($entry->childNodes as $childNode) {
                if (is_a($childNode, 'DOMElement') && preg_match('/AttributeValue/',$childNode->tagName)){
                    $attributeValue = $childNode->nodeValue;
                }
            }

            $this->cachedAttributes[$attributeName] = $attributeValue;
        }
        return $this->cachedAttributes;
    }
546104
public function getAttributes()
    {
        $data = @ldap_get_attributes($this->connection, $this->entry);

        $result = array();

        for ($i = 0; $i < $data['count']; $i++) {
            $key = $data[$i];
            $result[$key] = array();
            for ($j = 0; $j < $data[$key]['count']; $j++) {
                $result[$key][] = $data[$key][$j];
            }
        }

        return $result;
    }
646820
public static function contentClassIDs()
    {
        $userContentClassIDs = array();

        $ini = eZINI::instance( 'content.ini' );
        $userDatatypes = $ini->variable( "DataTypeSettings", "UserDataTypes" );

        $userContentClassIDs = array();
        foreach ( $userDatatypes as $datatypeIdentifier )
        {
            $userContentClassIDs = array_merge( $userContentClassIDs, eZContentClass::fetchIDListContainingDatatype( $datatypeIdentifier ) );
        }

        return $userContentClassIDs;
    }
1333028
function contentClassAttributeIdentifier()
    {
        if ( $this->ContentClassAttributeIdentifier === null )
        {
            $this->ContentClassAttributeIdentifier = eZContentClassAttribute::classAttributeIdentifierByID( $this->ContentClassAttributeID );
        }

        return $this->ContentClassAttributeIdentifier;
    }
1199808
function getAttributes($csr = null)
    {
        if (empty($csr)) {
            $csr = $this->currentCert;
        }

        $attributes = $this->_subArray($csr, 'certificationRequestInfo/attributes');
        $attrs = array();

        if (is_array($attributes)) {
            foreach ($attributes as $attribute) {
                $attrs[] = $attribute['type'];
            }
        }

        return $attrs;
    }
666090
function attributes()
    {
        $attributes = array();
        $item = $this->InternalAttributes['item'];
        if ( is_array( $item ) )
        {
            $attributes = array_keys( $item );
        }
        else if ( is_object( $item ) and
                  method_exists( $item, 'attributes' ) )
        {
            $attributes = $item->attributes();
        }
        $attributes = array_merge( $this->InternalAttributes, $attributes );
        $attributes = array_unique( $attributes );
        return $attributes;
    }
460056
public function collectData($attributes = null)
    {
        $data = [];
        foreach ($this->models as $model) {
            if ($this->dataCollector instanceof Closure) {
                list($key, $row) = call_user_func($this->dataCollector, $model, $this);
            } else {
                $key = $model->getPrimaryKey();
                $row = $model->getAttributes($attributes);
            }

            if ($key) {
                $data[$key] = $row;
            } else {
                $data[] = $row;
            }
        }

        return $data;
    }
946238
function &generateClassIDArray()
    {
        $classIDArray = array();
        foreach( $this->NodeObjectArray as $nodeObject )
        {
            $contentObject = $nodeObject->object();
            $classIDArray[] = $contentObject->attribute( 'contentclass_id' );
        }
        $classIDArray = array_unique( $classIDArray );
        return $classIDArray;
    }
260217
public function getSetCollectionAttributes()
    {
        $category = $this->vObj->getObjectAttributeCategory();
        $values = $category->getAttributeValues($this->vObj);
        $attribs = [];
        foreach ($values as $value) {
            $attribs[] = $value->getAttributeKey();
        }

        return $attribs;
    }
1190951
function objectAttributeContent( $contentObjectAttribute )
    {
        $content = $contentObjectAttribute->attribute( "data_text" );
        if ( trim( $content ) == '' )
        {
            $contentClassAttribute = $contentObjectAttribute->contentClassAttribute();
            $content = eZIdentifierType::generateIdentifierString( $contentClassAttribute, false );
        }
        return $content;
    }
1147401
public function getMentionsAttribute()
    {
        $users = new Collection([], 'id');

        foreach ($this->attributes['mentions'] as $mention) {
            $users->push($this->factory->create(User::class, $mention, true));
        }

        return $users;
    }
337147
function contentClassAttributeIsInformationCollector()
    {
        if ( $this->ContentClassAttributeIsInformationCollector === null )
        {
            eZDebug::accumulatorStart( 'class_a_is_ic', 'Sytem overhead', 'Fetch class attribute name' );

            $classAttribute = eZContentClassAttribute::fetch( $this->ContentClassAttributeID );
            $this->ContentClassAttributeIsInformationCollector = $classAttribute->attribute( 'is_information_collector' );
            eZDebug::accumulatorStop( 'class_a_is_ic' );
        }

        return $this->ContentClassAttributeIsInformationCollector;
    }
129894
public function getAttributes()
    {
        //select all the Attributes from table
        $this->result = DB::select(DB::raw('show columns from `'.$this->table.'`;'));
        //delete the first element.(ignore the id section)
        unset($this->result[0]);
        //get result
        return $this->result;
    }