ClearFoundation

ClearOS API

Class Chap

Description

CHAP/PAP configuration class.

Located in /api/Chap.class.php (line 54)

Engine
   |
   --Chap
Class Constant Summary
 CONSTANT_ANY = "*"
 FILE_PAP_SECRETS = "/etc/ppp/pap-secrets"
 FILE_SECRETS = "/etc/ppp/chap-secrets"
 LINE_ADD = -1
 LINE_DONE = -3
Variable Summary
mixed $is_loaded
mixed $secrets
Method Summary
void AddUser (string $username, string $password, [string $server = self::CONSTANT_ANY], [string $ip = self::CONSTANT_ANY])
void DeleteUser (string $username)
array GetUsers ()
Chap __construct ()
void __destruct ()
void _Save ()
Variables
mixed $is_loaded = false (line 60)
  • access: protected
mixed $secrets = array() (line 61)
  • access: protected

Inherited Variables

Inherited from Engine

Engine::$errors
Methods
AddUser (line 100)

Sets a username/password in the chap/pap secrets file.

  • throws: EngineException
void AddUser (string $username, string $password, [string $server = self::CONSTANT_ANY], [string $ip = self::CONSTANT_ANY])
  • string $username: username
  • string $password: password
  • string $server: server
  • string $ip: ip
DeleteUser (line 126)

Deletes a username from the chap/pap secrets file.

void DeleteUser (string $username)
  • string $username: username
GetUsers (line 148)

Returns user list.

  • return: information on users
  • throws: EngineException
array GetUsers ()
Constructor __construct (line 79)

Chap constructor.

Chap __construct ()

Redefinition of:
Engine::__construct()
Engine constructor.
Destructor __destruct (line 303)
  • access: public
void __destruct ()

Redefinition of:
Engine::__destruct()
_Save (line 223)

Saves configuration file.

  • private:
void _Save ()

Inherited Methods

Inherited From Engine

Engine::__construct()
Engine::AddValidationError()
Engine::CheckValidationErrors()
Engine::CopyValidationErrors()
Engine::GetValidationErrors()
Engine::Log()
Engine::__destruct()
Class Constants
CONSTANT_ANY = "*" (line 69)
FILE_PAP_SECRETS = "/etc/ppp/pap-secrets" (line 64)
FILE_SECRETS = "/etc/ppp/chap-secrets" (line 63)
LINE_ADD = -1 (line 67)
LINE_DEFINED = 0 (line 68)
LINE_DELETE = -2 (line 66)
LINE_DONE = -3 (line 65)

Inherited Constants

Inherited from Engine

Engine::COMMAND_API

Documentation generated on Fri, 28 Aug 2009 20:32:00 -0400 by phpDocumentor 1.3.2