本文整理汇总了PHP中record_adapter::get_record_by_uuid方法的典型用法代码示例。如果您正苦于以下问题:PHP record_adapter::get_record_by_uuid方法的具体用法?PHP record_adapter::get_record_by_uuid怎么用?PHP record_adapter::get_record_by_uuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类record_adapter
的用法示例。
在下文中一共展示了record_adapter::get_record_by_uuid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check
/**
* {@inheritdoc}
*/
public function check(EntityManager $em, File $file)
{
$boolean = !count(\record_adapter::get_record_by_uuid($this->app, $file->getCollection()->get_databox(), $file->getUUID()));
return new Response($boolean, $this);
}
示例2: getRecordsToSubstitute
/**
* Get an array of records that can be substitued by the Lazaret file
*
* @return array
*/
public function getRecordsToSubstitute(Application $app)
{
$ret = [];
$shaRecords = \record_adapter::get_record_by_sha($app, $this->getCollection($app)->get_sbas_id(), $this->getSha256());
$uuidRecords = \record_adapter::get_record_by_uuid($app, $this->getCollection($app)->get_databox(), $this->getUuid());
$merged = array_merge($uuidRecords, $shaRecords);
foreach ($merged as $record) {
if (!in_array($record, $ret)) {
$ret[] = $record;
}
}
return $ret;
}