Collect the Script Features of the given objects

@return ScriptFeature[]
974713
public static function collect()
    {
        $params         = func_get_args();
        $scriptFeatures = array();
        foreach ($params as $object) {
            if ($object instanceof ScriptFeature) {
                $scriptFeatures = static::addScriptFeature($scriptFeatures, $object);
            } else if ($object instanceof ScriptFeatureable) {
                $scriptFeatures = static::addScriptFeature($scriptFeatures, $object->getScriptFeatures());
            } else if (is_array($object)) {
                foreach ($object as $subObject) {
                    $scriptFeatures = static::addScriptFeature($scriptFeatures, static::collect($subObject));
                }
            }
        }
        return $scriptFeatures;
    }
707080
public function featureImportances() : array
    {
        if (!$this->forest or !$this->featureCount) {
            return [];
        }

        $importances = array_fill(0, $this->featureCount, 0.);

        foreach ($this->forest as $tree) {
            foreach ($tree->featureImportances() as $column => $value) {
                $importances[$column] += $value;
            }
        }

        $k = count($this->forest);

        foreach ($importances as &$importance) {
            $importance /= $k;
        }

        return $importances;
    }
954237
public function toObjectArray() : array
    {
        if ($this->isEmpty()) {
            return [];
        }

        $skeleton = $this->_model;

        return array_map(function ($entry) use ($skeleton) {
            return Model::cloneResult($skeleton, $entry);
        }, $this->toArray());
    }
61752
protected function getObjectValues(object $object): array
    {
        $class = new ReflectionClass(get_class($object));
        $constructor = $class->getConstructor();
        if ($constructor instanceof ReflectionMethod) {
            foreach ($constructor->getParameters() as $parameter) {
                $name = $parameter->getName();

                $property = $class->getProperty($name);
                $property->setAccessible(true);

                $value = $property->getValue($object);
                if (is_object($value) === true) {
                    $value = $this->getObjectValues($value);
                }

                $data[$name] = $value;
            }
        }

        return $data ?? [];
    }
95693
function collect()
    {
        $output = [];
        $frontendController = $this->getTypoScriptFrontendController();
        if ($this->extGetFeAdminValue('cache', 'noCache')) {
            $theBytes = 0;
            $count = 0;
            if (!empty($frontendController->imagesOnPage)) {
                $tableArr[] = [$this->extGetLL('info_imagesOnPage'), count($frontendController->imagesOnPage), true];
                foreach ($GLOBALS['TSFE']->imagesOnPage as $file) {
                    $fs = @filesize($file);
                    $tableArr[] = [TAB . $file, GeneralUtility::formatSize($fs)];
                    $theBytes += $fs;
                    $count++;
                }
            }
            // Add an empty line
            $output[$this->extGetLL('info_imagesSize')] = GeneralUtility::formatSize($theBytes);
            $output[$this->extGetLL('info_DocumentSize')] = GeneralUtility::formatSize(strlen($frontendController->content));
            $output[''] = '';
        }

        $output[$this->extGetLL('info_id')] = $frontendController->id;
        $output[$this->extGetLL('info_type')] = $frontendController->type;
        $output[$this->extGetLL('info_groupList')] = $frontendController->gr_list;
        $output[$this->extGetLL('info_noCache')] = $this->extGetLL('info_noCache_' . ($frontendController->no_cache ? 'no' : 'yes'));
        $INTincScript = $frontendController->config['INTincScript'];
        $output[$this->extGetLL('info_countUserInt')] = is_array($INTincScript) ? count($INTincScript) : 0;

        if (!empty($frontendController->fe_user->user['uid'])) {
            $output[$this->extGetLL('info_feuserName')] = htmlspecialchars($frontendController->fe_user->user['username']);
            $output[$this->extGetLL('info_feuserId')] = htmlspecialchars($frontendController->fe_user->user['uid']);
        }

        $output[$this->extGetLL('info_totalParsetime')] = $this->getTimeTracker()->getParseTime() . ' ms';

        return $output;
    }
807584
public function getArrayCopy() : array
    {
        $values = get_object_vars($this);
        foreach ($values as $property => $value) {
            // Skip relations
            if (is_object($value)) {
                unset($values[$property]);
            }
        }

        return $values;
    }
278647
public static function addScriptFeature(array $scriptFeatures, $newScriptFeatures)
    {
        if (!$newScriptFeatures) {
            return $scriptFeatures;
        }
        if ($newScriptFeatures instanceof ScriptFeature) {
            if (!in_array($newScriptFeatures, $scriptFeatures, true)) {
                array_push($scriptFeatures, $newScriptFeatures);
            }
        } else if (is_array($newScriptFeatures)) {
            foreach ($newScriptFeatures as $newScriptFeature) {
                $scriptFeatures = static::addScriptFeature($scriptFeatures, $newScriptFeature);
            }
        }
        return $scriptFeatures;
    }
