1,25 → 1,20 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Web service retournant toutes les infos d'une observation donnée : |
* images, votes sur image et protocole, commentaires, votes sur commentaires, ... |
* |
* @category DEL |
* @package Observations |
* @version 0.1 |
* @author Raphaël Droz <raphael@tela-botanica.org> |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @copyright Copyright (c) 2013, Tela Botanica (accueil@tela-botanica.org) |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt> |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt> |
* @see http://www.tela-botanica.org/wikini/eflore/wakka.php?wiki=ApiIdentiplante01Observations |
* |
* @config-depend: "url_image" (dans configurations/config_observations.ini) ex: http://www.tela-botanica.org/appli:cel-img:%09dXL.jpg |
* @category DEL |
* @package Services |
* @subpackage Observations |
* @version 0.1 |
* @author Mathias CHOUET <mathias@tela-botanica.org> |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @author Aurelien PERONNET <aurelien@tela-botanica.org> |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt> |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt> |
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org> |
*/ |
|
// http://localhost/del/services/0.1/observations/#id => une observation donnée et ses images, SANS LES propositions & nombre de commentaire |
|
require_once(dirname(__FILE__) . '/../DelTk.php'); |
|
class ObservationDetails { |
|
private $conteneur; |
29,7 → 24,7 |
private $protocole; |
private $observation; |
private $mappings = array(); |
|
|
public function __construct(Conteneur $conteneur) { |
$this->conteneur = $conteneur; |
$this->bdd = $this->conteneur->getBdd(); |
110,7 → 105,9 |
$image['binaire.href'] = sprintf($urlImgTpl, $image['id_image'], $imageFormat); |
unset($info['id_image'], $info['date'], $info['hauteur'], $info['largeur'], $info['nom_original']); |
|
if (!isset($this->observation)) $this->observation = $info; |
if (!isset($this->observation)) { |
$this->observation = $info; |
} |
$this->observation['images'][$image['id_image']] = $image; |
} |
} |