2011-08-21 4 views
0

내가 행동에 UsersTable.class.php을 참조한다면 내가 BaseUsers.class.php에서BaseUsers.class.php를 어떻게 참조할까요?

Doctrine::getTable('Users')->getCity($test); 

을 사용하여 내가 가지고

@method Users setCity()  Sets the current record's "city" value 

어떻게 action.class에서이 파일을 참조 할 수 있습니다 .php?

내가 어떻게 Users.class.php를 다시 볼 수 있습니까?

도움 주셔서 감사합니다!

+0

당신을 참조하여 무엇을 의미합니까? 그리고 당신의 스키마는 무엇이며, UsersTable :: getCity()는 무엇을해야합니까? 우리는 약간의 설명이 필요합니다. – Gerry

답변

1

도시는 하나의 객체의 속성입니다. 테이블을 사용하면 컬렉션을 얻을 수 있습니다. 당신이 원하는

은 다음과 같습니다

$users = UsersTable::getInstance()->findByCity('name'); 

또는

$user = UsersTable::getInstance()->find(1); //get your first user 
$user->setCity('Zurich'); // set the city-property of the first user to Zurich 
$user->getCity(); // will return Zurich