/**
  * Returns the next Account.
  * 
  * @return mixed The next Account object or false if we are at the end of the list.
  */
 public function getNextAccount()
 {
     if (!$this->allDataFetched) {
         $this->fetchNextAccount();
     }
     return nextByKey($this->accounts, $this->currentAccount);
 }
 /**
  * Returns the next Currency.
  * 
  * @return mixed The next Currency object or false if we are at the end of the list.
  */
 public function getNextCurrency()
 {
     if (!$this->allDataFetched) {
         $this->fetchNextCurrency();
     }
     return nextByKey($this->currencies, $this->currentCurrency);
 }
 /**
  * Returns the next Category.
  * 
  * @return mixed The next Category object or false if we are at the end of the list.
  */
 public function getNextCategory()
 {
     if ($this->fistRunNextCategory) {
         while (!$this->allDataFetched) {
             $this->fetchNextCategory();
         }
         $this->sortCategories();
         $this->fistRunNextCategory = false;
     }
     return nextByKey($this->categories, $this->currentCategory);
 }
Exemplo n.º 4
0
 /**
  * Returns the next transaction.
  * 
  * Essentially the same as getNextFinishedTransaction, but first fetches all planned transactions
  * and expands them.
  * 
  * @return mixed The next FinishedTransaction object or false if we are at the end of the list.
  */
 public function getNextTransaction()
 {
     $this->fetchTransactions();
     return nextByKey($this->finishedTransactions, $this->currentFinishedTransaction);
 }