Содержимое
Поиск
\BXmaker\GeoIP\Location\Search\Item
\BXmaker\GeoIP\Location\Search\Item -
Класс для работы с данными найденного местопложения
namespace BXmaker\GeoIP\Location\Search;
class Item implements \JsonSerializable, \Stringable
{
//...
}
Константы
TYPE_COUNTRY
public \BXmaker\GeoIP\Location\Search\Item::TYPE_COUNTRY = 'COUNTRY'
TYPE_COUNTRY_AREA
public \BXmaker\GeoIP\Location\Search\Item::TYPE_COUNTRY_AREA = 'COUNTRY_AREA'
TYPE_REGION
public \BXmaker\GeoIP\Location\Search\Item::TYPE_REGION = 'REGION'
TYPE_SUBREGION
public \BXmaker\GeoIP\Location\Search\Item::TYPE_SUBREGION = 'SUBREGION'
TYPE_CITY
public \BXmaker\GeoIP\Location\Search\Item::TYPE_CITY = 'CITY'
TYPE_VILLAGE
public \BXmaker\GeoIP\Location\Search\Item::TYPE_VILLAGE = 'VILLAGE'
TYPE_STREET
public \BXmaker\GeoIP\Location\Search\Item::TYPE_STREET = 'STREET'
Методы
__toString
public function __toString();
createComponent
Создаст объект местоположения, добавит в коллекцию и вернет его
/**
* @return \BXmaker\GeoIP\Location\Search\Item
*/
public function createComponent();
deleteComponents
/**
* @return $this
*/
public function deleteComponents();
getCode
/**
* @return string|null
*/
public function getCode();
getComponents
/**
* @return array
*/
public function getComponents() : array;
getCountryName
public function getCountryName();
getId
/**
* @return int|null
*/
public function getId();
getName
/**
* @return string|null
*/
public function getName();
getPostalCode
/**
* @return string|null
*/
public function getPostalCode();
getRegionName
public function getRegionName();
getType
/**
* @return string|null
*/
public function getType();
jsonSerialize
public function jsonSerialize();
pushComponent
Добавление комопнента в конец
/**
* @param \BXmaker\GeoIP\Location\Search\Item $oItem
* @return $this;
*/
public function pushComponent(\BXmaker\GeoIP\Location\Search\Item $oItem);
setCode
/**
* @param string|null $code
* @return $this
*/
public function setCode($code);
setId
/**
* @param $id
* @return $this
*/
public function setId($id);
setName
/**
* @param string|null $name
* @return $this
*/
public function setName($name);
setPostalCode
/**
* @param string|null $postalCode
* @return $this
*/
public function setPostalCode($postalCode);
setType
Установка типа, например \BXmaker\GeoIP\Location\Search\Item::TYPE_COUNTRY
/**
* @param string|null $type
* @return $this
*/
public function setType($type);
setTypeCity
public function setTypeCity();
setTypeCountry
public function setTypeCountry();
setTypeCountryArea
public function setTypeCountryArea();
setTypeRegion
public function setTypeRegion();
setTypeStreet
public function setTypeStreet();
setTypeSubRegion
public function setTypeSubRegion();
setTypeVillage
public function setTypeVillage();
unshiftComponent
Добавление компонента в начало
/**
* @param \BXmaker\GeoIP\Location\Search\Item $oItem
* @return $this
*/
public function unshiftComponent(\BXmaker\GeoIP\Location\Search\Item $oItem);