Back to index

php5  5.3.10
Defines | Functions | Variables
mysqli_driver.c File Reference
#include <signal.h>
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_mysqli_structs.h"
#include "zend_exceptions.h"
#include "mysqli_fe.h"

Go to the source code of this file.

Defines

#define MAP_PROPERTY_MYG_BOOL_READ(name, value)
#define MAP_PROPERTY_MYG_BOOL_WRITE(name, value)
#define MAP_PROPERTY_MYG_LONG_READ(name, value)
#define MAP_PROPERTY_MYG_LONG_WRITE(name, value)
#define MAP_PROPERTY_MYG_STRING_READ(name, value)
#define MAP_PROPERTY_MYG_STRING_WRITE(name, value)

Functions

static int driver_report_write (mysqli_object *obj, zval *value TSRMLS_DC)
static int driver_embedded_read (mysqli_object *obj, zval **retval TSRMLS_DC)
static int driver_client_version_read (mysqli_object *obj, zval **retval TSRMLS_DC)
static int driver_client_info_read (mysqli_object *obj, zval **retval TSRMLS_DC)
static int driver_driver_version_read (mysqli_object *obj, zval **retval TSRMLS_DC)
 ZEND_FUNCTION (mysqli_driver_construct)

Variables

const mysqli_property_entry mysqli_driver_property_entries []
zend_property_info mysqli_driver_property_info_entries []
const zend_function_entry mysqli_driver_methods []

Define Documentation

#define MAP_PROPERTY_MYG_BOOL_READ (   name,
  value 
)
Value:
static int name(mysqli_object *obj, zval **retval TSRMLS_DC) \
{ \
       MAKE_STD_ZVAL(*retval); \
       ZVAL_BOOL(*retval, MyG(value)); \
       return SUCCESS; \
} \

Definition at line 32 of file mysqli_driver.c.

#define MAP_PROPERTY_MYG_BOOL_WRITE (   name,
  value 
)
Value:
static int name(mysqli_object *obj, zval *value TSRMLS_DC) \
{ \
       MyG(value) = Z_LVAL_P(value) > 0; \
       return SUCCESS; \
} \

Definition at line 40 of file mysqli_driver.c.

#define MAP_PROPERTY_MYG_LONG_READ (   name,
  value 
)
Value:
static int name(mysqli_object *obj, zval **retval TSRMLS_DC) \
{ \
       MAKE_STD_ZVAL(*retval); \
       ZVAL_LONG(*retval, MyG(value)); \
       return SUCCESS; \
} \

Definition at line 47 of file mysqli_driver.c.

#define MAP_PROPERTY_MYG_LONG_WRITE (   name,
  value 
)
Value:
static int name(mysqli_object *obj, zval *value TSRMLS_DC) \
{ \
       MyG(value) = Z_LVAL_P(value); \
       return SUCCESS; \
} \

Definition at line 55 of file mysqli_driver.c.

#define MAP_PROPERTY_MYG_STRING_READ (   name,
  value 
)
Value:
static int name(mysqli_object *obj, zval **retval TSRMLS_DC) \
{ \
       MAKE_STD_ZVAL(*retval); \
       ZVAL_STRING(*retval, MyG(value), 1); \
       return SUCCESS; \
} \

Definition at line 62 of file mysqli_driver.c.

#define MAP_PROPERTY_MYG_STRING_WRITE (   name,
  value 
)
Value:
static int name(mysqli_object *obj, zval *value TSRMLS_DC) \
{ \
       MyG(value) = Z_STRVAL_P(value); \
       return SUCCESS; \
} \

Definition at line 70 of file mysqli_driver.c.


Function Documentation

static int driver_client_info_read ( mysqli_object obj,
zval **retval  TSRMLS_DC 
) [static]

Definition at line 110 of file mysqli_driver.c.

