Show
Ignore:
Timestamp:
06/20/08 12:24:23 (5 months ago)
Author:
llaumgui
Message:

Opérateur get_siteaccess

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ez_publish/myutils/trunk/autoloads/myutils_operators.php

    r183 r184  
    4040        { 
    4141                /* Opérateurs */ 
    42                 $this->Operators = array(       'gmdate', 
     42                $this->Operators = array(       'get_siteaccess', 
     43                                                                        'gmdate', 
    4344                                                                        'is_debug_enabled', 
    4445                                                                        'path_to_path_array', 
     
    6364        function namedParameterList() 
    6465        { 
    65                  return array(  'gmdate'                                                => array( 
     66                 return array(  'get_siteaccess'                                => array( ), 
     67                                                 
     68                                                'gmdate'                                                => array( 
    6669                                                                'format'                => array( 'type'        => 'string', 'required' => true, 'default' => ''  ), 
    6770                                                                'timestamp'             => array( 'type'        => 'integer', 'required' => true, 'default' => time()  ) 
     
    101104            switch ( $operatorName ) 
    102105            { 
     106                        case 'get_siteaccess': 
     107                                $operatorValue = $GLOBALS['eZCurrentAccess']['name']; 
     108                                break; 
     109 
    103110                        case 'gmdate': 
    104111                        $operatorValue = $this->gmDate( $namedParameters['format'], 
     
    107114                 
    108115                case 'is_debug_enabled': 
    109                         $operatorValue = $this->isDebugEnabled(); 
     116                        $operatorValue = eZDebug::isDebugEnabled(); 
    110117                        break; 
    111118                         
     
    153160        { 
    154161                return gmdate( $format, $timestamp); 
    155         } 
    156          
    157          
    158          
    159         /** 
    160          * Retourne l'info si le débug est activé. 
    161          * Peut servir pour conditionner la feuille de style débug. 
    162          *        
    163          * @author Guillaume Kulakowski <guillaume_AT_llaumgui_DOT_com> 
    164          * @since 1.0 
    165          * 
    166          * @return boolean 
    167          */ 
    168         function isDebugEnabled() 
    169         { 
    170                 return eZDebug::isDebugEnabled(); 
    171162        } 
    172163