PHP code example of uginroot / doctrine-type-location
1. Go to this page and download the library: Download uginroot/doctrine-type-location library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
uginroot / doctrine-type-location example snippets
use Uginroot\PhpLocation\Location;
use Doctrine\ORM\Mapping as ORM;
class User{
// ...
/**
* @ORM\Column(type="Location")
* @var Location|null
*/
private $location;
/**
* @return Location|null
*/
public function getLocation(): ?Location{
return $this->location;
}
/**
* @param Location|null $location
* @return $this
*/
public function setLocation(?Location $location):self {
$this->location = $location;
return $this;
}
}