本文整理汇总了PHP中Source::setType方法的典型用法代码示例。如果您正苦于以下问题:PHP Source::setType方法的具体用法?PHP Source::setType怎么用?PHP Source::setType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Source
的用法示例。
在下文中一共展示了Source::setType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Source
<?
require('../include/config.php');
require('../include/class.source.php');
$n = new Source($db);
$source = $_POST['source'];
$s = $n->getSource($source);
if (!isset($s['source_id'])) {
$n->Insert(Array(
'source_id' => $source,
'source_name' => $source,
'type' => 'good'
));
} else {
var_dump($n->setType(Array(
'type' => 'good',
'source_id' => $source
)));
}
?>
示例2: createSource
/**
* Creates a new Zend\Feed\Writer\Source data container for use. This is NOT
* added to the current feed automatically, but is necessary to create a
* container with some initial values preset based on the current feed data.
*
* @return Source
*/
public function createSource()
{
$source = new Source();
if ($this->getEncoding()) {
$source->setEncoding($this->getEncoding());
}
$source->setType($this->getType());
return $source;
}
示例3: Source
<?
require('../include/config.php');
require('../include/class.source.php');
$n = new Source($db);
$source = $_POST['source'];
$s = $n->getSource($source);
if (!isset($s['source_id'])) {
$n->Insert(Array(
'source_id' => $source,
'source_name' => $source,
'type' => 'bad'
));
} else {
$n->setType(Array(
'type' => 'bad',
'source_id' => $source
));
}
?>