accessor 예문
- One benefit to having accessor methods to hstore attributes is that it makes validations easy.
hstore 속성에 대한 접근자 메소드를 가질 경우의 장점이라면 유효성 검증을 쉽게 할 수 있다는 것입니다. - If you assign to an accessor JavaScript just invokes the function there and from its point of view nothing has changed.
만약 접근자를 지정한다면 자바스크립트는 그냥 거기에 있는 함수를 호출하며 이 관점에서 본다면 아무것도 변경되지 않습니다. - Reloading the page now shows the new field and if we fill in this field, submit the form then go back to edit it again we'll see the value we entered in the author field. Generating The Other Accessor Methods
이제 페이지를 다시 로드하면 새로 추가한 필드가 보이고 이 필드에 값을 입력하고 폼을 서브밋한 후 다시 수정하게 되면 author 필드에 입력했던 바로 그 값을 보게 될 것입니다.