Example #1
0
void StandardExtension::initIntrinsics() {
  if (!RuntimeOption::EnableIntrinsicsExtension) return;

  HHVM_FALIAS(__hhvm_intrinsics\\disable_inlining, disable_inlining);
  HHVM_FALIAS(__hhvm_intrinsics\\trigger_oom, trigger_oom);
  loadSystemlib("std_intrinsics");
}
Example #2
0
  void moduleInit() override {
    HHVM_RC_INT_SAME(PAGELET_NOT_READY);
    HHVM_RC_INT_SAME(PAGELET_READY);
    HHVM_RC_INT_SAME(PAGELET_DONE);

    HHVM_FE(hphp_thread_type);
    HHVM_FE(dangling_server_proxy_old_request);
    HHVM_FE(pagelet_server_is_enabled);
    HHVM_FE(pagelet_server_task_start);
    HHVM_FE(pagelet_server_task_status);
    HHVM_FE(pagelet_server_task_result);
    HHVM_FE(pagelet_server_tasks_started);
    HHVM_FE(pagelet_server_flush);
    HHVM_FE(xbox_send_message);
    HHVM_FE(xbox_post_message);
    HHVM_FE(xbox_task_start);
    HHVM_FE(xbox_task_status);
    HHVM_FE(xbox_task_result);
    HHVM_FE(xbox_process_call_message);
    HHVM_FE(xbox_get_thread_timeout);
    HHVM_FE(xbox_set_thread_timeout);
    HHVM_FE(xbox_schedule_thread_reset);
    HHVM_FE(xbox_get_thread_time);
    HHVM_FE(server_is_stopping);
    HHVM_FE(server_uptime);

    loadSystemlib();
  }
Example #3
0
 void moduleInit() override {
   HHVM_FALIAS(HH\\xenon_get_data, xenon_get_data);
   HHVM_FALIAS(HH\\xenon_get_and_clear_samples, xenon_get_and_clear_samples);
   HHVM_FALIAS(HH\\xenon_get_and_clear_missed_sample_count,
               xenon_get_and_clear_missed_sample_count);
   loadSystemlib();
 }
Example #4
0
  void moduleInit() override {
    HHVM_RC_INT(XHPROF_FLAGS_NO_BUILTINS, NoTrackBuiltins);
    HHVM_RC_INT(XHPROF_FLAGS_CPU, TrackCPU);
    HHVM_RC_INT(XHPROF_FLAGS_MEMORY, TrackMemory);
    HHVM_RC_INT(XHPROF_FLAGS_VTSC, TrackVtsc);
    HHVM_RC_INT(XHPROF_FLAGS_TRACE, XhpTrace);
    HHVM_RC_INT(XHPROF_FLAGS_MEASURE_XHPROF_DISABLE, MeasureXhprofDisable);
    HHVM_RC_INT(XHPROF_FLAGS_MALLOC, TrackMalloc);
    HHVM_RC_INT(XHPROF_FLAGS_I_HAVE_INFINITE_MEMORY, IHaveInfiniteMemory);
    HHVM_RC_INT(SETPROFILE_FLAGS_ENTERS, EventHook::ProfileEnters);
    HHVM_RC_INT(SETPROFILE_FLAGS_EXITS, EventHook::ProfileExits);
    HHVM_RC_INT(SETPROFILE_FLAGS_DEFAULT, EventHook::ProfileDefault);
    HHVM_RC_INT(SETPROFILE_FLAGS_FRAME_PTRS, EventHook::ProfileFramePointers);
    HHVM_RC_INT(SETPROFILE_FLAGS_CTORS, EventHook::ProfileConstructors);

    HHVM_FE(fb_setprofile);
    HHVM_FE(xhprof_frame_begin);
    HHVM_FE(xhprof_frame_end);
    HHVM_FE(xhprof_enable);
    HHVM_FE(xhprof_disable);
    HHVM_FE(xhprof_network_enable);
    HHVM_FE(xhprof_network_disable);
    HHVM_FE(xhprof_sample_enable);
    HHVM_FE(xhprof_sample_disable);

    loadSystemlib();
  }
