當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。