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


PHP collection::get_coll_id方法代码示例

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


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

示例1: testGet_coll_id

 public function testGet_coll_id()
 {
     $this->assertTrue(is_int(self::$object->get_coll_id()));
     $this->assertTrue(self::$object->get_coll_id() > 0);
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:5,代码来源:collectionTest.php

示例2: list_collection

 /**
  * Retrieve detailled informations about one collection
  *
  * @param  collection $collection
  *
  * @return array
  */
 private function list_collection(\collection $collection)
 {
     return ['base_id' => $collection->get_base_id(), 'collection_id' => $collection->get_coll_id(), 'name' => $collection->get_name(), 'labels' => ['fr' => $collection->get_label('fr'), 'en' => $collection->get_label('en'), 'de' => $collection->get_label('de'), 'nl' => $collection->get_label('nl')], 'record_amount' => $collection->get_record_amount()];
 }
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:11,代码来源:V1.php

示例3: createStory

 /**
  *
  * @param Application $app
  * @param \collection $collection
  *
  * @return \record_adapter
  */
 public static function createStory(Application $app, \collection $collection)
 {
     $databox = $collection->get_databox();
     $sql = 'INSERT INTO record
           (coll_id, record_id, parent_record_id, moddate, credate
             , type, sha256, uuid, originalname, mime)
         VALUES
           (:coll_id, null, :parent_record_id, NOW(), NOW()
           , :type, :sha256, :uuid
           , :originalname, :mime)';
     $stmt = $databox->get_connection()->prepare($sql);
     $stmt->execute([':coll_id' => $collection->get_coll_id(), ':parent_record_id' => 1, ':type' => 'unknown', ':sha256' => null, ':uuid' => \uuid::generate_v4(), ':originalname' => null, ':mime' => null]);
     $story_id = $databox->get_connection()->lastInsertId();
     $story = new self($app, $databox->get_sbas_id(), $story_id);
     try {
         $log_id = $app['phraseanet.logger']($databox)->get_id();
         $sql = 'INSERT INTO log_docs (id, log_id, date, record_id, action, final, comment)
         VALUES (null, :log_id, now(),
           :record_id, "add", :coll_id,"")';
         $stmt = $databox->get_connection()->prepare($sql);
         $stmt->execute([':log_id' => $log_id, ':record_id' => $story_id, ':coll_id' => $collection->get_coll_id()]);
         $stmt->closeCursor();
     } catch (\Exception $e) {
         unset($e);
     }
     return $story;
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:34,代码来源:adapter.php

示例4: list_collection

 /**
  * Retrieve detailled informations about one collection
  *
  * @param  collection $collection
  * @return array
  */
 protected function list_collection(collection $collection)
 {
     $ret = ['base_id' => $collection->get_base_id(), 'collection_id' => $collection->get_coll_id(), 'name' => $collection->get_name(), 'labels' => ['fr' => $collection->get_label('fr'), 'en' => $collection->get_label('en'), 'de' => $collection->get_label('de'), 'nl' => $collection->get_label('nl')], 'record_amount' => $collection->get_record_amount()];
     return $ret;
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:11,代码来源:adapter.php


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