Sulu\Bundle\ContactBundle\Entity\PhoneType::jsonSerialize PHP 메소드

jsonSerialize() 공개 메소드

(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON.
public jsonSerialize ( ) : mixed
리턴 mixed data which can be serialized by json_encode, which is a value of any type other than a resource
    public function jsonSerialize()
    {
        return ['id' => $this->getId(), 'name' => $this->getName()];
    }