Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
DSN Class Reference

Public Member Functions

 __construct (Array $dsn)
 
 getDSN ()
 
 getFailure ()
 
 setFailure ($failure)
 
 getWeight ()
 

Detailed Description

DSN.

A DSN object represents a single DSN.

DSN provides methods for getting weights, setting failure, etc.

Since
4.0.0

Definition at line 23 of file DSN.inc.

Constructor & Destructor Documentation

__construct ( Array  $dsn)

Constructor

Parameters
array$dsnThe array of a single DSN public

Definition at line 56 of file DSN.inc.

Member Function Documentation

getDSN ( )

Return the DSN array

Returns
array Return the single DSN array this object represents public

Definition at line 69 of file DSN.inc.

getFailure ( )

Get the failure value.

Returns
boolean Return the failure flag value of this object public

Definition at line 82 of file DSN.inc.

getWeight ( )

Get the weight of the DSN.

Returns
int Return the integer value of the DSN weight; Return -1 if there is no weight specified or the value is invalid public

Definition at line 110 of file DSN.inc.

setFailure (   $failure)

Set the failure value.

Parameters
boolean$failureThe boolean value to set for the failure flag
Returns
void public

Definition at line 96 of file DSN.inc.


The documentation for this class was generated from the following file: