Relates to https://github.com/shaarli/Shaarli/issues/95
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* @param string $redirector link redirector set in user settings.
* @param boolean $redirectorEncode Enable urlencode on redirected urls (default: true).
*/
* @param string $redirector link redirector set in user settings.
* @param boolean $redirectorEncode Enable urlencode on redirected urls (default: true).
*/
+ public function __construct(
$datastore,
$isLoggedIn,
$hidePublicLinks,
$datastore,
$isLoggedIn,
$hidePublicLinks,
/**
* Iterator - Returns the current element
*/
/**
* Iterator - Returns the current element
*/
+ public function current()
{
return $this->links[$this->keys[$this->position]];
}
{
return $this->links[$this->keys[$this->position]];
}
/**
* Iterator - Returns the key of the current element
*/
/**
* Iterator - Returns the key of the current element
*/
{
return $this->keys[$this->position];
}
{
return $this->keys[$this->position];
}
/**
* Iterator - Moves forward to next element
*/
/**
* Iterator - Moves forward to next element
*/
*
* Entries are sorted by date (latest first)
*/
*
* Entries are sorted by date (latest first)
*/
+ public function rewind()
{
$this->keys = array_keys($this->links);
rsort($this->keys);
{
$this->keys = array_keys($this->links);
rsort($this->keys);
/**
* Iterator - Checks if current position is valid
*/
/**
* Iterator - Checks if current position is valid
*/
+ public function valid()
{
return isset($this->keys[$this->position]);
}
{
return isset($this->keys[$this->position]);
}
/**
* Populates the test DB with reference data
*/
/**
* Populates the test DB with reference data
*/
+ public function __construct()
{
$this->addLink(
'Link title: @website',
{
$this->addLink(
'Link title: @website',