本文整理汇总了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));
}
示例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();
}