# Factory

final class Factory

## Methods

static
getInstance()

No description

static Factory
section(string $sectionName)

Define section page

void
setProvider(string $providerName)

Override provider name

string
getProviderName()

Getter

void
getConfig(string $key = '', bool $default = false)

Captcha config

mixed
getProviderConfig(string $key = '')

Get default captcha provider config

static
createConfigFromSample()

Create from sample if not exists

getProviderList()

No description

registerProvider(string $providerName, string $providerClass)

No description

string
getCaptcha()

Get captcha

getError()

No description

getCaptchaSection()

No description

bool
isValid()

Get validation result from provider

bool
isSectionActive()

Determine if captcha section is active or not

static void
operate()

Open factory to operate captcha

## Details

###
at line 31
`static getInstance()`

No description

###
at line 47
`static Factory section(string $sectionName)`

Define section page

SLiMS by default have 3 section page memberarea, librarian login and forgot password

#### Parameters

string | $sectionName |

#### Return Value

Factory |

###
at line 59
`void setProvider(string $providerName)`

Override provider name

#### Parameters

string | $providerName |

#### Return Value

void |

###
at line 69
`string getProviderName()`

Getter

#### Return Value

string |

###
at line 81
`void getConfig(string $key = '', bool $default = false)`

Captcha config

#### Parameters

string | $key |
bool | $default |

#### Return Value

void |

###
at line 92
`mixed getProviderConfig(string $key = '')`

Get default captcha provider config

#### Parameters

string | $key |

#### Return Value

mixed |

###
at line 100
`static createConfigFromSample()`

Create from sample if not exists

###
at line 134
`getProviderList()`

No description

###
at line 141
`registerProvider(string $providerName, string $providerClass)`

No description

#### Parameters

string | $providerName |
string | $providerClass |

###
at line 151
`string getCaptcha()`

Get captcha

#### Return Value

string |

###
at line 156
`getError()`

No description

###
at line 161
`getCaptchaSection()`

No description

###
at line 172
`bool isValid()`

Get validation result from provider

#### Return Value

bool |

###
at line 183
`bool isSectionActive()`

Determine if captcha section is active or not

#### Return Value

bool |

###
at line 193
`static void operate()`

Open factory to operate captcha

#### Return Value

void |