Returns all attributes as new MutableList

@param bool $asAssoc
@return array
488150
public function getArray($asAssoc = true)
    {
        // get all attribute names
        $attributes = $this->keys();
        $values = [];

        if (!empty($attributes)) {
            foreach ($attributes as $attribute) {
                $value = $this->get($attribute, false);

                if ($asAssoc === true) {
                    $values[$attribute] = $value;
                } else {
                    $values[] = $value;
                }
            }
        }

        return $values;
    }
839675
public function getManipulatedData(GridField $gridField, SS_List $dataList)
    {
        $state = $gridField->State->MockDataGenerator;
        $count = (string) $state->Count;
        if (!$count) {
            return $dataList;
        }
        $generator = new MockDataBuilder($gridField->getModelClass());
        $ids = $generator
            ->setCount($count)
            ->setIncludeRelations($state->IncludeRelations)
            ->setDownloadImages($state->DownloadImages === true)
            ->generate();

        foreach ($ids as $id) {
            $dataList->add($id);
        }

        return $dataList;
    }
476853
public function getAttributes( $nsPrefix = NULL )
	{
		$list	= array();
		foreach( $this->attributes( $nsPrefix, TRUE ) as $name => $value )
			$list[$name]	= (string) $value;
		return $list;
	}
538481
public function getMappedAttributes()
    {
        $mappedArrayForApiRequest = [];
        $requestAttributes = $this->request->getData();
        foreach ($requestAttributes as $key => $value) {
            if (array_key_exists($key, $this->mappingRequestToOtherRequestAttributes)) {
                $mappedArrayForApiRequest[$this->mappingRequestToOtherRequestAttributes[$key]] = $value;
            }
        }

        return $mappedArrayForApiRequest;
    }
530856
public function getAttributes()
    {
        $sActCat = $this->getId();

        $sKey = md5($sActCat . serialize(\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('session_attrfilter')));
        if (!isset(self::$_aCatAttributes[$sKey])) {
            $oAttrList = oxNew(\OxidEsales\Eshop\Application\Model\AttributeList::class);
            $oAttrList->getCategoryAttributes($sActCat, $this->getLanguage());
            self::$_aCatAttributes[$sKey] = $oAttrList;
        }

        return self::$_aCatAttributes[$sKey];
    }
783261
public function toArray($asAlias = false, $returnHidden = true) {

        $method = $asAlias ? "getAlias" : "getProperty";

        $dados = [];

        foreach (self::$schema->getProperties() as $item) {

            if (!$returnHidden && $item->getBehavior()->isHidden()) {
                continue;
            }

            if (method_exists($this, "get" . $item->getProperty())) {
                $value = $this->{"get" . $item->getProperty()}();
            } else {
                $value = $this->{$item->getProperty()};
            }

            if (is_null($value)) {
                continue;
            }

            if(is_array($value)){
                $dados[$item->{$method}()] = [];

                foreach ($value as $valueItem) {
                    $valueItem = is_object($valueItem) ? $valueItem->toArray($asAlias, $returnHidden) : $valueItem;

                    $dados[$item->{$method}()][] = $valueItem;
                }

                continue;
            }

            switch ($item->getType()) {
                case 'json':
                    $decoded = json_decode($value, true);

                    $dados[$item->{$method}()] = !empty($decoded) ? $decoded : $value;
                    break;
                default:
                    $value = is_object($value) ? $value->toArray($asAlias, $returnHidden) : $value;

                    $dados[$item->{$method}()] = $value;
                    break;
            }
        }

        return $dados;
    }
1366557
public function getList($list)
    {
        if (isset(self::$refs[$list])) {
            self::$refs[$list]['counter']++;
            return \Erebot\Module\Wordlists\Proxy(
                self::$refs[$list]['instance']
            );
        }

        $lists = $this->getAvailableLists();
        if (!in_array($list, $lists)) {
            throw new \Erebot\Module\Wordlists\BadListNameException($list);
        }

        $listObject = new \Erebot\Module\Wordlists\Wordlist(
            $this,
            $list,
            self::$cache[$list]
        );

        self::$refs[$list] = array(
            'counter'   => 1,
            'instance'  => $listObject,
        );
        return new \Erebot\Module\Wordlists\Proxy($listObject);
    }
662171
public function &GetFieldShopBundleArticleList()
    {
        $oBundleList = parent::GetFieldShopBundleArticleList();
        if (0 == $oBundleList->Length() && $this->IsVariant()) {
            $oBundleList = $this->GetFieldVariantParent()->GetFieldShopBundleArticleList();
        }
        $oBundleList->bAllowItemCache = true;

        return $oBundleList;
    }
