Translate old ebre-escool classroom id to scool id.

@param $oldClassroomId
@return integer
@throws ClassroomNotFoundByNameException
336118
protected function translateClassroomId($oldClassroomId)
    {
        $classroom = Classroom::where('name',ClassroomGroup::findOrFail($oldClassroomId)->name)->first();
        if ( $classroom != null ) {
            return $classroom->id;
        }
        throw new ClassroomNotFoundByNameException();
    }
19673
public function getClassNameWithID($includeNamespace = false)
    {
        $className = static::class;
        
        if (!$includeNamespace) {
            $className = ClassTools::singleton()->getClassWithoutNamespace($className);
        }
        
        return sprintf(
            '%s_%s',
            $className,
            $this->ID
        );
    }
291048
async def get_room(self, room_id, from_cache=True) -> Room:
        
        if not from_cache:
            await self.get_rooms()
        for _room in self.rooms:
            if _room.id == room_id:
                return _room
        raise ResourceNotFoundException("Room not found. Id: {}".format(room_id))
1152275
public function store(
        $code,
        $room_number,
        $room_label = null,
        $building_id = null,
        $building_code = null,
        $floor_number = null,
        $floor_label = null
    )
    {
        $fields = [];
        //@todo validate params, throw exception when they are missing
        $fields['code'] = $code;
        $fields['room_number'] = $room_number;
        if (!is_null($room_label)) $fields['room_label'] = $room_label;
        if (!is_null($building_id)) $fields['building_id'] = $building_id;
        if (!is_null($building_code)) $fields['building_code'] = $building_code;
        if (!is_null($floor_number)) $fields['floor_number'] = $floor_number;
        if (!is_null($floor_label)) $fields['floor_label'] = $floor_label;

        return $this->_post($fields);
    }
633598
public function query($chatroomId) {
    	try{
			if (empty($chatroomId))
				throw new Exception('Paramer "chatroomId" is required');


    		$params = array (
    		'chatroomId' => $chatroomId
    		);

    		$ret = $this->SendRequest->curl('/chatroom/query.json',$params,'urlencoded','im','POST');
    		if(empty($ret))
    			throw new Exception('bad request');
    		return $ret;

    	}catch (Exception $e) {
    		print_r($e->getMessage());
    	}
   }
1006261
protected function getNewInstance($sessionId)
    {
        $className = $this->repository->getClassName();
        $session = new $className();

        $session->setSessionId($sessionId);

        return $session;
    }
1313858
public function getIdByClassName($className)
    {
        $classId = $this->getClassIdFromShopMap($className);

        if (empty($classId)) {
            $classId = $this->getClassIdFromModuleMap($className);
        }
        return $classId;
    }
917541
public function getClassNameById($classId)
    {
        $className = $this->getClassNameFromShopMap($classId);

        if (empty($className)) {
            $className = $this->getClassNameFromModuleMap($classId);
        }
        return $className;
    }
1048587
public function get_response_class($classid) {
        if (!isset($this->responseclasses[$classid])) {
            debugging('Unexpected class id ' . $classid . ' encountered.');
            $this->responseclasses[$classid] = new analysis_for_class('[Unknown]', $classid);
        }
        return $this->responseclasses[$classid];

    }
579074
private function getRatingById($ratingId)
    {
        $rating = oxNew(Rating::class);
        $doesRatingExist = $rating->load($ratingId);

        if (!$doesRatingExist) {
            throw new EntryDoesNotExistDaoException();
        }

        return $rating;
    }
841191
public function createWebhook($roomId, Webhook $webhook)
    {
        $response = $this->client->post(sprintf('/v2/room/%s/webhook', $roomId), $webhook->toJson());

        return $response['id'];
    }
1142776
public function toUserId($userIds)
    {
        $userIds = is_string($userIds) || is_integer($userIds) ? func_get_args() : $userIds;

        foreach ($userIds as $userId) {
            $fds = $this->room->getClients(static::USER_PREFIX . $userId);
            $this->to($fds);
        }

        return $this;
    }
1112024
@SuppressWarnings("unchecked")
    @Override
	public <T extends ApiRoom> T getRoomByName(String name) {
	    Room sfsRoom = getZone().getRoomByName(name);
	    if(sfsRoom != null && sfsRoom.containsProperty(APIKey.ROOM))
	        return (T) sfsRoom.getProperty(APIKey.ROOM);
	    return null;
	}
200617
public function getAllWebhooks($roomId)
    {
        $webhooks = array();
        $response = $this->client->get(sprintf('/v2/room/%s/webhook', $roomId));
        foreach ($response['items'] as $item) {
            $webhooks[] = new Webhook($item);
        }

        return $webhooks;
    }
1080568
protected function getClassNameFromShopMap($classId)
    {
        $shopControllerMapProvider = $this->getShopControllerMapProvider();
        $idToNameMap = $shopControllerMapProvider->getControllerMap();
        $className = $this->arrayLookup($classId, $idToNameMap);

        return $className;
    }
302343
protected function getClassIdFromShopMap($className)
    {
        $shopControllerMapProvider = $this->getShopControllerMapProvider();
        $idToNameMap = $shopControllerMapProvider->getControllerMap();
        $classId = $this->arrayLookup($className, array_flip($idToNameMap));

        return $classId;
    }
1287514
public function join($roomId){
		$data = $this->reqdata();
        $data['nick'] = $this->endpoint->nick; 
		return $this->request("rooms/{$roomId}/join", $data, 'POST');
	}