945161
public function scriptVariables()
    {
        $lang = trans('sleeping_owl::lang');
        if ($lang == 'sleeping_owl::lang') {
            $lang = trans('sleeping_owl::lang', [], 'en');
        }

        return [
            'debug' => config('app.debug'),
            'env' => $this->app->environment(),
            'locale' => $this->app['translator']->getLocale(),
            'url' => $this->app['url']->to('/'),
            'lang' => $lang,
            'wysiwyg' => $this->config['wysiwyg'],
            'template' => $this->app[TemplateInterface::class]->toArray(),
            'user_id' => auth()->id(),
        ];
    }
607359
public function addFeature(ScriptFeature $feature)
    {
        if (!in_array($feature, $this->features, true)) {
            array_push($this->features, $feature);
        }
        return $this;
    }
1040461
private function getContainerConfigObjects() : array
    {
        $config = (new ConfigAggregator($this->getConfigProviders()))->getMergedConfig();
        $containerConfigs = [];

        foreach ($this->getContainerConfigs() as $containerConfig)
        {
            $containerConfigs[] = new $containerConfig($config);
        }
        return $containerConfigs;
    }
628218
public function getScriptFiles()
	{
		$return = array();
		//$return = $this->coreScripts;
		//print_r($this->coreScripts);
		if(!empty($this->coreScripts)) {
			foreach($this->coreScripts as $key=>$val) {
				if((is_string($key) && $key != 'jquery') && is_array($val)) {
				//if((is_string($key)) && is_array($val))
					if($val['baseUrl'] != null)
						$return[] = /*$this->getProtocol()."://".Yii::app()->request->serverName.*/$val['baseUrl'].'/'.$val['js'][0];
					else 
						$return[] = /*$this->getProtocol()."://".Yii::app()->request->serverName.*/$this->getCoreScriptUrl().'/'.$val['js'][0];
				}
			}
		}
		//echo '===========================================';
		
		//$return = $this->scriptFiles;
		//print_r($this->scriptFiles);
		if(!empty($this->scriptFiles)) {
			foreach($this->scriptFiles as $key=>$val) {
				if((is_string($key)) || is_array($val)) {
					if(!empty($val)) {
						foreach($val as $key=>$row)
							if($key == $row || $row==null)
								$return[] = /*$this->getProtocol()."://".Yii::app()->request->serverName.*/$key;
					}
				}
			}
		}
		return $return;
	}
849311
def features(self):
        """"""

        r = []
        for _, inter in self.props.items():
            if isinstance(inter, tuple):
                if (inter[0] and inter[1] and inter[0].getValue() == inter[1].getValue() and
                        inter[0].operator == "=" and inter[1].operator == "="):
                    r.append(inter[0])
                else:
                    r.extend([f for f in inter if f])
            elif isinstance(inter, dict):
                r.extend(inter.values())
            elif isinstance(inter, list):
                r.extend(inter)
            else:
                r.append(inter)
        return r
122525
public function getUnloadedAspects(): array
    {
        $unloadedAspects = [];

        foreach ($this->container->getByTag('aspect') as $aspect) {
            if (!isset($this->loadedAspects[get_class($aspect)])) {
                $unloadedAspects[] = $aspect;
            }
        }

        return $unloadedAspects;
    }
1024252
public static function objects()
    {
        //====================================================================//
        // Check if Object Manager is Overriden
        if (self::local() instanceof ObjectsProviderInterface) {
            return self::local()->objects();
        }
        $objectsList = array();
        //====================================================================//
        // Safety Check => Verify Objects Folder Exists
        $path = self::getLocalPath().'/Objects';
        if (!is_dir($path)) {
            return $objectsList;
        }
        //====================================================================//
        // Scan Local Objects Folder
        $scan = scandir($path, 1);
        if (false == $scan) {
            return $objectsList;
        }
        //====================================================================//
        // Scan Each File in Folder
        $files = array_diff($scan, array('..', '.', 'index.php', 'index.html'));
        foreach ($files as $filename) {
            //====================================================================//
            // Verify Filename is a File (Not a Directory)
            if (!is_file($path.'/'.$filename)) {
                continue;
            }
            //====================================================================//
            // Extract Class Name
            $className = pathinfo($path.'/'.$filename, PATHINFO_FILENAME);
            //====================================================================//
            // Verify ClassName is a Valid Object File
            if (false == self::validate()->isValidObject($className)) {
                continue;
            }
            $objectsList[] = $className;
        }

        return $objectsList;
    }
1211203
private function getElementsToProcess(): array
    {
        $result = [];

        foreach (get_object_vars($this) as $element) {
            if ($element instanceof FormElementInterface) {
                $result[] = $element;
            }
        }

        $result = array_merge($result, $this->extraElements);

        return $result;
    }
619880
public function getTags(): array
    {
        $tsfe = $this->getTsfe();
        if (!($tsfe instanceof TypoScriptFrontendController)) {
            return [];
        }

        return \array_unique((array)ObjectAccess::getProperty($tsfe, 'pageCacheTags', true));
    }
1023257
protected function getObjectProperties(array $objects): array
    {
        $objectProperties = [];
        /** @var ITypedObject[] $objects */
        foreach ($objects as $key => $object) {
            $objectProperties[$key] = $object->toArray();
        }

        return $objectProperties;
    }