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