本文整理汇总了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);
}