Source for file LoginEngine.php

Documentation is available at LoginEngine.php

  1. <?php
  2. /*
  3. * This file is part of Sylar.
  4. *
  5. * Sylar is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * Sylar is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public License
  16. * along with Sylar. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. * @copyright Copyright Sylar Development Team
  19. * @license http://www.gnu.org/licenses/ GNU Public License V2.0
  20. * @see https://launchpad.net/sylar/
  21. * @see http://www.giano-solutions.com
  22. */
  23.  
  24. import('sylar.common.security.Session');
  25.  
  26.  
  27. /**
  28. * Tit File
  29. *
  30. * Desc File
  31. *
  32. * @package Sylar
  33. * @version 1.0
  34. * @since 03/apr/08
  35. * @author Gianluca Giusti [brdp] <g.giusti@giano-solutions.com>
  36. * @copyright Sylar Development Team
  37. */
  38. class App_LoginEngine extends App_Format{
  39. function __construct(){
  40. parent::__construct();
  41. }
  42. function __destruct(){
  43. // nothing to do at the moment
  44. }
  45.  
  46. // Public Methods
  47. //__________________________________________________________________________
  48. public function isUserLogged(){
  49. $session = new Sylar_Session();
  50. if($session->isUserLogged()){
  51. return true;
  52. }
  53. return false;
  54. }
  55. public function extractUserInfo(){
  56. $session = new Sylar_Session();
  57. if($session->isUserLogged()){
  58. return $session->getSessionParam("name")." ".$session->getSessionParam("surname");
  59. }
  60. return null;
  61. }
  62. public function performDummyLogin(){
  63. $session = new Sylar_Session();
  64. $session->login("brdp", "brdp");
  65. }
  66. public function performDummyLogout(){
  67. $session = new Sylar_Session();
  68. $session->logout();
  69. }
  70. }
  71. ?>

Documentation generated on Thu, 24 Apr 2008 16:14:17 +0200 by phpDocumentor 1.3.0RC3