mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Remove useless interface
This commit is contained in:
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of Phraseanet
|
|
||||||
*
|
|
||||||
* (c) 2005-2016 Alchemy
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Alchemy\Phrasea\Application;
|
|
||||||
use Alchemy\Phrasea\SearchEngine\SearchEngineInterface;
|
|
||||||
use Alchemy\Phrasea\SearchEngine\SearchEngineOptions;
|
|
||||||
|
|
||||||
interface caption_interface
|
|
||||||
{
|
|
||||||
|
|
||||||
public function __construct(Application $app, \record_adapter $record, databox $databox);
|
|
||||||
|
|
||||||
public function get_highlight_fields($highlight = '', Array $grep_fields = null, SearchEngineInterface $searchEngine = null, $includeBusiness = false, SearchEngineOptions $options = null);
|
|
||||||
}
|
|
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of Phraseanet
|
* This file is part of Phraseanet
|
||||||
*
|
*
|
||||||
@@ -14,18 +13,13 @@ use Alchemy\Phrasea\Model\Serializer\CaptionSerializer;
|
|||||||
use Alchemy\Phrasea\SearchEngine\SearchEngineInterface;
|
use Alchemy\Phrasea\SearchEngine\SearchEngineInterface;
|
||||||
use Alchemy\Phrasea\SearchEngine\SearchEngineOptions;
|
use Alchemy\Phrasea\SearchEngine\SearchEngineOptions;
|
||||||
|
|
||||||
class caption_record implements caption_interface, cache_cacheableInterface
|
class caption_record implements cache_cacheableInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fields;
|
protected $fields;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
protected $sbas_id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var record_adapter
|
* @var record_adapter
|
||||||
*/
|
*/
|
||||||
@@ -44,7 +38,6 @@ class caption_record implements caption_interface, cache_cacheableInterface
|
|||||||
public function __construct(Application $app, \record_adapter $record, databox $databox)
|
public function __construct(Application $app, \record_adapter $record, databox $databox)
|
||||||
{
|
{
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
$this->sbas_id = $record->getDataboxId();
|
|
||||||
$this->record = $record;
|
$this->record = $record;
|
||||||
$this->databox = $databox;
|
$this->databox = $databox;
|
||||||
}
|
}
|
||||||
@@ -81,14 +74,12 @@ FROM metadatas m INNER JOIN metadatas_structure s ON s.id = m.meta_struct_id
|
|||||||
WHERE m.record_id = :record_id
|
WHERE m.record_id = :record_id
|
||||||
ORDER BY s.sorter ASC
|
ORDER BY s.sorter ASC
|
||||||
SQL;
|
SQL;
|
||||||
$stmt = $this->databox->get_connection()->prepare($sql);
|
$fields = $this->databox->get_connection()
|
||||||
$stmt->execute([':record_id' => $this->record->getRecordId()]);
|
->executeQuery($sql, [':record_id' => $this->record->getRecordId()])
|
||||||
$fields = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
->fetchAll(PDO::FETCH_ASSOC);
|
||||||
$stmt->closeCursor();
|
|
||||||
if ($fields) {
|
|
||||||
$this->set_data_to_cache($fields);
|
$this->set_data_to_cache($fields);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$rec_fields = array();
|
$rec_fields = array();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user