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


PHP License::insert方法代码示例

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


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

示例1: run

 public function run()
 {
     // Initialize empty array
     $license = array();
     $date = new DateTime();
     $license[] = array('name' => 'Adobe Photoshop CS6', 'serial' => 'ZOMG-WtF-BBQ-SRSLY', 'purchase_date' => '2013-10-02', 'purchase_cost' => '2435.99', 'purchase_order' => '1', 'maintained' => '0', 'order_number' => '987698576946', 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'seats' => 5, 'license_name' => '', 'license_email' => '', 'notes' => '', 'user_id' => 1, 'depreciation_id' => 2, 'deleted_at' => NULL, 'depreciate' => '0');
     $license[] = array('name' => 'Git Tower', 'serial' => '98049890394-340485934', 'purchase_date' => '2013-10-02', 'purchase_cost' => '2435.99', 'purchase_order' => '1', 'maintained' => '1', 'order_number' => '987698576946', 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'seats' => 2, 'license_name' => 'Alison Gianotto', 'license_email' => 'snipe@snipe.net', 'notes' => '', 'user_id' => 1, 'depreciation_id' => 2, 'deleted_at' => NULL, 'depreciate' => '0');
     // Delete all the old data
     DB::table('licenses')->truncate();
     // Insert the new posts
     License::insert($license);
 }
开发者ID:chromahoen,项目名称:snipe-it,代码行数:12,代码来源:LicensesSeeder.php

示例2: License

    $l->software($datas['logiciel']);
    $l->admin(true);
}
//Insert "other" keys
$iter = XDB::iterator('SELECT  logiciel, cle, eleve_id, binet_id
                         FROM  msdnaa.cles_autres');
while ($datas = $iter->next()) {
    $l = new License();
    $l->insert();
    $l->key($datas['cle']);
    $l->software($datas['logiciel']);
    if ($datas['eleve_id']) {
        $l->uid($datas['eleve_id']);
    }
    if ($datas['binet_id']) {
        $l->gid($datas['binet_id']);
    }
}
//Insert unregistred user keys
$iter = XDB::iterator('SELECT  logiciel, cle, prenom, nom, statut, mail
                         FROM  msdnaa.cles_unregistered_users');
while ($datas = $iter->next()) {
    $l = new License();
    $l->insert();
    $l->key($datas['cle']);
    $l->software($datas['logiciel']);
    $l->uid(0);
    $l->comments("Key given to " . $datas['prenom'] . " " . $datas['nom'] . " (" . $datas['statut'] . ") " . $datas['mail']);
}
echo "Done \n";
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
开发者ID:netixx,项目名称:frankiz,代码行数:31,代码来源:convert_msdnaa.php


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