Generate the static data for AniCollection
@author Dariel Noel <darielnoel@gmail.com>
@since  2015-03-10
@return {[type]}   [description]
967532
function () {

    var categories = grunt.file.readJSON('config/grunt/available-animations.json'),
      category, files, file,
      target = [ 'source/_base.css' ],
      count = 0,
      categoryCount = 0,
      dbCategoryList = [];

    for ( category in categories ) {
      // examp: category = 'attention_seekers'
      if ( categories.hasOwnProperty(category) ) {
        files = categories[category];
        dbCategoryList[categoryCount] = makeCategoryObject(category);
        // specif animation
        for (file in files) {
          if ( files.hasOwnProperty(file) && files[file] ) {
            dbCategoryList[categoryCount].animationList.push({name:file});
            createAnimationObject(category, file);
            count += 1;
          }
        }
      }
      categoryCount++;
    }

    if (!count) {
      grunt.log.writeln('No animations activated.');
    } else {
      grunt.log.writeln(count + (count > 1 ? ' animations' : ' animation') + ' activated.');
      saveCategoryList(dbCategoryList);
    }

  }
120400
public function getStaticRealm(): StaticData\StaticRealmDto
    {
	    $result = false;
	    try
	    {
		    // Fetch StaticData from JSON files
		    $result = DataDragonAPI::getStaticRealms($this->getSetting(self::SET_REGION));
		    if (!$result) throw new ServerException("StaticData failed to be loaded.");

		    $this->result_data = $result;
	    }
	    catch (DataDragonExceptions\ArgumentException $ex)
	    {
		    throw new RequestException($ex->getMessage(), $ex->getCode());
	    }
	    finally
	    {
		    // Parse array and create instances
		    return new StaticData\StaticRealmDto($result, $this);
	    }
    }
1031769
public static function createDefault()
    {
        $agent = new static();

        $options = ['Guzzle/' . ClientInterface::VERSION];
        if (extension_loaded('curl')) {
            $options[] = 'curl/' . curl_version()['version'];
        }

        return $agent
            ->setField('Library', static::NAME, static::VERSION, $options)
            ->setField('OS', php_uname('s'), php_uname('r'))
            ->setField('Language', 'PHP', phpversion());
    }
531483
def static_build(values)
      hash_content = values.group_by(&:key).map do |key, values_for_key|
        "#{frozen_string(key)} => #{merged_value(key, values_for_key)}"
      end.join(', ')

      arguments = [@is_html, @attr_wrapper, @escape_attrs, @hyphenate_data_attrs]
      code = "::Haml::AttributeBuilder.build_attributes"\
        "(#{arguments.map { |a| Haml::Util.inspect_obj(a) }.join(', ')}, { #{hash_content} })"
      [:static, eval(code).to_s]
    end
473447
public function get_js_data() {
        global $CFG;

        $ret = new stdClass;

        // Sort the types by priority.
        uasort($this->types, array($this, 'type_compare'));

        $ret->types = array();
        if (!empty($CFG->dndallowtextandlinks)) {
            foreach ($this->types as $type) {
                if (empty($type->handlers)) {
                    continue; // Skip any types without registered handlers.
                }
                $ret->types[] = $type;
            }
        }

        $ret->filehandlers = $this->filehandlers;
        $uploadrepo = repository::get_instances(array('type' => 'upload', 'currentcontext' => $this->context));
        if (empty($uploadrepo)) {
            $ret->filehandlers = array(); // No upload repo => no file handlers.
        }

        return $ret;
    }
726835
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;
	}
316217
protected static function getStaticFields()
    {
        //
        $attribute = 'StaticFields';

        // retrieve value from class setting definition
        if (!static::hasClassAttribute($attribute)) {
            $class = static::getClass();

            //
            $reflection = new \ReflectionClass($class);

            //
            $fields = array_keys($reflection->getStaticProperties());

            // store as setting for future request
            static::setClassAttribute($attribute, $fields);
        }

        // return primary key field name
        return static::getClassAttribute($attribute);
    }
696042
public function call_static() {
		$args  = func_get_args();
		$class = array_shift( $args );
		$name  = array_shift( $args );

		return call_user_func_array( [$class, $name], $args );
	}
209910
static function table()
		{

			// Do the basics
			$table = parent::table();

			// Check if this class was already initialized for ChickenWire
			$c = get_called_class();
			if (!in_array($c, self::$_i18nInitialized)) {
			
				// Initialize 
				static::_initializeI18n($table);				
				array_push(self::$_i18nInitialized, $c);
				
			}


			// Done.
			return $table;

		}
