???
@return void
971764
function update()
    {
        $old = Eresus_CMS::getLegacyKernel()->sections->get(arg('update', 'int'));
        $item = $old;

        $newName = arg('name', '/[^a-z0-9_]/i');
        if ($newName)
        {
            $item['name'] = $newName;
        }
        $item['title'] = arg('title', 'dbsafe');
        $item['caption'] = arg('caption', 'dbsafe');
        $item['description'] = arg('description', 'dbsafe');
        $item['hint'] = arg('hint', 'dbsafe');
        $item['keywords'] = arg('keywords', 'dbsafe');
        $item['template'] = arg('template', 'dbsafe');
        $item['type'] = arg('type', 'dbsafe');
        $item['active'] = arg('active', 'int');
        $item['visible'] = arg('visible', 'int');
        $item['access'] = arg('access', 'int');
        $item['position'] = arg('position', 'int');
        $item['options'] = text2array(arg('options'), true);

        $temp = Eresus_CMS::getLegacyKernel()->sections->get("(`name`='" . $item['name'] .
        "') AND (`owner`='" . $item['owner'] . "' AND `id` <> " . $item['id'] . ")");
        if (count($temp) > 0)
        {
            Eresus_Kernel::app()->getPage()->addErrorMessage(
                sprintf(errItemWithSameName, $item['name']));
            saveRequest();
            HTTP::redirect(Eresus_CMS::getLegacyKernel()->request['referer']);
        }

        if (arg('created'))
        {
            $item['created'] = arg('created', 'dbsafe');
        }
        $item['updated'] = arg('updated', 'dbsafe');
        if (arg('updatedAuto'))
        {
            $item['updated'] = gettime('Y-m-d H:i:s');
        }

        Eresus_CMS::getLegacyKernel()->sections->update($item);

        HTTP::redirect(arg('submitURL'));
    }
619561
public function handle()
    {
        do {
            if (!isset($validator) || $validator->errors()->has("username")) {
                if (isset($validator) && $validator->errors()->has("username")) {
                    $this->error($validator->errors()->first("username"));
                }
                $data["username"] = $this->ask("User's username: ");
            }

            if (!isset($validator) || $validator->errors()->has("firstname")) {
                if (isset($validator) && $validator->errors()->has("firstname")) {
                    $this->error($validator->errors()->first("firstname"));
                }
                $data["firstname"] = $this->ask("User's firstname: ");
            }

            if (!isset($validator) || $validator->errors()->has("lastname")) {
                if (isset($validator) && $validator->errors()->has("lastname")) {
                    $this->error($validator->errors()->first("lastname"));
                }
                $data["lastname"] = $this->ask("User's lastname: ");
            }

            if (!isset($validator) || $validator->errors()->has("email")) {
                if (isset($validator) && $validator->errors()->has("email")) {
                    $this->error($validator->errors()->first("email"));
                }
                $data["email"] = $this->ask("User's email: ");
                $data["email_confirmation"] = $this->ask("Email again: ");
            }

            if (!isset($validator) || $validator->errors()->has("password")) {
                if (isset($validator) && $validator->errors()->has("password")) {
                    $this->error($validator->errors()->first("password"));
                }
                $data["password"] = $this->secret("User's password: ");
                $data["password_confirmation"] = $this->secret("Password again: ");
            }

            $validator = new Validator;

            $validator = Validator::make($data, [
                'username' => 'required',
                'firstname' => 'required',
                'lastname' => 'required',
                'email' => 'required|unique:admin_users,email|confirmed',
                'password' => 'required|confirmed'
            ]);
        } while ($validator->fails());

        $user = new AdminUser;
        $user->username = $data["username"];
        $user->firstname = $data["firstname"];
        $user->lastname = $data["lastname"];
        $user->email = $data["email"];
        $user->is_active = true;
        $user->password = bcrypt($data["password"]);
        $user->save();

        $user->addRoleByName('administrator');
    }