Example #5
0
void StandardExtension::initGc() {
  HHVM_FE(gc_enabled);
  HHVM_FE(gc_enable);
  HHVM_FE(gc_disable);
  HHVM_FE(gc_collect_cycles);
  loadSystemlib("std_gc");
}
Example #6
0
    void moduleInit() override {
      xsltSetGenericErrorFunc(nullptr, xslt_ext_error_handler);
      exsltRegisterAll();
      HHVM_RC_INT(XSL_SECPREF_NONE, k_XSL_SECPREF_NONE);
      HHVM_RC_INT(XSL_SECPREF_READ_FILE, k_XSL_SECPREF_READ_FILE);
      HHVM_RC_INT(XSL_SECPREF_WRITE_FILE, k_XSL_SECPREF_WRITE_FILE);
      HHVM_RC_INT(XSL_SECPREF_CREATE_DIRECTORY, k_XSL_SECPREF_CREATE_DIRECTORY);
      HHVM_RC_INT(XSL_SECPREF_READ_NETWORK, k_XSL_SECPREF_READ_NETWORK);
      HHVM_RC_INT(XSL_SECPREF_WRITE_NETWORK, k_XSL_SECPREF_WRITE_NETWORK);
      HHVM_RC_INT(XSL_SECPREF_DEFAULT, k_XSL_SECPREF_DEFAULT);

      HHVM_RC_INT_SAME(LIBXSLT_VERSION);
      HHVM_RC_STR_SAME(LIBXSLT_DOTTED_VERSION);

      HHVM_ME(XSLTProcessor, getParameter);
      HHVM_ME(XSLTProcessor, getSecurityPrefs);
      HHVM_ME(XSLTProcessor, importStylesheet);
      HHVM_ME(XSLTProcessor, removeParameter);
      HHVM_ME(XSLTProcessor, registerPHPFunctions);
      HHVM_ME(XSLTProcessor, setParameter);
      HHVM_ME(XSLTProcessor, setSecurityPrefs);
      HHVM_ME(XSLTProcessor, setProfiling);
      HHVM_ME(XSLTProcessor, transformToDoc);
      HHVM_ME(XSLTProcessor, transformToURI);
      HHVM_ME(XSLTProcessor, transformToXML);

      Native::
        registerNativeDataInfo<XSLTProcessorData>(s_XSLTProcessorData.get());

      loadSystemlib();
    }
void StandardExtension::initNetwork() {
    HHVM_FE(gethostname);
    HHVM_FE(gethostbyaddr);
    HHVM_FE(gethostbyname);
    HHVM_FE(gethostbynamel);
    HHVM_FE(getprotobyname);
    HHVM_FE(getprotobynumber);
    HHVM_FE(getservbyname);
    HHVM_FE(getservbyport);
    HHVM_FE(inet_ntop);
    HHVM_FE(inet_pton);
    HHVM_FE(ip2long);
    HHVM_FE(long2ip);
    HHVM_FE(checkdnsrr);
    HHVM_FE(dns_get_record);
    HHVM_FE(getmxrr);
    HHVM_FE(header);
    HHVM_FE(http_response_code);
    HHVM_FE(headers_list);
    HHVM_FE(headers_sent);
    HHVM_FE(header_register_callback);
    HHVM_FE(header_remove);
    HHVM_FE(get_http_request_size);
    HHVM_FE(setcookie);
    HHVM_FE(setrawcookie);
    HHVM_FE(openlog);
    HHVM_FE(closelog);
    HHVM_FE(syslog);

    // These are defined in ext_socket, but Zend has them in network
    HHVM_FE(fsockopen);
    HHVM_FE(pfsockopen);

    loadSystemlib("std_network");
}
Example #8
0
  virtual void moduleInit() {
    Native::registerConstant<KindOfInt64>(s_PAGELET_NOT_READY.get(),
                                          k_PAGELET_NOT_READY);
    Native::registerConstant<KindOfInt64>(s_PAGELET_READY.get(),
                                          k_PAGELET_READY);
    Native::registerConstant<KindOfInt64>(s_PAGELET_DONE.get(), k_PAGELET_DONE);

    HHVM_FE(hphp_thread_type);
    HHVM_FE(dangling_server_proxy_old_request);
    HHVM_FE(pagelet_server_is_enabled);
    HHVM_FE(pagelet_server_task_start);
    HHVM_FE(pagelet_server_task_status);
    HHVM_FE(pagelet_server_task_result);
    HHVM_FE(pagelet_server_tasks_started);
    HHVM_FE(pagelet_server_flush);
    HHVM_FE(xbox_send_message);
    HHVM_FE(xbox_post_message);
    HHVM_FE(xbox_task_start);
    HHVM_FE(xbox_task_status);
    HHVM_FE(xbox_task_result);
    HHVM_FE(xbox_process_call_message);
    HHVM_FE(xbox_get_thread_timeout);
    HHVM_FE(xbox_set_thread_timeout);
    HHVM_FE(xbox_schedule_thread_reset);
    HHVM_FE(xbox_get_thread_time);

    loadSystemlib();
  }
