Create a message id.

@param  mixed  $id

@return mixed
559691
protected function createId($id)
    {
        if (is_null($id)) {
            return md5(join('_', [
                $this->config['shortcode'],
                $this->mobile,
                time(),
            ]));
        }

        return $id;
    }
1222625
public function store($id)
    {
        $content = $this->getContent($id);
        if (!empty($content)) {
            $this->authorize('create', $content);
            $this->authorize('update', $content);
            $input       = $this->validator->validate('create');
            $translation = $this->repository->createTranslation($content, $input);
            return $this->respondWithSuccess($translation, new ContentTranslationTransformer);
        }
        return $this->respondNotFound();
    }
757557
public function encodeId($id = '')
    {
        if (empty($id)) {
            return NULL;
        }
        try {
            $hash = new Hashids($this->hashIds['salt'], $this->hashIds['minHashLength'], $this->hashIds['alphabet']);

            return $hash->encode($id);
        }
        catch (\Exception $e) {
            if (function_exists('log_message')) {
                $message = 'Error Code: ' . $e->getCode() . ' - File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Message: ' . $e->getMessage();
                log_message('error', $message);
            }

            return NULL;
        }
    }
3440
public function getMessage($id = '')
    {
        $message = [];
        if (is_array($this->messages) == true) {
            foreach($this ->messages as $msg) {
                if ($msg['index'] == $id) {
                    $message = $msg;
                    break;
                }
            }
        }

        if (is_array($message) === true) {
            // Get the message body but do not mark as read
            $message['body'] = quoted_printable_decode(imap_fetchbody($this->conn, $message['index'], FT_PEEK));
        }

        return $message;
    }
1291795
public function getDMById($id)
    {
        return $this->getDMs()->then(function (array $dms) use ($id) {
            foreach ($dms as $dm) {
                if ($dm->getId() === $id) {
                    return $dm;
                }
            }

            throw new ApiException('DM ' . $id . ' not found.');
        });
    }
915027
public static function getById($id)
    {
        $result = null;
        $info = CldrData::getLanguageInfo($id);
        if (isset($info)) {
            $result = new Language($info);
        }

        return $result;
    }
210870
public static function create($id = null)
    {
        if ( empty($id) )
        {
            $id = md5(__METHOD__) . count(self::$instances); 
        }
        if ( empty(self::$instances[$id]) )
        {
            self::$instances[$id] = new self();  
        }
        return self::$instances[$id];
    }
464783
public function getDirectMessagesById($id)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('direct_messages', 'show');

		// Set the API path
		$path = '/direct_messages/show.json';

		$data['id'] = $id;

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}
615448
public function show($id)
    {
        $inbox = $this->client->get(
            sprintf('buckets/%d/inboxes/%d.json', $this->bucket, $id)
        );

        return new Inbox($this->response($inbox));
    }
1188540
public static function create($id)
	{
		$statusPacket = array(
			'status' => self::STATUS_WAITING,
			'updated' => time(),
			'started' => time(),
		);
		Resque::redis()->set('job:' . $id . ':status', json_encode($statusPacket));
	}
928696
private function checkMessageId($id)
    {
        if(!is_int($id)){
            throw new ImapClientException('$id must be an integer!');
        };
        if($id <= 0){
            throw new ImapClientException('$id must be greater then 0!');
        };
        if($id > $this->countMessages()){
            throw new ImapClientException('$id does not exist');
        }
    }
149265
public static function create($id = null)
    {
        $obj = new self();

        $obj->id = ($id) ? (string) $id : Uuid::uuid4()->toString();

        return $obj;
    }
1094185
public function deleteMsg($id)
    {
        $scaffold = Scaffoldinterface::FindOrFail($id);
        if (Schema::hasTable($scaffold->tablename)) {
            $table = $scaffold->tablename;

            return view('scaffold-interface::template.DeleteMessage.delete', compact('table'))->render();
        }
        $msg = Ajaxis::Mtdeleting('Warning!!', "Would you like to delete {$scaffold->tablename} MVC files ??", '/scaffold/guirollback/'.$id);

        return $msg;
    }
399836
public function show($id)
    {
        $campfire = $this->client->get(
            sprintf('buckets/%d/chats/%d.json', $this->bucket, $id)
        );

        return new Campfire($this->response($campfire));
    }
471455
protected function prepareId($id) {
		if (! is_scalar($id)) {
			$id = json_encode($id);
			
			if (isset($id[33])) {
				$id = md5($id);
			}
		}
		
		if ($this->namespace === null) {
			return $id;
		}
		
		return $this->namespace . '_' . $id;
	}
118610
public function updateEventMessageById($id, $fields) {
        $event = new \CEventMessage;
        if ($event->Update($id, $fields)) {
            return $id;
        }

        $this->throwException(__METHOD__, $event->LAST_ERROR);
    }
452334
public function delete($id) {
		// find
		$model = $this->get($id);

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

		// delete
		$this->dispatch(PositionEvent::PRE_DELETE, $model);
		$model->delete();

		if ($model->isDeleted()) {
			$this->dispatch(PositionEvent::POST_DELETE, $model);
			return new Deleted(['model' => $model]);
		}

		return new NotDeleted(['message' => 'Could not delete Position']);
	}