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


PHP Job::getId方法代码示例

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


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

示例1: save

 /**
  * Serialize the form into the database.
  *
  */
 public function save($con = null)
 {
     if ($this->getObject()) {
         $j = $this->getObject();
     } else {
         $j = new Job();
     }
     $j->setPublicationId($this->getValue("publication_id"));
     $j->setStatusId($this->getValue("status_id"));
     $j->setEvent($this->getValue("event"));
     $j->setDate($this->getValue("date"));
     $j->setStartTime($this->getValue("start_time"));
     $j->setEndTime($this->getValue("end_time"));
     $j->setDueDate($this->getValue("due_date"));
     $j->setContactName($this->getValue("contact_name"));
     $j->setContactPhone($this->getValue("contact_phone"));
     $j->setContactEmail($this->getValue("contact_email"));
     $j->setAcctNum($this->getValue("acct_num"));
     $j->save();
     $logEntry = new Log();
     $logEntry->setWhen(time());
     $logEntry->setPropelClass("Job");
     $logEntry->setSfGuardUserProfileId(sfContext::getInstance()->getUser()->getUserId());
     $logEntry->setMessage("Basic info updated.");
     $logEntry->setLogMessageTypeId(sfConfig::get("app_log_type_update"));
     $logEntry->setPropelId($j->getId());
     $logEntry->save();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:32,代码来源:BasicInfoJobForm.class.php

示例2: newFromJob

 /**
  * Get a duplicate no-op version of a job
  *
  * @param Job $job
  * @return Job
  */
 public static function newFromJob(Job $job)
 {
     $djob = new self($job->getTitle(), $job->getParams(), $job->getId());
     $djob->command = $job->getType();
     $djob->params = is_array($djob->params) ? $djob->params : array();
     $djob->params = array('isDuplicate' => true) + $djob->params;
     $djob->metadata = $job->metadata;
     return $djob;
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:15,代码来源:DuplicateJob.php

示例3: buildForm

 /**
  * Form builder
  *
  * @param FormBuilderInterface $builder
  * @param array $options
  *
  * @return null
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $this->company = $options['company'];
     $this->job = $options['job'];
     if (null == $this->company) {
         $builder->add('company', EntityType::class, array('label' => 'CompanyFrame.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) {
             return $br->createQueryBuilder('c')->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'corporateName', 'multiple' => false, 'by_reference' => true, 'required' => true));
     } else {
         $companyId = $this->company->getId();
         $builder->add('company', EntityidType::class, array('label' => 'CompanyFrame.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) use($companyId) {
             return $br->createQueryBuilder('c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'id', 'multiple' => false, 'by_reference' => true, 'required' => true));
     }
     if (null == $this->job) {
         $builder->add('job', EntityType::class, array('label' => 'CompanyFrame.job.label', 'class' => 'AcfDataBundle:Job', 'query_builder' => function (JobRepository $br) {
             return $br->createQueryBuilder('j')->orderBy('j.label', 'ASC');
         }, 'choice_label' => 'label', 'multiple' => false, 'by_reference' => true, 'required' => true));
     } else {
         $jobId = $this->job->getId();
         $builder->add('job', EntityidType::class, array('label' => 'CompanyFrame.job.label', 'class' => 'AcfDataBundle:Job', 'query_builder' => function (JobRepository $br) use($jobId) {
             return $br->createQueryBuilder('j')->where('j.id = :id')->setParameter('id', $jobId)->orderBy('j.label', 'ASC');
         }, 'choice_label' => 'id', 'multiple' => false, 'by_reference' => true, 'required' => true));
     }
     $builder->add('sexe', ChoiceType::class, array('label' => 'CompanyFrame.sexe.label', 'choices_as_values' => true, 'choices' => CompanyFrame::choiceSexe(), 'attr' => array('choice_label_trans' => true)));
     $builder->add('firstName', TextType::class, array('label' => 'CompanyFrame.firstName.label'));
     $builder->add('lastName', TextType::class, array('label' => 'CompanyFrame.lastName.label'));
     $builder->add('cin', TextType::class, array('label' => 'CompanyFrame.cin.label', 'required' => false));
     $builder->add('passport', TextType::class, array('label' => 'CompanyFrame.passport.label', 'required' => false));
     $builder->add('email', EmailType::class, array('label' => 'CompanyFrame.email.label', 'required' => false));
     $builder->add('phone', TextType::class, array('label' => 'CompanyFrame.phone.label', 'required' => false));
     $builder->add('mobile', TextType::class, array('label' => 'CompanyFrame.mobile.label', 'required' => false));
     $builder->add('streetNum', IntegerType::class, array('label' => 'CompanyFrame.streetNum.label', 'scale' => 0, 'required' => false));
     $builder->add('address', TextareaType::class, array('label' => 'CompanyFrame.address.label', 'required' => false));
     $builder->add('address2', TextareaType::class, array('label' => 'CompanyFrame.address2.label', 'required' => false));
     $builder->add('town', TextType::class, array('label' => 'CompanyFrame.town.label', 'required' => false));
     $builder->add('zipCode', TextType::class, array('label' => 'CompanyFrame.zipCode.label', 'required' => false));
     $builder->add('country', CountryType::class, array('label' => 'CompanyFrame.country.label', 'required' => false, 'placeholder' => 'Options.choose', 'empty_data' => null));
     $builder->add('otherInfos', TextareaType::class, array('label' => 'CompanyFrame.otherInfos.label', 'required' => false));
 }
开发者ID:sasedev,项目名称:acf-expert,代码行数:48,代码来源:NewTForm.php

示例4: multiget

 /**
  * Returns an array of jobs for the specified job identifiers, keyed by job identifier
  *
  * @param string[] $jids
  *
  * @return array|Job[]
  */
 public function multiget($jids)
 {
     if (empty($jids)) {
         return [];
     }
     $results = call_user_func_array([$this->client, 'multiget'], $jids);
     $jobs = json_decode($results, true);
     $ret = [];
     foreach ($jobs as $job_data) {
         $job = new Job($this->client, $job_data);
         $ret[$job->getId()] = $job;
     }
     return $ret;
 }
开发者ID:contatta,项目名称:qless-php,代码行数:21,代码来源:Jobs.php

示例5: save

 /**
  * Serialize the form into the database.
  *
  */
 public function save($con = null)
 {
     if ($this->getObject()) {
         $j = $this->getObject();
     } else {
         $j = new Job();
     }
     $j->setEstimate($this->getValue("estimate"));
     $j->setProcessing($this->getValue("processing"));
     $j->save();
     $logEntry = new Log();
     $logEntry->setWhen(time());
     $logEntry->setPropelClass("Job");
     $logEntry->setSfGuardUserProfileId(sfContext::getInstance()->getUser()->getUserId());
     $logEntry->setMessage("Billing info updated.");
     $logEntry->setLogMessageTypeId(sfConfig::get("app_log_type_update"));
     $logEntry->setPropelId($j->getId());
     $logEntry->save();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:23,代码来源:BillingInfoJobForm.class.php

示例6: save

 /**
  * Serialize the form into the database.
  *
  */
 public function save($con = null)
 {
     if ($this->getObject()) {
         $j = $this->getObject();
     } else {
         $j = new Job();
     }
     $j->setState($this->getValue("state"));
     $j->setCity($this->getValue("city"));
     $j->setZip($this->getValue("zip"));
     $j->setStreet($this->getValue("street"));
     $j->save();
     $logEntry = new Log();
     $logEntry->setWhen(time());
     $logEntry->setPropelClass("Job");
     $logEntry->setSfGuardUserProfileId(sfContext::getInstance()->getUser()->getUserId());
     $logEntry->setMessage("Shoot info updated.");
     $logEntry->setLogMessageTypeId(sfConfig::get("app_log_type_update"));
     $logEntry->setPropelId($j->getId());
     $logEntry->save();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:25,代码来源:ShootInfoJobForm.class.php

示例7: save

 /**
  * Serialize the form into the database.
  *
  */
 public function save($con = null)
 {
     if ($this->getObject()) {
         $j = $this->getObject();
     } else {
         $j = new Job();
     }
     $j->setPhotoType(implode(", ", $this->getValue("photo_type")));
     $j->setQues1($this->getValue("ques1"));
     $j->setQues2($this->getValue("ques2"));
     $j->setQues3($this->getValue("ques3"));
     $j->setOther($this->getValue("other"));
     $j->save();
     $logEntry = new Log();
     $logEntry->setWhen(time());
     $logEntry->setPropelClass("Job");
     $logEntry->setSfGuardUserProfileId(sfContext::getInstance()->getUser()->getUserId());
     $logEntry->setMessage("Photography info updated.");
     $logEntry->setLogMessageTypeId(sfConfig::get("app_log_type_update"));
     $logEntry->setPropelId($j->getId());
     $logEntry->save();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:26,代码来源:PhotographyInfoJobForm.class.php

示例8: setJob

 /**
  * Declares an association between this object and a Job object.
  *
  * @param      Job $v
  * @return     JobPhotographer The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setJob(Job $v = null)
 {
     if ($v === null) {
         $this->setJobId(NULL);
     } else {
         $this->setJobId($v->getId());
     }
     $this->aJob = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Job object, it will not be re-added.
     if ($v !== null) {
         $v->addJobPhotographer($this);
     }
     return $this;
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:22,代码来源:BaseJobPhotographer.php

示例9: testGetId

 /**
  * Test related method
  */
 public function testGetId()
 {
     $this->assertNull($this->jobInstance->getId());
 }
开发者ID:xleliberty,项目名称:BatchBundle,代码行数:7,代码来源:JobInstanceTest.php

示例10: Job

$job = new Job();
$date = date('Y-m-d H:i:s');
$expiry_date = sql_date_add($date, 30, 'day');
$data = array();
$data['employer'] = 'acme123';
$data['industry'] = '2';
$data['country'] = 'SG';
$data['currency'] = 'MYR';
$data['salary'] = '3200';
$data['salary_negotiable'] = 'N';
$data['created_on'] = $date;
$data['expire_on'] = $expiry_date;
$data['title'] = "Some lame job";
$data['description'] = "blahlelelll blah... some job descriptions goes here";
if ($job->create($data)) {
    echo "This job gets the ID of <b>" . $job->getId() . "</b><br><br>";
    print_array($job->get());
} else {
    echo "failed";
    exit;
}
?>
</p><p style="font-weight: bold;">Get all jobs... </p><p><?php 
$jobs = $job->find(array('columns' => 'id'));
echo "There are " . count($jobs) . " jobs in the database.<br><br>";
?>
</p><p style="font-weight: bold;">Update 1st job... </p><p><?php 
echo $first_job_id . '<br/>';
$job = new Job($first_job_id);
$data = array();
$data['country'] = 'HK';
开发者ID:pamalite,项目名称:yel,代码行数:31,代码来源:job.php

示例11: setLastRun

 /**
  * set the lastRun of $job to now
  *
  * @param Job $job
  */
 public function setLastRun($job)
 {
     $query = \OC_DB::prepare('UPDATE `*PREFIX*jobs` SET `last_run` = ? WHERE `id` = ?');
     $query->execute(array(time(), $job->getId()));
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:10,代码来源:joblist.php

示例12: doAck

 /**
  * @see JobQueue::doAck()
  * @return Job|bool
  */
 protected function doAck(Job $job)
 {
     $dbw = $this->getMasterDB();
     $dbw->commit(__METHOD__, 'flush');
     // flush existing transaction
     $autoTrx = $dbw->getFlag(DBO_TRX);
     // automatic begin() enabled?
     $dbw->clearFlag(DBO_TRX);
     // make each query its own transaction
     try {
         // Delete a row with a single DELETE without holding row locks over RTTs...
         $dbw->delete('job', array('job_cmd' => $this->type, 'job_id' => $job->getId()));
     } catch (Exception $e) {
         $dbw->setFlag($autoTrx ? DBO_TRX : 0);
         // restore automatic begin()
         throw $e;
     }
     $dbw->setFlag($autoTrx ? DBO_TRX : 0);
     // restore automatic begin()
     return true;
 }
开发者ID:nischayn22,项目名称:mediawiki-core,代码行数:25,代码来源:JobQueueDB.php

示例13: dirname

require_once dirname(__FILE__) . '/private/lib/utilities.php';
session_start();
if (!isset($_POST['job_id'])) {
    redirect_to('welcome.php');
}
// 1. initialize the parameters
$candidate = array();
$candidate['email_addr'] = sanitize($_POST['apply_email']);
$candidate['phone_num'] = sanitize($_POST['apply_phone']);
$candidate['name'] = sanitize(stripslashes($_POST['apply_name']));
$candidate['current_position'] = sanitize(stripslashes($_POST['apply_current_pos']));
$candidate['current_employer'] = sanitize(stripslashes($_POST['apply_current_emp']));
$job_id = $_POST['job_id'];
$job = new Job($job_id);
// get employer info
$criteria = array('columns' => "jobs.employer, employers.name AS employer_name", 'joins' => "employers ON employers.id = jobs.employer", 'match' => "jobs.id = " . $job->getId(), 'limit' => "1");
$result = $job->find($criteria);
$employer_id = $result[0]['employer'];
$employer_name = $result[0]['employer_name'];
$today = now();
// 2. store the contacts
$country_code = strtolower($_SESSION['yel']['country_code']);
if (isset($_SESSION['yel']['member']['id']) && !empty($_SESSION['yel']['member']['id'])) {
    $member = new Member($_SESSION['yel']['member']['id']);
    $country_code = strtolower($member->getCountry());
    if (is_null($country_code) || empty($country_code) || $country_code === false) {
        $country_code = 'my';
    }
}
//$branch_email = 'team.'. $country_code. '@yellowelevator.com';
$branch_email = 'team.my@yellowelevator.com';
开发者ID:pamalite,项目名称:yel,代码行数:31,代码来源:apply_action.php

示例14: now

$today = now();
// 2. store the contacts
$data = array();
$data['requested_on'] = $today;
$data['referrer_email'] = $referrer['email_addr'];
$data['referrer_phone'] = $referrer['phone_num'];
$data['referrer_name'] = $referrer['name'];
$data['is_reveal_name'] = $referrer['is_reveal_name'];
// loop through the number of candidates
$has_error = false;
$error_candidates = array();
foreach ($candidates as $i => $candidate) {
    $data['candidate_email'] = $candidate['email_addr'];
    $data['candidate_phone'] = $candidate['phone_num'];
    $data['candidate_name'] = $candidate['name'];
    $data['job'] = $job->getId();
    $data['via_social_connection'] = $candidate['social'];
    $data['current_position'] = $candidate['current_position'];
    $data['current_employer'] = $candidate['current_employer'];
    $data['referrer_remarks'] = 'NULL';
    $referral_buffer = new ReferralBuffer();
    $buffer_id = $referral_buffer->create($data);
    if ($buffer_id === false) {
        $has_error = true;
        $error_candidates[] = array('email_addr' => $candidate['email_addr'], 'name' => $candidate['name']);
        continue;
    }
    // Send a yes/no email to each candidate. reveal the name of the referrer if is_reveal_name is set to 1
    $mail_lines = file(dirname(__FILE__) . '/private/mail/new_referral_confirm.txt');
    $message = '';
    foreach ($mail_lines as $line) {
开发者ID:pamalite,项目名称:yel,代码行数:31,代码来源:refer_action.php

示例15: forceRegisterJob

 /**
  * @method boolean forceRegisterJob(Job $job) registers an Job to JobManager regardless of whether id of job is already registered.
  * @param Job $job The job to register.
  */
 public static function forceRegisterJob(Job $job)
 {
     self::$jobs[$job->getId()] = $job;
 }
开发者ID:HelloWorld017,项目名称:ToAruPG,代码行数:8,代码来源:JobManager.php


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