当前位置: 首页>>代码示例>>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;未经允许,请勿转载。