Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:dao:themedao

This is an old revision of the document!


ThemeDao

Layer: DAO · Source: lib/dao/ThemeDao.php:22 (lines 22–434)


class ThemeDao extends Dao

Theme class extends Dao

Docblock Metadata

^ Tag ^ Value ^
| ''@category'' | Dao Class |
| ''@author'' | M.Noermoehammad |
| ''@license'' | MIT |
| ''@version'' | 1.0 |
| ''@since'' | Since Release 1.0 |

Inheritance

^ Relation ^ Type ^ Meaning ^
| extends | [[scriptlog:lib:core:dao|''Dao'']] | parent class/interface |

Constants (0)

None.

Properties (0)

None declared.

Methods (22)

^ Visibility ^ Method ^ Summary ^ Line ^
| public | ''__construct()'' | (undocumented) | 24 |
| public | ''findThemes()'' | findThemes function | 39 |
| public | ''findTheme()'' | findTheme function | 63 |
| public | ''insertTheme()'' | addTheme function | 88 |
| public | ''updateTheme()'' | updateTheme function | 108 |
| public | ''deleteTheme()'' | deleteTheme function | 129 |
| public | ''checkThemeId()'' | Check theme function | 145 |
| public | ''isThemeActived()'' | Is theme active or not | 161 |
| public | ''activateTheme()'' | Activate theme function | 183 |
| public | ''deactivateTheme()'' | Deactivate theme function | 203 |
| public | ''findThemeByDirectory()'' | Find theme by directory name | 230 |
| public | ''getThemeType()'' | Find theme type (free or premium) for a given theme ID. | 252 |
| public | ''saveLicense()'' | Save license information for a theme. | 266 |
| public | ''setLicenseStatus()'' | Update just the license status for a theme. | 288 |
| public | ''findActiveThemes()'' | Find active themes | 302 |
| public | ''totalThemeRecords()'' | Total theme record function | 321 |
| public | ''themeExists()'' | Theme exists function | 337 |
| public | ''insertThemeLicense()'' | Insert a theme license activation record. | 351 |
| public | ''findThemeLicense()'' | Find a theme license activation by key and domain. | 370 |
| public | ''updateThemeLicense()'' | Update a theme license activation record. | 387 |
| public | ''findThemeLicensesByThemeId()'' | Get all license activations for a given theme. | 398 |
| public | ''loadTheme()'' | Total theme record function | 413 |

__construct()

public function __construct()

lines 24–27 (4)

Takes no parameters.

findThemes()

public function findThemes($orderBy = "ID")

lines 39–50 (12)

findThemes function

Retrieve all themes records ordered by ID (default)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$orderBy'' | ''(untyped)'' | ''"ID"'' | //none// |

Returns: (none declared) — mixed

findTheme()

public function findTheme($id, $sanitize)

lines 63–78 (16)

findTheme function

Retrieve single theme record based on ID

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — mixed

insertTheme()

public function insertTheme($bind)

lines 88–97 (10)

addTheme function

Insert new theme record into theme table

^ Parameter ^ Type ^ Default ^ Description ^
| ''$bind'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

updateTheme()

public function updateTheme($sanitize, $bind, $ID)

lines 108–118 (11)

updateTheme function

update an existing theme record

^ Parameter ^ Type ^ Default ^ Description ^
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |
| ''$bind'' | ''(untyped)'' | //required// | //none// |
| ''$ID'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

deleteTheme()

public function deleteTheme($id, $sanitize)

lines 129–133 (5)

deleteTheme function

Remove theme record from theme table

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

checkThemeId()

public function checkThemeId($id, $sanitize)

lines 145–152 (8)

Check theme function

checking ID theme

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — numeric

isThemeActived()

public function isThemeActived($theme_title)

lines 161–173 (13)

Is theme active or not

^ Parameter ^ Type ^ Default ^ Description ^
| ''$theme_title'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — boolen|string

activateTheme()

public function activateTheme($id, $sanitize)

lines 183–193 (11)

Activate theme function

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

deactivateTheme()

public function deactivateTheme($id, $sanitize)

lines 203–220 (18)

Deactivate theme function

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

findThemeByDirectory()

public function findThemeByDirectory($directory)

lines 230–243 (14)

Find theme by directory name

^ Parameter ^ Type ^ Default ^ Description ^
| ''$directory'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — array|null

getThemeType()

public function getThemeType($id)

lines 252–257 (6)

Find theme type (free or premium) for a given theme ID.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — string|boolean

saveLicense()

public function saveLicense($id, array $license)

lines 266–279 (14)

Save license information for a theme.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$license'' | ''array'' | //required// | //none// |

Returns: (none declared)

setLicenseStatus()

public function setLicenseStatus($id, $status)

lines 288–293 (6)

Update just the license status for a theme.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$status'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

findActiveThemes()

public function findActiveThemes(): array

lines 302–311 (10)

Find active themes

Takes no parameters.

Returns: array — array

totalThemeRecords()

public function totalThemeRecords(array $data = array()): ?int

lines 321–326 (6)

Total theme record function

^ Parameter ^ Type ^ Default ^ Description ^
| ''$data'' | ''array'' | ''array()'' | //none// |

Returns: ?int — numeric|integer|null

themeExists()

public function themeExists($theme_title)

lines 337–344 (8)

Theme exists function

is theme exists or not

^ Parameter ^ Type ^ Default ^ Description ^
| ''$theme_title'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — boolean

insertThemeLicense()

public function insertThemeLicense(array $bind)

lines 351–361 (11)

Insert a theme license activation record.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$bind'' | ''array'' | //required// | //none// |

Returns: (none declared)

findThemeLicense()

public function findThemeLicense($licenseKey, $domain)

lines 370–379 (10)

Find a theme license activation by key and domain.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$licenseKey'' | ''(untyped)'' | //required// | //none// |
| ''$domain'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — array|false

updateThemeLicense()

public function updateThemeLicense($id, array $bind)

lines 387–390 (4)

Update a theme license activation record.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$bind'' | ''array'' | //required// | //none// |

Returns: (none declared)

findThemeLicensesByThemeId()

public function findThemeLicensesByThemeId($themeId): array

lines 398–405 (8)

Get all license activations for a given theme.

^ Parameter ^ Type ^ Default ^ Description ^
| ''$themeId'' | ''(untyped)'' | //required// | //none// |

Returns: array — array

loadTheme()

public function loadTheme($theme_status)

lines 413–433 (21)

Total theme record function

^ Parameter ^ Type ^ Default ^ Description ^
| ''$theme_status'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared) — mixed

Imports

^ Alias ^ Fully-qualified name ^
| ''Dao'' | [[scriptlog:lib:core:dao|''Scriptlog\Core\Dao'']] |
| ''Registry'' | [[scriptlog:lib:core:registry|''Scriptlog\Core\Registry'']] |

This page is generated from source by 'tools/gendoc'. Edits will be overwritten.

scriptlog/lib/dao/themedao.1790413760.txt.gz · Last modified: by admin