2016-07-19 09:27:35 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace manager\repo;
|
|
|
|
use \manager\Database;
|
|
|
|
use \manager\Repo;
|
|
|
|
use \manager\ManagerError;
|
2016-07-24 10:00:49 +00:00
|
|
|
use \manager\ORM\Table;
|
|
|
|
use \manager\ORM\Rows;
|
2016-07-19 09:27:35 +00:00
|
|
|
|
|
|
|
class chip extends parentRepo{
|
|
|
|
|
|
|
|
protected static function table_name(){ static $table_name = 'chip'; return $table_name; }
|
|
|
|
|
|
|
|
|
2016-07-24 10:00:49 +00:00
|
|
|
/* RENVOIE LA LISTE DES CARTES/PUCES DISPONIBLES EN FONCTION DES MODULES DE L'ENTREPOT
|
|
|
|
*
|
|
|
|
* @return chips<Array> Liste des puces/cartes disponibles
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public static function getAll($id_warehouse){
|
|
|
|
/* [1] On récupère les modules de l'entrepot courant
|
|
|
|
=========================================================*/
|
2016-07-24 23:14:35 +00:00
|
|
|
$module_merge = Table::get('module_merge')
|
|
|
|
->whereIdWarehouse(7);
|
|
|
|
|
2016-07-24 10:18:30 +00:00
|
|
|
|
|
|
|
$chip = Table::get('chip')
|
2016-07-24 23:14:35 +00:00
|
|
|
->join('id_module', $module_merge)
|
2016-07-24 10:18:30 +00:00
|
|
|
->select('*');
|
|
|
|
|
2016-07-24 10:00:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* [2] On retourne le résultat
|
|
|
|
=========================================================*/
|
2016-07-24 23:14:35 +00:00
|
|
|
return $chip->fetch();
|
2016-07-24 10:00:49 +00:00
|
|
|
}
|
2016-07-19 09:27:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|