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


PHP Job::id方法代码示例

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


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

示例1: getCfreldirvector

 public function getCfreldirvector()
 {
     $jobs = Job::type('RelDir')->get();
     $count = 0;
     foreach ($jobs as $job) {
         foreach ($job->workerunits as $ann) {
             $count++;
             $u = $ann->unit['content'];
             $ann->type = $job->type;
             $ans = $ann->content['direction'];
             if ($ans == 'no_relation') {
                 $realans = 'Choice3';
             } else {
                 if (strpos($ans, $u['terms']['first']['formatted']) === 0) {
                     $realans = 'Choice1';
                 } elseif (strpos($ans, $u['terms']['first']['formatted']) > 0) {
                     $realans = 'Choice2';
                 } else {
                     $realans = '-------';
                 }
             }
             echo "{$realans} - {$ans}\r\n";
             $ann->annotationVector = array('Choice1' => $ans == 'Choice1' ? 1 : 0, 'Choice2' => $ans == 'Choice2' ? 1 : 0, 'Choice3' => $ans == 'Choice3' ? 1 : 0);
             $ann->save();
         }
         $job = Job::id('entity/text/medical/job/0')->first();
         Queue::push('Queues\\UpdateJob', array('job' => serialize($job)));
     }
 }
开发者ID:crowdtruth,项目名称:crowdtruth,代码行数:29,代码来源:tempImportAndVectorsMethodsController.php

示例2: getDuplicate

 public function getDuplicate($entity, $format, $domain, $docType, $incr)
 {
     Session::forget('batch');
     $job = Job::id("entity/{$format}/{$domain}/{$docType}/{$incr}")->first();
     if (!is_null($job)) {
         $jc = $job->JobConfiguration->replicate();
         unset($jc->activity_id);
         $jc->parents = array($job->JobConfiguration->_id);
         Session::put('jobconf', serialize($jc));
         Session::put('format', $job->batch->format);
         if (isset($jc->content['TVID'])) {
             Session::put('templateType', $jc->content['TVID']);
         }
         Session::put('title', $jc->content['title']);
         Session::put('templateType', $jc->content['type']);
         return Redirect::to("jobs2/batchd");
     } else {
         Session::flash('flashError', "Job {$id} not found.");
         return Redirect::back();
     }
 }
开发者ID:harixxy,项目名称:CrowdTruth,代码行数:21,代码来源:JobsController2.php

示例3: while

 $type = $_POST['type'];
 $statut = $_POST['statut'];
 $mieuxNotes = "job.php";
 $recherche = "rechercheJob.php";
 $ajouter = "ajoutJob.php";
 require 'includes/menu.php';
 require 'includes/menuServices.php';
 require 'includes/menuInfos.php';
 require 'includes/themesJob.php';
 require 'objets/ObjetJob.php';
 require 'includes/bbcodeTexte.php';
 echo '<section id="voirJobs"><h2>Les meilleures propostions et recherches d\'emplois dans cette ville</h2>';
 $request = $bdd->query('SELECT * FROM freeCitizenJob WHERE ville = "' . $ville . '" AND type = "' . $type . '" AND statut =  "' . $statut . '" ORDER BY votes LIMIT 0, 10');
 while ($donnees = $request->fetch(PDO::FETCH_ASSOC)) {
     $job = new Job($donnees);
     echo $job->id();
     echo "</br>";
     echo $job->titre();
     echo "</br>";
     echo $job->date();
     echo "</br>";
     echo $job->ville();
     echo "</br>";
     echo $job->type();
     echo "</br>";
     echo $job->statut();
     echo "</br>";
     echo $job->votes();
     echo "</br>";
     $texte = $job->descriptif();
     echo $texte;
开发者ID:elBichon,项目名称:freeCitizen,代码行数:31,代码来源:job.php

示例4: getDuplicate

 public function getDuplicate($entity, $format, $domain, $docType, $incr)
 {
     Session::forget('jobconf');
     Session::forget('origjobconf');
     Session::forget('template');
     //Session::forget('questiontemplateid');
     Session::forget('batch');
     $job = Job::id("entity/{$format}/{$domain}/{$docType}/{$incr}")->first();
     if (!is_null($job)) {
         //$jc = new JobConfiguration;
         $jc = $job->JobConfiguration->replicate();
         unset($jc->activity_id);
         $jc->parents = array($job->JobConfiguration->_id);
         Session::put('jobconf', serialize($jc));
         Session::put('batch', serialize($job->batch));
         Session::put('template', $job->template);
         // Job->parents = array($job->_id);
         return Redirect::to("jobs/batch");
     } else {
         Session::flash('flashError', "Job {$id} not found.");
         return Redirect::back();
     }
 }
开发者ID:harixxy,项目名称:CrowdTruth,代码行数:23,代码来源:JobsController.php


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