Example #9
0
  void moduleInit() override {
    HHVM_RC_INT(JSON_HEX_TAG, k_JSON_HEX_TAG);
    HHVM_RC_INT(JSON_HEX_AMP, k_JSON_HEX_AMP);
    HHVM_RC_INT(JSON_HEX_APOS, k_JSON_HEX_APOS);
    HHVM_RC_INT(JSON_HEX_QUOT, k_JSON_HEX_QUOT);
    HHVM_RC_INT(JSON_FORCE_OBJECT, k_JSON_FORCE_OBJECT);
    HHVM_RC_INT(JSON_NUMERIC_CHECK, k_JSON_NUMERIC_CHECK);
    HHVM_RC_INT(JSON_UNESCAPED_SLASHES, k_JSON_UNESCAPED_SLASHES);
    HHVM_RC_INT(JSON_PRETTY_PRINT, k_JSON_PRETTY_PRINT);
    HHVM_RC_INT(JSON_UNESCAPED_UNICODE, k_JSON_UNESCAPED_UNICODE);
    HHVM_RC_INT(JSON_PARTIAL_OUTPUT_ON_ERROR, k_JSON_PARTIAL_OUTPUT_ON_ERROR);
    HHVM_RC_INT(JSON_PRESERVE_ZERO_FRACTION, k_JSON_PRESERVE_ZERO_FRACTION);
    HHVM_RC_INT(JSON_BIGINT_AS_STRING, k_JSON_BIGINT_AS_STRING);
    HHVM_RC_INT(JSON_FB_LOOSE, k_JSON_FB_LOOSE);
    HHVM_RC_INT(JSON_FB_UNLIMITED, k_JSON_FB_UNLIMITED);
    HHVM_RC_INT(JSON_FB_EXTRA_ESCAPES, k_JSON_FB_EXTRA_ESCAPES);
    HHVM_RC_INT(JSON_FB_COLLECTIONS, k_JSON_FB_COLLECTIONS);
    HHVM_RC_INT(JSON_FB_STABLE_MAPS, k_JSON_FB_STABLE_MAPS);
    HHVM_RC_INT(JSON_ERROR_NONE, k_JSON_ERROR_NONE);
    HHVM_RC_INT(JSON_ERROR_DEPTH, k_JSON_ERROR_DEPTH);
    HHVM_RC_INT(JSON_ERROR_STATE_MISMATCH, k_JSON_ERROR_STATE_MISMATCH);
    HHVM_RC_INT(JSON_ERROR_CTRL_CHAR, k_JSON_ERROR_CTRL_CHAR);
    HHVM_RC_INT(JSON_ERROR_SYNTAX, k_JSON_ERROR_SYNTAX);
    HHVM_RC_INT(JSON_ERROR_UTF8, k_JSON_ERROR_UTF8);
    HHVM_RC_INT(JSON_ERROR_RECURSION, k_JSON_ERROR_RECURSION);
    HHVM_RC_INT(JSON_ERROR_INF_OR_NAN, k_JSON_ERROR_INF_OR_NAN);
    HHVM_RC_INT(JSON_ERROR_UNSUPPORTED_TYPE, k_JSON_ERROR_UNSUPPORTED_TYPE);

    HHVM_FE(json_last_error);
    HHVM_FE(json_last_error_msg);
    HHVM_FE(json_encode);
    HHVM_FE(json_decode);

    loadSystemlib();
  }
