method accessUpdatePath documentation in bbn\User\Permissions

Updates all access permission for the given path in the given root.

function(string $path, string $root, string $url = '') { string $root, string $url = '' ): int { if (!empty($url) && (substr($url, -1) !== '/')) { $url .= '/'; } $num = 0; $fs = new System(); $ff = function ($a) use ($url, $path) { if (empty($url)) { $a['path'] = substr($a['name'], strlen(Mvc::getAppPath().'mvc/public/')); } else { $a['path'] = $url.substr($a['name'], strlen($path.'mvc/public/')); } if (substr($a['path'], -4) === '.php') { $a['path'] = substr($a['path'], 0, -4); } return $this->fFilter($a); }; if ($all = $fs->getTree($path.'mvc/public', '', false, $ff)) { $all = self::fTreat($all, false); usort($all, ['\\bbn\User\\Permissions', 'fSort']); array_walk($all, ['\\bbn\\User\\Permissions', 'fWalk']); foreach ($all as $i => $it) { $it['cfg'] = json_encode(['order' => $i + 1]); $num += $this->_add($it, $root); } } return $num; }

Updates all access permission for the given path in the given root. 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.