Пример #1
0
 /**
  * Checks for required PHP features, enables autoloading and starts a default profiler.
  *
  * @throws LogicException
  * @return void
  */
 public static function init()
 {
     if (version_compare(phpversion(), "5.2.1") == -1) {
         throw new LogicException("this particular software cannot be used with the installed version of PHP");
     }
     if (!function_exists("stream_socket_client")) {
         throw new LogicException("network functions are not available in this PHP installation");
     }
     if (!function_exists("spl_autoload_register")) {
         throw new LogicException("autoload functions are not available in this PHP installation");
     }
     if (!class_exists("TeamSpeak3_Helper_Profiler")) {
         spl_autoload_register(array(__CLASS__, "autoload"));
     }
     TeamSpeak3_Helper_Profiler::start();
 }