PHP 클래스 Folks_Driver_sql, horde

Required values for $params:
     'phptype'       The database type (e.g. 'pgsql', 'mysql', etc.).
     'table'         The name of the foo table in 'database'.
     'charset'       The database's internal charset.
Required by some database implementations:
     'database'      The name of the database.
     'hostspec'      The hostname of the database server.
     'protocol'      The communication protocol ('tcp', 'unix', etc.).
     'username'      The username with which to connect to the database.
     'password'      The password associated with 'username'.
     'options'       Additional options to pass to the database.
     'tty'           The TTY on which to connect to the database.
     'port'          The port on which to connect to the database.
The table structure can be created by the scripts/sql/folks_foo.sql script. Copyright 2008-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
저자: Duck ([email protected])
상속: extends Folks_Driver
파일 보기 프로젝트 열기: horde/horde

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructs a new SQL storage object.
addUser ( $user, array $credentials ) : boolean Adds a set of authentication credentials.
countUsers ( $criteria = [] ) Count users by attributes
deleteOnlineUser ( $user ) Remove user if is online
getUsers ( $criteria = [], $from, $count ) Get users by attributes
getViews ( ) Get user groups
updateComments ( string $user, $reset = false ) Update user comments count
userExists ( string $user ) : boolean Check if user exist

보호된 메소드들

메소드 설명
_deleteActivity ( string $scope, integer $date, string $user ) : true Delete users activity
_deleteImage ( string $user ) Delete user image
_deleteOnlineStatus ( $to ) Delete users online
_deleteSavedSearch ( string $name ) Delete saved search
_deleteUser ( string $user ) : boolean Delete user
_getActivity ( string $user, $limit ) : array Get user's activity
_getCryptedPassword ( string $user ) : string Formats a password using the current encryption.
_getOnlineUsers ( ) Get usersnames online
_getProfile ( string $user ) Get user profile
_getRandomUsers ( integer $limit = 10, boolean $online = false ) : array Get random users
_getRecentVisitors ( integer $limit = 10 ) : array Get last visitors
_getSavedSearch ( ) : array Get saved search
_getSearchCriteria ( string $name ) : array Get saved search criteria
_logActivity ( string $message, string $scope, string $user ) : true Log users actions
_logView ( $id ) Log user view
_saveProfile ( array $data, string $user ) Save basic user profile
_saveSearch ( string $criteria, string $name ) Save search criteria
_updateOnlineStatus ( ) Get usersnames online

비공개 메소드들

메소드 설명
_buildWhere ( $criteria = [] ) : array Build attributes query
_connect ( ) : boolean Attempts to open a persistent connection to the SQL server.

메소드 상세

__construct() 공개 메소드

Constructs a new SQL storage object.
public __construct ( array $params = [] )
$params array A hash containing connection parameters.

_deleteActivity() 보호된 메소드

Delete users activity
protected _deleteActivity ( string $scope, integer $date, string $user ) : true
$scope string Scope
$date integer Date
$user string Username
리턴 true on success

_deleteImage() 보호된 메소드

Delete user image
protected _deleteImage ( string $user )
$user string Username

_deleteOnlineStatus() 보호된 메소드

Delete users online
protected _deleteOnlineStatus ( $to )

_deleteSavedSearch() 보호된 메소드

Delete saved search
protected _deleteSavedSearch ( string $name )
$name string Username

_deleteUser() 보호된 메소드

Delete user
protected _deleteUser ( string $user ) : boolean
$user string Username
리턴 boolean

_getActivity() 보호된 메소드

Get user's activity
protected _getActivity ( string $user, $limit ) : array
$user string Username
리턴 array Activity log

_getCryptedPassword() 보호된 메소드

Formats a password using the current encryption.
protected _getCryptedPassword ( string $user ) : string
$user string User we are getting password for
리턴 string The encrypted password.

_getOnlineUsers() 보호된 메소드

Get usersnames online
protected _getOnlineUsers ( )

_getProfile() 보호된 메소드

Get user profile
protected _getProfile ( string $user )
$user string Username

_getRandomUsers() 보호된 메소드

Get random users
protected _getRandomUsers ( integer $limit = 10, boolean $online = false ) : array
$limit integer Username to check
$online boolean User is online?
리턴 array users

_getRecentVisitors() 보호된 메소드

Get last visitors
protected _getRecentVisitors ( integer $limit = 10 ) : array
$limit integer Username to check
리턴 array users

_getSavedSearch() 보호된 메소드

Get saved search
protected _getSavedSearch ( ) : array
리턴 array saved searches

_getSearchCriteria() 보호된 메소드

Get saved search criteria
protected _getSearchCriteria ( string $name ) : array
$name string Username
리턴 array search criteria

_logActivity() 보호된 메소드

Log users actions
protected _logActivity ( string $message, string $scope, string $user ) : true
$message string Log message
$scope string Scope
$user string Username
리턴 true on success

_logView() 보호된 메소드

Log user view
protected _logView ( $id )

_saveProfile() 보호된 메소드

Save basic user profile
protected _saveProfile ( array $data, string $user )
$data array A hash containing profile data
$user string Username

_saveSearch() 보호된 메소드

Save search criteria
protected _saveSearch ( string $criteria, string $name )
$criteria string Search criteria
$name string Search name

_updateOnlineStatus() 보호된 메소드

Get usersnames online
protected _updateOnlineStatus ( )

addUser() 공개 메소드

Adds a set of authentication credentials.
public addUser ( $user, array $credentials ) : boolean
$credentials array The credentials to use.
리턴 boolean true|PEAR_Error

countUsers() 공개 메소드

Count users by attributes
public countUsers ( $criteria = [] )

deleteOnlineUser() 공개 메소드

Remove user if is online
public deleteOnlineUser ( $user )

getUsers() 공개 메소드

Get users by attributes
public getUsers ( $criteria = [], $from, $count )

getViews() 공개 메소드

Get user groups
public getViews ( )

updateComments() 공개 메소드

Update user comments count
public updateComments ( string $user, $reset = false )
$user string Username

userExists() 공개 메소드

Check if user exist
public userExists ( string $user ) : boolean
$user string Username
리턴 boolean