Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
d0b45011
Commit
d0b45011
authored
Feb 19, 2016
by
Laurent Lécluse
Browse files
Accès au flashMessengher depuis les assertions
parent
35ab756c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/Assertion/AbstractAssertion.php
View file @
d0b45011
...
...
@@ -5,6 +5,7 @@ namespace UnicaenAuth\Assertion;
use
BjyAuthorize\Service\Authorize
;
use
UnicaenAuth\Service\Traits\UserContextServiceAwareTrait
;
use
Zend\Mvc\Application
;
use
Zend\Mvc\Controller\Plugin\FlashMessenger
;
use
Zend\Mvc\MvcEvent
;
use
Zend\Permissions\Acl\Acl
;
use
Zend\Permissions\Acl\Assertion\AssertionInterface
;
...
...
@@ -33,6 +34,11 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw
*/
private
$role
=
false
;
/**
* @var FlashMessenger
*/
private
$fm
;
/**
...
...
@@ -293,4 +299,17 @@ abstract class AbstractAssertion implements AssertionInterface, ServiceLocatorAw
return
$serviceAuthorize
;
}
/**
* @return FlashMessenger
*/
protected
function
flashMessenger
()
{
if
(
!
$this
->
fm
){
$this
->
fm
=
$this
->
getServiceLocator
()
->
get
(
'controllerpluginmanager'
)
->
get
(
'flashmessenger'
);
}
return
$this
->
fm
;
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment