Back to index

php5  5.3.10
Defines | Functions | Variables
php_spl.h File Reference
#include "php.h"
#include <stdarg.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SPL_DEBUG(x)
#define phpext_spl_ptr   &spl_module_entry
#define SPL_API
#define SPL_G(v)   (spl_globals.v)

Functions

 PHP_MINIT_FUNCTION (spl)
 PHP_MSHUTDOWN_FUNCTION (spl)
 PHP_RINIT_FUNCTION (spl)
 PHP_RSHUTDOWN_FUNCTION (spl)
 PHP_MINFO_FUNCTION (spl)
 PHP_FUNCTION (spl_classes)
 PHP_FUNCTION (class_parents)
 PHP_FUNCTION (class_implements)
PHPAPI void php_spl_object_hash (zval *obj, char *md5str TSRMLS_DC)

Variables

zend_module_entry spl_module_entry
char * autoload_extensions
HashTableautoload_functions
int autoload_running
int autoload_extensions_len
intptr_t hash_mask_handle
intptr_t hash_mask_handlers
int hash_mask_init
zend_spl_globals spl_globals

Define Documentation

Definition at line 37 of file php_spl.h.

#define SPL_API

Definition at line 50 of file php_spl.h.

#define SPL_DEBUG (   x)

Definition at line 33 of file php_spl.h.

#define SPL_G (   v)    (spl_globals.v)

Definition at line 79 of file php_spl.h.


Function Documentation

Definition at line 214 of file php_spl.c.

{
       array_init(return_value);
       
       SPL_LIST_CLASSES(return_value, 0, 0, 0)
}
PHP_FUNCTION ( class_parents  )

Definition at line 92 of file php_spl.c.

{
       zval *obj;
       zend_class_entry *parent_class, *ce;
       zend_bool autoload = 1;

       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &obj, &autoload) == FAILURE) {
              RETURN_FALSE;
       }
       
       if (Z_TYPE_P(obj) != IS_OBJECT && Z_TYPE_P(obj) != IS_STRING) {
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "object or string expected");
              RETURN_FALSE;
       }
       
       if (Z_TYPE_P(obj) == IS_STRING) {
              if (NULL == (ce = spl_find_ce_by_name(Z_STRVAL_P(obj), Z_STRLEN_P(obj), autoload TSRMLS_CC))) {
                     RETURN_FALSE;
              }
       } else {
              ce = Z_OBJCE_P(obj);
       }
       
       array_init(return_value);
       parent_class = ce->parent;
       while (parent_class) {
              spl_add_class_name(return_value, parent_class, 0, 0 TSRMLS_CC);
              parent_class = parent_class->parent;
       }
}

Here is the call graph for this function:

PHP_FUNCTION ( class_implements  )

Definition at line 126 of file php_spl.c.

{
       zval *obj;
       zend_bool autoload = 1;
       zend_class_entry *ce;
       
       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &obj, &autoload) == FAILURE) {
              RETURN_FALSE;
       }
       if (Z_TYPE_P(obj) != IS_OBJECT && Z_TYPE_P(obj) != IS_STRING) {
              php_error_docref(NULL TSRMLS_CC, E_WARNING, "object or string expected");
              RETURN_FALSE;
       }
       
       if (Z_TYPE_P(obj) == IS_STRING) {
              if (NULL == (ce = spl_find_ce_by_name(Z_STRVAL_P(obj), Z_STRLEN_P(obj), autoload TSRMLS_CC))) {
                     RETURN_FALSE;
              }
       } else {
              ce = Z_OBJCE_P(obj);
       }
       
       array_init(return_value);
       spl_add_interfaces(return_value, ce, 1, ZEND_ACC_INTERFACE TSRMLS_CC);
}

Here is the call graph for this function:

PHP_MINFO_FUNCTION ( spl  )

Definition at line 775 of file php_spl.c.

{
       zval list;
       char *strg;

       php_info_print_table_start();
       php_info_print_table_header(2, "SPL support",        "enabled");

       INIT_PZVAL(&list);
       array_init(&list);
       SPL_LIST_CLASSES(&list, 0, 1, ZEND_ACC_INTERFACE)
       strg = estrdup("");
       zend_hash_apply_with_argument(Z_ARRVAL_P(&list), (apply_func_arg_t)spl_build_class_list_string, &strg TSRMLS_CC);
       zval_dtor(&list);
       php_info_print_table_row(2, "Interfaces", strg + 2);
       efree(strg);

       INIT_PZVAL(&list);
       array_init(&list);
       SPL_LIST_CLASSES(&list, 0, -1, ZEND_ACC_INTERFACE)
       strg = estrdup("");
       zend_hash_apply_with_argument(Z_ARRVAL_P(&list), (apply_func_arg_t)spl_build_class_list_string, &strg TSRMLS_CC);
       zval_dtor(&list);
       php_info_print_table_row(2, "Classes", strg + 2);
       efree(strg);

       php_info_print_table_end();
}

Here is the call graph for this function:

PHP_MINIT_FUNCTION ( spl  )
PHP_RINIT_FUNCTION ( spl  )

Definition at line 902 of file php_spl.c.

PHPAPI void php_spl_object_hash ( zval *  obj,
char *md5str  TSRMLS_DC 
)

Variable Documentation

Definition at line 66 of file php_spl.h.

Definition at line 69 of file php_spl.h.

Definition at line 67 of file php_spl.h.

Definition at line 68 of file php_spl.h.

Definition at line 70 of file php_spl.h.

Definition at line 71 of file php_spl.h.

Definition at line 72 of file php_spl.h.

zend_spl_globals spl_globals
zend_module_entry spl_module_entry

Definition at line 931 of file php_spl.c.