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
精彩评论