本文整理匯總了PHP中Place::getId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Place::getId方法的具體用法?PHP Place::getId怎麽用?PHP Place::getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Place
的用法示例。
在下文中一共展示了Place::getId方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getClassesForPlace
public function getClassesForPlace(Place $place)
{
$q = Doctrine_Query::create()->from('AbstractClass class')->where('class.place_id = ?', $place->getId());
return $q->execute();
}
示例2: testSetGetId
public function testSetGetId()
{
$this->object->setId(123);
$this->assertEquals(123, $this->object->getId());
}
示例3: User
function test_confirmMeetUserTwo()
{
//Arrange
$user_name = "Nathan";
$password = "xxx60606";
$latitude = 45.520969;
$longitude = -122.679953;
$signed_in = 1;
$id = 1;
$test_user = new User($user_name, $password, $longitude, $latitude, $signed_in, $id);
$test_user->save();
$user_name2 = "John";
$password2 = "xxx";
$latitude2 = 45.515852;
$longitude2 = -122.674644;
$signed_in2 = 1;
$id2 = 1;
$test_user2 = new User($user_name2, $password2, $longitude2, $latitude2, $signed_in2, $id2);
$test_user2->save();
$place_name = "Director Park";
$address = "SW Park Ave";
$longitude = 45.518672;
$latitude = -122.681211;
$id3 = 5;
$test_place = new Place($place_name, $address, $longitude, $latitude, $id3);
//Act
$test_user->addMeetUpRequest($test_user2->getId(), $test_place->getId());
$test_user2->confirmMeetupRequest($test_user->getId());
$test_user2->confirmMeetUserTwo($test_user->getId(), $test_user2->getId(), true);
$meetup_array = Meetup::getAll();
$result = $meetup_array[0]->getConfirm_meet_usr2();
//Assert
$this->assertEquals(true, $result);
}
示例4: link_to_event_new
/**
* Ссылка на добавление события
*
* @param Place $place
*/
function link_to_event_new($place = null)
{
$args = $place ? array('place' => $place->getId()) : array();
return link_to('Добавить событие', 'event_new', $args, array('class' => 'ajax event-new'));
}
示例5: Place
function test_getId()
{
//Arrange
$place_name = "Director Park";
$address = "SW Park Ave";
$latitude = 45.518672;
$longitude = -122.681211;
$id = 1;
$test_place = new Place($place_name, $address, $latitude, $longitude, $id);
//Act
$result = $test_place->getId();
//Assert
$this->assertEquals($id, $result);
}