本文整理汇总了PHP中Package::with方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::with方法的具体用法?PHP Package::with怎么用?PHP Package::with使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::with方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: component_row
function component_row(Package $package, $indentation, TableCreator $table_creator)
{
$package->with('integration');
$ret = $table_creator->row(array($package->full_name(), $package->integration == null ? 'Architettura del sistema' : $package->integration->public_id()));
$nested = $package->with('packages')->packages;
foreach ($nested as $nuc) {
$ret .= component_row($nuc, $indentation + 1, $table_creator);
}
return $ret;
}
示例2: display_comp
function display_comp(Package $component, TableCreator $table_creator)
{
$string = "";
$component->with('classes');
foreach ($component->classes as $class) {
$string .= display_class($class, $table_creator);
}
$component->with('packages');
$nested = $component->packages;
foreach ($nested as $nuc) {
$string .= display_comp($nuc, $table_creator);
}
return $string;
}
示例3: component_row
function component_row(Package $component, $indentation, TableCreator $table_creator)
{
$req_id = array();
$component->with('requirements');
foreach ($component->requirements as $rq) {
array_push($req_id, $table_creator->link($rq->public_id(), $rq->public_id()));
}
array_unique($req_id);
$cells = array($table_creator->child_indentation($indentation), $table_creator->link($component->full_name(), $component->full_name("::\\-")), implode("\n\n", $req_id));
$ret = $table_creator->row($cells);
$nested = $component->with('packages')->packages;
foreach ($nested as $nuc) {
$ret .= component_row($nuc, $indentation + 1, $table_creator);
}
return $ret;
}
示例4: component_row
function component_row(Package $package, $indentation, TableCreator $table_creator)
{
$ret = $table_creator->row(array($package->full_name(), $package->afferente(), $package->efferente(), round($package->instability(), 2)));
$nested = $package->with('packages')->packages;
foreach ($nested as $nuc) {
$ret .= component_row($nuc, $indentation + 1, $table_creator);
}
return $ret;
}
示例5: ns_build_package
function ns_build_package(Package $package, $namespace, &$namespace_array)
{
$namespace_array[] = $namespace . $package->name;
$package->with('packages,classes');
$sub_scope = $namespace . $package->name . '::';
if (isset($package->packages)) {
foreach ($package->packages as $c) {
ns_build_package($c, $sub_scope, $namespace_array);
}
}
if (isset($package->classes)) {
foreach ($package->classes as $class) {
$namespace_array[] = $sub_scope . $class->name;
}
}
}
示例6: display_package
function display_package(Package $pack, $indentation, TableCreator $table_creator)
{
$txt = "";
/*$name = $pack->full_name("::");
if ( !$pack->virtual )
{
$txt .= $table_creator->anchor($name,'')."\n";
$txt .= $table_creator->title(2,$name);
$txt .= $pack->description."\n\n";
}*/
if ($indentation == 1) {
$txt .= $table_creator->title(2, $pack->name);
}
//else if ( $indentation == 2 )
// $txt .= $table_creator->title(3,$pack->name);
$pack->with('classes', 'packages');
foreach ($pack->classes as $c) {
$txt .= display_class($c, $table_creator);
}
foreach ($pack->packages as $p) {
$txt .= display_package($p, $indentation + 1, $table_creator);
}
return $txt;
}
示例7: 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();
}