961811
protected function bootstrap(): void
	{
		(function($app, $container): void
		{
			include $this->applicationPath . '/bootstrap.php';
		})($this, $this->container);
	}
491783
public function index()
    {
        $this->requireAdmin();

        $this->layout->title = Lang::get('settings');

        $this->view->settings = $this->settings;

        $basicSettings = array();
        if (isset($this->settings['phpci']['basic'])) {
            $basicSettings = $this->settings['phpci']['basic'];
        }

        $buildSettings = array();
        if (isset($this->settings['phpci']['build'])) {
            $buildSettings = $this->settings['phpci']['build'];
        }

        $latestBuildsSettings = array();
        if (isset($this->settings['phpci']['latest_builds'])) {
            $latestBuildsSettings = $this->settings['phpci']['latest_builds'];
        }

        $emailSettings = array();
        if (isset($this->settings['phpci']['email_settings'])) {
            $emailSettings = $this->settings['phpci']['email_settings'];
        }

        $authSettings = array();
        if (isset($this->settings['phpci']['authentication_settings'])) {
            $authSettings = $this->settings['phpci']['authentication_settings'];
        }

        $this->view->configFile = PHPCI_CONFIG_FILE;
        $this->view->basicSettings = $this->getBasicForm($basicSettings);
        $this->view->latestBuildsSettings = $this->getLatestBuildsForm($latestBuildsSettings);
        $this->view->buildSettings = $this->getBuildForm($buildSettings);
        $this->view->github = $this->getGithubForm();
        $this->view->emailSettings = $this->getEmailForm($emailSettings);
        $this->view->authenticationSettings = $this->getAuthenticationForm($authSettings);
        $this->view->isWriteable = $this->canWriteConfig();

        if (!empty($this->settings['phpci']['github']['token'])) {
            $this->view->githubUser = $this->getGithubUser($this->settings['phpci']['github']['token']);
        }

        return $this->view->render();
    }
285771
protected function clear(): void
    {
        $this->innerHtml = null;
        $this->outerHtml = null;
        $this->text      = null;
        $this->textWithChildren = null;

        if (is_null($this->parent) === false) {
            $this->parent->clear();
        }
    }
675941
public function getQuestion() : ?string 
    {
        if ( ! $this->hasQuestion()) {
            $this->setQuestion($this->getDefaultQuestion());
        }
        return $this->question;
    }
674647
public function checks()
    {
        foreach ($this->check as $checkName => $className) {
            $this
                ->getValidator($className, $checkName)
                ->check()
            ;
        }
    }
757931
public function handle()
    {
        $name = $this->argument('module');

        if ($name) {
            $this->updateModule($name);

            return;
        }

        /** @var \Nwidart\Modules\Module $module */
        foreach ($this->laravel['modules']->getOrdered() as $module) {
            $this->updateModule($module->getName());
        }
    }
330386
public function validate(): void
    {
        $this->validateRootFilter();
        $this->validateRelations();
        $this->validateSorts();
        $this->validateOffset();
        $this->validateLimit();
        $this->validateFields();
    }
747808
public function init(): void
    {
        parent::init();

        if ($this->default !== '' && $this->default !== null && !is_array($this->default)) {
            try {
                $default = Json::decode($this->default);

                if (is_array($default)) {
                    $this->default = $default;
                }
            } catch (InvalidArgumentException $exception) {}
        }
    }
