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;
    }