Skip to content

Commit

Permalink
API Standardise extension hooks (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Aug 27, 2024
1 parent eab840e commit c2d37cc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Dev/VersionedTestSessionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class VersionedTestSessionExtension extends VersionedStateExtension
*
* @param string $url
*/
public function updateLink(&$url)
protected function updateLink(&$url)
{
$session = $this->owner->session();
if (!$session) {
Expand Down
4 changes: 2 additions & 2 deletions src/Versioned.php
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ protected function extendcanRestoreToDraft()
* @param Member $member
* @return bool|null
*/
public function canView($member = null)
protected function canView($member = null)
{
// Invoke default version-gnostic canView
if ($this->owner->canViewVersioned($member) === false) {
Expand Down Expand Up @@ -2888,7 +2888,7 @@ protected function onBeforeDuplicate($source, $doWrite)
$this->owner->Version = 0;
}

public function flushCache()
protected function onFlushCache()
{
Versioned::$cache_versionnumber = [];
$this->versionModifiedCache = [];
Expand Down
2 changes: 1 addition & 1 deletion src/VersionedStateExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class VersionedStateExtension extends Extension
*
* @param string $link
*/
public function updateLink(&$link)
protected function updateLink(&$link)
{
// Skip if link already contains reading mode
if ($this->hasVersionedQuery($link)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/php/VersionedTest/PublicExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class PublicExtension extends DataExtension implements TestOnly
{
public function canViewNonLive($member = null)
protected function canViewNonLive($member = null)
{
return true;
}
Expand Down

0 comments on commit c2d37cc

Please sign in to comment.