38790
public function fire()
    {

        Assets::withChain([
            new Locations($this->token), new Names($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Bookmarks::withChain([
            new Folders($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Contacts::withChain([
            new Labels($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Contracts::withChain([
            new Items($this->token), new Bids($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Info::dispatch($this->token)->onQueue($this->queue);
        AllianceHistory::dispatch($this->token)->onQueue($this->queue);
        Blueprints::dispatch($this->token)->onQueue($this->queue);
        ContainerLogs::dispatch($this->token)->onQueue($this->queue);
        Divisions::dispatch($this->token)->onQueue($this->queue);
        Facilities::dispatch($this->token)->onQueue($this->queue);
        IssuedMedals::dispatch($this->token)->onQueue($this->queue);
        Medals::dispatch($this->token)->onQueue($this->queue);
        Members::dispatch($this->token)->onQueue($this->queue);
        MembersLimit::dispatch($this->token)->onQueue($this->queue);
        MemberTracking::dispatch($this->token)->onQueue($this->queue);

        Roles::withChain([
                new RoleHistories($this->token), ]
        )->dispatch($this->token)->onQueue($this->queue);

        Shareholders::dispatch($this->token)->onQueue($this->queue);
        Standings::dispatch($this->token)->onQueue($this->queue);

        Starbases::withChain([
            new StarbaseDetails($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Structures::dispatch($this->token)->onQueue($this->queue);

        CustomsOffices::withChain([
            new CustomsOfficeLocations($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Titles::withChain([
            new MembersTitles($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Jobs::dispatch($this->token)->onQueue($this->queue);
        Extractions::dispatch($this->token)->onQueue($this->queue);

        Observers::withChain([
            new ObserverDetails($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Recent::withChain([
            new Detail($this->token),
        ])->dispatch($this->token)->onQueue($this->queue);

        Orders::dispatch($this->token)->onQueue($this->queue);

        Balances::dispatch($this->token)->onQueue($this->queue);
        Journals::dispatch($this->token)->onQueue($this->queue);
        Transactions::dispatch($this->token)->onQueue($this->queue);
    }
328688
public function execute()
    {
        if (!$this->isEmpty()) {
            $this->table->update($this->context + $this->values, $this->where)->run();
        }

        parent::execute();
    }
1162159
public function query()
	{
		if(preg_match('/^\s*(.*?)\((.*)\)\s*$/',$this->relation->foreignKey,$matches))
			$this->queryManyMany($matches[1],$matches[2]);
		else
			$this->queryOneMany();
	}
1303544
public function index()
    {
        $this->loadModel('Content.Contents');
        $this->Contents->CreatedBy->fieldable(false);
        $this->Contents->ModifiedBy->fieldable(false);
        $contents = $this->Contents
            ->find('all', ['fieldable' => false])
            ->contain(['ContentTypes', 'CreatedBy', 'ModifiedBy']);

        if (!empty($this->request->query['filter']) &&
            $contents instanceof Query
        ) {
            $this->Contents->search($this->request->query['filter'], $contents);
        }

        $this->title(__d('content', 'Contents List'));
        $this->set('contents', $this->paginate($contents));
        $this->Breadcrumb->push('/admin/content/manage');
    }
234849
public function validate() : void
    {
        $this->value = null;
        $value = $this->filter($this->raw_value);
        if (true === $this->checkValidity($value)) {
            $this->is_valid = true;
        } else {
            $this->is_valid = false;
            $this->reportError($this->error_message);
            $error_message = sprintf($this->error_message, $this->field_name);
            $this->the_message = $error_message;
        }
        // If no issues have been found, check the constraints.
        if ($this->is_valid) {
            foreach ($this->constraints as $constraint) {
                if (false === $constraint->check($value)) {
                    $this->is_valid = false;
                    $this->the_message = sprintf($constraint->getErrorMessage(), $this->field_name);
                }
            }
        }
        // Set the value for retrieval
        if ($this->is_valid) {
            $this->value = $value;
        }
    }
671433
public function pass() {
    if ($this->output && !$this->output->isQuiet()) {
      $this->output->write(".");
    }
    $this->passed += 1;
  }
647781
public function init()
    {
        $valid = null;

        if ($this->cache->has(self::CACHE_KEY)) {
            $cached = $this->cache->get(self::CACHE_KEY);
            $valid  = $cached && isset($cached['hosts']) && count($cached['hosts']);
        }


        if ($valid) {
            $this->map = $cached;
        } else {
            $this->build();
        }
    }