Source for file Users.php

Documentation is available at Users.php

  1. <?php
  2.  
  3. class Users
  4. {
  5.     private static $accounts array('dirk'        => 'myPass',
  6.                                      'albert'    => 'einstein');
  7.                             
  8.     public static function validate($user$password)
  9.     {
  10.         return self::$accounts[$user== $password;
  11.     }
  12.     
  13.     public function __call($name$arguments)
  14.     {
  15.         if (preg_match("/^validate(.*)$/"$name$matches&& count($arguments0{
  16.             return self::validate($matches[1]$arguments[0]);
  17.         }
  18.     }
  19. }
  20.  
  21. ?>

Documentation generated on Mon, 26 Jul 2010 21:52:59 +0100 by phpDocumentor 1.4.3