当前位置: 首页>>代码示例>>PHP>>正文


PHP CApp::getChildClasses方法代码示例

本文整理汇总了PHP中CApp::getChildClasses方法的典型用法代码示例。如果您正苦于以下问题:PHP CApp::getChildClasses方法的具体用法?PHP CApp::getChildClasses怎么用?PHP CApp::getChildClasses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CApp的用法示例。


在下文中一共展示了CApp::getChildClasses方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mine

 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";
         }
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:28,代码来源:CDataMinerWorker.class.php

示例2: getChildReceivers

 /**
  * Get child receivers
  * 
  * @return array CInteropReceiver collection 
  */
 static function getChildReceivers()
 {
     return CApp::getChildClasses("CInteropReceiver", true);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:9,代码来源:CInteropReceiver.class.php

示例3: array

 * $Id$
 *
 * @package    Mediboard
 * @subpackage PlanningOp
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @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");
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:datamining_board.php

示例4: getServicesClasses

 /**
  * Get services classes
  *
  * @param string $class Class name
  *
  * @return array
  */
 public function getServicesClasses($class)
 {
     $this->services = CApp::getChildClasses($class);
     return $this->services;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:12,代码来源:CWebservice.class.php

示例5: array

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage System
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @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;
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:view_modules.php

示例6: CExchangeDataFormat

 * @category EAI
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @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");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:vw_stats.php

示例7: getAll

 /**
  * Get child exchanges
  *
  * @param string $class Classname
  * 
  * @return string[] Data format classes collection
  */
 static function getAll($class = "CExchangeDataFormat")
 {
     return CApp::getChildClasses($class, true);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:11,代码来源:CExchangeDataFormat.class.php

示例8: CSmartyDP

<?php

/**
 * $Id$
 *  
 * @category System
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @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");
开发者ID:fbone,项目名称:mediboard4,代码行数:17,代码来源:vw_purge_objects.php

示例9: array

$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();
        }
    }
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_view_all_exchanges.php

示例10: CSmartyDP

<?php

/**
 * dPccam
 *
 * @category Ccam
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @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");
开发者ID:fbone,项目名称:mediboard4,代码行数:17,代码来源:configure.php

示例11: array

 * @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");
    }
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_refresh_linked_objects.php

示例12: getChildSenders

 /**
  * Get child senders
  * 
  * @return array CInteropSender collection 
  */
 static function getChildSenders()
 {
     return CApp::getChildClasses("CInteropSender", true);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:9,代码来源:CInteropSender.class.php

示例13: Chronometer

<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage developpement
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @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:fbone,项目名称:mediboard4,代码行数:31,代码来源:cache_tester_metamodel.php

示例14: CEAIRoute

/**
 * $Id$
 *  
 * @category EAI
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @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);
开发者ID:fbone,项目名称:mediboard4,代码行数:30,代码来源:ajax_edit_route.php

示例15: getAll

 /**
  * 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;
     });
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:13,代码来源:CExchangeSource.class.php


注:本文中的CApp::getChildClasses方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。