开发者

How to refer to BaseUsers.class.php in action?

If i will refer to UsersTable.class.php in action i use

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

In BaseUsers.class.p开发者_StackOverflow社区hp i have:

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

How can i refer to this file in action.class.php ?

by the way how can i refet to Users.class.php ?

thanks for help!


city is a property of one object.. with the table you will get a collection.

what you want is:

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

or

$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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