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


PHP DateTimeHelper::formatForJs方法代码示例

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


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

示例1: getJsonObject

 public function getJsonObject()
 {
     $ret = array('departureCity' => $this->getDepartureCity()->localRu, 'departureCityPre' => $this->getDepartureCity()->casePre, 'arrivalCity' => $this->getArrivalCity()->localRu, 'arrivalCityPre' => $this->getArrivalCity()->casePre, 'departureDate' => DateTimeHelper::formatForJs($this->departureDate), 'arrivalDate' => DateTimeHelper::formatForJs($this->getArrivalDate()), 'fullDuration' => $this->fullDuration, 'flightParts' => array());
     foreach ($this->flightParts as $flightPart) {
         $ret['flightParts'][] = $flightPart->getJsonObject();
     }
     return $ret;
 }
开发者ID:niranjan2m,项目名称:Voyanga,代码行数:8,代码来源:Flight.php

示例2: getJsonObject

 public function getJsonObject()
 {
     $airline = Airline::getAirlineByCode($this->transportAirlineCode);
     //echo 1;
     //die();
     if (!$this->markAirline) {
         //$this->markAirline = $airline;
         $ret = array('transportAirline' => $this->transportAirlineCode, 'transportAirlineName' => $airline->localRu, 'transportAirlineNameEn' => $airline->localEn, 'departureCity' => City::getCityByPk($this->departureCityId)->localRu, 'departureCityPre' => City::getCityByPk($this->departureCityId)->casePre, 'departureCityId' => $this->departureCityId, 'arrivalCity' => City::getCityByPk($this->arrivalCityId)->localRu, 'arrivalCityPre' => City::getCityByPk($this->arrivalCityId)->casePre, 'arrivalCityId' => $this->arrivalCityId, 'datetimeBegin' => DateTimeHelper::formatForJs($this->timestampBegin), 'datetimeEnd' => DateTimeHelper::formatForJs($this->timestampEnd), 'flightCode' => $this->code, 'duration' => $this->duration, 'departureAirport' => $this->departureAirport->localRu, 'arrivalAirport' => $this->arrivalAirport->localRu, 'departureAirportId' => $this->departureAirport->id, 'arrivalAirportId' => $this->arrivalAirport->id, 'aircraftCode' => $this->aircraftCode, 'aircraftName' => $this->getAircraftName(), 'stopNum' => $this->stopNum, 'bookingCode' => $this->bookingCodes[0]);
     } else {
         $ret = array('transportAirline' => $this->transportAirlineCode, 'transportAirlineName' => $airline->localRu, 'transportAirlineNameEn' => $airline->localEn, 'markAirline' => $this->markAirline->code, 'markAirlineName' => $this->markAirline->localRu, 'markAirlineNameEn' => $this->markAirline->localEn, 'departureCity' => City::getCityByPk($this->departureCityId)->localRu, 'departureCityPre' => City::getCityByPk($this->departureCityId)->casePre, 'departureCityId' => $this->departureCityId, 'arrivalCity' => City::getCityByPk($this->arrivalCityId)->localRu, 'arrivalCityPre' => City::getCityByPk($this->arrivalCityId)->casePre, 'arrivalCityId' => $this->arrivalCityId, 'datetimeBegin' => DateTimeHelper::formatForJs($this->timestampBegin), 'datetimeEnd' => DateTimeHelper::formatForJs($this->timestampEnd), 'flightCode' => $this->code, 'duration' => $this->duration, 'departureAirport' => $this->departureAirport->localRu, 'arrivalAirport' => $this->arrivalAirport->localRu, 'departureAirportId' => $this->departureAirport->id, 'arrivalAirportId' => $this->arrivalAirport->id, 'aircraftCode' => $this->aircraftCode, 'aircraftName' => $this->getAircraftName(), 'stopNum' => $this->stopNum, 'bookingCode' => $this->bookingCodes[0]);
     }
     //print_r($ret);
     //die();
     return $ret;
 }
开发者ID:niranjan2m,项目名称:Voyanga,代码行数:15,代码来源:FlightPart.php

示例3: getJsonObject

 public function getJsonObject()
 {
     return array('departure' => $this->departureCity->localRu, 'departure_iata' => $this->departureCity->code, 'arrival' => $this->arrivalCity->localRu, 'arrival_iata' => $this->arrivalCity->code, 'date' => DateTimeHelper::formatForJs($this->departureDate));
 }
开发者ID:niranjan2m,项目名称:Voyanga,代码行数:4,代码来源:Route.php

示例4: getJsonObject

 public function getJsonObject()
 {
     $data = array('id' => $this->id, 'active' => false, "startDate" => DateTimeHelper::formatForJs($this->startDate), "endDate" => DateTimeHelper::formatForJs($this->endDate), "address" => $this->address, "contact" => $this->contact, "thumb" => isset($this->pictureSmall) ? $this->imgSrc . $this->pictureSmall->url : $this->defaultThumbImageUrl, "preview" => $this->preview, "description" => $this->description, "image" => isset($this->pictureBig) ? $this->imgSrc . $this->pictureBig->url : $this->defaultBigImageUrl, "title" => $this->title, "categories" => $this->getCategoriesJsonObject(), "links" => $this->getLinksJsonObject(), "tags" => $this->getTagsJsonObject(), "prices" => $this->getPricesJsonObject(), "tours" => $this->getToursJsonObject());
     return $data;
 }
开发者ID:niranjan2m,项目名称:Voyanga,代码行数:5,代码来源:Event.php


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