throw new Exception('Objet introuvable : ' . $params['id'], -32601); } $jsonrpc->makeSuccess(utils::o2a($object)); } if ($jsonrpc->getMethod() == 'object::full') { $cache = cache::byKey('api::object::full'); $cron = cron::byClassAndFunction('object', 'fullData'); if (!is_object($cron)) { $cron = new cron(); } $cron->setClass('object'); $cron->setFunction('fullData'); $cron->setSchedule('* * * * * 2000'); $cron->setTimeout(10); $cron->save(); if (!$cron->running()) { $cron->run(true); } if ($cache->getValue() != '') { $jsonrpc->makeSuccess(json_decode($cache->getValue(), true)); } $jsonrpc->makeSuccess(array()); } if ($jsonrpc->getMethod() == 'object::fullById') { $object = object::byId($params['id']); if (!is_object($object)) { throw new Exception('Objet introuvable : ' . $params['id'], -32601); } $return = utils::o2a($object); $return['eqLogics'] = array(); foreach ($object->getEqLogic() as $eqLogic) {