Rename method for the website GetLoans and recreate GetCirculations for internal tools

This commit is contained in:
Gilles Crettenand
2015-06-04 10:50:12 +02:00
parent d25f4f7ceb
commit 7ac2b107dc
2 changed files with 74 additions and 10 deletions

View File

@@ -411,15 +411,28 @@ class NetBiblio extends WebService
}
/**
* This method returns the list of books that are currently let to the
* authenticated user.
* This method returns the list of all Circulations for the currently
* authenticated user in a format suited for BSR internal tools
* (CD engraving for example).
*
* @return array
* @throws AuthenticationException
*/
public function GetCirculations()
{
$circulations = $this->getUser()->getCirculations();
return $this->getUser()->GetCirculations();
}
/**
* This method returns the list of books that are currently lent to the
* authenticated user.
*
* @return array
* @throws AuthenticationException
*/
public function GetLoans()
{
$circulations = $this->getUser()->GetLoans();
return array_values($this->AddBookData($circulations));
}
@@ -430,9 +443,9 @@ class NetBiblio extends WebService
* @return array
* @throws AuthenticationException
*/
public function GetOldCirculations()
public function GetOldLoans()
{
$circulations = $this->getUser()->getOldCirculations();
$circulations = $this->getUser()->GetOldLoans();
return array_values($this->AddBookData($circulations));
}