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


PHP Cabinet::save方法代码示例

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


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

示例1: getCabinet

 function getCabinet()
 {
     $this->autoRender = false;
     $sql = "SELECT * FROM cabinetlist;";
     $datas = $this->Cabinet->query($sql);
     App::uses("Cabinet", "Inventory.Model");
     foreach ($datas as $data) {
         $cabinet_model = new Cabinet();
         $cabinet_data['Cabinet']['name'] = $data['cabinetlist']['Cabinet'];
         $cabinet_data['Cabinet']['description'] = $data['cabinetlist']['Description'];
         $cabinet_data['Cabinet']['actual_dimensions_width'] = $data['cabinetlist']['Width'];
         $cabinet_data['Cabinet']['actual_dimensions_height'] = $data['cabinetlist']['Height'];
         $cabinet_data['Cabinet']['actual_dimensions_depth'] = $data['cabinetlist']['Depth'];
         $cabinet_data['Cabinet']['left_gable_price'] = $data['cabinetlist']['LeftGablePrice'];
         $cabinet_data['Cabinet']['right_gable_price'] = $data['cabinetlist']['RightGablePrice'];
         $cabinet_data['Cabinet']['top_bottom_width'] = $data['cabinetlist']['TBWidth'];
         $cabinet_data['Cabinet']['top_bottom_depth'] = $data['cabinetlist']['TBDepth'];
         $cabinet_data['Cabinet']['top_bottom_sqr'] = $data['cabinetlist']['TBSquareFeet'];
         $cabinet_data['Cabinet']['cabinet_back_width'] = $data['cabinetlist']['BackWidth'];
         $cabinet_data['Cabinet']['cabinet_back_height'] = $data['cabinetlist']['BackHeight'];
         $cabinet_data['Cabinet']['cabinet_back_sqr'] = $data['cabinetlist']['BackSquareFeet'];
         $cabinet_data['Cabinet']['MelCost'] = $data['cabinetlist']['MelCost'];
         $cabinet_data['Cabinet']['taping'] = $data['cabinetlist']['Taping'];
         $cabinet_data['Cabinet']['drilling'] = $data['cabinetlist']['Drilling'];
         $cabinet_data['Cabinet']['back_cutting'] = $data['cabinetlist']['BackCutting'];
         $cabinet_data['Cabinet']['BoxPrice'] = $data['cabinetlist']['BoxPrice'];
         $cabinet_data['Cabinet']['top_door_width'] = $data['cabinetlist']['TopDoorWidth'];
         $cabinet_data['Cabinet']['top_door_height'] = $data['cabinetlist']['TopDoorHeight'];
         $cabinet_data['Cabinet']['top_door_count'] = $data['cabinetlist']['TopDoorCount'];
         $cabinet_data['Cabinet']['bottom_door_width'] = $data['cabinetlist']['BottomDoorWidth'];
         $cabinet_data['Cabinet']['bottom_door_height'] = $data['cabinetlist']['BottomDoorHeight'];
         $cabinet_data['Cabinet']['bottom_door_count'] = $data['cabinetlist']['BottomDoorCount'];
         $cabinet_data['Cabinet']['top_drawer_front_width'] = $data['cabinetlist']['TopDrawerWidth'];
         $cabinet_data['Cabinet']['top_drawer_front_height'] = $data['cabinetlist']['TopDrawerHeight'];
         $cabinet_data['Cabinet']['top_drawer_front_count'] = $data['cabinetlist']['TopDrawerCount'];
         $cabinet_data['Cabinet']['middle_drawer_front_width'] = $data['cabinetlist']['MidDrawerWidth'];
         $cabinet_data['Cabinet']['middle_drawer_front_height'] = $data['cabinetlist']['MidDrawerHeight'];
         $cabinet_data['Cabinet']['middle_drawer_front_count'] = $data['cabinetlist']['MidDrawerCount'];
         $cabinet_data['Cabinet']['bottom_drawer_front_width'] = $data['cabinetlist']['BottomDrawerWidth'];
         $cabinet_data['Cabinet']['bottom_drawer_front_height'] = $data['cabinetlist']['BottomDrawerHeight'];
         $cabinet_data['Cabinet']['bottom_drawer_front_count'] = $data['cabinetlist']['BottomDrawerCount'];
         $cabinet_data['Cabinet']['dummy_drawer_front_width'] = $data['cabinetlist']['DummyHeight'];
         $cabinet_data['Cabinet']['dummy_drawer_front_height'] = $data['cabinetlist']['DummyWidth'];
         $cabinet_data['Cabinet']['dummy_drawer_front_count'] = $data['cabinetlist']['DummyCount'];
         $cabinet_data['Cabinet']['drawer_bottom_width'] = $data['cabinetlist']['DrawerBottomWidth'];
         $cabinet_data['Cabinet']['drawer_bottom_depth'] = $data['cabinetlist']['DrawerBottomDepth'];
         $cabinet_data['Cabinet']['number_hinges'] = $data['cabinetlist']['NumberofHinges'];
         $cabinet_data['Cabinet']['AssemblyCost'] = $data['cabinetlist']['AssemblyCost'];
         $cabinet_data['Cabinet']['UnitType'] = $data['cabinetlist']['UnitType'];
         $cabinet_data['Cabinet']['number_shelfs'] = $data['cabinetlist']['ShelfCount'];
         $cabinet_data['Cabinet']['Line'] = $data['cabinetlist']['Line'];
         $cabinet_data['Cabinet']['BothBotDoors'] = $data['cabinetlist']['BothBotDoors'];
         $cabinet_data['Cabinet']['include_on_door_list'] = $data['cabinetlist']['IncOnDoorList'];
         $cabinet_data['Cabinet']['include_on_finishing_list'] = $data['cabinetlist']['IncOnFinList'];
         $cabinet_data['Cabinet']['FinishedEndSquareFeet'] = $data['cabinetlist']['FinishedEndSquareFeet'];
         $cabinet_data['Cabinet']['FinishedEndPanelPrice'] = $data['cabinetlist']['FinishedEndPanelPrice'];
         $cabinet_data['Cabinet']['VeneerPanelSquareFeet'] = $data['cabinetlist']['VeneerPanelSquareFeet'];
         $cabinet_data['Cabinet']['VeneerPriceNotIncluded'] = $data['cabinetlist']['VeneerPriceNotIncluded'];
         $cabinet_data['Cabinet']['OutsideProfiling'] = $data['cabinetlist']['OutsideProfiling'];
         $cabinet_data['Cabinet']['DrawerCount'] = $data['cabinetlist']['DrawerCount'];
         $cabinet_data['Cabinet']['DrawerHardwareCost'] = $data['cabinetlist']['DrawerHardwareCost'];
         $cabinet_data['Cabinet']['ImageID'] = $data['cabinetlist']['ImageID'];
         if (!$cabinet_model->save($cabinet_data)) {
             pr($cabinet_model->validationErrors);
         }
     }
 }
开发者ID:khaled-saiful-islam,项目名称:zen_v1.0,代码行数:67,代码来源:DataMigrationsController.php


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