Set the insertion ID.

@param string $pId
@return Insert
551552
private function _setId($pId)
    {
        $idField = ItemInterface::IDFIELD;

        if (! isset($this->_fields[$idField])
            or ! $this->_fields[$idField]) {
            $this->_fields[$idField] = $pId;
        }

        return $this;
    }
757895
public function setId($id)
    {
       	if ($id !== null && is_numeric($id)) {
            $id = (int) $id;
        }
        $this->id = $id;

        return $this;
    }
1351676
def set_id(self,pid):
        
        if self.type == 'KAF':
            return self.node.set('pid',pid)
        elif self.type == 'NAF':
            return self.node.set('id',pid)
148436
public function setId($sid)
    {
        //argument 1 must be an integer
        Argument::i()->test(1, 'int');

        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        return session_id((int) $sid);
    }
294830
public function setRefId($refId)
    {
        if ($this->refIdAttribute == $this->guidAttribute) {
            return $this->setGUID($refId);
        }
        if ($this->refIdAttribute == $this->idAttribute) {
            return $this->setID($refId);
        }
        return $this->{$this->refIdAttribute} = $refId;
    }
793457
public function setMenuId( $menuId )
    {
        $this->menuId = empty( $menuId ) ? null : (int) $menuId;

        if ( null !== $this->_menu &&
             $this->_menu->id != $this->menuId )
        {
            $this->_menu = null;
        }

        return $this;
    }
473208
@Override
  public final void setItsId(final IdUserRoleJetty pId) {
    this.itsId = pId;
    if (this.itsId == null) {
      this.itsUser = null;
      this.itsRole = null;
    } else {
      this.itsUser = this.itsId.getItsUser();
      this.itsRole = this.itsId.getItsRole();
    }
  }
712782
public function setCwd($cwd)
    {
        if (empty($cwd)) {
            $cwd    = null;
        } else {
            $cwd    = (string)$cwd;
        }
        $this->cwd  = $cwd;
        return $this;
    }
854387
private function createId($time = null)
    {
        $pid = getmypid();
        $inc = $this->readInc($pid);

        $id = $this->intToMaxLengthHex(null !== $time ? (int) $time : time(), 8);
        $id .= $this->intToMaxLengthHex(crc32(self::getHostname()), 6);
        $id .= $this->intToMaxLengthHex($pid, 4);
        $id .= $this->intToMaxLengthHex($inc, 6);

        return $id;
    }
654512
public function getPidLoadInfo($pid)
    {
        $commandsDto = new CommandsExecutionDto();
        $commandsDto->setCommandName(CommandsConstants::GET_PID_LOAD_INFO);
        $commandsDto->setPid($pid);

        return $this->getCommandExecutionResult($commandsDto);
    }
364739
protected function prepare_post_info( $pid = 0 ) {
		if ( is_string($pid) || is_numeric($pid) || (is_object($pid) && !isset($pid->post_title)) || $pid === 0 ) {
			$pid = self::check_post_id($pid);
			$post = get_post($pid);
			if ( $post ) {
				return $post;
			}
		}
		//we can skip if already is WP_Post
		return $pid;
	}
314795
protected function removePidFileByPid(int $pid) : bool
    {
        foreach ($this->pids as $pool => $poolPids) {
            foreach ($poolPids as $workerId => $workerPid) {
                if ($pid !== $workerPid) {
                    continue;
                }
                $pidFile = $this->runPath .'/'.$pool.'/'.$pid.'.pid';
                return $this->removePidFile($pidFile);
            }
        }
        return false;
    }
1066227
public function set_last_insert_id($id=''): self
  {
    if ( $id === '' ){
      if ( $this->id_just_inserted ){
        $id = $this->id_just_inserted;
        $this->id_just_inserted = null;
      }
      else{
        $id = $this->lastInsertId();
        if ( \is_string($id) && str::is_integer($id) ){
          $id = (int)$id;
        }
      }
    }
    else{
      $this->id_just_inserted = $id;
    }
    $this->last_insert_id = $id;
    return $this;
  }
345320
public function & SetId ($id) {
		/** @var $this \MvcCore\Ext\Forms\IForm */
		$this->id = $id;
		self::$instances[$id] = & $this;
		return $this;
	}
135463
public function setObjId($objId)
    {
        if (!is_scalar($objId)) {
            throw new InvalidArgumentException(sprintf(
                'Object ID must be a string or numerical value, received %s.',
                (is_object($objId) ? get_class($objId) : gettype($objId))
            ));
        }

        $this->objId = $objId;

        return $this;
    }
278765
private function writePidFile(string $pidfile, $pid = null)
    {
        if (is_null($pid)) {
            $pid = getmypid();
        }

        file_put_contents($pidfile, $pid) || die(sprintf('Could not write PID information to %s', $pidfile));
    }
209235
public function setId($id = null)
        {
            if (null !== $id && !is_string($id) && !is_numeric($id)) {
                throw new Exception(
                        'Invalid argument: $id must be a string, number or null');
            }

            $this->_id = null === $id ? $id : (string) $id;

            return $this;
        }