static function mine($parent_class) { $classes = CApp::getChildClasses($parent_class); $limit = CAppUI::conf("dataminer_limit"); foreach ($classes as $_class) { $miner = new $_class(); $report = $miner->mineSome($limit, "mine"); $dt = CMbDT::dateTime(); echo "<{$dt}> Miner: {$_class}. Success mining count is '" . $report["success"] . "'\n"; if (!$report["failure"]) { echo "<{$dt}> Miner: {$_class}. Failure mining counts is '" . $report["failure"] . "'\n"; } $miner = new $_class(); $report = $miner->mineSome($limit, "remine"); $dt = CMbDT::dateTime(); echo "<{$dt}> Reminer: {$_class}. Success remining count is '" . $report["success"] . "'\n"; if (!$report["failure"]) { echo "<{$dt}> Reminer: {$_class}. Failure remining counts is '" . $report["failure"] . "'\n"; } $miner = new $_class(); $report = $miner->mineSome($limit, "postmine"); $dt = CMbDT::dateTime(); echo "<{$dt}> Postminer: {$_class}. Success postmining count is '" . $report["success"] . "'\n"; if (!$report["failure"]) { echo "<{$dt}> Postminer: {$_class}. Failure postmining counts is '" . $report["failure"] . "'\n"; } } }
/** * Get child receivers * * @return array CInteropReceiver collection */ static function getChildReceivers() { return CApp::getChildClasses("CInteropReceiver", true); }
* $Id$ * * @package Mediboard * @subpackage PlanningOp * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkAdmin(); /** @var bool $automine */ $automine = CView::get("automine", "bool", true); /** @var int $limit */ $limit = CView::get("limit", "num default|1", true); CView::checkin(); $counts = COperationMiner::makeOperationCounts(); $miner_classes = CApp::getChildClasses("COperationMiner"); $miners = array(); foreach ($miner_classes as $_class) { /** @var COperationMiner $miner */ $miner = new $_class(); $miner->loadMatchingObject("date DESC"); $miner->makeMineCounts(); $miners[] = $miner; } // Création du template $smarty = new CSmartyDP(); $smarty->assign("counts", $counts); $smarty->assign("miners", $miners); $smarty->assign("automine", $automine); $smarty->assign("limit", $limit); $smarty->display("datamining_board.tpl");
/** * Get services classes * * @param string $class Class name * * @return array */ public function getServicesClasses($class) { $this->services = CApp::getChildClasses($class); return $this->services; }
<?php /** * $Id$ * * @package Mediboard * @subpackage System * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkAdmin(); CModule::loadModules(false); $setupClasses = CApp::getChildClasses("CSetup"); $mbmodules = array("notInstalled" => array(), "installed" => array()); $coreModules = array(); $upgradable = false; foreach ($setupClasses as $setupClass) { if (!class_exists($setupClass)) { continue; } $setup = new $setupClass(); $mbmodule = new CModule(); $mbmodule->compareToSetup($setup); $mbmodule->checkModuleFiles(); $mbmodule->getUpdateMessages($setup, true); $mbmodule->updateFormFields(); if ($mbmodule->mod_ui_order == 1000) { $mbmodules["notInstalled"][$mbmodule->mod_name] = $mbmodule; } else { $mbmodules["installed"][$mbmodule->mod_name] = $mbmodule;
* @category EAI * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version SVN: $Id:$ * @link http://www.mediboard.org */ CCanDo::checkAdmin(); $count = CValue::getOrSession("count", 30); $date_production = CValue::getOrSession("date_production", CMbDT::date()); $group_id = CValue::getOrSession("group_id", CGroups::loadCurrent()->_id); $filter = new CExchangeDataFormat(); $filter->date_production = $date_production; $filter->group_id = $group_id; $exchanges_classes = array(); foreach (CExchangeDataFormat::getAll() as $key => $_exchange_class) { foreach (CApp::getChildClasses($_exchange_class, true) as $_child_key => $_child_class) { $exchanges_classes[$_exchange_class][] = $_child_class; } if ($_exchange_class == "CExchangeAny") { $exchanges_classes[$_exchange_class][] = $_exchange_class; } } $criteres = array('no_date_echange', 'emetteur', 'destinataire', 'message_invalide', 'acquittement_invalide'); $smarty = new CSmartyDP(); $smarty->assign("count", $count); $smarty->assign("date_production", $date_production); $smarty->assign("filter", $filter); $smarty->assign("exchanges_classes", $exchanges_classes); $smarty->assign("criteres", $criteres); $smarty->display("vw_stats.tpl");
/** * Get child exchanges * * @param string $class Classname * * @return string[] Data format classes collection */ static function getAll($class = "CExchangeDataFormat") { return CApp::getChildClasses($class, true); }
<?php /** * $Id$ * * @category System * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ * @link http://www.mediboard.org */ CCanDo::checkAdmin(); $smarty = new CSmartyDP(); $smarty->assign("user_log", new CUserLog()); $smarty->assign("classes", CApp::getChildClasses()); $smarty->display("vw_purge_objects.tpl");
$group_id = CValue::getOrSession('group_id', CGroups::loadCurrent()->_id); $id_permanent = CValue::getOrSession("id_permanent"); $object_id = CValue::getOrSession("object_id"); $total_exchanges = 0; $exchanges = array(); $where = array(); if ($id_permanent) { $where["id_permanent"] = " = '{$id_permanent}'"; } if ($object_id) { $where["object_id"] = " = '{$object_id}'"; } $where["group_id"] = " = '{$group_id}'"; $forceindex[] = "date_production"; foreach (CExchangeDataFormat::getAll() as $key => $_exchange_class) { foreach (CApp::getChildClasses($_exchange_class, true) as $under_key => $_under_class) { $exchange = new $_under_class(); $exchange->_date_min = $_date_min; $exchange->_date_max = $_date_max; $exchange->group_id = $group_id; $exchange->loadRefGroups(); $total_exchanges += $exchange->countList($where, null, null, $forceindex); $order = "date_production DESC"; $exchanges[$_under_class] = $exchange->loadList($where, $order, "0, 10", null, null, $forceindex); foreach ($exchanges[$_under_class] as $_exchange) { $_exchange->loadRefsBack(); $_exchange->getObservations(); $_exchange->loadRefsInteropActor(); } } }
<?php /** * dPccam * * @category Ccam * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version SVN: $Id:\$ * @link http://www.mediboard.org */ CCanDo::checkAdmin(); // Création du template $smarty = new CSmartyDP(); $smarty->assign("childs_codable_class", CApp::getChildClasses("CCodable")); $smarty->display("configure.tpl");
* @subpackage eai * @version $Revision$ * @author SARL OpenXtrem */ CCanDo::checkRead(); $actor_guid = CValue::getOrSession("actor_guid"); if ($actor_guid) { $actor = CMbObject::loadFromGuid($actor_guid); if ($actor->_id) { $objects = $actor->loadBackRefs("object_links"); $linked_objects = array(); foreach ($objects as $_object) { $_class = $_object->object_class; if (!array_key_exists($_class, $linked_objects)) { $linked_objects[$_class] = array(); } $_object->loadRefObject(); $linked_objects[$_class][] = $_object; } $classes = CApp::getChildClasses(); $linked_object = new CObjectToInteropSender(); $linked_object->sender_class = $actor->_class; $linked_object->sender_id = $actor->_id; $smarty = new CSmartyDP(); $smarty->assign("actor", $actor); $smarty->assign("linked_objects", $linked_objects); $smarty->assign("classes", $classes); $smarty->assign("linked_object", $linked_object); $smarty->display("inc_linked_objects.tpl"); } }
/** * Get child senders * * @return array CInteropSender collection */ static function getChildSenders() { return CApp::getChildClasses("CInteropSender", true); }
<?php /** * $Id$ * * @package Mediboard * @subpackage developpement * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $chrono = new Chronometer(); $chrono->start(); $classes = CApp::getChildClasses("CModelObject"); //$classes = array_keys(CModelObject::$spec); foreach ($classes as $_class) { /** @var CModelObject $object */ $object = new $_class(); $object->makeAllBackSpecs(); $chrono->step("make"); } foreach ($classes as $_class) { $ballot = array("spec" => CModelObject::$spec[$_class], "props" => CModelObject::$props[$_class], "specs" => CModelObject::$specs[$_class], "backProps" => CModelObject::$backProps[$_class], "backSpecs" => CModelObject::$backSpecs[$_class]); SHM::put("ballot-{$_class}", $ballot, true); $chrono->step("put"); } foreach ($classes as $_class) { SHM::get("ballot-{$_class}"); $chrono->step("get"); }
/** * $Id$ * * @category EAI * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ * @link http://www.mediboard.org */ CCanDo::checkEdit(); $route_id = CValue::get("route_id"); $actor_guid = CValue::get("actor_guid"); $list_receiver = CApp::getChildClasses("CInteropReceiver", true); $list_sender = CApp::getChildClasses("CInteropSender", true); if ($actor_guid) { $actor = CMbObject::loadFromGuid($actor_guid); } $route = new CEAIRoute(); $route->load($route_id); if (!$route->_id && isset($actor)) { $route->sender_class = $actor->_class; $route->sender_id = $actor->_id; } $route->loadRefReceiver(); $route->loadRefSender(); $smarty = new CSmartyDP(); $smarty->assign("route", $route); $smarty->assign("list_receiver", $list_receiver); $smarty->assign("list_sender", $list_sender);
/** * Get child exchanges * * @return string[] Data format classes collection */ static function getAll() { $sources = CApp::getChildClasses("CExchangeSource", true); return array_filter($sources, function ($v) { $s = new $v(); return $s->_spec->key; }); }
/** * Get objects * * @return array CInteropNorm collection */ static function getObjects() { $standards = array(); foreach (CApp::getChildClasses("CInteropNorm", false) as $_interop_norm) { /** @var CInteropNorm $norm */ $norm = new $_interop_norm(); if (!$norm->name || !$norm->type) { continue; } $domain_name = $norm->getDomain(); $type = $norm->getType(); $events = $norm->getEvents(); $standards[$norm->name][$domain_name][$type] = $events; } return $standards; }
/** * $Id$ * * @category Files * @package Mediboard * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ * @link http://www.mediboard.org */ CCanDo::checkAdmin(); $category_id = CValue::getOrSession("category_id", 0); $page = intval(CValue::get('page', 0)); $filter = CValue::getOrSession("filter", ""); $eligible_file_view = CValue::getOrSession("eligible_file_view"); $class = CValue::getOrSession("class"); $listClass = CApp::getChildClasses(); $classes = array(); foreach ($listClass as $key => $_class) { $classes[$_class] = CAppUI::tr($_class); } asort($classes); $smarty = new CSmartyDP(); $smarty->assign("category_id", $category_id); $smarty->assign("page", $page); $smarty->assign("listClass", $classes); $smarty->assign("filter", $filter); $smarty->assign("class", $class); $smarty->assign("eligible_file_view", $eligible_file_view); $smarty->display("vw_categories.tpl");
/** * Message understood ? * * @param string $data Data * @param CInteropSender $actor Actor data * @param mixed $contexts Used with Dicom, the presentation contexts * * @return bool Understood ? */ static function understand($data, $actor = null, $contexts = null) { foreach (CExchangeDataFormat::getAll() as $_exchange_class) { foreach (CApp::getChildClasses($_exchange_class, true) as $_data_format) { /** * @var CExchangeDataFormat $data_format */ $data_format = new $_data_format(); // Test si le message est compris if ($contexts) { $understand = $data_format->understand($data, $actor, $contexts); } else { $understand = $data_format->understand($data, $actor); } if ($understand) { return $data_format; } } } return null; }