Beispiel #1
0
 /**
  * Returns number of elements in container or, the number of elements in a
  * variable
  *
  * @param string $name [optional] name to get size of
  *
  * @returns int number of elements or false if not found
  *
  * @access public
  *
  * @static
  */
 static function size($name = "", $check_globals = FALSE)
 {
     if (strlen($name) == 0) {
         // no size specified
         $size = sizeof(SingletonContainer::getAllData());
         if ($check_globals) {
             $size += sizeof($GLOBALS);
         }
         return $size;
     }
     $v =& SingletonContainer::get($name, $check_globals);
     return sizeof($v);
 }