1254898
public function actionList ()
		{
			$class = $this->_modelClass;
			$list = $class::find()->select('name,value,description')->orderBy([ 'name' => SORT_ASC ])->asArray()->all();
			Console::printTable($list, [ 'Name', 'Value', 'Description' ]);
		}
894607
private function getAttributes(SamlSpResponseToken $token)
    {
        if (null === $this->attributeMapper) {
            return [];
        }

        $attributes = $this->attributeMapper->getAttributes($token);

        if (false === is_array($attributes)) {
            throw new \LogicException('Attribute mapper must return array');
        }

        return $attributes;
    }
787527
public function asArray()
    {
        $array = [];
        $properties = (new \ReflectionClass($this))
            ->getProperties(ReflectionProperty::IS_PUBLIC);

        foreach ($properties as $object) {
            $value = $object->getValue($this);
            if (!isset($value)) {
                continue;
            }
            $property = $object->getName();

            if (!empty($this->mappings)
                && isset($this->mappings[$property])) {
                $property = $this->mappings[$property];
            }

            $array[$property] = $value;
        }

        return new \ArrayIterator($array);
    }
58691
private function getTranslationData(MutableBag $tr)
    {
        $translation = new TranslationFile($this->app, $tr->get('domain'), $tr->get('locale'));

        list($tr['path'], $tr['shortPath']) = $translation->path();
        $tr->set('writeallowed', $translation->isWriteAllowed());

        $this->app['logger.system']->info('Editing translation: ' . $tr->get('shortPath'), ['event' => 'translation']);

        return ['contents' => $translation->content()];
    }
389699
public static function skins($sModule, $sSubType = ''): array
    {
        $aSkins = static::filter('skin');
        $aOut   = [];

        foreach ($aSkins as $oSkin) {

            //  Provide a url field for the skin
            if (Functions::isPageSecure()) {
                $oSkin->url = SECURE_BASE_URL . $oSkin->relativePath;
            } else {
                $oSkin->url = BASE_URL . $oSkin->relativePath;
            }

            if ($oSkin->forModule == $sModule) {
                if (!empty($sSubType) && $sSubType == $oSkin->subType) {
                    $aOut[] = $oSkin;
                } elseif (empty($sSubType)) {
                    $aOut[] = $oSkin;
                }
            }
        }

        return $aOut;
    }
550579
public function serialize(Scorm $scorm)
    {
        return [
            'id' => $scorm->getUuid(),
            'version' => $scorm->getVersion(),
            'hashName' => $scorm->getHashName(),
            'ratio' => $scorm->getRatio(),
            'scos' => $this->serializeScos($scorm),
        ];
    }
407642
public function getSortTable(SS_List $list)
    {
        $field = $this->getSortField();
        if ($list instanceof ManyManyList) {
            $extra = $list->getExtraFields();
            $table = $list->getJoinTable();
            if ($extra && array_key_exists($field, $extra)) {
                return $table;
            }
        } elseif ($list instanceof ManyManyThroughList) {
            return $this->getManyManyInspector($list)->getJoinAlias();
        }
        $classes = ClassInfo::dataClassesFor($list->dataClass());
        foreach ($classes as $class) {
            if (singleton($class)->hasDataBaseField($field)) {
                return DataObject::getSchema()->tableName($class);
            }
        }
        throw new Exception("Couldn't find the sort field '$field'");
    }
238041
public function getExtension($asArray = false)
    {
        $asArray   = (bool) $asArray;
        $extension = (string) $this->_extension;
        if ($asArray) {
            $extension = explode(',', $extension);
        }

        return $extension;
    }
590907
public function attributesToArray()
	{
		$attributes = $this->getArrayableAttributes();

		// We want to spin through all the mutated attributes for this model and call
		// the mutator for the attribute. We cache off every mutated attributes so
		// we don't have to constantly check on attributes that actually change.
		foreach ($this->getMutatedAttributes() as $key)
		{
			if ( ! array_key_exists($key, $attributes)) continue;

			$attributes[$key] = $this->mutateAttribute(
				$key, $attributes[$key]
			);
		}

		// Here we will grab all of the appended, calculated attributes to this model
		// as these attributes are not really in the attributes array, but are run
		// when we need to array or JSON the model for convenience to the coder.
		foreach ($this->appends as $key)
		{
			$attributes[$key] = $this->mutateAttribute($key, null);
		}

		return $attributes;
	}