Newer
Older
ubFramework / Portal / docroot / include / runtime / Globals.php
@Christopher W. Olsen Christopher W. Olsen on 10 Dec 2017 373 bytes Cleaning Up Making It A Sub Module
<?php

/**
 * Function to get or set a global variable
 * @param type $key
 * @param type $value
 * @return value of the given key
 */
function sphere_global($key, $value = null) {

  $returnVal = false;
  if ($value !== null) {
    $GLOBALS [$key] = $value;
  }
  $returnVal = isset ( $GLOBALS [$key] ) ? $GLOBALS [$key] : false;
  return $returnVal;

}