之PDO数据层深入讲解
在PHP5,6系列中,主要有四个类,因为开发领导者与SPL是同一个人,所以关联相关厉害,它们分别是
class PDOException extends RuntimeException
class PDO
class PDOStatement implements Traversable
final class PDORow
Classes [4] {
Class [ <internal:PDO> class PDOException extends RuntimeException ] {
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [5] {
Property [ <default> protected $message ]
Property [ <default> protected $code ]
Property [ <default> protected $file ]
Property [ <default> protected $line ]
Property [ <default> public $errorInfo ]
}
- Methods [9] {
Method [ <internal, inherits Exception> final private method __clone ] {
}
Method [ <internal, inherits Exception, ctor> public method __construct ] {
- Parameters [2] {
Parameter #0 [ <optional> $message ]
Parameter #1 [ <optional> $code ]
}
}
Method [ <internal, inherits Exception> final public method getMessage ] {
}
Method [ <internal, inherits Exception> final public method getCode ] {
}
Method [ <internal, inherits Exception> final public method getFile ] {
}
Method [ <internal, inherits Exception> final public method getLine ] {
}
Method [ <internal, inherits Exception> final public method getTrace ] {
}
Method [ <internal, inherits Exception> final public method getTraceAsString ] {
}
Method [ <internal, inherits Exception> public method __toString ] {
}
}
}
Class [ <internal:PDO> class PDO ] {
- Constants [77] {
Constant [ integer PARAM_BOOL ] { 5 }
Constant [ integer PARAM_NULL ] { 0 }
Constant [ integer PARAM_INT ] { 1 }
Constant [ integer PARAM_STR ] { 2 }
Constant [ integer PARAM_LOB ] { 3 }
Constant [ integer PARAM_STMT ] { 4 }
Constant [ integer PARAM_INPUT_OUTPUT ] { -2147483648 }
Constant [ integer PARAM_EVT_ALLOC ] { 0 }
Constant [ integer PARAM_EVT_FREE ] { 1 }
Constant [ integer PARAM_EVT_EXEC_PRE ] { 2 }
Constant [ integer PARAM_EVT_EXEC_POST ] { 3 }
Constant [ integer PARAM_EVT_FETCH_PRE ] { 4 }
Constant [ integer PARAM_EVT_FETCH_POST ] { 5 }
Constant [ integer PARAM_EVT_NORMALIZE ] { 6 }
Constant [ integer FETCH_LAZY ] { 1 }
Constant [ integer FETCH_ASSOC ] { 2 }
Constant [ integer FETCH_NUM ] { 3 }
Constant [ integer FETCH_BOTH ] { 4 }
Constant [ integer FETCH_OBJ ] { 5 }
Constant [ integer FETCH_BOUND ] { 6 }
Constant [ integer FETCH_COLUMN ] { 7 }
Constant [ integer FETCH_CLASS ] { 8 }
Constant [ integer FETCH_INTO ] { 9 }
Constant [ integer FETCH_FUNC ] { 10 }
Constant [ integer FETCH_GROUP ] { 65536 }
Constant [ integer FETCH_UNIQUE ] { 196608 }
Constant [ integer FETCH_KEY_PAIR ] { 12 }
Constant [ integer FETCH_CLASSTYPE ] { 262144 }
Constant [ integer FETCH_SERIALIZE ] { 524288 }
Constant [ integer FETCH_PROPS_LATE ] { 1048576 }
Constant [ integer FETCH_NAMED ] { 11 }
Constant [ integer ATTR_AUTOCOMMIT ] { 0 }
Constant [ integer ATTR_PREFETCH ] { 1 }
Constant [ integer ATTR_TIMEOUT ] { 2 }
Constant [ integer ATTR_ERRMODE ] { 3 }
Constant [ integer ATTR_SERVER_VERSION ] { 4 }
Constant [ integer ATTR_CLIENT_VERSION ] { 5 }
Constant [ integer ATTR_SERVER_INFO ] { 6 }
Constant [ integer ATTR_CONNECTION_STATUS ] { 7 }
Constant [ integer ATTR_CASE ] { 8 }
Constant [ integer ATTR_CURSOR_NAME ] { 9 }
Constant [ integer ATTR_CURSOR ] { 10 }
Constant [ integer ATTR_ORACLE_NULLS ] { 11 }
Constant [ integer ATTR_PERSISTENT ] { 12 }
Constant [ integer ATTR_STATEMENT_CLASS ] { 13 }
Constant [ integer ATTR_FETCH_TABLE_NAMES ] { 14 }
Constant [ integer ATTR_FETCH_CATALOG_NAMES ] { 15 }
Constant [ integer ATTR_DRIVER_NAME ] { 16 }
Constant [ integer ATTR_STRINGIFY_FETCHES ] { 17 }
Constant [ integer ATTR_MAX_COLUMN_LEN ] { 18 }
Constant [ integer ATTR_EMULATE_PREPARES ] { 20 }
Constant [ integer ATTR_DEFAULT_FETCH_MODE ] { 19 }
Constant [ integer ERRMODE_SILENT ] { 0 }
Constant [ integer ERRMODE_WARNING ] { 1 }
Constant [ integer ERRMODE_EXCEPTION ] { 2 }
Constant [ integer CASE_NATURAL ] { 0 }
Constant [ integer CASE_LOWER ] { 2 }
Constant [ integer CASE_UPPER ] { 1 }
Constant [ integer NULL_NATURAL ] { 0 }
Constant [ integer NULL_EMPTY_STRING ] { 1 }
Constant [ integer NULL_TO_STRING ] { 2 }
Constant [ string ERR_NONE ] { 00000 }
Constant [ integer FETCH_ORI_NEXT ] { 0 }
Constant [ integer FETCH_ORI_PRIOR ] { 1 }
Constant [ integer FETCH_ORI_FIRST ] { 2 }
Constant [ integer FETCH_ORI_LAST ] { 3 }
Constant [ integer FETCH_ORI_ABS ] { 4 }
Constant [ integer FETCH_ORI_REL ] { 5 }
Constant [ integer CURSOR_FWDONLY ] { 0 }
Constant [ integer CURSOR_SCROLL ] { 1 }
Constant [ integer MYSQL_ATTR_USE_BUFFERED_QUERY ] { 1000 }
Constant [ integer MYSQL_ATTR_LOCAL_INFILE ] { 1001 }
Constant [ integer MYSQL_ATTR_INIT_COMMAND ] { 1002 }
Constant [ integer MYSQL_ATTR_READ_DEFAULT_FILE ] { 1003 }
Constant [ integer MYSQL_ATTR_READ_DEFAULT_GROUP ] { 1004 }
Constant [ integer MYSQL_ATTR_MAX_BUFFER_SIZE ] { 1005 }
Constant [ integer MYSQL_ATTR_DIRECT_QUERY ] { 1006 }
}
- Static properties [0] {
}
- Static methods [1] {
Method [ <internal:PDO> static public method getAvailableDrivers ] {
}
}
- Properties [0] {
}
- Methods [15] {
Method [ <internal:PDO, ctor> public method __construct ] {
- Parameters [4] {
Parameter #0 [ <required> $dsn ]
Parameter #1 [ <required> $username ]
Parameter #2 [ <required> $passwd ]
Parameter #3 [ <optional> $options ]
}
}
Method [ <internal:PDO> public method prepare ] {
- Parameters [2] {
Parameter #0 [ <required> $statment ]
Parameter #1 [ <optional> $options ]
}
}
Method [ <internal:PDO> public method beginTransaction ] {
}
Method [ <internal:PDO> public method commit ] {
}
Method [ <internal:PDO> public method rollBack ] {
}
Method [ <internal:PDO> public method setAttribute ] {
- Parameters [2] {
Parameter #0 [ <required> $attribute ]
Parameter #1 [ <required> $value ]
}
}
Method [ <internal:PDO> public method exec ] {
- Parameters [1] {
Parameter #0 [ <required> $query ]
}
}
Method [ <internal:PDO> public method query ] {
}
Method [ <internal:PDO> public method lastInsertId ] {
- Parameters [1] {
Parameter #0 [ <optional> $seqname ]
}
}
Method [ <internal:PDO> public method errorCode ] {
}
Method [ <internal:PDO> public method errorInfo ] {
}
Method [ <internal:PDO> public method getAttribute ] {
- Parameters [1] {
Parameter #0 [ <required> $attribute ]
}
}
Method [ <internal:PDO> public method quote ] {
- Parameters [2] {
Parameter #0 [ <required> $string ]
Parameter #1 [ <optional> $paramtype ]
}
}
Method [ <internal:PDO> final public method __wakeup ] {
}
Method [ <internal:PDO> final public method __sleep ] {
}
}
}
Class [ <internal:PDO> <iterateable> class PDOStatement implements Traversable ] {
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [1] {
Property [ <default> public $queryString ]
}
- Methods [21] {
Method [ <internal:PDO> public method execute ] {
- Parameters [1] {
Parameter #0 [ <optional> $bound_input_params ]
}
}
Method [ <internal:PDO> public method fetch ] {
- Parameters [3] {
Parameter #0 [ <optional> $how ]
Parameter #1 [ <optional> $orientation ]
Parameter #2 [ <optional> $offset ]
}
}
Method [ <internal:PDO> public method bindParam ] {
- Parameters [5] {
Parameter #0 [ <required> $paramno ]
Parameter #1 [ <required> &$param ]
Parameter #2 [ <optional> $type ]
Parameter #3 [ <optional> $maxlen ]
Parameter #4 [ <optional> $driverdata ]
}
}
Method [ <internal:PDO> public method bindColumn ] {
- Parameters [5] {
Parameter #0 [ <required> $column ]
Parameter #1 [ <required> &$param ]
Parameter #2 [ <optional> $type ]
Parameter #3 [ <optional> $maxlen ]
Parameter #4 [ <optional> $driverdata ]
}
}
Method [ <internal:PDO> public method bindValue ] {
- Parameters [3] {
Parameter #0 [ <required> $paramno ]
Parameter #1 [ <required> $param ]
Parameter #2 [ <optional> $type ]
}
}
Method [ <internal:PDO> public method rowCount ] {
}
Method [ <internal:PDO> public method fetchColumn ] {
- Parameters [1] {
Parameter #0 [ <optional> $column_number ]
}
}
Method [ <internal:PDO> public method fetchAll ] {
- Parameters [3] {
Parameter #0 [ <optional> $how ]
Parameter #1 [ <optional> $class_name ]
Parameter #2 [ <optional> $ctor_args ]
}
}
Method [ <internal:PDO> public method fetchObject ] {
- Parameters [2] {
Parameter #0 [ <required> $class_name ]
Parameter #1 [ <optional> $ctor_args ]
}
}
Method [ <internal:PDO> public method errorCode ] {
}
Method [ <internal:PDO> public method errorInfo ] {
}
Method [ <internal:PDO> public method setAttribute ] {
- Parameters [2] {
Parameter #0 [ <required> $attribute ]
Parameter #1 [ <required> $value ]
}
}
Method [ <internal:PDO> public method getAttribute ] {
- Parameters [1] {
Parameter #0 [ <required> $attribute ]
}
}
Method [ <internal:PDO> public method columnCount ] {
}
Method [ <internal:PDO> public method getColumnMeta ] {
- Parameters [1] {
Parameter #0 [ <required> $column ]
}
}
Method [ <internal:PDO> public method setFetchMode ] {
- Parameters [2] {
Parameter #0 [ <required> $mode ]
Parameter #1 [ <optional> $params ]
}
}
Method [ <internal:PDO> public method nextRowset ] {
}
Method [ <internal:PDO> public method closeCursor ] {
}
Method [ <internal:PDO> public method debugDumpParams ] {
}
Method [ <internal:PDO> final public method __wakeup ] {
}
Method [ <internal:PDO> final public method __sleep ] {
}
}
}
Class [ <internal:PDO> final class PDORow ] {
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [0] {
}
}
}
}