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


PHP Driver::write方法代码示例

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


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

示例1: write

 /**
  * Writes the container data to the session store
  *
  * @return boolean
  */
 public function write()
 {
     // do we need to rotate?
     if ($this->rotationInterval and $this->rotationTimer < time()) {
         $this->rotate();
     }
     return $this->driver->write();
 }
开发者ID:fuelphp,项目名称:session,代码行数:13,代码来源:Manager.php

示例2: run

 function run()
 {
     set_time_limit(0);
     try {
         DB::query("UPDATE Driver SET Active = 0");
         DB::query("UPDATE DriverRelease SET Active = 0");
         $url = 'http://stackalytics.com/driverlog/api/1.0/drivers';
         $jsonResponse = @file_get_contents($url);
         $driverArray = json_decode($jsonResponse, true);
         $array = $driverArray['drivers'];
         foreach ($array as $contents) {
             if (!isset($contents['project_name']) || !isset($contents['name'])) {
                 continue;
             }
             $driver = Driver::get()->filter(array("Name" => trim($contents['name']), "Project" => trim($contents['project_name'])))->first();
             if (!$driver) {
                 $driver = new Driver();
             }
             $driver->Name = trim($contents['name']);
             $driver->Description = isset($contents['description']) ? $contents['description'] : null;
             $driver->Project = $contents['project_name'];
             $driver->Vendor = isset($contents['vendor']) ? $contents['vendor'] : null;
             $driver->Url = isset($contents['wiki']) ? $contents['wiki'] : null;
             $driver->Active = 1;
             if (isset($contents['releases_info'])) {
                 $releases = $contents['releases_info'];
                 foreach ($releases as $release) {
                     $driver_release = DriverRelease::get()->filter("Name", trim($release['name']))->first();
                     if (!$driver_release) {
                         $driver_release = new DriverRelease();
                     }
                     $driver_release->Name = trim($release['name']);
                     $driver_release->Url = $release['wiki'];
                     $driver_release->Active = 1;
                     $driver_release->write();
                     $driver->Releases()->add($driver_release);
                 }
             }
             $driver->write();
         }
         return 'OK';
     } catch (Exception $ex) {
         SS_Log::log($ex, SS_Log::ERR);
         echo $ex->getMessage();
     }
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:46,代码来源:UpdateDriversTask.php

示例3: superPostAdd

 function superPostAdd()
 {
     global $gbl, $sgbl, $login, $ghtml;
     if (!$sgbl->isHyperVm()) {
         return;
     }
     if ($this->vpstype_f === 'xen') {
         $driver = new Driver(null, $this->nname, $this->nname);
         $driver->get();
         $driver->driver_b->pg_vps = 'xen';
         $driver->setUpdateSubaction();
         $driver->write();
         if ($this->xenlocation) {
             $dirlocation = new Dirlocation(null, $this->nname, $this->nname);
             $dirlocation->dbaction = 'add';
             foreach ($this->xenlocation as $k) {
                 $name = "lvm:{$k['nname']}";
                 $xenloc[$name] = new xen_location_a(null, $this->nname, $name);
             }
             $dirlocation->parent_clname = $this->getClName();
             $dirlocation->xen_location_a = $xenloc;
             $this->addToList('dirlocation', $dirlocation);
         }
     }
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:25,代码来源:pservercorelib.php


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