Send a message to the client (without event name).
@param string $data Data.
@param string $id Optional id.
434877
public function send($data, $id = null)
    {
        if (!isset($id)) {
            $id = $this->lastId++;
        }
        $this->putLine('id: ' . $id);
        $this->putLine('data: ' . $data);
        $this->putLine();
        $this->flush();
    }
1139421
public function saveById($id, $data)
    {
        $exists = !is_null($id);
        if (!$exists) {
            $id = $this->findAvailableIdByData($data);
        }
        parent::saveById($id, $data);
        return $id;
    }
1099990
public static void add(Id id, Map<String, Object> data){
        DDSCluster.call(new MessageBean(MongoDBDDS.class,
                id.getDatabase(),id.getCollection(),id.getEntity(),
                "add",data));
    }
777274
public function write($id , $data) {
    $crypto = $this->psl['crypt/crypto'];
    $store  = $this->psl['store'];

    /* Encrypt session. */
    try {
      $crypto->_algo = $this->cryptAlgo;
      $crypto->_mode = $this->cryptMode;
      $encrypted = $crypto->encrypt($data, $this->secret);

      /* Destroy old session. */
      if($this->newID != $this->currID) {
        $this->destroy($this->currID);
      }

      /* Write new session, with new ID. */
      return $store->write('session', $this->newID, $encrypted);
    } catch (\phpSec\Exception $e) {
      return false;
    }
  }
920044
public function update($id, $data)
    {
        $sections = empty($data['sections']) ? [] : $data['sections'];

        return $this->_sendPayload(
            $this->_getService($this->_pageServiceKey)->updateTemplateSections($id, $sections)
        );
    }
313915
public function update($id, $data) {
		$dt = $this->getDataTable();
		
		if (! $dt)
			return $this->createResponse($this->getNameManager()->getTableNames(), 401, "Tabels");
		
		return $this->createResponse([], 200, "{$this->getNameManager()->entityName}: No Update");
	}
42876
public function write($id, $data) {
    // TODO: Implement locking. b/7701850
    return $this->memcacheContainer->set(
        self::SESSION_PREFIX . $id, $data, $this->expire);
  }
1199300
public function write( $id, $data, $next ) {
		$this->_write( $id, $data );

		return $next( $id, $data );
	}
400701
function write($id,$data) {
		$this->set('session_id',$id);
		$this->set('data',$data);
		$this->set('ip',$this->_ip);
		$this->set('agent',$this->_agent);
		$this->set('stamp',time());
		$this->save();
		return TRUE;
	}
1105596
public function put($id = null, $data = array())
    {

        $args = func_get_args();
        if(count($args) == 2){
            $args = $id;
        }else{
            $data = array_pop($args);
        }

        try {
            $this->client->request($this, 'put', $args, $data);
        } catch(Exception $ex) {
            $this->dispatchException($ex);
        }

        return true;
    }
113799
public function _write($id, $data) {
        $access = time();
        
        ORM::for_table($this->sessions_table)->raw_execute("REPLACE INTO " . $this->sessions_table . " VALUES (:id, :access, :data)", ['id' => $id, 'access' => $access, 'data' => $data]);
    }
1324834
public static function update(array $id = [], array $data = [], ClientInterface $client = null)
    {
        return (new RequestService($client))
            ->setResourceClass(static::class)
            ->setResourcePath(static::RESOURCE_PATH . "/:" . static::RESOURCE_ID)
            ->update($id, $data);
    }
857275
public function update($id, array $data)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->update($data);
    }
980446
protected function _update($id, array $data)
    {
        return $this->db->update($this->table, $data, ['id' => $id]);
    }
417192
public void send(byte[] data, int id) {
        boolean isFirstPacket = (packets.size() == 0);
        packets.add(data);
        ids.add(id);
        if (isFirstPacket) {
            scheduleSendTask(true);
        }
        Log.d(TAG, "Added packet " + id + " to buffer; " + packets.size() + " packets in buffer");
    }
515598
public function send($command, $data)
    {
        $message = new Message;

        $message->command = $command;
        $message->data = $data;

        $this->connection->send($message->serialize());
    }
1134525
public function addSkills($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Reference not found.']);
		}

		// pass add to internal logic
		try {
			$this->doAddSkills($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(ReferenceEvent::PRE_SKILLS_ADD, $model, $data);
		$this->dispatch(ReferenceEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(ReferenceEvent::POST_SKILLS_ADD, $model, $data);
		$this->dispatch(ReferenceEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}