4
0
Fork 0
api-powers/src/f815fb33-f721-48a5-a84e-53f...
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 Watcher (Details)

namespace: TrueChristianChurch\Joomla\GetBible

@startuml
class Watcher << (F,LightGreen) >> #RoyalBlue {
  # Load $load
  # Translation $translation
  # Book $book
  # Chapter $chapter
  # bool $fresh
  + __construct(Load $load, Translation $translation, ...)
  + sync(string $translation, int $book, ...) : bool
  + isNew() : bool
  + enoughVerses(string $translation = 'kjv') : bool
  + totalVerses(string $translation = 'kjv') : ?int
  + getNextChapter(string $translation, int $book, ...) : ?int
  + getPreviousChapter(int $chapter, bool $force = false) : ?int
  + getLastChapter(string $translation, int $book) : ?int
  + getNextBook(string $translation, int $book, ...) : ?int
  + getPreviousBook(string $translation, int $book, ...) : ?int
  - forceUpdate(bool $state) : void
}

note right of Watcher::__construct
  Constructor

  since: 2.0.1
  
  arguments:
    Load $load
    Translation $translation
    Book $book
    Chapter $chapter
end note

note left of Watcher::sync
  Watching that the local Database and API is in sync

  since: 2.0.1
  return: bool
  
  arguments:
    string $translation
    int $book
    int $chapter
    bool $force = false
end note

note right of Watcher::isNew
  The see if new chapters was installed, and therefore new

  since: 2.0.1
  return: bool
end note

note left of Watcher::enoughVerses
  Check if a translation has enough verses

  since: 2.0.1
  return: bool
end note

note right of Watcher::totalVerses
  Get the total number of verses in the database of a given translation

  since: 2.0.1
  return: ?int
end note

note left of Watcher::getNextChapter
  Get the next chapter

  since: 2.0.1
  return: ?int
  
  arguments:
    string $translation
    int $book
    int $chapter
    bool $force = false
end note

note right of Watcher::getPreviousChapter
  Get the previous chapter

  since: 2.0.1
  return: ?int
end note

note left of Watcher::getLastChapter
  Get the last chapter of a book

  since: 2.0.1
  return: ?int
end note

note right of Watcher::getNextBook
  Get the next book

  since: 2.0.1
  return: ?int
  
  arguments:
    string $translation
    int $book
    int $try
end note

note left of Watcher::getPreviousBook
  Get the previous book

  since: 2.0.1
  return: ?int
  
  arguments:
    string $translation
    int $book
    int $try
end note

note right of Watcher::forceUpdate
  The method to set the update state

  since: 2.0.1
  return: void
end note
 
@enduml

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

Build with Joomla Component Builder