Example #10
0
  void moduleInit() override {
    HHVM_RC_INT_SAME(PAGELET_NOT_READY);
    HHVM_RC_INT_SAME(PAGELET_READY);
    HHVM_RC_INT_SAME(PAGELET_DONE);

    HHVM_FE(hphp_thread_type);
    HHVM_FE(pagelet_server_is_enabled);
    HHVM_FE(pagelet_server_task_start);
    HHVM_FE(pagelet_server_task_status);
    HHVM_FE(pagelet_server_task_result);
    HHVM_FE(pagelet_server_tasks_started);
    HHVM_FE(pagelet_server_flush);
    HHVM_FE(xbox_send_message);
    HHVM_FE(xbox_post_message);
    HHVM_FE(xbox_task_start);
    HHVM_FE(xbox_task_status);
    HHVM_FE(xbox_task_result);
    HHVM_FE(xbox_process_call_message);
    HHVM_FE(xbox_get_thread_timeout);
    HHVM_FE(xbox_set_thread_timeout);
    HHVM_FE(xbox_schedule_thread_reset);
    HHVM_FE(xbox_get_thread_time);
    HHVM_FALIAS(HH\\server_is_stopping, server_is_stopping);
    HHVM_FALIAS(HH\\server_is_prepared_to_stop, server_is_prepared_to_stop);
    HHVM_FALIAS(HH\\server_health_level, server_health_level);
    HHVM_FALIAS(HH\\server_uptime, server_uptime);
    HHVM_FALIAS(HH\\server_process_start_time, server_process_start_time);

    loadSystemlib();
  }
Example #11
0
  void moduleInit() override {
    HHVM_FE(pcntl_alarm);
    HHVM_FE(pcntl_exec);
    HHVM_FE(pcntl_fork);
    HHVM_FE(pcntl_getpriority);
    HHVM_FE(pcntl_setpriority);
    HHVM_FE(pcntl_signal);
    HHVM_FE(pcntl_sigprocmask);
    HHVM_FE(pcntl_wait);
    HHVM_FE(pcntl_waitpid);
    HHVM_FE(pcntl_wexitstatus);
    HHVM_FE(pcntl_signal_dispatch);
    HHVM_FE(pcntl_wifexited);
    HHVM_FE(pcntl_wifsignaled);
    HHVM_FE(pcntl_wifstopped);
    HHVM_FE(pcntl_wstopsig);
    HHVM_FE(pcntl_wtermsig);
    HHVM_FE(shell_exec);
    HHVM_FE(exec);
    HHVM_FE(passthru);
    HHVM_FE(system);
    HHVM_FE(proc_open);
    HHVM_FE(proc_terminate);
    HHVM_FE(proc_close);
    HHVM_FE(proc_get_status);
    HHVM_FE(proc_nice);
    HHVM_FE(escapeshellarg);
    HHVM_FE(escapeshellcmd);

    loadSystemlib("process");
  }
Example #12
0
 void moduleInit() override {
   HHVM_FE(snappy_compress);
   HHVM_FE(snappy_uncompress);
   HHVM_FALIAS(sncompress, snappy_compress);
   HHVM_FALIAS(snuncompress, snappy_uncompress);
   loadSystemlib();
 }
Example #13
0
void StandardExtension::initMisc() {
    HHVM_FALIAS(HH\\server_warmup_status, server_warmup_status);
    HHVM_FE(connection_aborted);
    HHVM_FE(connection_status);
    HHVM_FE(connection_timeout);
    HHVM_FE(constant);
    HHVM_FE(define);
    HHVM_FE(defined);
    HHVM_FE(ignore_user_abort);
    HHVM_FE(pack);
    HHVM_FE(sleep);
    HHVM_FE(usleep);
    HHVM_FE(time_nanosleep);
    HHVM_FE(time_sleep_until);
    HHVM_FE(uniqid);
    HHVM_FE(unpack);
    HHVM_FE(sys_getloadavg);
    HHVM_FE(token_get_all);
    HHVM_FE(token_name);
    HHVM_FE(hphp_to_string);
    Native::registerConstant<KindOfDouble>(makeStaticString("INF"), k_INF);
    Native::registerConstant<KindOfDouble>(makeStaticString("NAN"), k_NAN);
    Native::registerConstant<KindOfInt64>(
        makeStaticString("PHP_MAXPATHLEN"), MAXPATHLEN);
    Native::registerConstant<KindOfBoolean>(makeStaticString("PHP_DEBUG"),
      #if DEBUG
        true
      #else
        false
      #endif
     );
    loadSystemlib("std_misc");
  }
