当前位置: 首页>>代码示例>>PHP>>正文


PHP ORM::id方法代码示例

本文整理汇总了PHP中ORM::id方法的典型用法代码示例。如果您正苦于以下问题:PHP ORM::id方法的具体用法?PHP ORM::id怎么用?PHP ORM::id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ORM的用法示例。


在下文中一共展示了ORM::id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: id

 /**
  * Get the database ID of this model instance.
  *
  * @return integer
  */
 public function id()
 {
     return $this->orm->id();
 }
开发者ID:florinp,项目名称:dexonline,代码行数:9,代码来源:paris.php

示例2: array

 if (!$launch) {
     return false;
 }
 $launchkeys = array("course_id" => $crs->id(), "user_id" => $usr->id());
 if ($org && $org->id()) {
     $launchkeys[org_id] = $org->id();
 } else {
     // Make sure to never get a org with a primary key of -1
     $launchkeys[org_id] = -1;
 }
 $launch->read($launchkeys);
 $launch->setall($launchkeys);
 // Set the foreign keys
 $launch->setall($_REQUEST, '/^launch_/');
 $launchpassword = md5(uniqid(rand(), true));
 if ($launch->id()) {
     $launch->update();
     DPRT("Updated launch={$launch->id}()");
 } else {
     $launch->insert();
     DPRT("Added launch={$launch->id}()");
 }
 // Log this digest
 $reqstr = mysql_real_escape_string(print_r($_REQUEST, TRUE));
 $quer = "insert into lti_digest (created_at, digest, request) values (NOW(), '{$digest}', '{$reqstr}');";
 mysql_query($quer);
 // Time to return a response, we either return a web service
 // response, debug outtput, or redirect back to ourselves
 $theurl = $_SERVER[SCRIPT_URI];
 $theuri = $_SERVER[REQUEST_URI];
 $i = strpos($theuri, '?');
开发者ID:csev,项目名称:cloudcollab,代码行数:31,代码来源:launch.php

示例3: unset

    if ($_REQUEST[lti_launch_id]) {
        $launchid = $_REQUEST[lti_launch_id];
    } else {
        if (!empty($_SESSION['lti_launch_id'])) {
            $launchid = $_SESSION[lti_launch_id];
        } else {
            unset($_SESSION['lti_launch_id']);
            redirect_login();
            $launchid = false;
        }
    }
    if ($launchid) {
        $launch = new ORM("launch", false, "lti_launch");
        if (!$launch) {
            throw new Exception("LTI Runtime - Datebase unable to instance user");
        }
        $launch->get($launchid);
        if (!$launch->id()) {
            throw new Exception("LTI Runtime - Launch session not found");
        }
        $launchdata = $launch->data();
        $_SESSION['lti_launch_id'] = $launch->id();
        if ($launch && $launch->data()) {
            $LTI = new LTIObject($launch->data());
        }
    }
} catch (Exception $e) {
    DPRT($e->getMessage());
    redirect_login();
    $LTI = false;
}
开发者ID:csev,项目名称:cloudcollab,代码行数:31,代码来源:setup.php


注:本文中的ORM::id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。