本文整理汇总了PHP中Model_User::getUserId方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_User::getUserId方法的具体用法?PHP Model_User::getUserId怎么用?PHP Model_User::getUserId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_User
的用法示例。
在下文中一共展示了Model_User::getUserId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set
public function set($typ, $akce, $title, $link, $id = null)
{
$user = new Model_User();
$project = new Model_Project();
$idproject = is_null($project->getId()) ? $link : $project->getId();
$data = array('idaccount' => $this->_dbTable->getAccountId(), 'idproject' => $idproject, 'iduser' => $user->getUserId(), 'typ' => $typ, 'akce' => $akce, 'title' => $title, 'link' => (int) $link, 'datetime' => new Zend_Db_Expr('NOW()'));
$lastInsertId = $this->_dbTable->save($data, $id);
}
示例2: save
/**
* Uklada novy/editovany ticket do DB
*
* @param array $formData Data z formulare
* @param int $id ID editovaneho zaznamu
* @return int ID ukladaneho zaznamu
*/
public function save($formData, $id = null)
{
$user = new Model_User();
$project = new Model_Project();
$data = array('idproject' => $project->getId(), 'iduser' => $user->getUserId(), 'idpriority' => empty($formData['idpriority']) ? null : $formData['idpriority'], 'idmilestone' => empty($formData['idmilestone']) ? null : $formData['idmilestone'], 'idtyp' => empty($formData['idtyp']) ? null : $formData['idtyp'], 'name' => $formData['name'], 'datetime' => new Zend_Db_Expr('NOW()'), 'description' => empty($formData['description']) ? null : $formData['description'], 'status' => $formData['status']);
$lastInsertId = $this->_dbTable->save($data, $id);
$this->_dbTable->stream(Model_Stream::TYP_TICKET, Model_Stream::AKCE_REPORTED, $formData['name'], $lastInsertId);
return $lastInsertId;
}
示例3: save
/**
* Uklada novy/editovany milnik do DB
*
* @param array $formData Data z formulare
* @param int $id ID editovaneho zaznamu
* @return int ID ukladaneho zaznamu
*/
public function save($formData, $id = null)
{
$user = new Model_User();
$project = new Model_Project();
$data = array('idproject' => $project->getId(), 'iduser' => $user->getUserId(), 'idpriority' => empty($formData['idpriority']) ? null : $formData['idpriority'], 'name' => $formData['name'], 'datetime' => $formData['datetime'], 'description' => empty($formData['description']) ? null : $formData['description'], 'status' => $formData['status'], 'parent' => empty($formData['parent']) ? null : $formData['parent']);
$lastInsertId = $this->_dbTable->save($data, $id);
$this->_dbTable->stream(Model_Stream::TYP_MILESTONE, Model_Stream::AKCE_CREATED, $formData['name'], $lastInsertId);
return $lastInsertId;
}