Example #14
0
void IntlExtension::initDateFormatter() {
  UDAT_CONST(FULL);
  UDAT_CONST(LONG);
  UDAT_CONST(MEDIUM);
  UDAT_CONST(SHORT);
  UDAT_CONST(NONE);

  UCAL_CONST(GREGORIAN);
  UCAL_CONST(TRADITIONAL);

  HHVM_ME(IntlDateFormatter, __construct_array);
  HHVM_ME(IntlDateFormatter, __clone);
  HHVM_ME(IntlDateFormatter, format);
  HHVM_STATIC_ME(IntlDateFormatter, formatObject);
  HHVM_ME(IntlDateFormatter, getCalendar);
  HHVM_ME(IntlDateFormatter, getDateType);
  HHVM_ME(IntlDateFormatter, getErrorCode);
  HHVM_ME(IntlDateFormatter, getErrorMessage);
  HHVM_ME(IntlDateFormatter, getLocale);
  HHVM_ME(IntlDateFormatter, getPattern);
  HHVM_ME(IntlDateFormatter, getTimeType);
  HHVM_ME(IntlDateFormatter, getTimeZoneId);
  HHVM_ME(IntlDateFormatter, getCalendarObject);
  HHVM_ME(IntlDateFormatter, getTimeZone);
  HHVM_ME(IntlDateFormatter, isLenient);
  HHVM_ME(IntlDateFormatter, localtime);
  HHVM_ME(IntlDateFormatter, parse);
  HHVM_ME(IntlDateFormatter, setCalendar);
  HHVM_ME(IntlDateFormatter, setLenient);
  HHVM_ME(IntlDateFormatter, setPattern);
  HHVM_ME(IntlDateFormatter, setTimeZone);
  loadSystemlib("icu_date_fmt");
}
Example #15
0
void IntlExtension::initDateFormatter() {
  HHVM_RCC_INT(IntlDateFormatter, FULL, UDAT_FULL);
  HHVM_RCC_INT(IntlDateFormatter, LONG, UDAT_LONG);
  HHVM_RCC_INT(IntlDateFormatter, MEDIUM, UDAT_MEDIUM);
  HHVM_RCC_INT(IntlDateFormatter, SHORT, UDAT_SHORT);
  HHVM_RCC_INT(IntlDateFormatter, NONE, UDAT_NONE);

  HHVM_RCC_INT(IntlDateFormatter, GREGORIAN, UCAL_GREGORIAN);
  HHVM_RCC_INT(IntlDateFormatter, TRADITIONAL, UCAL_TRADITIONAL);

  HHVM_ME(IntlDateFormatter, __construct);
  HHVM_ME(IntlDateFormatter, format);
  HHVM_STATIC_ME(IntlDateFormatter, formatObject);
  HHVM_ME(IntlDateFormatter, getCalendar);
  HHVM_ME(IntlDateFormatter, getDateType);
  HHVM_ME(IntlDateFormatter, getErrorCode);
  HHVM_ME(IntlDateFormatter, getErrorMessage);
  HHVM_ME(IntlDateFormatter, getLocale);
  HHVM_ME(IntlDateFormatter, getPattern);
  HHVM_ME(IntlDateFormatter, getTimeType);
  HHVM_ME(IntlDateFormatter, getTimeZoneId);
  HHVM_ME(IntlDateFormatter, getCalendarObject);
  HHVM_ME(IntlDateFormatter, getTimeZone);
  HHVM_ME(IntlDateFormatter, isLenient);
  HHVM_ME(IntlDateFormatter, localtime);
  HHVM_ME(IntlDateFormatter, parse);
  HHVM_ME(IntlDateFormatter, setCalendar);
  HHVM_ME(IntlDateFormatter, setLenient);
  HHVM_ME(IntlDateFormatter, setPattern);
  HHVM_ME(IntlDateFormatter, setTimeZone);

  Native::registerNativeDataInfo<IntlDateFormatter>(s_IntlDateFormatter.get());

  loadSystemlib("icu_date_fmt");
}
Example #16
0
void ZendExtension::moduleInit() {
  if (!RuntimeOption::EnableZendCompat) {
    return;
  }
  // Give it a module number
  zend_module_entry* module = getEntry();
  module->module_number = s_zend_next_module++;
  s_zend_extensions->insert(module->module_number, this);

  ZendObject::registerNativeData();
  // Allocate globals
  if (module->globals_size) {
    ts_allocate_id(module->globals_id_ptr, module->globals_size,
        (ts_allocate_ctor) module->globals_ctor,
        (ts_allocate_dtor) module->globals_dtor);
  }
  // Register global functions
  const zend_function_entry * fe = module->functions;
  while (fe->fname) {
    assert(fe->handler);
    Native::registerBuiltinFunction(makeStaticString(fe->fname),
                                          fe->handler);
    fe++;
  }
  // Call MINIT
  if (module->module_startup_func) {
    TSRMLS_FETCH();
    module->module_startup_func(1, module->module_number TSRMLS_CC);
  }
  // The systemlib name must match the name used by the build process. For
  // in-tree builds this is the directory name, which is typically the same
  // as the extension name converted to lower case.
  std::string slName = toLower(std::string(getName()));
  loadSystemlib(slName);
}
Example #17
0
void IntlExtension::initIterator() {
  HHVM_ME(IntlIterator, current);
  HHVM_ME(IntlIterator, key);
  HHVM_ME(IntlIterator, next);
  HHVM_ME(IntlIterator, rewind);
  HHVM_ME(IntlIterator, valid);
  loadSystemlib("icu_iterator");
}
Example #18
0
 void moduleInit() override {
   HHVM_NAMED_FE(HH\\autoload_set_paths, HHVM_FN(autoload_set_paths));
   HHVM_NAMED_FE(HH\\could_include, HHVM_FN(could_include));
   HHVM_NAMED_FE(HH\\serialize_memoize_param,
                 HHVM_FN(serialize_memoize_param));
   HHVM_NAMED_FE(HH\\set_frame_metadata, HHVM_FN(set_frame_metadata));
   loadSystemlib();
 }
