src/Controller/Component/AuthenticationComponent.php
public function setIdentity(ArrayAccess $identity)
    {
        $controller = $this->getController();

        $result = $this->getAuthenticationService()->persistIdentity(
            $controller->request,
            $controller->response,
            $identity
        );

        $controller->setRequest($result['request']);
        $controller->response = $result['response'];

        return $this;
    }
public function setIdentity(ArrayAccess $identity)
    {
        $controller = $this->getController();

        $result = $this->getAuthenticationService()->persistIdentity(
            $controller->request,
            $controller->response,
            $identity
        );

        $controller->setRequest($result['request']);
        $controller->response = $result['response'];

        return $this;
    }
public function setIdentity ( ArrayAccess $ identity ) { $ controller = $ this -> getController ( ) ; $ result = $ this -> getAuthenticationService ( ) -> persistIdentity ( $ controller -> request , $ controller -> response , $ identity ) ; $ controller -> setRequest ( $ result [ 'request' ] ) ; $ controller -> response = $ result [ 'response' ] ; return $ this ; }
Set identity data to all authenticators that are loaded and support persistence.

@param \ArrayAccess $identity Identity data to persist.
@return $this
Set identity data to all authenticators that are loaded and support persistence .