Back to index

php5  5.3.10
Defines | Functions | Variables
incomplete_class.c File Reference
#include "php.h"
#include "basic_functions.h"
#include "php_incomplete_class.h"

Go to the source code of this file.

Defines

#define INCOMPLETE_CLASS_MSG

Functions

static void incomplete_class_message (zval *object, int error_type TSRMLS_DC)
static zval * incomplete_class_get_property (zval *object, zval *member, int type TSRMLS_DC)
static void incomplete_class_write_property (zval *object, zval *member, zval *value TSRMLS_DC)
static zval ** incomplete_class_get_property_ptr_ptr (zval *object, zval *member TSRMLS_DC)
static void incomplete_class_unset_property (zval *object, zval *member TSRMLS_DC)
static int incomplete_class_has_property (zval *object, zval *member, int check_empty TSRMLS_DC)
static union _zend_functionincomplete_class_get_method (zval **object, char *method, int method_len TSRMLS_DC)
static zend_object_value php_create_incomplete_object (zend_class_entry *class_type TSRMLS_DC)
PHPAPI zend_class_entry * php_create_incomplete_class (TSRMLS_D)
PHPAPI char * php_lookup_class_name (zval *object, zend_uint *nlen)
PHPAPI void php_store_class_name (zval *object, const char *name, zend_uint len)

Variables

static zend_object_handlers php_incomplete_object_handlers

Define Documentation

Value:
"The script tried to execute a method or "  \
              "access a property of an incomplete object. " \
              "Please ensure that the class definition \"%s\" of the object " \
              "you are trying to operate on was loaded _before_ " \
              "unserialize() gets called or provide a __autoload() function " \
              "to load the class definition "

Definition at line 25 of file incomplete_class.c.


Function Documentation

static union _zend_function* incomplete_class_get_method ( zval **  object,
char *  method,
int method_len  TSRMLS_DC 
) [static, write]

Definition at line 95 of file incomplete_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static zval* incomplete_class_get_property ( zval *  object,
zval *  member,
int type  TSRMLS_DC 
) [static]

Definition at line 57 of file incomplete_class.c.

{
       incomplete_class_message(object, E_NOTICE TSRMLS_CC);
       
       if (type == BP_VAR_W || type == BP_VAR_RW) {
              return EG(error_zval_ptr);
       } else {
              return EG(uninitialized_zval_ptr);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static zval** incomplete_class_get_property_ptr_ptr ( zval *  object,
zval *member  TSRMLS_DC 
) [static]

Definition at line 75 of file incomplete_class.c.

{
       incomplete_class_message(object, E_NOTICE TSRMLS_CC);
       return &EG(error_zval_ptr);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int incomplete_class_has_property ( zval *  object,
zval *  member,
int check_empty  TSRMLS_DC 
) [static]

Definition at line 88 of file incomplete_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void incomplete_class_message ( zval *  object,
int error_type  TSRMLS_DC 
) [static]

Definition at line 37 of file incomplete_class.c.

{
       char *class_name;
       zend_bool class_name_alloced = 1;

       class_name = php_lookup_class_name(object, NULL);
       
       if (!class_name) {
              class_name_alloced = 0;
              class_name = "unknown";
       }
       
       php_error_docref(NULL TSRMLS_CC, error_type, INCOMPLETE_CLASS_MSG, class_name);

       if (class_name_alloced) {
              efree(class_name);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void incomplete_class_unset_property ( zval *  object,
zval *member  TSRMLS_DC 
) [static]

Definition at line 82 of file incomplete_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void incomplete_class_write_property ( zval *  object,
zval *  member,
zval *value  TSRMLS_DC 
) [static]

Definition at line 69 of file incomplete_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI zend_class_entry* php_create_incomplete_class ( TSRMLS_D  )

Definition at line 117 of file incomplete_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static zend_object_value php_create_incomplete_object ( zend_class_entry *class_type  TSRMLS_DC) [static]

Definition at line 104 of file incomplete_class.c.

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI char* php_lookup_class_name ( zval *  object,
zend_uint nlen 
)

Definition at line 138 of file incomplete_class.c.

{
       zval **val;
       char *retval = NULL;
       HashTable *object_properties;
       TSRMLS_FETCH();

       object_properties = Z_OBJPROP_P(object);

       if (zend_hash_find(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), (void **) &val) == SUCCESS) {
              retval = estrndup(Z_STRVAL_PP(val), Z_STRLEN_PP(val));

              if (nlen) {
                     *nlen = Z_STRLEN_PP(val);
              }
       }

       return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_store_class_name ( zval *  object,
const char *  name,
zend_uint  len 
)

Definition at line 161 of file incomplete_class.c.

{
       zval *val;
       TSRMLS_FETCH();

       MAKE_STD_ZVAL(val);

       Z_TYPE_P(val)   = IS_STRING;
       Z_STRVAL_P(val) = estrndup(name, len);
       Z_STRLEN_P(val) = len;

       zend_hash_update(Z_OBJPROP_P(object), MAGIC_MEMBER, sizeof(MAGIC_MEMBER), &val, sizeof(val), NULL);
}

Here is the caller graph for this function:


Variable Documentation

zend_object_handlers php_incomplete_object_handlers [static]

Definition at line 33 of file incomplete_class.c.