phpPoA2
[ class tree: phpPoA2 ] [ index: phpPoA2 ] [ all elements ]

Source for file InviteConfigurator.php

Documentation is available at InviteConfigurator.php

  1. <?php
  2. /**
  3.  * @copyright Copyright 2005-2010 RedIRIS, http://www.rediris.es/
  4.  *
  5.  *  This file is part of phpPoA2.
  6.  *
  7.  *  phpPoA2 is free software: you can redistribute it and/or modify
  8.  *  it under the terms of the GNU General Public License as published by
  9.  *  the Free Software Foundation, either version 3 of the License, or
  10.  *  (at your option) any later version.
  11.  *
  12.  *  phpPoA2 is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *  GNU General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU General Public License
  18.  *  along with phpPoA2. If not, see <http://www.gnu.org/licenses/>.
  19.  *
  20.  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
  21.  * @version 2.0
  22.  * @author Jaime Perez <jaime.perez@rediris.es>
  23.  * @filesource
  24.  */
  25.  
  26. /**
  27.  * Configurator for the Invitation based authorization engine.
  28.  * @package phpPoA2
  29.  * @subpackage InviteAuthorizationEngine
  30.  */
  31.  
  32.     protected $mandatory_options = array('InvitesDBType',
  33.                                          'AuthorizedDBType',
  34.                                          'AdminEmail',
  35.                                          'InviteURL',
  36.                                          'InviteText',
  37.                                          'InviteSubject',
  38.                                          'UniqueAttributes');
  39.  
  40.     /**
  41.      * Returns
  42.      * @return string 
  43.      */
  44.     public function getAdminEmail({
  45.         return $this->cfg['AdminEmail'];
  46.     }
  47.  
  48.     /**
  49.      * Returns
  50.      * @return string 
  51.      */
  52.     public function getInviteText({
  53.         return $this->cfg['InviteText'];
  54.     }
  55.  
  56.     /**
  57.      * Returns
  58.      * @return string 
  59.      */
  60.     public function getInviteSubject({
  61.         return $this->cfg['InviteSubject'];
  62.     }
  63.  
  64.     /**
  65.      * Returns
  66.      * @return array 
  67.      */
  68.     public function getUniqueAttributes({
  69.         if (!is_array($this->cfg['UniqueAttributes'])) {
  70.             return array($this->cfg['UniqueAttributes']);
  71.         }
  72.         return $this->cfg['UniqueAttributes'];
  73.     }
  74.  
  75.     /*
  76.      * Returns 
  77.      * @return string
  78.      */
  79.     public function getEmailVerifyAttribute({
  80.         if (isset($this->cfg['EmailVerifyAttribute'])) {
  81.             return $this->cfg['EmailVerifyAttribute'];
  82.         }
  83.         return "";
  84.     }
  85.  
  86.     /*
  87.      * Returns 
  88.      * @return string 
  89.      */
  90.     public function getEmailVerifyRegEx({
  91.         if (isset($this->cfg['EmailVerifyRegEx'])) {
  92.             return $this->cfg['EmailVerifyRegEx'];
  93.         }
  94.         return "(.*)";
  95.     }
  96.  
  97.     /*
  98.      * Returns 
  99.      * @return string 
  100.      */
  101.     public function getEmailVerifyAlgRegEx({
  102.         if (isset($this->cfg['EmailVerifyAlgRegEx'])) {
  103.             return $this->cfg['EmailVerifyAlgRegEx'];
  104.         }
  105.         return "";
  106.     }
  107.  
  108.     /*
  109.      * Returns 
  110.      * @return boolean 
  111.      */
  112.     public function doEmailVerify({
  113.         if (isset($this->cfg['EmailVerify'])) {
  114.             return $this->cfg['EmailVerify'=== true;
  115.         }
  116.         return false// do not verify by default
  117.     }
  118.  
  119.     /**
  120.      * Returns
  121.      * @return string 
  122.      */
  123.     public function getInviteURL({
  124.         return $this->cfg['InviteURL'];
  125.     }
  126.  
  127.     /**
  128.      * Returns
  129.      * @return integer 
  130.      */
  131.     public function getInvitesDBType({
  132.         return $this->cfg['InvitesDBType'];
  133.     }
  134.  
  135.     /**
  136.      * Returns
  137.      * @return string 
  138.      */
  139.     public function getInvitesDBFile({
  140.         return @$this->cfg['InvitesDBFile'];
  141.     }
  142.  
  143.     /**
  144.      * Returns
  145.      * @return string 
  146.      */
  147.     public function getInvitesDBHost({
  148.         return @$this->cfg['InvitesDBHost'];
  149.     }
  150.  
  151.     /**
  152.      * Returns
  153.      * @return string 
  154.      */
  155.     public function getInvitesDBUser({
  156.         return @$this->cfg['InvitesDBUser'];
  157.     }
  158.  
  159.     /**
  160.      * Returns
  161.      * @return string 
  162.      */
  163.     public function getInvitesDBPassword({
  164.         return @$this->cfg['InvitesDBPassword'];
  165.     }
  166.  
  167.     /**
  168.      * Returns
  169.      * @return string 
  170.      */
  171.     public function getInvitesDBName({
  172.         return @$this->cfg['InvitesDBName'];
  173.     }
  174.  
  175.     /**
  176.      * Returns
  177.      * @return integer 
  178.      */
  179.     public function getAuthorizedDBType({
  180.         return $this->cfg['AuthorizedDBType'];
  181.     }
  182.  
  183.     /**
  184.      * Returns
  185.      * @return string 
  186.      */
  187.     public function getAuthorizedDBFile({
  188.         return @$this->cfg['AuthorizedDBFile'];
  189.     }
  190.  
  191.     /**
  192.      * Returns
  193.      * @return string 
  194.      */
  195.     public function getAuthorizedDBHost({
  196.         return @$this->cfg['AuthorizedDBHost'];
  197.     }
  198.  
  199.     /**
  200.      * Returns
  201.      * @return string 
  202.      */
  203.     public function getAuthorizedDBUser({
  204.         return @$this->cfg['AuthorizedDBUser'];
  205.     }
  206.  
  207.     /**
  208.      * Returns
  209.      * @return string 
  210.      */
  211.     public function getAuthorizedDBPassword({
  212.         return @$this->cfg['AuthorizedDBPassword'];
  213.     }
  214.  
  215.     /**
  216.      * Returns
  217.      * @return string 
  218.      */
  219.     public function getAuthorizedDBName({
  220.         return @$this->cfg['AuthorizedDBName'];
  221.     }
  222.  
  223. }
  224.  
  225. ?>

Documentation generated on Wed, 13 Oct 2010 15:06:19 +0200 by phpDocumentor 1.4.3