LeagueWrap\Dto\ImportStaticTrait::getStaticFields PHP Method

getStaticFields() protected method

Sets all the static fields in the current dto in the fields and aggrigates it with the child dto fields.
protected getStaticFields ( ) : array
return array
    protected function getStaticFields()
    {
        $splHash = spl_object_hash($this);
        $fields = [$splHash => []];
        foreach ($this->staticFields as $field => $data) {
            if (!isset($this->info[$field])) {
                continue;
            }
            $fieldValue = $this->info[$field];
            if (!isset($fields[$splHash][$data])) {
                $fields[$splHash][$data] = [];
            }
            $fields[$splHash][$data][] = $fieldValue;
        }
        $fields += parent::getStaticFields();
        return $fields;
    }