Exemplo n.º 1
0
 /**
  * Writes data to the settings. Writing can be done can be done in several ways, i.e. name can either be a
  * a string or a number. Or it can be a string followed by [], which would write the data in an array.
  * Or it can be  be a list, separated by periods. This would be converted to a multi level array.
  *
  * @code
  * self::write('foo','bar')
  * self::write('foo[]','bar') // works like $array_name[]
  * self::write('foo.bar', 'quux') // works like an object in JavaScript
  * @endcode
  *
  * @param string $name the name of the variable to write, use [] at the end if you want to write in an array
  * @param mixed $value the content of the variable to write
  * @return bool
  */
 public static function write($name, $value)
 {
     $settingsObj = self::getInstance();
     $settingsObj->data = ArrayUtils::setValue($settingsObj->data, $name, $value);
 }