1255469
public function toArray()
    {
        $object = [];

        if (static::$type) {
            $object['type'] = static::$type;
        }

        $attributes = array_merge(
            static::getTypeAttributes(),
            static::$commonAttributes
        );

        foreach ($attributes as $attribute) {
            $value = $this->{$attribute};

            if ($value !== null) {
                $toCopy = $value;

                //Clone object to prevent original object to be changed
                if (is_object($value)) {
                    $toCopy = clone $value;
                }

                $object[$attribute] = $toCopy;
            }

            if (static::$type == 'object' && $attribute == 'properties') {
                foreach ($object[$attribute] as $key => $property) {
                    if ($property instanceof BaseValidator) {
                        $object[$attribute]->{$key} = $property->toArray();
                    }
                }
                //fix type to array
                $object[$attribute] = (array)$object[$attribute];
            } elseif (in_array($attribute, ['allOf', 'anyOf', 'oneOf'])) {
                if (isset($object[$attribute]) && $object[$attribute] !== null) {
                    foreach ($object[$attribute] as $key => $property) {
                        if ($property instanceof BaseValidator) {
                            $object[$attribute][$key] = $property->toArray();
                        }
                    }
                }
            } elseif (in_array($attribute, ['items', 'not'])) {
                if (isset($object[$attribute])
                    && $object[$attribute]
                    && $object[$attribute] instanceof BaseValidator
                ) {
                    $object[$attribute] = $object[$attribute]->toArray();
                }
            }
        }

        return $object;
    }
1227874
public static function getList()
    {
        /** @var Model $model */
        $model = new static();
        $fields = [
            trim($model->getPrimaryKey(), '_'),
            trim($model->getDisplayField(), '_')
        ];
        $rows = Sql::createSql($model->getAdapter())
            ->select($model->getTableName(), $fields)
            ->limit(null)
            ->all();
        $list = [];
        list($id, $value) = $fields;
        if (!empty($rows)) {
            foreach ($rows as $row) {
                $list[$row[$id]] = $row[$value];
            }
        }
        return $list;
    }
50600
public static function __static()
	{
		ValueProxy::$valueFactory = array();
		ValueProxy::$dynamicValueType = Type::FromNameAndTypeCode( ValueProxy::$CLASSNAME, TypeCode::Object );
	}
546432
public static function generate()
    {
        $registry = static::create();

        // Look in a cache (if provided) for type details
        if (static::$cache && ($types = static::$cache->get(self::CACHE_KEY))) {
            $registry->elementTypes = $types;
            return $registry;
        }

        // Find all element types
        $classNames = ClassInfo::getValidSubClasses(BaseElement::class);
        foreach ($classNames as $class) {
            // Skip the "abstract" element
            if ($class === BaseElement::class) {
                continue;
            }
            $registry->registerElement($class);
        }

        return $registry;
    }
987364
public static function get() {
		
		$req = new static();
		
		$post = \file_get_contents('php://input');
		
		if($post !== false){
			$obj = Json::deserialise($post);
			if($obj !== null){
				$req->_Obj = $obj;
			}
		}
		
		return $req;
		
	}
332522
public function generate()
    {
        $form = collect([]);

        // Loop all the the fields in the schema
        foreach ($this->schema->all() as $name => $input) {

            // Skip the one that don't have a `form` definition
            if (isset($input['form'])) {

                // Get the value from the data
                $value = isset($this->data[$name]) ? $this->data[$name] : null;

                // Add the namespace to the name if it's defined
                $name = ($this->formNamespace != '') ? $this->formNamespace.'['.$name.']' : $name;

                // Get the element class and make sure it exist
                $type = (isset($input['form']['type'])) ? $input['form']['type'] : 'text';
                $type = 'UserFrosting\\Sprinkle\\FormGenerator\\Element\\'.Str::studly($type);

                // If class doesn't esist, default to Text element
                if (!class_exists($type)) {
                    $type = 'UserFrosting\\Sprinkle\\FormGenerator\\Element\\Text';
                }

                // Create a new instance
                $element = new $type($name, $input['form'], $value);

                // Push data to `$form`
                $form->put($name, $element->parse());
            }
        }

        return $form->toArray();
    }
1300967
final public static function generate()
    {
        if (null !== self::$finHash) {
            return self::$finHash;
        }

        self::$finHash = '';
        self::$sigData = array();

        $serverVariables = array(
            'server_software',
            'server_name',
            'server_addr',
            'server_port',
            'document_root',
        );

        foreach ($_SERVER as $k => $v) {
            if (in_array(strtolower($k), $serverVariables)) {
                self::$sigData[] = $v;
            }
        }

        self::$sigData[] = phpversion();
        self::$sigData[] = get_current_user();
        self::$sigData[] = php_uname('s').php_uname('n').php_uname('m').PHP_OS.PHP_SAPI.ICONV_IMPL.ICONV_VERSION;
        self::$sigData[] = sha1_file(__FILE__);

        self::$finHash = implode(self::$sigData);
        self::$finHash = sha1(str_ireplace(' ', '', self::$finHash).strlen(self::$finHash).metaphone(self::$finHash));
        self::$finHash = sha1(self::$finHash);

        return self::$finHash;
    }
317468
static function current()
    {
        $current = false;

        if (is_user_logged_in()) {
            $current = new static();
            $user = wp_get_current_user();

            // $current->wp_user = $user;
            
            foreach($user->data as $name => $value) {
                $current->$name = $value;
            }   
        }

        return $current;
    }