本文整理汇总了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);
}
示例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()];
}
示例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;
}
示例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;
}