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.7")
Class Method Summary
collapse
Class Method Details
.define_global ⇒ Object
785
786
787
788
789
790
791
|
# File 'ext/php_vm/php_vm.c', line 785
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
588
589
590
591
|
# File 'ext/php_vm/php_vm.c', line 588
VALUE rb_php_vm_get_error_handler(VALUE cls)
{
return rb_cv_get(rb_mPHPVM, "@@error_handler");
}
|
.error_handler=(proc) ⇒ Object
593
594
595
596
597
598
599
600
|
# File 'ext/php_vm/php_vm.c', line 593
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
640
641
642
643
644
645
|
# File 'ext/php_vm/php_vm.c', line 640
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
647
648
649
650
|
# File 'ext/php_vm/php_vm.c', line 647
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
628
629
630
631
632
|
# File 'ext/php_vm/php_vm.c', line 628
VALUE rb_php_vm_include(VALUE cls, VALUE filepath)
{
php_vm_require("include", filepath);
return Qnil;
}
|
.include_once(filepath) ⇒ Object
634
635
636
637
638
|
# File 'ext/php_vm/php_vm.c', line 634
VALUE rb_php_vm_include_once(VALUE cls, VALUE filepath)
{
php_vm_require("include_once", filepath);
return Qnil;
}
|
.output_handler ⇒ Object
574
575
576
577
|
# File 'ext/php_vm/php_vm.c', line 574
VALUE rb_php_vm_get_output_handler(VALUE cls)
{
return rb_cv_get(rb_mPHPVM, "@@output_handler");
}
|
.output_handler=(proc) ⇒ Object
579
580
581
582
583
584
585
586
|
# File 'ext/php_vm/php_vm.c', line 579
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
616
617
618
619
620
|
# File 'ext/php_vm/php_vm.c', line 616
VALUE rb_php_vm_require(VALUE cls, VALUE filepath)
{
php_vm_require("require", filepath);
return Qtrue;
}
|
.require_once(filepath) ⇒ Object
622
623
624
625
626
|
# File 'ext/php_vm/php_vm.c', line 622
VALUE rb_php_vm_require_once(VALUE cls, VALUE filepath)
{
php_vm_require("require_once", filepath);
return Qtrue;
}
|