当前位置: 首页>>代码示例>>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;未经允许,请勿转载。