이 줄을 반환get_object_vars는 NULL
object(Penny\HomeBundle\Entity\Department)[1420]
protected 'id' => int 37
protected 'name' => string 'Support' (length=7)
protected 'email' => string '[email protected]' (length=25)
나는 내가
array
empty
을 얻을
var_dump(get_object_vars($data['department']));
을하려고개체가있는 경우 왜 이런 일이 발생하는지 잘 모르겠습니다.
편집 : $ obj-> getValue() 메소드 (getters)를 사용하여 문제점을 수정했습니다.
하지만 여전히 문제가 있습니다. get_object_vars()가 작동하지 않는 이유는 무엇입니까? 매뉴얼에서
작동하지 않았습니다. – Tool