コード例 #1
0
 /**
  *  This function returns one of the named variables from the global CMS scope.
  *
  *  @param  $var    The name of the variable you want to retrieve.
  *
  *  @returns    The contents of that variable, false if the variable doesn't exist.
  *
  *  @static
  */
 function &getVar($var)
 {
     // Initialize the SimpleCMS package
     YDSimpleCMS::initialize();
     // Return the variable if it's set, otherwise return false
     if (!isset($GLOBALS[YD_SIMPLECMS_PACKAGE_NAME][$var])) {
         $var = false;
         return $var;
     }
     // Return a reference to the variable
     return $GLOBALS[YD_SIMPLECMS_PACKAGE_NAME][$var];
 }