{
       MAKE_STD_ZVAL(*retval);
       ZVAL_STRING(*retval, (char *)mysql_get_client_info(), 1);
       return SUCCESS;
}
static int driver_client_version_read ( mysqli_object obj,
zval **retval  TSRMLS_DC 
) [static]

Definition at line 101 of file mysqli_driver.c.

{
       MAKE_STD_ZVAL(*retval);
       ZVAL_LONG(*retval, MYSQL_VERSION_ID);
       return SUCCESS;
}
static int driver_driver_version_read ( mysqli_object obj,
zval **retval  TSRMLS_DC 
) [static]

Definition at line 119 of file mysqli_driver.c.

{
       MAKE_STD_ZVAL(*retval);
       ZVAL_LONG(*retval, MYSQLI_VERSION_ID);
       return SUCCESS;
}
static int driver_embedded_read ( mysqli_object obj,
zval **retval  TSRMLS_DC 
) [static]

Definition at line 88 of file mysqli_driver.c.

{
       MAKE_STD_ZVAL(*retval);
#ifdef HAVE_EMBEDDED_MYSQLI
       ZVAL_BOOL(*retval, 1);
#else
       ZVAL_BOOL(*retval, 0);
#endif
       return SUCCESS;
}
static int driver_report_write ( mysqli_object obj,
zval *value  TSRMLS_DC 
) [static]

Definition at line 78 of file mysqli_driver.c.

{
       MyG(report_mode) = Z_LVAL_P(value);
       /*FIXME*/
       /* zend_replace_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL, NULL, NULL TSRMLS_CC); */
       return SUCCESS;
}
ZEND_FUNCTION ( mysqli_driver_construct  )

Definition at line 131 of file mysqli_driver.c.

{
#if G0
       MYSQLI_RESOURCE      *mysqli_resource;

       mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
       mysqli_resource->ptr = 1;
       mysqli_resource->status = (ZEND_NUM_ARGS() == 1) ? MYSQLI_STATUS_INITIALIZED : MYSQLI_STATUS_VALID;
       ((mysqli_object *) zend_object_store_get_object(getThis() TSRMLS_CC))->ptr = mysqli_resource;
#endif
}

Here is the call graph for this function:


Variable Documentation

Initial value:
 {




       {NULL, NULL, NULL}
}

Definition at line 168 of file mysqli_driver.c.

Initial value:
 {
       {"client_info", sizeof("client_info") - 1, driver_client_info_read, NULL},
       {"client_version", sizeof("client_version") - 1, driver_client_version_read, NULL},
       {"driver_version", sizeof("driver_version") - 1, driver_driver_version_read, NULL},
       {"embedded", sizeof("embedded") - 1, driver_embedded_read, NULL},
       {"reconnect", sizeof("reconnect") - 1, driver_reconnect_read, driver_reconnect_write},
       {"report_mode", sizeof("report_mode") - 1, driver_report_read, driver_report_write},
       {NULL, 0, NULL, NULL}
}

Definition at line 143 of file mysqli_driver.c.

Initial value:
 {
       {ZEND_ACC_PUBLIC, "client_info",   sizeof("client_info") - 1,         0, NULL, 0, NULL},
       {ZEND_ACC_PUBLIC, "client_version",       sizeof("client_version") - 1,      0, NULL, 0, NULL},
       {ZEND_ACC_PUBLIC, "driver_version",       sizeof("driver_version") - 1,      0, NULL, 0, NULL},
       {ZEND_ACC_PUBLIC, "embedded",             sizeof("embedded") - 1,                   0, NULL, 0, NULL},
       {ZEND_ACC_PUBLIC, "reconnect",            sizeof("reconnect") - 1,           0, NULL, 0, NULL},
       {ZEND_ACC_PUBLIC, "report_mode",   sizeof("report_mode") - 1,         0, NULL, 0, NULL},
       {0,                                NULL,                0,                                                      0, NULL, 0, NULL},
}

Definition at line 154 of file mysqli_driver.c.