Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:dao:translationdao

This is an old revision of the document!


TranslationDao

Layer: DAO · Source: lib/dao/TranslationDao.php:9 (lines 9–205)


class TranslationDao extends Dao

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 | ''createTranslation()'' | (undocumented) | 11 |
| public | ''findById()'' | (undocumented) | 25 |
| public | ''findTranslationsByLocale()'' | (undocumented) | 32 |
| public | ''findTranslationByKey()'' | (undocumented) | 41 |
| public | ''findByContext()'' | (undocumented) | 49 |
| public | ''search()'' | (undocumented) | 58 |
| public | ''updateTranslation()'' | (undocumented) | 68 |
| public | ''deleteTranslation()'' | (undocumented) | 73 |
| public | ''deleteByLanguage()'' | (undocumented) | 78 |
| public | ''exportToJson()'' | (undocumented) | 83 |
| public | ''countByLanguage()'' | (undocumented) | 95 |
| public | ''getDistinctContexts()'' | (undocumented) | 102 |
| public | ''findByKeyPrefix()'' | (undocumented) | 111 |
| public | ''findByLocaleCode()'' | (undocumented) | 120 |
| public | ''getTranslationValue()'' | (undocumented) | 131 |
| public | ''findTranslationsPaginated()'' | (undocumented) | 141 |
| public | ''findByContextPaginated()'' | (undocumented) | 151 |
| public | ''searchPaginated()'' | (undocumented) | 161 |
| public | ''countByContext()'' | (undocumented) | 172 |
| public | ''countSearch()'' | (undocumented) | 179 |
| public | ''countAllTranslations()'' | (undocumented) | 188 |
| public | ''findAllTranslationsPaginated()'' | (undocumented) | 195 |

createTranslation()

public function createTranslation(array $data): int

lines 11–23 (13)

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

Returns: int

findById()

public function findById(int $id): ?array

lines 25–30 (6)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''int'' | //required// | //none// |

Returns: ?array

findTranslationsByLocale()

public function findTranslationsByLocale(int $langId): array

lines 32–39 (8)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |

Returns: array

findTranslationByKey()

public function findTranslationByKey(int $langId, string $key): ?array

lines 41–47 (7)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$key'' | ''string'' | //required// | //none// |

Returns: ?array

findByContext()

public function findByContext(int $langId, string $context): array

lines 49–56 (8)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$context'' | ''string'' | //required// | //none// |

Returns: array

search()

public function search(int $langId, string $query): array

lines 58–66 (9)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$query'' | ''string'' | //required// | //none// |

Returns: array

updateTranslation()

public function updateTranslation(int $id, array $data): void

lines 68–71 (4)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''int'' | //required// | //none// |
| ''$data'' | ''array'' | //required// | //none// |

Returns: void

deleteTranslation()

public function deleteTranslation(int $id): void

lines 73–76 (4)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''int'' | //required// | //none// |

Returns: void

deleteByLanguage()

public function deleteByLanguage(int $langId): void

lines 78–81 (4)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |

Returns: void

exportToJson()

public function exportToJson(int $langId): array

lines 83–93 (11)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |

Returns: array

countByLanguage()

public function countByLanguage(int $langId): int

lines 95–100 (6)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |

Returns: int

getDistinctContexts()

public function getDistinctContexts(): array

lines 102–109 (8)

Takes no parameters.

Returns: array

findByKeyPrefix()

public function findByKeyPrefix(int $langId, string $prefix): array

lines 111–118 (8)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$prefix'' | ''string'' | //required// | //none// |

Returns: array

findByLocaleCode()

public function findByLocaleCode(string $localeCode): array

lines 120–129 (10)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$localeCode'' | ''string'' | //required// | //none// |

Returns: array

getTranslationValue()

public function getTranslationValue(int $langId, string $key): ?string

lines 131–139 (9)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$key'' | ''string'' | //required// | //none// |

Returns: ?string

findTranslationsPaginated()

public function findTranslationsPaginated(int $langId, int $offset, int $limit): array

lines 141–149 (9)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$offset'' | ''int'' | //required// | //none// |
| ''$limit'' | ''int'' | //required// | //none// |

Returns: array

findByContextPaginated()

public function findByContextPaginated(int $langId, string $context, int $offset, int $limit): array

lines 151–159 (9)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$context'' | ''string'' | //required// | //none// |
| ''$offset'' | ''int'' | //required// | //none// |
| ''$limit'' | ''int'' | //required// | //none// |

Returns: array

searchPaginated()

public function searchPaginated(int $langId, string $query, int $offset, int $limit): array

lines 161–170 (10)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$query'' | ''string'' | //required// | //none// |
| ''$offset'' | ''int'' | //required// | //none// |
| ''$limit'' | ''int'' | //required// | //none// |

Returns: array

countByContext()

public function countByContext(int $langId, string $context): int

lines 172–177 (6)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$context'' | ''string'' | //required// | //none// |

Returns: int

countSearch()

public function countSearch(int $langId, string $query): int

lines 179–186 (8)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$langId'' | ''int'' | //required// | //none// |
| ''$query'' | ''string'' | //required// | //none// |

Returns: int

countAllTranslations()

public function countAllTranslations(): int

lines 188–193 (6)

Takes no parameters.

Returns: int

findAllTranslationsPaginated()

public function findAllTranslationsPaginated(int $offset, int $limit): array

lines 195–204 (10)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$offset'' | ''int'' | //required// | //none// |
| ''$limit'' | ''int'' | //required// | //none// |

Returns: array

Imports

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

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

scriptlog/lib/dao/translationdao.1790413761.txt.gz · Last modified: by admin