method decipherPath documentation in bbn\Appui\Ide
Replaces the constant at the first part of the path with its value.
function($st)
{
//return $this->projects::decipherPath($st);
$st = Str::parsePath($st);
//get root absolute of the file
foreach ($this->repositories as $i => $rep) {
if (strpos($st, $rep['name']) === 0) {
$root = $rep['root_path']; //$this->getRootPath($i);
$bit_rep = explode('/', $i);
break;
}
}
//the root of the file is removed
if (!empty($root) && !empty($bit_rep)) {
$bits = explode('/', $st);
$part_bits = array_diff($bits, $bit_rep);
//array_shift($part_bits);
/** @var string $path The path that will be returned */
$path = $root . '/' . implode('/', $part_bits);
return Str::parsePath($path);
}
return false;
}
Replaces the constant at the first part of the path with its value. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions