Returns the complete nested version of the source array.

@return array
191673
public function nested()
    {
        if ($this->nestedCache === null) {
            $this->nestedCache = static::toNested($this->array, $this->separator);
        }

        return $this->nestedCache;
    }
667982
public function all(): array
    {
        $out = [];
        foreach (parent::all() as $key => $props) {
            $out[$props['originalKey']] = $props['value'];
        }

        return $out;
    }
831787
protected function getKeyAsArray()
    {
        $result = [];
        if ( ! empty( $this->compositeKey )) {
            foreach ($this->compositeKey as $key) {
                $result[$key] = $this->{$key};
            }
        } else {
            $result[$this->getKeyName()] = $this->getKey();
        }

        return $result;
    }
1053640
private function getDuplicates(): array
  {
    // First pass make lookup table by method_name.
    $lookup = [];
    foreach ($this->sources as $source)
    {
      if (isset($source['method_name']))
      {
        if (!isset($lookup[$source['method_name']]))
        {
          $lookup[$source['method_name']] = [];
        }

        $lookup[$source['method_name']][] = $source;
      }
    }

    // Second pass find duplicate sources.
    $duplicates_sources = [];
    $duplicates_methods = [];
    foreach ($this->sources as $source)
    {
      if (sizeof($lookup[$source['method_name']])>1)
      {
        $duplicates_sources[$source['path_name']]   = $source;
        $duplicates_methods[$source['method_name']] = $lookup[$source['method_name']];
      }
    }

    return [$duplicates_sources, $duplicates_methods];
  }
1023830
public function getRenderablesRecursively()
    {
        $renderables = [];
        foreach ($this->renderables as $renderable) {
            $renderables[] = $renderable;
            if ($renderable instanceof CompositeRenderableInterface) {
                $renderables = array_merge($renderables, $renderable->getRenderablesRecursively());
            }
        }
        return $renderables;
    }
893197
public function getSubs()
    {
        
        $r = self::getDbConnection()->query('
        	SELECT A.*, B.level 
        	FROM dir_data A, dir_structure B, dir_structure C
        	WHERE A.id=B.data_id and C.data_id='.$this->id.' and B.lft BETWEEN C.lft and C.rght');
        	
		$result = [];
			
        while ($f = $r->fetch()) {
            $c = Catalog::fetch($f);
            $result[] = $c->prototype->id;
        }
                    
        return $result;
    }
404113
public function getData()
    {
        $data = $this->context->data;
        $result = [
            'version' => 3,
            'file' => $data['file'] ?: '',
            'sourceRoot' => $data['sourceRoot'] ?: '',
            'sources' => $this->sources->getNames(),
            'names' => $this->names->getNames(),
            'mappings' => $this->context->getMappings()->pack(),
        ];
        $contents = $this->sources->getContents();
        if (!empty($contents)) {
            $result['sourcesContent'] = $contents;
        }
        return $result;
    }
417298
public function toArray()
	{
		$list = parent::toArray();

		$list[$this->_prefix . 'parentid'] = $this->getParentId();
		$list[$this->_prefix . 'typeid'] = $this->getTypeId();
		$list[$this->_prefix . 'type'] = $this->getType();
		$list[$this->_prefix . 'domain'] = $this->getDomain();
		$list[$this->_prefix . 'refid'] = $this->getRefId();
		$list[$this->_prefix . 'datestart'] = $this->getDateStart();
		$list[$this->_prefix . 'dateend'] = $this->getDateEnd();
		$list[$this->_prefix . 'config'] = $this->getConfig();
		$list[$this->_prefix . 'position'] = $this->getPosition();
		$list[$this->_prefix . 'status'] = $this->getStatus();

		return $list;
	}
763420
public function getAll()
    {
        $all = parent::getAll();
        $res = [];
        foreach ($all as $key => $raw) {
            $res[$key] = $raw['value'];
        }

        return $res;
    }
1361613
public function getTree(): array
    {
        $tree = [];
        $size = count($this->segments);

        for ($index = 0; $index < $size; $index = $index + 1) {
            $temp = array_slice($this->segments, 0, $index + 1);
            $path = implode(DIRECTORY_SEPARATOR, $temp);

            $tree[] = Path::normalize($path);
        }

        return $tree;
    }
1192003
public function toArray()
    {
        return [
            'required'      => $this->isRequired(),
            'hidden'        => $this->isHidden(),
            'persistent'    => $this->isPersistent(),
            'whenReplicate' => $this->getWhenReplicate()->toArray(),
            'whenPatch'     => $this->getWhenPatch()->toArray(),
        ];
    }
854857
public function getDefAsArray()
    {
        return array_replace(
            $this->element->getDefAsArray(),
            [
                'name'              => $this->getName(),
                'type'              => $this->getType(),
                'doctrineType'      => $this->getTypeDoctrine(),
                'serializerType'    => $this->getTypeSerializer()
            ],
            $this->getHashAnonymousHashRequired()
        );
    }
737596
public function AllSuccessArray() {
        $r=array();
        foreach($this->items as $v) {
            $r=array_merge($r,$v->allSuccess());
        }
        return $r;
    }
1049393
public function nest()
    {
        $parentColumn = $this->parentColumn;
        if (!$parentColumn) {
            return $this;
        }

        // Set id as keys.
        $this->items = $this->getDictionary();

        $keysToDelete = [];

        // Add empty collection to each items.
        $collection = $this->each(function ($item) {
            if (!$item->{$this->childrenName}) {
                $item->{$this->childrenName} = app()->make('Illuminate\Support\Collection');
            }
        });

        // Remove items with missing ancestor.
        if ($this->removeItemsWithMissingAncestor) {
            $collection = $this->reject(function ($item) use ($parentColumn) {
                if ($item->$parentColumn) {
                    $missingAncestor = $this->anAncestorIsMissing($item);

                    return $missingAncestor;
                }
            });
        }

        // Add items to children collection.
        foreach ($collection->items as $key => $item) {
            if ($item->$parentColumn && isset($collection[$item->$parentColumn])) {
                $collection[$item->$parentColumn]->{$this->childrenName}->push($item);
                $keysToDelete[] = $item->id;
            }
        }

        // Delete moved items.
        $this->items = array_values(Arr::except($collection->items, $keysToDelete));

        return $this;
    }
1343556
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'created_at'  => $this->created_at(),
            'updated_at'  => $this->updated_at(),
            'verified_at' => $this->verified_at(),
        ]);
    }
1235267
public function getLastLevelOfdataTypes()
    {
        $dataTypes = $this->getDataTypes();
        $lastLevel = array();
        foreach ($dataTypes as $key1 => $value1) {
            if (! array_key_exists('children', $value1))
                $lastLevel[$key1] = $value1;
            else
                foreach ($value1['children'] as $key2 => $value2)
                    $lastLevel[$key2] = $value2;
        }
        return $lastLevel;
    }
299521
public function get_versions() {
        if ($this->versions === null) {
            $policyid = $this->get_policy_id_filter();
            $versionid = $this->get_version_id_filter();
            $this->versions = [];
            foreach ($this->get_avaliable_policies() as $policy) {
                if ($policyid && $policy->id != $policyid) {
                    continue;
                }
                if ($versionid) {
                    if (array_key_exists($versionid, $policy->versions)) {
                        $this->versions[$versionid] = $policy->versions[$versionid];
                        break; // No need to keep searching.
                    }
                } else if ($policy->currentversion) {
                    $this->versions[$policy->currentversion->id] = $policy->currentversion;
                }
            }
        }
        return $this->versions;
    }