Sets the

@param mixed $id The ID of the resource model. Also sets the base URL based on the Nova config

@return void
7311
protected function setResourceId($id)
    {
        $path = Config::get('nova.path');
        // If the path is the site route, prevent a double-slash
        if ('/' === $path) {
            $path = '';
        }
        return $this->withMeta(['id' => $id, 'nova_path' => $path]);
    }
42560
public function setBaseId( $baseid )
	{
		if ( $baseid == $this->getBaseId() ) { return; }

		$this->_values['baseid'] = (int) $baseid;
		$this->setModified();
	}
1036136
public function setId($id)
    {
        $id = (string) $id;

        if (!preg_match('#^[a-zA-Z0-9_.]+$#', $id)) {
            throw new InvalidAlgorithmIdException($id);
        }

        $this->id = mb_strtolower($id);
    }
936297
public function setSiteId( $id )
	{
		if ( $id === $this->getSiteId() ) { return; }

		$this->_values['siteid'] = (int) $id;
		$this->_sitePath = array( (int) $id );
		$this->_siteSubTree = array( (int) $id );

		/** @todo: Wrong site item shouldn't be available any more but causes problems in controller */
		// $this->_site = null;

		$this->setModified();
	}
246394
public function set($id, $service)
    {
        if (!$this->has($id)) {
            $this->repository->set($id, $service);
        }
    }
626699
private function setFile(string $id)
    {
        if (!$this->id || $id != $this->id) {
            $this->id = $id;
            $id = Check::name($id, ["#"]);
            $this->file = (preg_match("/^" . preg_quote(PATH_HOME, '/') . "/i", $id) ? $id : PATH_HOME . "_cdn/" . parent::getFolder() . "/{$id}");

            // Verifica se é final .json
            if (!preg_match("/\.json$/i", $id))
                $this->file .= ".json";
        }
    }
1353395
public function setId($value)
    {
        $this->_validateNotNull('Id', $value);
        $this->_validateInt('Id', $value);

        if ($this->data['id'] === $value) {
            return;
        }

        $this->data['id'] = $value;

        $this->_setModified('id');
    }
1047012
public function setDefault($id)
    {
        $this->loadModel('Locale.Languages');
        $this->loadModel('System.Options');
        $language = $this->Languages->get($id);

        if ($language->status) {
            if ($this->Options->update('default_language', $language->code)) {
                $this->Flash->success(__d('locale', 'Default language changed!'));
            } else {
                $this->Flash->danger(__d('locale', 'Default language could not be changed.'));
            }
        } else {
            $this->Flash->danger(__d('locale', 'You cannot set as default a disabled language.'));
        }

        $this->title(__d('locale', 'Set Default Language'));
        $this->redirect($this->referer());
    }
545537
public function setVisible(int $id): void
    {
        $this->logger->logCall(__METHOD__, ['location' => $id]);
        $this->persistenceHandler->locationHandler()->setVisible($id);

        $this->cache->invalidateTags(['location-path-data-' . $id]);
    }
182589
public function set_id( $id ) {
		$this->id = $this->is_valid_id( $id ) ? $id : $this->generate_session_id();
	}
171579
public function setId($id)
    {
        if (!empty($id) && is_string($id) && ctype_print($id)) {
            $this->id = trim($id);
        }

        return $this;
    }
887177
public function change($id = null)
    {
        if ($id === null || !$this->Languages->exists(['id' => $id])) {
            $this->Flash->error($this->invalidRequestMessage);
            $this->redirect($this->referer());
            return;
        }
        $this->request->session()->write('contentLanguageId', (int)$id);
        $this->redirect($this->referer());
    }
698917
public function setId( $id )
	{
		if( $id === $this->getId() ) { return; }

		$this->_values['id'] = (string) $id ;
		$this->setModified();
	}
372239
public function remove($id)
    {
        if (isset($this->aliases[$id])) {
            $aliasId = $id;
            $id = $this->aliases[$id];
            unset($this->aliases[$aliasId]);
        }

        unset($this->keys[$id]);
        unset($this->values[$id]);
        unset($this->immutable[$id]);
        unset($this->factories[$id]);
        unset($this->definition[$id]);
    }
679170
public function updateIDValue(&$id)
    {
        $owner = $this->owner;
        if ($owner->IDCustomValue) {
            $id = $owner->IDCustomValue;
        }
    }
869336
public function set_id_from_database($id) {
        $this->id = $id;
        foreach ($this->questionattempts as $qa) {
            $qa->set_usage_id($id);
        }
    }
757895
public function setId($id)
    {
       	if ($id !== null && is_numeric($id)) {
            $id = (int) $id;
        }
        $this->id = $id;

        return $this;
    }