4
0
Fork 0
api-powers/src/899551ac-943e-4f81-becd-7e1...
Robot cfe9fa7ba7
update 2024-04-06 15:05:35
2024-04-06 15:05:35 +02:00
..
README.md update 2024-04-06 15:05:35 2024-04-06 15:05:35 +02:00
code.php update 2024-04-06 15:05:35 2024-04-06 15:05:35 +02:00
code.power update 2023-09-26 08:24:03 2023-09-26 08:24:03 +02:00
settings.json update 2024-04-06 15:05:35 2024-04-06 15:05:35 +02:00

README.md

██████╗  ██████╗ ██╗    ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║    ██║██╔════╝██╔══██╗
██████╔╝██║   ██║██║ █╗ ██║█████╗  ██████╔╝
██╔═══╝ ██║   ██║██║███╗██║██╔══╝  ██╔══██╗
██║     ╚██████╔╝╚███╔███╔╝███████╗██║  ██║
╚═╝      ╚═════╝  ╚══╝╚══╝ ╚══════╝╚═╝  ╚═╝

final class Word (Details)

namespace: TrueChristianChurch\Joomla\GetBible\Data

@startuml
class Word << (F,LightGreen) >> #RoyalBlue {
  # Verse $verse
  # Config $config
  # Prompt $prompt
  # array $words
  # array $sequential
  # ?array $verses
  # ?array $valid
  + __construct(Verse $verse, Config $config, ...)
  + getNumber() : string
  + getText() : string
  - get() : ?object
  - loadWordData(string $cacheKey, string $verses, ...) : ?object
  - selectedWordNumbers(string $verse, string $words) : array
  - selectedWordNumbersToString(array $wordNumberArray) : string
  - selectedWord(array $words) : array
  - selectedWordToString(array $wordArray) : string
  - splitAndTrim(string $str) : array
  - isValidWordNumber(int $verseNumber, int $wordNumber) : bool
  - isSequential(array $arr) : bool
  - generateCacheKey(string $abbreviation, int $book, ...) : string
}

note right of Word::__construct
  Constructor

  since: 2.0.1
  
  arguments:
    Verse $verse
    Config $config
    Prompt $prompt
end note

note left of Word::getNumber
  Get the word number/s

  since: 2.0.1
  return: string
end note

note right of Word::getText
  Get the word text

  since: 2.0.1
  return: string
end note

note left of Word::get
  Get the words

  since: 2.0.1
  return: ?object
end note

note right of Word::loadWordData
  Loads the word data

  since: 2.0.1
  return: ?object
  
  arguments:
    string $cacheKey
    string $verses
    string $words
end note

note left of Word::selectedWordNumbers
  Build word number array from verse and words.

  since: 2.0.1
  return: array
end note

note right of Word::selectedWordNumbersToString
  Converts word number array to string.

  since: 2.0.1
  return: string
end note

note left of Word::selectedWord
  Build word array from verse and words.

  since: 2.0.1
  return: array
end note

note right of Word::selectedWordToString
  Converts word array to string.

  since: 2.0.1
  return: string
end note

note left of Word::splitAndTrim
  Split string by '-' and trim each element.

  since: 2.0.1
  return: array
end note

note right of Word::isValidWordNumber
  Check if a word exist in a verse

  since: 2.0.1
  return: bool
end note

note left of Word::isSequential
  Check if an array values is sequential.

  since: 2.0.1
  return: bool
end note

note right of Word::generateCacheKey
  Generates a cache key based on the abbreviation, book, chapter, verses, and  words

  since: 2.0.1
  return: string
  
  arguments:
    string $abbreviation
    int $book
    int $chapter
    string $verses
    string $words
end note
 
@enduml

     ██╗ ██████╗██████╗
     ██║██╔════╝██╔══██╗
     ██║██║     ██████╔╝
██   ██║██║     ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
 ╚════╝  ╚═════╝╚═════╝

Build with Joomla Component Builder