Example #19
0
 virtual void moduleInit() {
   loadImagickConstants();
   loadImagickClass();
   loadImagickDrawClass();
   loadImagickPixelClass();
   loadImagickPixelIteratorClass();
   loadSystemlib();
 }
Example #20
0
 void moduleInit() override {
   HHVM_FE(wddx_add_vars);
   HHVM_FE(wddx_packet_end);
   HHVM_FE(wddx_packet_start);
   HHVM_FE(wddx_serialize_value);
   HHVM_FE(wddx_serialize_vars);
   loadSystemlib();
 }
Example #21
0
void AsioExtension::initFunctions() {
  HHVM_FALIAS(
    HH\\asio_get_current_context_idx,
    asio_get_current_context_idx);
  HHVM_FALIAS(HH\\asio_get_running_in_context, asio_get_running_in_context);
  HHVM_FALIAS(HH\\asio_get_running, asio_get_running);

  loadSystemlib();
}
Example #22
0
void AsioExtension::initAsyncGenerator() {
  Native::registerNativeDataInfo<AsyncGenerator>(
    AsyncGenerator::s_className.get(),
    Native::NDIFlags::NO_SWEEP | Native::NDIFlags::NO_COPY);
  loadSystemlib("async-generator");
  AsyncGenerator::s_class =
    Unit::lookupClass(AsyncGenerator::s_className.get());
  assert(AsyncGenerator::s_class);
}
Example #23
0
  void moduleInit() override {
    HHVM_RCC_INT(XMLReader, NONE, XML_READER_TYPE_NONE);
    HHVM_RCC_INT(XMLReader, ELEMENT, XML_READER_TYPE_ELEMENT);
    HHVM_RCC_INT(XMLReader, ATTRIBUTE, XML_READER_TYPE_ATTRIBUTE);
    HHVM_RCC_INT(XMLReader, TEXT, XML_READER_TYPE_TEXT);
    HHVM_RCC_INT(XMLReader, CDATA, XML_READER_TYPE_CDATA);
    HHVM_RCC_INT(XMLReader, ENTITY_REF, XML_READER_TYPE_ENTITY_REFERENCE);
    HHVM_RCC_INT(XMLReader, ENTITY, XML_READER_TYPE_ENTITY);
    HHVM_RCC_INT(XMLReader, PI, XML_READER_TYPE_PROCESSING_INSTRUCTION);
    HHVM_RCC_INT(XMLReader, COMMENT, XML_READER_TYPE_COMMENT);
    HHVM_RCC_INT(XMLReader, DOC, XML_READER_TYPE_DOCUMENT);
    HHVM_RCC_INT(XMLReader, DOC_TYPE, XML_READER_TYPE_DOCUMENT_TYPE);
    HHVM_RCC_INT(XMLReader, DOC_FRAGMENT, XML_READER_TYPE_DOCUMENT_FRAGMENT);
    HHVM_RCC_INT(XMLReader, NOTATION, XML_READER_TYPE_NOTATION);
    HHVM_RCC_INT(XMLReader, WHITESPACE, XML_READER_TYPE_WHITESPACE);
    HHVM_RCC_INT(XMLReader, SIGNIFICANT_WHITESPACE,
                 XML_READER_TYPE_SIGNIFICANT_WHITESPACE);
    HHVM_RCC_INT(XMLReader, END_ELEMENT, XML_READER_TYPE_END_ELEMENT);
    HHVM_RCC_INT(XMLReader, END_ENTITY, XML_READER_TYPE_END_ENTITY);
    HHVM_RCC_INT(XMLReader, XML_DECLARATION, XML_READER_TYPE_XML_DECLARATION);
    HHVM_RCC_INT(XMLReader, LOADDTD, XML_PARSER_LOADDTD);
    HHVM_RCC_INT(XMLReader, DEFAULTATTRS, XML_PARSER_DEFAULTATTRS);
    HHVM_RCC_INT(XMLReader, VALIDATE, XML_PARSER_VALIDATE);
    HHVM_RCC_INT(XMLReader, SUBST_ENTITIES, XML_PARSER_SUBST_ENTITIES);

    HHVM_ME(XMLReader, open);
    HHVM_ME(XMLReader, XML);
    HHVM_ME(XMLReader, close);
    HHVM_ME(XMLReader, read);
    HHVM_ME(XMLReader, next);
    HHVM_ME(XMLReader, readString);
    HHVM_ME(XMLReader, readInnerXML);
    HHVM_ME(XMLReader, readOuterXML);
    HHVM_ME(XMLReader, moveToNextAttribute);
    HHVM_ME(XMLReader, getAttribute);
    HHVM_ME(XMLReader, getAttributeNo);
    HHVM_ME(XMLReader, getAttributeNs);
    HHVM_ME(XMLReader, moveToAttribute);
    HHVM_ME(XMLReader, moveToAttributeNo);
    HHVM_ME(XMLReader, moveToAttributeNs);
    HHVM_ME(XMLReader, moveToElement);
    HHVM_ME(XMLReader, moveToFirstAttribute);
    HHVM_ME(XMLReader, isValid);
    HHVM_ME(XMLReader, __get);
    HHVM_ME(XMLReader, getParserProperty);
    HHVM_ME(XMLReader, lookupNamespace);
    HHVM_ME(XMLReader, setSchema);
    HHVM_ME(XMLReader, setParserProperty);
    HHVM_ME(XMLReader, setRelaxNGSchema);
    HHVM_ME(XMLReader, setRelaxNGSchemaSource);
    HHVM_ME(XMLReader, expand);

    Native::registerNativeDataInfo<XMLReader>(s_XMLReader.get());

    loadSystemlib();
  }
