ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDBUpdate3004 Class Reference

Update class for step 3004. More...

+ Collaboration diagram for ilDBUpdate3004:

Static Public Member Functions

static createPathFromId ($a_container_id, $a_name)
 

Detailed Description

Update class for step 3004.

Definition at line 8 of file class.ilDBUpdate3004.php.

Member Function Documentation

◆ createPathFromId()

static ilDBUpdate3004::createPathFromId (   $a_container_id,
  $a_name 
)
static

Definition at line 10 of file class.ilDBUpdate3004.php.

References $i, and $path.

11  {
12  $max_exponent = 3;
13  $st_factor = 100;
14 
15  $path = array();
16  $found = false;
17  $num = $a_container_id;
18  for ($i = $max_exponent; $i > 0;$i--) {
19  $factor = pow($st_factor, $i);
20  if (($tmp = (int) ($num / $factor)) or $found) {
21  $path[] = $tmp;
22  $num = $num % $factor;
23  $found = true;
24  }
25  }
26 
27  if (count($path)) {
28  $path_string = (implode('/', $path) . '/');
29  }
30  return $path_string . $a_name . '_' . $a_container_id;
31  }
$path
Definition: aliased.php:25
$i
Definition: disco.tpl.php:19

The documentation for this class was generated from the following file: