Get the higher level place.

@return Place
19118
public function parent(): Place
    {
        return new self($this->parts->slice(1)->implode(Gedcom::PLACE_SEPARATOR), $this->tree);
    }
598657
public function findDescendants()
    {
        return static::where($this->getTreeColumn('path'), 'LIKE', $this->{$this->getTreeColumn('path')} . '%')
            ->orderBy($this->getTreeColumn('level'), 'ASC');
    }
100560
public function previous_level()
    {
        if (!$this->previous_level) {
            $this->previous_level = new Level(
                $this->level->profile,
                $this->level->number - 1
            );
        }
        return $this->previous_level;
    }
579393
public function getNextSortPositionInBucket()
    {
        $maxSort = 0;
        if ($this->model && $this->bucket) {
            $query = Media::find()
                ->where(['=', 'model', $this->model])
                ->andWhere(['=', 'bucket', $this->bucket]);
            if (is_null($this->model_id)) {
                $query->andWhere(['IS', 'model_id', null]);
            } else {
                $query->andWhere(['=', 'model_id', $this->model_id]);
            }
            $maxSort = $query
                ->max('sort');
        }
        return $maxSort + 1;
    }
536713
public IsolationLevel getIsolationLevel() {
        mLock.lock();
        try {
            return (mClosed || mActive == null) ? null : mActive.getIsolationLevel();
        } finally {
            mLock.unlock();
        }
    }
647187
public function hierarchy()
    {
        if ($this->hierarchy === null) {
            $hierarchy = [];

            $parent = $this->getParent();
            while ($parent) {
                $hierarchy[] = $parent;
                $parent = $parent->getParent();
            }

            $this->hierarchy = $hierarchy;
        }

        return $this->hierarchy;
    }
1064030
public function getSignificantPlace(){
	    if($bplace = $this->gedcomrecord->getBirthPlace()){
	        return $bplace;
	    }
	
	    foreach ($this->gedcomrecord->getAllEventPlaces('RESI') as $rplace) {
	        if ($rplace) {
	            return $rplace;
	        }
	    }
	
	    if($dplace = $this->gedcomrecord->getDeathPlace()){
	        return $dplace;
	    }
	
	    foreach($this->gedcomrecord->getSpouseFamilies() as $fams) {
	        foreach ($fams->getAllEventPlaces('RESI') as $rplace) {
	            if ($rplace) {
	                return $rplace;
	            }
	        }
	    }
	
	    return null;
	}
922315
protected function getWhere()
    {
        // 删除条件
        $pk = $this->getPk();

        if (is_string($pk) && isset($this->data[$pk])) {
            $where[] = [$pk, '=', $this->data[$pk]];
        } elseif (!empty($this->updateWhere)) {
            $where = $this->updateWhere;
        } else {
            $where = null;
        }

        return $where;
    }
1234768
public function getMaxSort()
    {
        if ($this->_max === null) {
            $this->_max = $this->owner->find()->andWhere($this->getCondition())->count() - 1;
        }
        return $this->_max;
    }
381985
public function getLastCategoryPur()
    {
        $lastOrderId = $this->model->getLastOrderId();
        $order = $this->orderFactory->create();
        $this->orderResource->load($order, $lastOrderId);
        $categoryIds = $this->getCategoriesFromOrderItems($order->getAllItems());

        return $this->getCategoryNames($categoryIds);
    }
1162141
public function getLevel()
    {
        $constMap = array(
            self::VOID,
            self::CONTENT,
            self::COMPONENT,
        );

        return $constMap[count($this->stack)];
    }
801991
public function getPlaceableObject()
    {
        if ($this->placeableobject) {
            return $this->placeableobject;
        }
        $instance = Injector::inst()->get($this->ObjectClassName);
        $this->placeableobject = $instance;
        return $instance;
    }
62981
private function buildWhere()
	{
		$strings = [];
		$first   = true;
		$depth   = 0;

		foreach ($this->where as $constraint)
		{
			$string = '';

			if (array_key_exists('resetdepth', $constraint))
			{
				$string .= str_repeat(')', ($depth - $constraint['depth']));
			}
			else
			{
				$string .= ($constraint['depth'] < $depth) ? ') ' : '';
				$string .= ($first) ? 'WHERE ' : strtoupper($constraint['logical']) . ' ';
				$string .= ($constraint['depth'] > $depth) ? '(' : '';

				// Make sure this isn't a 'raw' where clause
				if (array_key_exists('raw', $constraint))
				{
					$string .= $constraint['raw'];

					foreach ($constraint['bindings'] as $binding)
					{
						$this->bind($binding);
					}
				}
				else
				{
					$string .= $this->connection->quoteName($constraint['column']);
					$string .= ' ' . $constraint['operator'];
					if (is_array($constraint['value']))
					{
						$values = array();
						foreach ($constraint['value'] as $value)
						{
							$values[] = '?';
							$this->bind($value);
						}
						$string .= ' (' . ((!empty($values)) ? implode(',', $values) : "''") . ')';
					}
					else
					{
						$string .= ' ?';
						$this->bind($constraint['value']);
					}
				}
			}

			$strings[] = $string;
			$first     = false;
			$depth     = $constraint['depth'];
		}

		// Catch instance where last item was at a greater depth and never got a closing ')'
		if ($depth > 0)
		{
			$strings[] = str_repeat(')', $depth);
		}

		return implode("\n", $strings);
	}
186726
private function getLocation()
    {
        return new Location($this->event->get('Location_X'), $this->event->get('Location_Y'), $this->event);
    }
215272
public function getRememberedPosition()
    {
        if (!$this->ableToFormat) {
            return $this->originalPosition;
        }

        $accruedInputIndex = 0;
        $currentOutputIndex = 0;
        $currentOutputLength = mb_strlen($this->currentOutput);
        while ($accruedInputIndex < $this->positionToRemember && $currentOutputIndex < $currentOutputLength) {
            if (mb_substr($this->accruedInputWithoutFormatting, $accruedInputIndex, 1) == mb_substr($this->currentOutput, $currentOutputIndex, 1)) {
                $accruedInputIndex++;
            }
            $currentOutputIndex++;
        }
        return $currentOutputIndex;
    }
152258
public function top()
    {
        $handles = array_keys((array)$this->_priority_list);

        $object = null;
        if (isset($handles[0])) {
            $object  = $this->_object_list[$handles[0]];
        }

        return $object;
    }
205817
public function getPrev()
    {
        return self::find()->where(['<', 'id', $this->id])->orderBy(['id' => SORT_DESC])->limit(1)->one();
    }