本文整理汇总了PHP中Job::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP Job::insert方法的具体用法?PHP Job::insert怎么用?PHP Job::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Job
的用法示例。
在下文中一共展示了Job::insert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insert
/**
* This actually files the job. This is prevented if the configuration of SMW
* disables jobs.
* @note Any method that inserts jobs with Job::batchInsert or otherwise must
* implement this check individually. The below is not called in these cases.
*/
function insert()
{
global $smwgEnableUpdateJobs;
if ($smwgEnableUpdateJobs) {
parent::insert();
}
}
示例2: queueLinksJobs
/**
* Add an array of refreshLinks jobs to the queue
* @param array $titles Array of title objects.
* @static
*/
function queueLinksJobs($titles)
{
$fname = 'Job::queueLinksJobs';
wfProfileIn($fname);
foreach ($titles as $title) {
$job = new Job('refreshLinks', $title);
$job->insert();
}
wfProfileOut($fname);
}
示例3: percentSign
public function percentSign()
{
$observer = $this->getConnection()->addObserver(newinstance('rdbms.DBObserver', array(create('new Vector<lang.types.String>')), '{
public $statements;
public function __construct($statements) {
$this->statements= $statements;
}
public static function instanceFor($arg) { }
public function update($observable, $event= NULL) {
if ($event instanceof DBEvent && "query" == $event->getName()) {
$this->statements[]= new String($event->getArgument());
}
}
}'));
$j = new Job();
$j->setTitle('Percent%20Sign');
$j->insert();
$this->assertEquals(new String('insert into JOBS.job (title) values ("Percent%20Sign")'), $observer->statements[0]);
}