Overview

Namespaces

  • BSN
    • CryptUser

Classes

  • CryptJSONSource
  • CryptMySQLSource
  • CryptUser
  • SSLKey

Interfaces

  • CryptDataSource
  • Overview
  • Namespace
  • Class
  • Tree

Interface CryptDataSource

The data source interface used to define functions required by any data source.

Direct known implementers

BSN\CryptUser\CryptJSONSource, BSN\CryptUser\CryptMySQLSource
Namespace: BSN\CryptUser
Copyright: Copyright 2013, Bryan Nielsen
Author: Bryan Nielsen, bnielsen1965@gmail.com
Located at Class/CryptDataSource.php
Methods summary
public string
# getSourceType( )

Get the source type. This function should return a string representing the type of data source, i.e. 'JSON' or 'MySQL'.

Get the source type. This function should return a string representing the type of data source, i.e. 'JSON' or 'MySQL'.

Returns

string
The data source type.
public array|boolean
# getUserByName( string $username )

Get array of user elements that match a given name. The aray of user elements may come from any type of data source, a database table, a flat file, etc., but the returned user array must include the following elements: username, passwordHash, sslKey, flags

Get array of user elements that match a given name. The aray of user elements may come from any type of data source, a database table, a flat file, etc., but the returned user array must include the following elements: username, passwordHash, sslKey, flags

Parameters

$username
string
$username The username to search for in the data source.

Returns

array|boolean
An array of arrays containing user elements to create a user or FALSE if not found.
public array
# getUsernames( )

Get a list of usernames

Get a list of usernames

Returns

array
An array of strings containing the usernames from the data source.
public boolean
# saveUser( array $user )

Save the provided user details in the data source.

Save the provided user details in the data source.

Parameters

$user
array
$user An array of user elements to be saved.

Returns

boolean
Returns TRUE on success and FALSE on failure.
public boolean
# deleteUser( string $username )

Delete the specified user from the data source.

Delete the specified user from the data source.

Parameters

$username
string
$username The username of the user to delete.

Returns

boolean
Returns TRUE on success and FALSE on failure.
cryptUser API documentation generated by ApiGen 2.8.0