Return the appointment (if any) linked to the valid after setting of given roundId

@param int $roundId
@return int | null | false False when RoundId not found or not an appointment otherwise appointment id or null when not set
543186
public function getRoundAfterAppointmentId($roundId)
    {
        $this->_ensureFieldData();
        $this->_ensureRounds();

        if (isset($this->_rounds[$roundId])) {
            $round = $this->_rounds[$roundId];

            if (isset($round['gro_valid_after_source'], $round['gro_valid_after_field']) &&
                    ('app' === $round['gro_valid_after_source'])) {

                if (isset($this->_fieldData[$round['gro_valid_after_field']])) {
                    return $this->_fieldData[$round['gro_valid_after_field']];
                } else {
                    return null;
                }
            }
        }

        return false;
    }
1092636
public function getById($layoutId)
    {
        $record = LayoutRecord::findOne(['id' => $layoutId]);

        if ($record) {
            return new LayoutModel($record->getAttributes());
        }

        return null;
    }
287288
public function getCallByRequestId($requestId)
    {
        /* @var $registration \Thruway\Registration */
        foreach ($this->registrations as $registration) {
            $call = $registration->getCallByRequestId($requestId);
            if ($call) {
                return $call;
            }
        }

        return false;
    }
706036
public function read($sessionId)
    {

        if (Config::get('session_user_loc') == 'db') {
            $result = $this->handler->get(Config::get('session_user_loc_table') . '-id-' . $sessionId, true, true, Config::get('session_user_loc_tableprefix'));
            return $result ? $result[0]['value'] : null;
        } else {
            $result = $this->handler->get(Config::get('session_user_loc_tableprefix') . Config::get('session_user_loc_table') . '-id-' . $sessionId);
            return $result ? $result : null;
        }
    }
1252169
public function game($gameId)
	{
		if ( ! isset($this->info['games'][$gameId]))
		{
			return null;
		}

		return $this->info['games'][$gameId];
	}
730089
public function getNumberLookup($messageId)
    {
        $numberLookup = $this->factory->createEmptyNumberLookup();
        $numberLookup->populate($messageId);

        return $numberLookup;
    }
368690
protected function getSurveyId($roundId)
    {
       $this->_ensureRounds();
       if (isset($this->_rounds[$roundId]['gro_id_survey'])) {
           return $this->_rounds[$roundId]['gro_id_survey'];
       }

       throw new \Gems_Exception_Coding("Requested non existing survey id for round $roundId.");
    }
742632
public function getFilter($filterId)
    {
        static $filters = array();

        if (isset($filters[$filterId])) {
            return $filters[$filterId];
        }
        $found = $this->getFilters("SELECT *
                FROM gems__appointment_filters LEFT JOIN gems__track_appointments ON gaf_id = gtap_filter_id
                WHERE gaf_active = 1 AND gaf_id = $filterId LIMIT 1");

        if ($found) {
            $filters[$filterId] = reset($found);
            return $filters[$filterId];
        }
    }
369507
public function getSafeList($count = null, $maxId = null, $sinceId = null)
    {
        $parameters = array(
          'count' => $count,
          'max_id' => $maxId,
          'since_id' => $sinceId,
        );

        $parameters = array_filter($parameters, function($val) {return !is_null($val);});

        return $this->online->call('/storage/c14/safe', 'GET', $parameters);
    }
1123333
protected function check_post_id( $pid ) {
		if ( is_numeric($pid) && $pid === 0 ) {
			$pid = get_the_ID();
			return $pid;
		}
		if ( !is_numeric($pid) && is_string($pid) ) {
			$pid = PostGetter::get_post_id_by_name($pid);
			return $pid;
		}
		if ( !$pid ) {
			return null;
		}
		return $pid;
	}
437971
public function getIntersect($dp=0) {
		if ($dp != 0) {
			return round(exp($this->_intersect),$dp);
		}
		return exp($this->_intersect);
	}
805277
public function doesRowExists($rowId = null)
    {
        /* @var $schemaManager SchemaManager */
        $schemaManager = $this->schemaManager;

        $schemas = $schemaManager->listSchemas();

        return isset($schemas[$rowId]);
    }
1006702
public function getAppointment($appointmentData)
    {
        if (! $appointmentData) {
            throw new \Gems_Exception_Coding('Provide at least the apppointment id when requesting an appointment.');
        }

        if (is_array($appointmentData)) {
             if (!isset($appointmentData['gap_id_appointment'])) {
                 throw new \Gems_Exception_Coding(
                         '$appointmentData array should atleast have a key "gap_id_appointment" containing the requested appointment id'
                         );
             }
            $appointmentId = $appointmentData['gap_id_appointment'];
        } else {
            $appointmentId = $appointmentData;
        }
        // \MUtil_Echo::track($appointmentId, $appointmentData);

        if (! isset($this->_appointments[$appointmentId])) {
            $this->_appointments[$appointmentId] = $this->_loadClass('appointment', true, array($appointmentData));
        } elseif (is_array($appointmentData)) {
            // Make sure the new values are set in the object
            $this->_appointments[$appointmentId]->refresh($appointmentData);
        }

        return $this->_appointments[$appointmentId];
    }
166632
public function getHours($round_method = null)
    {
        $result = $this->interval / (1000 * 60 * 60);

        return $this->round($result, $round_method);
    }
841743
public static function matchExists($matchId)
    {
        $db = Db::obtain();
        $r = $db->queryFirstPDO(
            'SELECT match_id FROM ' . Db::realTablename('matches') . ' WHERE match_id = ?',
            array($matchId)
        );
        return ((bool)$r);
    }
973660
public function getRoundCode($roundId)
    {
        $this->_ensureRounds();
        $roundCode = null;

        if (array_key_exists($roundId, $this->_rounds) && array_key_exists('gro_code', $this->_rounds[$roundId])) {
            $roundCode = $this->_rounds[$roundId]['gro_code'];
        }

        return $roundCode;
    }
1365939
public function get($calendarId, $ruleId, $optParams = array()) {
      $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId);
      $params = array_merge($params, $optParams);
      $data = $this->__call('get', array($params));
      if ($this->useObjects()) {
        return new AclRule($data);
      } else {
        return $data;
      }
    }