Parse firewalls from configuration
@param  boolean $force force parsing
@return void
976312
protected function parseFirewalls($force = false)
    {
        if (null == $this->firewalls || $force) {
            $firewalls = ['pattern'=>null,'paths'=>[]];
            $pattern = '';

            foreach (Base::instance()->get('SECURITY.firewalls') ?: [] as $name => $config) {
                $pattern .= ($pattern?'|':'').$config['path'];
                $key = static::pathName($config['path']);
                $firewalls['paths'][$key] = [
                    'login_route' => $config['login_route'],
                    'roles' => $config['roles'],
                ];
            }

            if ($pattern) {
                $firewalls['pattern'] = '#(?<path>'.$pattern.')#';
            }

            $this->firewalls = $firewalls;
        }
    }
933550
public function compile($force = false)
    {
        $this->commandCaller->compile($this->configFile, $force, $this->target);
    }
1115160
public function hasTranslations(bool $force = false)
    {
        $this->getTranslations($force);

        return $this->translations_list->isFilled();

    }
241343
public function execute(bool $force = false): void
	{
		if($force || $this->confirm('<yellow>Are you sure you want to reset your database?</yellow>'))
		{
			$this->nl();

			$this->rollback();

			return;
		}

		$this->nl();

		$this->write('Ok, no action was performed.');
	}
1266366
protected function loadMetadata(bool $force = false) {
        if (!$this->metadata || $force) {
            $meta = $this->getMetadataFromFedora();

            if (count($meta->propertyUris()) === 0) {
                throw new RuntimeException('No resource metadata. Please check a value of the fedoraApiUrl configuration property.');
            }

            $this->setMetadata($meta);
        }
    }
835667
public function get_extlinks( $force = false ) {

		if( !$force && $this->extlinks !== null ) {
			return $this->extlinks;
		}

		$this->extlinks = array();
		if( !$this->exists ) return array();

		$tArray = array(
			'prop'     => 'extlinks',
			'titles'   => $this->title,
			'_code'    => 'el',
			'_lhtitle' => 'extlinks'
		);

		pecho( "Getting external links used on {$this->title}..\n\n", PECHO_NORMAL );

		$result = $this->wiki->listHandler( $tArray );

		if( count( $result ) > 0 ) {
			foreach( $result as $extlink ){
				$this->extlinks[] = $extlink['*'];
			}
		}

		return $this->extlinks;
	}
482745
public function render($force = false) {

        if(empty($this->html) || $force) {

            $attr = [
                sprintf('src="%s"', $this->getValue()),
                'type="image"'
            ];

            foreach($this->attributes as $k => $v) {

                if(in_array(strtolower($k), ['src', 'value', 'type'])) {
                    continue;
                }
                $attr[] = sprintf('%s="%s"', $k, $v);

            }

            $this->html = sprintf('<input name="%s" %s>',
                $this->getName(),
                implode(' ', $attr)
            );

        }

        return $this->html;

	}
1095926
public function stopProcessesCommand(bool $force = false)
    {
        $count = $this->processManager->killAllProcesses($force);
        $this->outputLine();

        if ($force === true) {
            $this->outputFormatted('<comment>force stopped %s</comment>', [
                $count === 1 ? '1 process' : $count . ' processes'
            ]);
        } else {
            $this->outputFormatted('<success>stopped %s</success>', [
                $count === 1 ? '1 process' : $count . ' processes'
            ]);
        }

        $this->outputLine();
        $this->outputFormatted('The processes will automatically restart during the next request');
        $this->outputLine();
    }
47287
public static function flush_cacheblock_cache($force = false)
    {
        if (!self::$cacheblock_cache_flushed || $force) {
            $cache = Injector::inst()->get(CacheInterface::class . '.cacheblock');
            $cache->clear();


            self::$cacheblock_cache_flushed = true;
        }
    }
1335357
public function ensurePropertiesAttributes($force = false)
    {
        if ($this->propertiesAttributes === null || $force === true) {
            $this->ensurePropertiesIds($force);
            $this->propertiesAttributes = [];

            foreach ($this->propertiesIds as $propertyId) {
                $this->propertiesAttributes[$propertyId] = Property::propertyKeyForId($propertyId);
            }
        }
    }
1264184
public function setup($force = false) {
		if(!$force && $this->description)
			return;
		
		$this->changeDescription($this->fetchDescription());
	}
25239
public function delete($force = false)
    {
        $this->getParent()->channelDelete($this->getId(), $force);

        unset($this);
    }
618401
public function remove($force = false)
    {
        $isEmpty = $this->isEmpty();
        if ($force && !$isEmpty) {
            $it = new \RecursiveDirectoryIterator($this->dir, \RecursiveDirectoryIterator::SKIP_DOTS);
            $files = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
            foreach($files as $file) {
                if ($file->isDir()){
                    \rmdir($file->getRealPath());
                } else {
                    \unlink($file->getRealPath());
                }
            }

            \rmdir($this->dir);
            $this->removed = true;

            return;
        }

        if ($isEmpty) {
            \rmdir($this->dir);
            $this->removed = true;
        }
    }
1259645
public function render($force = false) {

		if(empty($this->html) || $force) {

			$this->attributes['type'] = 'password';
			$this->html = parent::render(true);

		}

		return $this->html;

	}
765122
public function render($force = false) {

		if(empty($this->html) || $force) {

			$attr = [];
			foreach($this->attributes as $k => $v) {
				$attr[] = sprintf('%s="%s"', $k, $v);
			}

			$options = [];
			foreach($this->options as $o) {
				$options[] = $o->render();
			}

			$this->html = sprintf('<select name="%s" %s>%s</select>',
				$this->getName(),
				implode(' ', $attr),
				"\n" . implode("\n", $options) . "\n"
			);
		}

		return $this->html;
	}
783546
public function toArray($force = true)
    {
        if (!$force && !$this->hasChildren()) {
            return $this->toValue();
        }

        $data = array();
        foreach ($this->children() as $name => $child) {
            $data[$name] = $child->toArray(false);
        }

        return $data;
    }
657540
public function login($force=false) {
		if( !$force && static::isLogged() ) {
			static::throwException('alreadyLoggedin');
		}
		/**
		 * @var AbstractUser $USER
		 * @deprecated
		 */
		global $USER;
		$_SESSION['USER'] = $USER = $this;
		$this->login = $force ? self::LOGGED_FORCED : self::IS_LOGGED;
		if( !$force ) {
			static::logEvent('login');
		}
		static::logEvent('activity');
	}