當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Dept::getId方法代碼示例

本文整理匯總了PHP中Dept::getId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Dept::getId方法的具體用法?PHP Dept::getId怎麽用?PHP Dept::getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Dept的用法示例。


在下文中一共展示了Dept::getId方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: lookup

 function lookup($id)
 {
     return $id && is_numeric($id) && ($dept = new Dept($id)) && $dept->getId() == $id ? $dept : null;
 }
開發者ID:dmiguel92,項目名稱:osTicket-1.8,代碼行數:4,代碼來源:class.dept.php

示例2: or

                        $errors['err']='Unable to fetch info on rep ID#'.$id;
                    }
                }
                $page=($staff or ($_REQUEST['a']=='new' && !$uID))?'staff.inc.php':'staffmembers.inc.php';
                break;
            default:
                $page='staffmembers.inc.php';
        }
        break;
    //Departments
    case 'dept': //lazy
    case 'depts':
        $dept=null;
        if(($id=$_REQUEST['id']?$_REQUEST['id']:$_POST['dept_id']) && is_numeric($id)) {
            $dept= new Dept($id);
            if(!$dept || !$dept->getId()) {
                $dept=null;
                $errors['err']='Unable to fetch info on Dept ID#'.$id;
            }
        }
        $page=($dept or ($_REQUEST['a']=='new' && !$deptID))?'dept.inc.php':'depts.inc.php';
        $nav->setTabActive('depts');
        $nav->addSubMenu(array('desc'=>'Departments','href'=>'admin.php?t=depts','iconclass'=>'departments'));
        $nav->addSubMenu(array('desc'=>'Add New Dept.','href'=>'admin.php?t=depts&a=new','iconclass'=>'newDepartment'));
        break;
    // (default)
    default:
        $page='pref.inc.php';
}
//========================= END ADMIN PAGE LOGIC ==============================//
開發者ID:hungnv0789,項目名稱:vhtm,代碼行數:30,代碼來源:admin.php

示例3: filterByDept

 /**
  * Filter the query by a related Dept object
  *
  * @param     Dept|PropelCollection $dept The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    CourseQuery The current query, for fluid interface
  */
 public function filterByDept($dept, $comparison = null)
 {
     if ($dept instanceof Dept) {
         return $this->addUsingAlias(CoursePeer::DEPT_ID, $dept->getId(), $comparison);
     } elseif ($dept instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CoursePeer::DEPT_ID, $dept->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByDept() only accepts arguments of type Dept or PropelCollection');
     }
 }
開發者ID:therealchiko,項目名稱:getchabooks,代碼行數:21,代碼來源:BaseCourseQuery.php

示例4: setDept

 /**
  * Declares an association between this object and a Dept object.
  *
  * @param      Dept $v
  * @return     Course The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setDept(Dept $v = null)
 {
     if ($v === null) {
         $this->setDeptId(NULL);
     } else {
         $this->setDeptId($v->getId());
     }
     $this->aDept = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Dept object, it will not be re-added.
     if ($v !== null) {
         $v->addCourse($this);
     }
     return $this;
 }
開發者ID:therealchiko,項目名稱:getchabooks,代碼行數:22,代碼來源:BaseCourse.php

示例5: actionAddDept

 /**
  * Handler for add new dept
  */
 public function actionAddDept()
 {
     $user = $_REQUEST['user'][0];
     $sum = $_REQUEST['sum'][0];
     $comment = $_REQUEST['comment'][0];
     $date = $_REQUEST['date'][0];
     $time = $_REQUEST['time'][0];
     $attributs = array();
     if ($user != '') {
         $attributs['user_id'] = $user;
     }
     if ($sum != '') {
         $attributs['sum'] = $sum;
     }
     if ($comment != '') {
         $attributs['comment'] = $comment;
     }
     if ($date != '' && $time != '') {
         $attributs['comment'] = $date . ' ' . $time;
     }
     if (isset($_REQUEST['id'])) {
         $id = $_REQUEST['id'];
         $attributs['id'] = $id;
     }
     $dept = new Dept($attributs);
     $dept->save();
     $id = $dept->getId();
     $this->showResponse(array('status' => true, 'id' => $id));
 }
開發者ID:crashkita,項目名稱:dept,代碼行數:32,代碼來源:MainController.php

示例6: prune

 /**
  * Exclude object from result
  *
  * @param     Dept $dept Object to remove from the list of results
  *
  * @return    DeptQuery The current query, for fluid interface
  */
 public function prune($dept = null)
 {
     if ($dept) {
         $this->addUsingAlias(DeptPeer::ID, $dept->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
開發者ID:therealchiko,項目名稱:getchabooks,代碼行數:14,代碼來源:BaseDeptQuery.php


注:本文中的Dept::getId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。