\Role_model

Model Class

Summary

Methods
Properties
Constants
__construct()
__get()
getRoleList()
insertData()
updateData()
getRoleRow()
checkUnique()
getRowCount()
_getWhere()
delete()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$table
N/A

Properties

$table

$table : 

Type

Methods

__construct()

__construct() : void

Class constructor

__get()

__get(string  $key) 

__get magic

Allows models to access CI's loaded classes using the same syntax as controllers.

Parameters

string $key

getRoleList()

getRoleList(  $where = array(),   $select = '*',   $limit = 10,   $start) 

获取角色列表

Parameters

$where
$select
$limit
$start

insertData()

insertData(  $roleData) 

添加

Parameters

$roleData

updateData()

updateData(  $roleData,   $roleId) 

修改

Parameters

$roleData
$roleId

getRoleRow()

getRoleRow(  $roleId) 

查询单条数据

Parameters

$roleId

checkUnique()

checkUnique(  $roleName,   $roleId) 

检查角色名称是否存在

Parameters

$roleName
$roleId

getRowCount()

getRowCount(  $where = array()) 

获取总条数

Parameters

$where

_getWhere()

_getWhere(  $where = array()) 

查询条件

Parameters

$where

delete()

delete(  $roleId) : boolean

删除

Parameters

$roleId

Returns

boolean