当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Date::__construct方法代码示例

本文整理汇总了PHP中Zend_Date::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Date::__construct方法的具体用法?PHP Zend_Date::__construct怎么用?PHP Zend_Date::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Date的用法示例。


在下文中一共展示了Zend_Date::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Set current store locale by default
  * @see parent::__construct()
  */
 public function __construct($date = null, $part = null, $locale = null)
 {
     if ($locale == null) {
         $locale = Mage::app()->getLocale()->getLocale();
     }
     return parent::__construct($date, $part, $locale);
 }
开发者ID:nicolas-bastien,项目名称:MagentoUnderControl,代码行数:11,代码来源:Date.php

示例2: __construct

 /**
  * Constructor
  * @param  string|integer|Zend_Date|array  $date    OPTIONAL Date value or value of date part to set
  *                                                 ,depending on $part. If null the actual time is set
  * @param  string                          $part    OPTIONAL Defines the input format of $date
  * @param  string|Zend_Locale              $locale  OPTIONAL Locale for parsing input
  * @return Axis_Date
  * @throws Zend_Date_Exception
  */
 public function __construct($date = null, $part = null, $locale = null)
 {
     if (null === $locale) {
         $locale = Axis_Locale::getLocale();
     }
     // supress notice about PCRE without UTF8 support
     @parent::__construct($date, $part, $locale);
 }
开发者ID:rommmka,项目名称:axiscommerce,代码行数:17,代码来源:Date.php

示例3: __construct

 public function __construct($date = null, $part = null, $locale = null)
 {
     if (!is_null(self::$frozenNow) && is_null($date) && is_null($part) && is_null($locale)) {
         parent::__construct(self::$frozenNow);
     } else {
         parent::__construct($date, $part, $locale);
     }
 }
开发者ID:pago,项目名称:pantr,代码行数:8,代码来源:Date.php

示例4: __construct

 /**
  * Does exactly what Zend_Date does except that after setting the intial date/time
  * we check to see if it contains times that are known to be "TBA" for events
  * such as Event Inventory's '23:59:20' and '23:59:59' and if so it resets
  * the time to be '00:00:00' which is what we use as TBA.
  *
  * @param  string|integer|Zend_Date|array  $date    OPTIONAL Date value or value of date part to set
  *                                                 ,depending on $part. If null the actual time is set
  * @param  string                          $part    OPTIONAL Defines the input format of $date
  * @param  string|Zend_Locale              $locale  OPTIONAL Locale for parsing input
  * @return Zend_Date
  * @throws Zend_Date_Exception
  */
 public function __construct($date = null, $part = null, $locale = null)
 {
     parent::__construct($date, $part, $locale);
     if ($this->get('HH:mm') === '23:59' || $this->get('HH:mm') === '03:30') {
         // 23:59 is an EventInventory TBA time
         // 03:30 is a TicketNetwork TBA time
         // Set the time to '00:00:00'
         $this->set($this->get(self::DATES));
     }
 }
开发者ID:4ticketdeals,项目名称:ticketevolution-php,代码行数:23,代码来源:Date.php

示例5: __construct

 public function __construct($date = null, $part = null, $locale = null)
 {
     $this->setTimezone('Europe/Paris');
     parent::__construct($date, $part, $locale);
 }
开发者ID:baofeng-beijing,项目名称:zf1.11.x,代码行数:5,代码来源:DateObjectTest.php

示例6: __construct

 public function __construct($date = null, $part = null, $locale = null)
 {
     parent::__construct($date = null, $part = null, $locale = null);
     $this->setTimezone('Asia/Calcutta');
 }
开发者ID:riteshsahu1981,项目名称:Weadvance,代码行数:5,代码来源:Date.php

示例7: __construct

 /**
  * Generates the standard date object, could be a unix timestamp, localized date,
  * string, integer, array and so on. Also parts of dates or time are supported
  * Always set the default timezone: http://php.net/date_default_timezone_set
  * For example, in your bootstrap: date_default_timezone_set('America/Los_Angeles');
  * For detailed instructions please look in the docu.
  *
  * @param  string|integer|Zend_Date|array  $date    OPTIONAL Date value or value of date part to set
  *                                                 ,depending on $part. If null the actual time is set
  * @param  string                          $part    OPTIONAL Defines the input format of $date
  * @param  string|Zend_Locale              $locale  OPTIONAL Locale for parsing input
  * @return Zend_Date
  * @throws Zend_Date_Exception
  */
 public function __construct($date = null, $part = null, $locale = null)
 {
     $notset = true;
     if (null == $locale) {
         if (is_string($date) && is_string($part) && isset(self::$zendToPhpFormats[$part])) {
             $phpDate = \DateTime::createFromFormat(self::$zendToPhpFormats[$part], $date);
             if ($phpDate) {
                 $date = $phpDate;
             }
         } elseif (null == $date && null == $part) {
             $this->setLocale();
             $zone = @date_default_timezone_get();
             $this->setTimezone($zone);
             $this->setUnixTimestamp(time());
             $notset = false;
         }
     }
     if ($date instanceof \DateTime) {
         $this->setLocale();
         $this->setTimezone($date->getTimezone()->getName());
         $this->setUnixTimestamp($date->getTimestamp());
         $notset = false;
     }
     if ($notset) {
         parent::__construct($date, $part, $locale);
     }
 }
开发者ID:GemsTracker,项目名称:MUtil,代码行数:41,代码来源:Date.php

示例8: __construct

 /**
  * Generates the standard date object, could be a unix timestamp, localized date,
  * string, integer, array and so on. Also parts of dates or time are supported
  * Always set the default timezone: http://php.net/date_default_timezone_set
  * For example, in your bootstrap: date_default_timezone_set('America/Los_Angeles');
  * For detailed instructions please look in the documentation.
  *
  * @param  SZend_Calendar $calendar					Instance of SZend_Calendar the day belongs to
  * @param  string|integer|Zend_Date|array  $date    OPTIONAL Date value or value of date part to set
  * ,depending on $part. If null the actual time is set
  * @param  string                          $part    OPTIONAL Defines the input format of $date
  * @param  string|Zend_Locale              $locale  OPTIONAL Locale for parsing input
  * @return Zend_Date
  * @throws Zend_Date_Exception
  */
 public function __construct($date = null, $part = null, $locale = null, $class = null)
 {
     parent::__construct($date, $part, $locale);
     $this->_class = $class;
 }
开发者ID:robjacoby,项目名称:xlr8u,代码行数:20,代码来源:Day.php


注:本文中的Zend_Date::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。