本文整理汇总了PHP中Point::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Point::getId方法的具体用法?PHP Point::getId怎么用?PHP Point::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point
的用法示例。
在下文中一共展示了Point::getId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: User
<?php
set_include_path(dirname(_FILE_) . '/../');
require_once 'class/Point.class.php';
require_once 'class/User.class.php';
require_once 'class/Proposition.class.php';
require_once 'class/Object.class.php';
require_once 'class/Price.class.php';
//Pour créer une proposition, on a besoin d'un user et d'un point
$User = new User('6362', 2, '', 1);
echo $User->getId();
$Point = new Point(2);
echo $Point->getId();
echo '<h2>Création</h2>';
$Proposition = new Proposition($User, $Point);
echo $Proposition->getUser()->getFirstname();
echo $Proposition->getPoint()->getName();
$Propo =& $Proposition->getObjectList();
echo '<pre>';
echo $Propo[0]->getName();
echo '</pre>';
$Object = new Object(2);
echo Price::checkPrice($User, $Point, $Object, 150);
echo Price::checkPrice($User, $Point, $Object, 50);
示例2: queryByPoint
/**
* Запрос с выборкой по объекту
*
* @param Point $point
* @return Doctrine_Query
*/
public function queryByPoint(Point $point)
{
$q = $this->createQuery('i')->where('i.point_id = ?', $point->getId());
return $this->withPrimaryOrder($q, $point);
}
示例3: makePointUser
/**
* Создать PointUser
*/
public function makePointUser(Point $point, sfGuardUser $user, $save = false, array $props = array())
{
$defaultProps = array('user_id' => $user->getId(), 'point_id' => $point->getId());
$props = array_merge($defaultProps, $props);
return $this->makeModel('PointUser', $props, $save);
}