CrossPHP
  • Namespace
  • Class
  • Download

Namespaces

  • Cross
    • Auth
    • Cache
      • Driver
      • Request
    • Core
    • DB
      • Connecter
      • Drivers
      • SQLAssembler
    • Exception
    • Http
    • I
    • Lib
      • Document
    • Module
    • MVC
    • Runtime
  • None

Classes

  • SQLModule

Class SQLModule

提供简单的CRUD功能

Cross\Core\FrameBase
Extended by Cross\MVC\Module
Extended by Cross\Module\SQLModule
Namespace: Cross\Module
Package: Cross\Module
Author:

wonli wonli@live.com Class MysqlModule


Located at Module/SQLModule.php

Methods summary

public
# __construct( string $params = '' )

SQLModule constructor.

SQLModule constructor.

Parameters

$params

Throws

Cross\Exception\CoreException

Overrides

Cross\MVC\Module::__construct
public static static::get_called_class()
# init( string $args = '' )

实例化当前类的子类

实例化当前类的子类

Parameters

$args

Returns

static::get_called_class()
public static
# setTable( string $table_name, boolean $add_prefix = true )

设置表名

设置表名

Parameters

$table_name
$add_prefix

Returns

static
::get_called_class()
public mixed
# get( $condition, string $fields = '*' )

Parameters

$condition
$fields

Returns

mixed

Throws

Cross\Exception\CoreException

See

PDOSqlDriver::get()
public array
# getAll( null $where = null, integer $order = 1, integer $group_by = 1, integer $limit = 0, string $fields = '*' )

Parameters

$where
$order
$group_by
$limit
$fields

Returns

array

Throws

Cross\Exception\CoreException

See

PDOSqlDriver::getAll()
public array|mixed
# find( $condition, array & $page = array(), integer $order = 1, integer $group_by = 1, string $fields = '*' )

Parameters

$condition
$page
$order
$group_by
$fields

Returns

array|mixed

Throws

Cross\Exception\CoreException

See

PDOSqlDriver::find()
public array|boolean|mixed
# add( $data, boolean $multi = false, array & $insert_data = array(), boolean $openTA = false )

Parameters

$data
$multi
$insert_data
$openTA

Returns

array|boolean|mixed

Throws

Cross\Exception\CoreException

See

PDOSqlDriver::add()
public
# update( $data, $where )

Parameters

$data
$where

Returns


$this|array|string

Throws

Cross\Exception\CoreException

See

PDOSqlDriver::update()
public boolean|mixed
# del( $where, boolean $multi = false, boolean $openTA = false )

Parameters

$where
$multi
$openTA

Returns

boolean|mixed

Throws

Cross\Exception\CoreException

See

PDOSqlDriver::del()

Methods inherited from Cross\MVC\Module

__get(), databaseConfig(), getLinkConfig(), getLinkName(), getLinkType(), getModel(), getPrefix(), parseModelParams(), setDatabaseConfigFile()

Methods inherited from Cross\Core\FrameBase

getAuth(), getConfig(), getDelegate(), getFilePath(), getUrlEncryptKey(), initView(), loadConfig(), parseGetFile(), result(), sParams(), setAuth(), urlEncrypt()

Properties summary

protected string $t

要操作的数据表名

要操作的数据表名

#
protected static array() $instance
#
protected boolean $auto_prefix

是否自动添加表前缀

是否自动添加表前缀

# true

Properties inherited from Cross\MVC\Module

$db_config_file

Properties inherited from Cross\Core\FrameBase

$action, $action_annotate, $app_delegate, $controller, $delegate, $params, $view_controller

Magic properties inherited from Cross\MVC\Module

$link

Magic properties inherited from Cross\Core\FrameBase

$config, $request, $response, $view

CrossPHP API documentation generated by ApiGen