Example #24
0
  void moduleInit() override {
    Native::registerConstant<KindOfInt64>(
      s_PASSWORD_BCRYPT.get(), k_PASSWORD_BCRYPT
    );
    Native::registerConstant<KindOfInt64>(
      s_PASSWORD_DEFAULT.get(), k_PASSWORD_DEFAULT
    );

    loadSystemlib();
  }
Example #25
0
void StandardExtension::initString() {
  HHVM_FE(wordwrap);

  HHVM_FE(sprintf);
  HHVM_FE(vsprintf);
  HHVM_FE(printf);
  HHVM_FE(vprintf);

  loadSystemlib("std_string");
}
Example #26
0
 void moduleInit() override {
   HHVM_ME(Generator, getOrigFuncName);
   HHVM_ME(Generator, getCalledClass);
   Native::registerNativeDataInfo<Generator>(
     Generator::s_className.get(),
     Native::NDIFlags::NO_SWEEP);
   loadSystemlib("generator");
   Generator::s_class = Unit::lookupClass(Generator::s_className.get());
   assert(Generator::s_class);
 }
Example #27
0
  virtual void moduleInit() {
    HHVM_FE(apache_note);
    HHVM_FE(apache_request_headers);
    HHVM_FE(apache_response_headers);
    HHVM_FE(apache_setenv);
    HHVM_FE(getallheaders);
    HHVM_FE(apache_get_config);

    loadSystemlib();
  }
