## Apache Zeta Components Manual :: File Source for authentication_status.php

## Source for file authentication_status.php

Documentation is available at authentication_status.php

1. <?php
2. /**
3. * File containing the ezcAuthenticationStatus class.
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 Authentication
25. * @version //autogen//
26. */
28. /**
29. * Holds the statuses returned from each authentication filter.
30. *
31. * @package Authentication
32. * @version //autogen//
33. */
34. class ezcAuthenticationStatus
35. {
36. /**
37. * Holds the statuses returned by the authentication filters.
38. *
39. * var array(string=>mixed)
40. */
41. private $statuses = array();
43. /**
44. * Adds a new status to the list of statuses.
45. *
46. * @param string $class The class name associated with the status
47. * @param mixed|array(mixed)$status A status associated with the class name
48. */
49. public function append ( $class, $status )
50. {
51. if ( is_array ( $status ) )
52. {
53. $this->statuses = array_merge ( $this->statuses, $status );
54. }
55. else
56. {
57. $this->statuses[] = array( $class => $status );
58. }
59. }
61. /**
62. * Returns the list of authentication statuses.
63. *
64. * The format of the returned array is array( class => code ).
65. *
66. * Example:
67. * <code>
68. * array(
69. * 'ezcAuthenticationSession' => ezcAuthenticationSession::STATUS_EMPTY,
70. * 'ezcAuthenticationDatabaseFilter' => ezcAuthenticationDatabaseFilter::STATUS_PASSWORD_INCORRECT
71. * );
72. * </code>
73. *
74. * @return array(string=>mixed)
75. */
76. public function get ()
77. {
78. return $this->statuses;
79. }
80. }
81. ?>

Documentation generated by phpDocumentor 1.4.3