當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Connect::model方法代碼示例

本文整理匯總了PHP中Connect::model方法的典型用法代碼示例。如果您正苦於以下問題:PHP Connect::model方法的具體用法?PHP Connect::model怎麽用?PHP Connect::model使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Connect的用法示例。


在下文中一共展示了Connect::model方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: actionDisconnect

 function actionDisconnect($signal, $slot, $to)
 {
     $model = Connect::model()->findByAttributes(array('signal' => $signal, 'slot' => $slot));
     $model->delete();
     $this->redirect(array('methodView', 'id' => $to));
 }
開發者ID:black2279,項目名稱:Tracy-openshift,代碼行數:6,代碼來源:ClassController.php

示例2: package

 function package(Package $package, $assoc)
 {
     $package->with('parent0, packages, classes');
     $id = $this->package_id($package->id_package);
     $namespace = $this->package_id($package->parent);
     $this->open_uml_simple_element('Namespace.ownedElement');
     $this->open_uml_element('Package', $id, $package->name, $namespace);
     $this->open_uml_simple_element('Namespace.ownedElement');
     foreach ($package->packages as $c) {
         $this->package($c, $assoc);
     }
     foreach ($package->classes as $c) {
         $this->print_class($c, $assoc);
     }
     if ($assoc) {
         $ass = Association::model()->findAll(array('join' => 'Join class c on c.id_class = class_from', 'condition' => 'id_package = :idp', 'params' => array('idp' => $package->id_package)));
         foreach ($ass as $hole) {
             $this->association($hole, $id);
         }
     }
     $sig = Connect::model()->findAll(array('join' => 'Join method sl on sl.id_method = t.slot
                        join class c on c.id_class = sl.id_class', 'condition' => 'c.id_package = :idp', 'params' => array('idp' => $package->id_package)));
     foreach ($sig as $segv) {
         $this->signal($segv, $id);
     }
     foreach ($package->packages as $child) {
         $dep = $child->get_dependencies(false);
         $child_id = $this->package_id($child->id_package);
         foreach ($dep as $d) {
             if ($d['id_from'] != $child->id_package) {
                 continue;
             }
             $did = $this->generic_id('UMLDependency');
             $dit = $this->package_id($d['id_to']);
             $this->open_uml_element('Dependency', "", $child_id, null, array('client' => $id, 'supplier' => $dit));
         }
     }
     $this->close_element();
     $this->close_element();
     $this->close_element();
 }
開發者ID:black2279,項目名稱:Tracy-openshift,代碼行數:41,代碼來源:XmiRenderer.php


注:本文中的Connect::model方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。