## 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. */
28. /**
29. * Structure for defining the database and table to authenticate against.
30. *
31. * @package AuthenticationDatabaseTiein
32. * @version //autogentag//
33. */
34. class ezcAuthenticationDatabaseInfo extends ezcBaseStruct
35. {
36. /**
37. * Database instance.
38. *
39. * @var ezcDbHandler
40. */
41. public $instance ;
43. /**
44. * Table which stores the user credentials.
45. *
46. * @var string
47. */
48. public $table ;
50. /**
51. * Fields which hold the user credentials.
52. *
53. * @var array(string)
54. */
55. public $fields ;
57. /**
58. * Constructs a new ezcAuthenticationDatabaseInfo object.
59. *
60. * @param ezcDbHandler $instance Database instance to use
61. * @param string $table Table which stores usernames and passwords
62. * @param array(string) $fields The fields which hold usernames and passwords
63. */
64. public function __construct ( ezcDbHandler $instance, $table, array $fields )
65. {
66. $this->instance = $instance;
67. $this->table = $table;
68. $this->fields = $fields;
69. }
71. /**
72. /**
73. * Returns a new instance of this class with the data specified by $array.
74. *
75. * $array contains all the data members of this class in the form:
76. * array('member_name'=>value).
77. *
78. * __set_state makes this class exportable with var_export.
79. * var_export() generates code, that calls this method when it
80. * is parsed with PHP.
81. *
82. * @param array(string=>mixed) $array Associative array of data members for this class
83. * @return ezcAuthenticationDatabaseInfo
84. */
85. static public function __set_state( array $array )
86. {
87. return new ezcAuthenticationDatabaseInfo( $array['instance'], $array['table'], $array['fields'] );
88. }
89. }
90. ?>

Documentation generated by phpDocumentor 1.4.3