method realToUrl documentation in bbn\Appui\Ide

Returns the file's URL from the real file's path.

function(string $file) { return $this->projects->realToUrl($file); //get root for path //foreach ( $this->repositories() as $i => $d ){ /* foreach ( $this->repositories as $i => $d ){ $root = $d['root_path']; if ( $root && (strpos($file, $root) === 0) ){ $rep = $i; break; } } if ( isset($rep) ){ $res = $rep.'/src/'; $bits = explode('/', substr($file, \strlen($root))); // MVC if ( !empty($d['tabs']) ){ $tab_path = array_shift($bits); $fn = array_pop($bits); $ext = Str::fileExt($fn); $fn = Str::fileExt($fn, 1)[0]; $res .= implode('/', $bits); foreach ( $d['tabs'] as $k => $t ){ if ( empty($t['fixed']) && ($t['path'] === $tab_path . '/') ){ $res .= "/$fn/$t[url]"; break; } } } // Normal file else { $res .= implode('/', $bits); } return Str::parsePath($res); } return false;*/ }

Returns the file's URL from the real file's path. 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.