Example #28
0
    void moduleInit() override {
        HHVM_ME(IntervalTimer, __construct);
        HHVM_ME(IntervalTimer, start);
        HHVM_ME(IntervalTimer, stop);
        Native::registerNativeDataInfo<IntervalTimer>(
            IntervalTimer::c_ClassName.get(),
            Native::NDIFlags::NO_SWEEP);

        loadSystemlib("intervaltimer");
    }
Example #29
0
  void moduleInit() override {
    REGISTER_XML_READER_CONSTANT(NONE);
    REGISTER_XML_READER_CONSTANT(ELEMENT);
    REGISTER_XML_READER_CONSTANT(ATTRIBUTE);
    REGISTER_XML_READER_CONSTANT(TEXT);
    REGISTER_XML_READER_CONSTANT(CDATA);
    REGISTER_XML_READER_CONSTANT(ENTITY_REF);
    REGISTER_XML_READER_CONSTANT(ENTITY);
    REGISTER_XML_READER_CONSTANT(PI);
    REGISTER_XML_READER_CONSTANT(COMMENT);
    REGISTER_XML_READER_CONSTANT(DOC);
    REGISTER_XML_READER_CONSTANT(DOC_TYPE);
    REGISTER_XML_READER_CONSTANT(DOC_FRAGMENT);
    REGISTER_XML_READER_CONSTANT(NOTATION);
    REGISTER_XML_READER_CONSTANT(WHITESPACE);
    REGISTER_XML_READER_CONSTANT(SIGNIFICANT_WHITESPACE);
    REGISTER_XML_READER_CONSTANT(END_ELEMENT);
    REGISTER_XML_READER_CONSTANT(END_ENTITY);
    REGISTER_XML_READER_CONSTANT(XML_DECLARATION);
    REGISTER_XML_READER_CONSTANT(LOADDTD);
    REGISTER_XML_READER_CONSTANT(DEFAULTATTRS);
    REGISTER_XML_READER_CONSTANT(VALIDATE);
    REGISTER_XML_READER_CONSTANT(SUBST_ENTITIES);

    HHVM_ME(XMLReader, open);
    HHVM_ME(XMLReader, XML);
    HHVM_ME(XMLReader, close);
    HHVM_ME(XMLReader, read);
    HHVM_ME(XMLReader, next);
    HHVM_ME(XMLReader, readString);
    HHVM_ME(XMLReader, readInnerXML);
    HHVM_ME(XMLReader, readOuterXML);
    HHVM_ME(XMLReader, moveToNextAttribute);
    HHVM_ME(XMLReader, getAttribute);
    HHVM_ME(XMLReader, getAttributeNo);
    HHVM_ME(XMLReader, getAttributeNs);
    HHVM_ME(XMLReader, moveToAttribute);
    HHVM_ME(XMLReader, moveToAttributeNo);
    HHVM_ME(XMLReader, moveToAttributeNs);
    HHVM_ME(XMLReader, moveToElement);
    HHVM_ME(XMLReader, moveToFirstAttribute);
    HHVM_ME(XMLReader, isValid);
    HHVM_ME(XMLReader, __get);
    HHVM_ME(XMLReader, getParserProperty);
    HHVM_ME(XMLReader, lookupNamespace);
    HHVM_ME(XMLReader, setSchema);
    HHVM_ME(XMLReader, setParserProperty);
    HHVM_ME(XMLReader, setRelaxNGSchema);
    HHVM_ME(XMLReader, setRelaxNGSchemaSource);
    HHVM_ME(XMLReader, expand);

    Native::registerNativeDataInfo<XMLReader>(s_XMLReader.get());

    loadSystemlib();
  }
Example #30
0
 virtual void moduleInit() {
   HHVM_FE(stream_get_filters);
   HHVM_FE(stream_filter_register);
   HHVM_FE(stream_filter_append);
   HHVM_FE(stream_filter_prepend);
   HHVM_FE(stream_filter_remove);
   HHVM_FE(stream_bucket_make_writeable);
   HHVM_FE(stream_bucket_append);
   HHVM_FE(stream_bucket_prepend);
   loadSystemlib("stream-user-filters");
 }