registerPaths

@param bool $refresh

@return static
@throws \ReflectionException
481178
public function registerPaths($refresh = false)
    {
        if ($this->config['path.registered'] && !$refresh) {
            return $this;
        }

        /**
         * @var PriorityQueue $paths
         * @var Structure     $config
         */
        $paths    = $this->getRenderer()->getPaths();
        $config   = $this->getPackage()->getContainer()->get('config');
        $ref      = new \ReflectionClass($this);
        $viewName = strtolower($this->getName());
        $package  = $this->getPackage();

        if ($this->config['package.path']) {
            $this->config['tmpl_path.view']    = Path::normalize($this->config['package.path'] . '/Templates/' . $viewName);
            $this->config['tmpl_path.package'] = Path::normalize($this->config['package.path'] . '/Templates');
        } elseif (!$package instanceof NullPackage) {
            $this->config['tmpl_path.view']    = Path::normalize($package->getDir() . '/Templates/' . $viewName);
            $this->config['tmpl_path.package'] = Path::normalize($package->getDir() . '/Templates');
        } else {
            $this->config['tmpl_path.view']    = Path::normalize(dirname($ref->getFileName()) . '/../../Templates/' . $viewName);
            $this->config['tmpl_path.package'] = Path::normalize(dirname($ref->getFileName()) . '/../../Templates');
        }

        $paths->insert($this->config['tmpl_path.view'], PriorityQueue::LOW);
        $paths->insert($this->config['tmpl_path.package'], PriorityQueue::LOW);

        $paths->insert(
            Path::normalize($config->get('path.templates') . '/' . $package->getName() . '/' . $viewName),
            PriorityQueue::LOW - 10
        );
        $paths->insert(
            Path::normalize($config->get('path.templates') . '/' . $package->getName()),
            PriorityQueue::LOW - 10
        );

        $this->renderer->setPaths($paths);

        $this->config['path.registered'] = true;

        $this->registerMultilingualPaths();

        return $this;
    }
734498
protected function getCmd($refresh = false)
    {
        if (is_null($this->cmd) || $refresh) {
            $this->cmd = new Command();
        }
        
        return $this->cmd;
    }
780466
public function refresh($refresh = true)
    {
        $this->unitOfWorkHints[Query::HINT_REFRESH] = (boolean) $refresh;
        return $this;
    }
1122618
public function refresh($forceForever = false, $resetClaims = false)
    {
        $this->requireToken();

        return $this->manager->customClaims($this->getCustomClaims())
                             ->refresh($this->token, $forceForever, $resetClaims)
                             ->get();
    }
709075
protected function authenticate($refresh = false)
    {
        $token = $refresh ? $this->refreshToken : $this->authToken ;

        $response = $this->client->get('authenticate', [
            'headers' => ['Authentication' => $token->getToken()],
        ]);

        // Parse the response body.
        $json = json_decode($response->getBody());
        $body = $json->{'nl.divide.iq'};
        $expire = new \DateTime($body->expiration_date, new \DateTimezone('UTC'));

        // Store the access and refresh (if any) tokens in the object.
        $this->accessToken = new Token($body->access_token, $expire);
        if (isset($body->refresh_token)) {
            $this->refreshToken = new Token($body->refresh_token);
        }

        return $this;
    }
1243265
public function Refresh() {
      $LocalName = $this->Current();
      
      $ApplicationWhiteList = Gdn::ApplicationManager()->EnabledApplicationFolders();
      $PluginWhiteList = Gdn::PluginManager()->EnabledPluginFolders();

      $ForceRemapping = TRUE;

      $this->Set($LocalName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping);
   }
1043897
public function getColumns($base = false, $refresh = false)
    {
        //Get the table name
        $name = $base ? $this->getBase() : $this->getName();

        //Get the columns from the schema and perform mapping
        if (!isset($this->__column_cache[$name]) || $refresh)
        {
            $columns = $this->getSchema($name)->columns;
            $this->__column_cache[$name] = $this->mapColumns($columns, true);
        }

        return $this->__column_cache[$name];
    }
799972
public function registerClasses($classes, $merge = true)
    {
        if (DIRECTORY_SEPARATOR === '\\') {
            foreach ($classes as $key => $path) {
                $classes[$key] = strtr($path, '\\', '/');
            }
        }

        $this->_classes = $merge ? array_merge($this->_classes, $classes) : $classes;

        return $this;
    }
1155568
public function registerPathTemplate($template, $prepend = false)
    {
        if($prepend) {
            array_unshift($this->__path_templates, $template);
        } else {
            array_push($this->__path_templates, $template);
        }

        return $this;
    }
314580
public function registerLocator(ClassLocatorInterface $locator, $prepend = false )
    {
        $array = array($locator->getName() => $locator);

        if($prepend) {
            $this->_locators = $array + $this->_locators;
        } else {
            $this->_locators = $this->_locators + $array;
        }
    }
743229
public function getEncodings($refresh = false)
    {
        if (empty($this->detection['acceptEncoding']) || $refresh) {
            $this->detectEncoding($this->acceptEncoding);
        }

        return $this->encodings;
    }
982085
public static function registerPath($path)
    {
        $path = realpath($path);
        if (!in_array($path, self::$paths)) {
            self::$paths[] = $path;
            self::$cache   = null;
        }
    }
65597
public function register($restore = true, $type = E_ALL | E_STRICT, $shutdown = false)
    {
        if ($type === null) {
            $type = E_ALL | E_STRICT;
        }

        if ($restore) {
            $this->restore();
        }

        set_error_handler([$this, 'error'], $type);
        set_exception_handler([$this, 'exception']);

        if ($shutdown) {
            register_shutdown_function([$this, 'down']);
        }
    }
482522
public function makeCollection(bool $forceFetch = false): RouteInterface
    {
        $this->collectionFromPks = true;
        $this->instanceForceFetch = $forceFetch;

        return $this;
    }
1273199
private function registerBase()
    {
        $this['request'] = function () {
            return Request::createFromGlobals();
        };

        if (!empty($this['config']['cache']) && $this['config']['cache'] instanceof Cache) {
            $this['cache'] = $this['config']['cache'];
        } else {
            $this['cache'] = function () {
                return new FilesystemCache(sys_get_temp_dir());
            };
        }
    }
134181
public function refresh() {

		clearstatcache();

		$file = new File($this -> file -> getBasepath());
		$this -> file = $file -> entity();

		return $this;
	}
538113
public function getSelector(bool $refresh = false): string
    {
        if (!isset($this->selector) || $refresh) {
            $this->generateSelector();
        }

        return $this->selector;
    }