Show
Ignore:
Timestamp:
06/11/08 08:00:05 (5 months ago)
Author:
llaumgui
Message:

Opérateur gmdate

Files:
1 modified

Legend:

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

    r157 r164  
    4040        { 
    4141                /* Opérateurs */ 
    42                 $this->Operators = array(       'is_debug_enabled', 
     42                $this->Operators = array(       'gmdate', 
     43                                                                        'is_debug_enabled', 
    4344                                                                        'path_to_path_array', 
    4445                                                                        'php_tidy', 
     
    6364        function namedParameterList() 
    6465        { 
    65                  return array(  'is_debug_enabled'                              => array( 
     66                 return array(  'gmdate'                                                => array( 
     67                                                                'format'                => array( 'type'        => 'string', 'required' => true, 'default' => ''  ), 
     68                                                                'timestamp'             => array( 'type'        => 'integer', 'required' => true, 'default' => time()  ) 
     69                                                                                                        ), 
     70                                                 
     71                                                'is_debug_enabled'                              => array( 
    6672                                                                                                        ), 
    6773 
     
    100106            switch ( $operatorName ) 
    101107            { 
    102                         case 'is_debug_enabled': 
     108                        case 'gmdate': 
     109                        $operatorValue = $this->gmDate( $namedParameters['format'], 
     110                                                                                        $namedParameters['timestamp'] ); 
     111                        break; 
     112                 
     113                case 'is_debug_enabled': 
    103114                        $operatorValue = $this->isDebugEnabled(); 
    104115                        break; 
    105  
     116                         
    106117                case 'path_to_path_array': 
    107118                        $operatorValue = $this->path2PathArray(         $namedParameters['path'] ); 
     
    137148         * 
    138149         * ###################################################################### */ 
     150         
     151        /** 
     152         * Fonction gmdate dans eZ (pour les flux RSS par exemple). 
     153         *        
     154         * @author Guillaume Kulakowski <guillaume_AT_llaumgui_DOT_com> 
     155         * @since 1.1 
     156         *  
     157         * @param string format 
     158         * @param integer timestamp 
     159         * @return string 
     160         */ 
     161        function gmDate( $format, $timestamp) 
     162        { 
     163                return gmdate( $format, $timestamp); 
     164        } 
     165         
     166         
    139167         
    140168        /**