Set district

@param \Core\Entity\District $district
@return Street
551466
public function setDistrict(\Core\Entity\District $district = null)
    {
        $this->district = $district;

        return $this;
    }
17047
public function setCollection($collection)
    {
        $this->collection = $collection;

        $this->collection->setCurPage($this->getCurrentPage());

        // we need to set pagination only if passed value integer and more that 0
        $limit = (int)$this->getLimit();
        if ($limit) {
            $this->collection->setPageSize($limit);
        }
        if ($this->getCurrentOrder()) {
            $this->collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
        }

        return $this;
    }
886308
public function tile($tile) : GD
    {
        if( ! is_resource($tile) )
        {
            throw new InvalidArgumentException(NULL, '[resource]');
        }

        imagesettile($this->canvas, $tile);

        return $this;
    }
1137385
public function setCity($city)
    {
      if(!is_string($city) || strlen(trim($city)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid city, must be a non empty string');

      $this->city = $city;
    }
282067
public function setEntity($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->entity !== $v) {
            $this->entity = $v;
            $this->modifiedColumns[IndexEngineIndexVersionTableMap::ENTITY] = true;
        }

        return $this;
    }
45724
public function setCollection(array $collection)
    {
        if (is_array($this->buildItems) 
                && array_key_exists('collection', $this->buildItems) 
                && !empty($this->buildItems['collection'])) {
            unset($this->collection);
        }
        $this->setBuildItems();
        foreach ($collection as $builder) {
            $this->addBuilder($builder);
        }
        
        return $this;
    }
1223512
public function setHeadquartersLocation($headquartersLocation) {
		if (is_array($headquartersLocation) && empty($headquartersLocation)) {
			$this->headquartersLocation = new \stdClass;
		} else {
			$this->headquartersLocation = $headquartersLocation;
		}

		return $this;
	}
1321367
public function setId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->id !== $v) {
            $this->id = $v;
            $this->modifiedColumns[CustomerGroupI18nTableMap::ID] = true;
        }

        if ($this->aCustomerGroup !== null && $this->aCustomerGroup->getId() !== $v) {
            $this->aCustomerGroup = null;
        }


        return $this;
    }
1320431
public function setAll($collection) {
		foreach ($collection as $key => $element) {
			$this->set($key, $element);
		}
		
		return $this;
	}
801671
public function setId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->id !== $v) {
            $this->id = $v;
            $this->modifiedColumns[FunctionPhaseTableMap::COL_ID] = true;
        }

        if ($this->aStructureNode !== null && $this->aStructureNode->getId() !== $v) {
            $this->aStructureNode = null;
        }

        return $this;
    }
326663
public function setStreet($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->street !== $v) {
            $this->street = $v;
            $this->modifiedColumns[] = CustomerPeer::STREET;
        }


        return $this;
    }
903366
public function setCampaign(\CampaignChain\CoreBundle\Entity\Campaign $campaign = null)
    {
        $this->campaign = $campaign;

        return $this;
    }
930133
public function setCity($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->city !== $v) {
            $this->city = $v;
            $this->modifiedColumns[] = CustomerPeer::CITY;
        }


        return $this;
    }
795140
def add_lv_grid_district(self, lv_grid_district):
        # TODO: check docstring
        

        if lv_grid_district not in self._lv_grid_districts and \
                isinstance(lv_grid_district, LVGridDistrictDing0):
            self._lv_grid_districts.append(lv_grid_district)
717183
public function set(\Nails\Common\Factory\Locale $oLocale = null): self
    {
        $this->oLocale = $oLocale;
        return $this;
    }
167256
public function setCity($city) {
        if (empty($city))
            throw new Exception('City must be set and cannot be empty.');

        $this->city = trim($city);

        return $this;
    }
932022
public function setDirectory($directory = __DIR__)
    {
        if (!is_dir($directory)) {
            $message = "Directory {$directory} doesn't exist.";
            throw new \RuntimeException($message);
        }
        $this->directory = $directory;
        $this->gitattributesFile = $directory
            . DIRECTORY_SEPARATOR
            . '.gitattributes';

        return $this;
    }