FML/Script/Features/ScriptFeature.php
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;
    }
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;
    }
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 ; }
Collect the Script Features of the given objects

@return ScriptFeature[]
Collect the Script Features of the given objects