本文整理匯總了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
));
}
?>