X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FLinkDB.php;h=c8b162b6b4931678fde97767cfc3775483e07efb;hb=refs%2Fpull%2F673%2Fhead;hp=f5f209f61837a43417e7607a433adf5714e5f0be;hpb=f21abf329234ae4d5a1d56c5a9dd0bc11f80bac8;p=github%2Fshaarli%2FShaarli.git diff --git a/application/LinkDB.php b/application/LinkDB.php index f5f209f6..c8b162b6 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php @@ -87,7 +87,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess * @param string $redirector link redirector set in user settings. * @param boolean $redirectorEncode Enable urlencode on redirected urls (default: true). */ - function __construct( + public function __construct( $datastore, $isLoggedIn, $hidePublicLinks, @@ -164,7 +164,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess /** * Iterator - Returns the current element */ - function current() + public function current() { return $this->links[$this->keys[$this->position]]; } @@ -172,7 +172,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess /** * Iterator - Returns the key of the current element */ - function key() + public function key() { return $this->keys[$this->position]; } @@ -180,7 +180,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess /** * Iterator - Moves forward to next element */ - function next() + public function next() { ++$this->position; } @@ -190,7 +190,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess * * Entries are sorted by date (latest first) */ - function rewind() + public function rewind() { $this->keys = array_keys($this->links); rsort($this->keys); @@ -200,7 +200,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess /** * Iterator - Checks if current position is valid */ - function valid() + public function valid() { return isset($this->keys[$this->position]); }