Skip to content

Instantly share code, notes, and snippets.

@merltron-pa
Last active November 16, 2020 16:17
Show Gist options
  • Save merltron-pa/57f9e4e69c4f106b3426c36272e0c3e3 to your computer and use it in GitHub Desktop.
Save merltron-pa/57f9e4e69c4f106b3426c36272e0c3e3 to your computer and use it in GitHub Desktop.
PHP/JMS Article: Add getters to entity
<?php
...
private $country;
public function getName(): ?string
{
return $this->name;
}
public function getLineOne(): ?string
{
return $this->lineOne;
}
public function getLineTwo(): ?string
{
return $this->lineTwo;
}
public function getLineThree(): ?string
{
return $this->lineThree;
}
public function getPostcode(): ?string
{
return $this->postcode;
}
public function getCountry(): ?string
{
return $this->country;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment