Module: PHPVM
- Defined in:
- ext/php_vm/php_vm.c
Defined Under Namespace
Modules: PHPGlobal
Classes: PHPClass, PHPError, PHPErrorReporting, PHPExceptionObject, PHPObject, PHPSyntaxError
Constant Summary
collapse
- VERSION =
rb_str_new2("1.3.6")
Class Method Summary
collapse
Class Method Details
.define_global ⇒ Object
791
792
793
794
795
796
797
|
# File 'ext/php_vm/php_vm.c', line 791
VALUE rb_php_vm_define_global(VALUE cls)
{
VALUE res1 = define_global_constants();
VALUE res2 = define_global_functions();
VALUE res3 = define_global_classes();
return res1==Qtrue && res2==Qtrue && res3==Qtrue;
}
|
.error_handler ⇒ Object
594
595
596
597
|
# File 'ext/php_vm/php_vm.c', line 594
VALUE rb_php_vm_get_error_handler(VALUE cls)
{
return rb_cv_get(rb_mPHPVM, "@@error_handler");
}
|
.error_handler=(proc) ⇒ Object
599
600
601
602
603
604
605
606
|
# File 'ext/php_vm/php_vm.c', line 599
VALUE rb_php_vm_set_error_handler(VALUE cls, VALUE proc)
{
if (proc!=Qnil && !rb_obj_is_kind_of(proc, rb_cProc)) {
rb_raise(rb_eArgError, "proc is not proc object");
}
rb_cv_set(rb_mPHPVM, "@@error_handler", proc);
return Qnil;
}
|
.exec(code) ⇒ Object
646
647
648
649
650
651
|
# File 'ext/php_vm/php_vm.c', line 646
VALUE rb_php_vm_exec(VALUE cls, VALUE code)
{
TSRMLS_FETCH();
php_eval_string(RSTRING_PTR(code), RSTRING_LEN(code) TSRMLS_CC);
return Qnil;
}
|
.get_class(v_class_name) ⇒ Object
653
654
655
656
|
# File 'ext/php_vm/php_vm.c', line 653
VALUE rb_php_vm_get_class(VALUE cls, VALUE v_class_name)
{
return rb_php_class_get(rb_cPHPClass, v_class_name);
}
|
.include(filepath) ⇒ Object
634
635
636
637
638
|
# File 'ext/php_vm/php_vm.c', line 634
VALUE rb_php_vm_include(VALUE cls, VALUE filepath)
{
php_vm_require("include", filepath);
return Qnil;
}
|
.include_once(filepath) ⇒ Object
640
641
642
643
644
|
# File 'ext/php_vm/php_vm.c', line 640
VALUE rb_php_vm_include_once(VALUE cls, VALUE filepath)
{
php_vm_require("include_once", filepath);
return Qnil;
}
|
.output_handler ⇒ Object
580
581
582
583
|
# File 'ext/php_vm/php_vm.c', line 580
VALUE rb_php_vm_get_output_handler(VALUE cls)
{
return rb_cv_get(rb_mPHPVM, "@@output_handler");
}
|
.output_handler=(proc) ⇒ Object
585
586
587
588
589
590
591
592
|
# File 'ext/php_vm/php_vm.c', line 585
VALUE rb_php_vm_set_output_handler(VALUE cls, VALUE proc)
{
if (proc!=Qnil && !rb_obj_is_kind_of(proc, rb_cProc)) {
rb_raise(rb_eArgError, "proc is not proc object");
}
rb_cv_set(rb_mPHPVM, "@@output_handler", proc);
return Qnil;
}
|
.require(filepath) ⇒ Object
622
623
624
625
626
|
# File 'ext/php_vm/php_vm.c', line 622
VALUE rb_php_vm_require(VALUE cls, VALUE filepath)
{
php_vm_require("require", filepath);
return Qtrue;
}
|
.require_once(filepath) ⇒ Object
628
629
630
631
632
|
# File 'ext/php_vm/php_vm.c', line 628
VALUE rb_php_vm_require_once(VALUE cls, VALUE filepath)
{
php_vm_require("require_once", filepath);
return Qtrue;
}
|