Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Set extension hook implementation visibility to protected #79

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions code/AuditHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public static function handle_manipulation($manipulation)
/**
* Log a record being published.
*/
public function onAfterPublish(&$original)
protected function onAfterPublish(&$original)
{
$member = Security::getCurrentUser();
if (!$member || !$member->exists()) {
Expand Down Expand Up @@ -203,7 +203,7 @@ public function onAfterPublish(&$original)
/**
* Log a record being unpublished.
*/
public function onAfterUnpublish()
protected function onAfterUnpublish()
{
$member = Security::getCurrentUser();
if (!$member || !$member->exists()) {
Expand All @@ -223,7 +223,7 @@ public function onAfterUnpublish()
/**
* Log a record being reverted to live.
*/
public function onAfterRevertToLive()
protected function onAfterRevertToLive()
{
$member = Security::getCurrentUser();
if (!$member || !$member->exists()) {
Expand All @@ -244,7 +244,7 @@ public function onAfterRevertToLive()
/**
* Log a record being duplicated.
*/
public function onAfterDuplicate()
protected function onAfterDuplicate()
{
$member = Security::getCurrentUser();
if (!$member || !$member->exists()) {
Expand All @@ -264,7 +264,7 @@ public function onAfterDuplicate()
/**
* Log a record being deleted.
*/
public function onAfterDelete()
protected function onAfterDelete()
{
$member = Security::getCurrentUser();
if (!$member || !$member->exists()) {
Expand All @@ -284,7 +284,7 @@ public function onAfterDelete()
/**
* Log a record being restored to stage.
*/
public function onAfterRestoreToStage()
protected function onAfterRestoreToStage()
{
$member = Security::getCurrentUser();
if (!$member || !$member->exists()) {
Expand Down Expand Up @@ -316,7 +316,7 @@ public function afterMemberLoggedIn()
/**
* Log successfully restored sessions from "remember me" cookies ("auto login").
*/
public function memberAutoLoggedIn()
protected function memberAutoLoggedIn()
{
$this->getAuditLogger()->info(sprintf(
'"%s" (ID: %s) successfully restored autologin session',
Expand Down Expand Up @@ -348,15 +348,15 @@ public function authenticationFailed($data)
/**
* Log failed login attempts when the email address doesn't map to an existing member record
*/
public function authenticationFailedUnknownUser($data)
protected function authenticationFailedUnknownUser($data)
{
$this->authenticationFailed($data);
}

/**
* Log permission failures (where the status is set after init of page).
*/
public function onAfterInit()
protected function onAfterInit()
{
// Suppress errors if dev/build necessary
if (!Security::database_is_ready()) {
Expand Down
10 changes: 5 additions & 5 deletions code/AuditHookMFA.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AuditHookMFA extends DataExtension
* @param Member $member
* @param MethodInterface $method
*/
public function onMethodVerificationSuccess(Member $member, $method)
protected function onMethodVerificationSuccess(Member $member, $method)
{
$this->getAuditLogger()->info(
sprintf(
Expand All @@ -41,7 +41,7 @@ public function onMethodVerificationSuccess(Member $member, $method)
* @param Member $member
* @param MethodInterface $method
*/
public function onMethodVerificationFailure(Member $member, $method)
protected function onMethodVerificationFailure(Member $member, $method)
{
$context = [
'method' => get_class($method),
Expand All @@ -64,7 +64,7 @@ public function onMethodVerificationFailure(Member $member, $method)
*
* @param Member $member
*/
public function onSkipRegistration(Member $member)
protected function onSkipRegistration(Member $member)
{
$this->getAuditLogger()->info(sprintf(
'"%s" (ID: %s) skipped MFA registration',
Expand All @@ -77,7 +77,7 @@ public function onSkipRegistration(Member $member)
* @param Member $member
* @param MethodInterface $method
*/
public function onRegisterMethod(Member $member, $method)
protected function onRegisterMethod(Member $member, $method)
{
$context = [
'method' => get_class($method),
Expand All @@ -96,7 +96,7 @@ public function onRegisterMethod(Member $member, $method)
* @param Member $member
* @param MethodInterface $method
*/
public function onRegisterMethodFailure(Member $member, $method)
protected function onRegisterMethodFailure(Member $member, $method)
{
$context = [
'method' => get_class($method),
Expand Down
2 changes: 1 addition & 1 deletion code/AuditHookSessionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AuditHookSessionManager extends DataExtension
*
* @param LoginSession $loginSession
*/
public function onBeforeRemoveLoginSession(LoginSession $loginSession)
protected function onBeforeRemoveLoginSession(LoginSession $loginSession)
{
$member = $loginSession->Member();
$currentUser = Security::getCurrentUser();
Expand Down
2 changes: 1 addition & 1 deletion code/Extensions/DatabaseExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class DatabaseExtension extends Extension
{
public function onBeforeManipulate(array &$manipulation)
protected function onBeforeManipulate(array &$manipulation)
{
AuditHook::handle_manipulation($manipulation);
}
Expand Down
Loading