Apache Zeta Components Manual :: File Source for database_info.php

Source for file database_info.php

Documentation is available at database_info.php

  1. <?php
  2. /**
  3.  * File containing the ezcAuthenticationDatabaseInfo structure.
  4.  *
  5.  * Licensed to the Apache Software Foundation (ASF) under one
  6.  * or more contributor license agreements.  See the NOTICE file
  7.  * distributed with this work for additional information
  8.  * regarding copyright ownership.  The ASF licenses this file
  9.  * to you under the Apache License, Version 2.0 (the
  10.  * "License"); you may not use this file except in compliance
  11.  * with the License.  You may obtain a copy of the License at
  12.  * 
  13.  *   http://www.apache.org/licenses/LICENSE-2.0
  14.  * 
  15.  * Unless required by applicable law or agreed to in writing,
  16.  * software distributed under the License is distributed on an
  17.  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18.  * KIND, either express or implied.  See the License for the
  19.  * specific language governing permissions and limitations
  20.  * under the License.
  21.  *
  22.  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  23.  * @filesource
  24.  * @package AuthenticationDatabaseTiein
  25.  * @version //autogentag//
  26.  */
  27.  
  28. /**
  29.  * Structure for defining the database and table to authenticate against.
  30.  *
  31.  * @package AuthenticationDatabaseTiein
  32.  * @version //autogentag//
  33.  */
  34. {
  35.     /**
  36.      * Database instance.
  37.      *
  38.      * @var ezcDbHandler 
  39.      */
  40.     public $instance;
  41.  
  42.     /**
  43.      * Table which stores the user credentials.
  44.      *
  45.      * @var string 
  46.      */
  47.     public $table;
  48.  
  49.     /**
  50.      * Fields which hold the user credentials.
  51.      *
  52.      * @var array(string) 
  53.      */
  54.     public $fields;
  55.  
  56.     /**
  57.      * Constructs a new ezcAuthenticationDatabaseInfo object.
  58.      *
  59.      * @param ezcDbHandler $instance Database instance to use
  60.      * @param string $table Table which stores usernames and passwords
  61.      * @param array(string) $fields The fields which hold usernames and passwords
  62.      */
  63.     public function __constructezcDbHandler $instance$tablearray $fields )
  64.     {
  65.         $this->instance $instance;
  66.         $this->table $table;
  67.         $this->fields $fields;
  68.     }
  69.  
  70.     /**
  71. /**
  72.      * Returns a new instance of this class with the data specified by $array.
  73.      *
  74.      * $array contains all the data members of this class in the form:
  75.      * array('member_name'=>value).
  76.      *
  77.      * __set_state makes this class exportable with var_export.
  78.      * var_export() generates code, that calls this method when it
  79.      * is parsed with PHP.
  80.      *
  81.      * @param array(string=>mixed) $array Associative array of data members for this class
  82.      * @return ezcAuthenticationDatabaseInfo 
  83.      */
  84.     static public function __set_statearray $array )
  85.     {
  86.         return new ezcAuthenticationDatabaseInfo$array['instance']$array['table']$array['fields');
  87.     }
  88. }
  89. ?>
Documentation generated by phpDocumentor 1.4.3