本文整理匯總了PHP中TagPeer::getIdFromTagValue方法的典型用法代碼示例。如果您正苦於以下問題:PHP TagPeer::getIdFromTagValue方法的具體用法?PHP TagPeer::getIdFromTagValue怎麽用?PHP TagPeer::getIdFromTagValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TagPeer
的用法示例。
在下文中一共展示了TagPeer::getIdFromTagValue方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: run_a0_get_main_acts_for_tags
/**
* estrae gli N atti più rilevanti per determinati argomenti (tag)
*/
function run_a0_get_main_acts_for_tags($task, $args, $options)
{
static $loaded;
// load application context
if (!$loaded) {
task_loader();
$loaded = true;
}
echo "memory usage: " . memory_get_usage() . "\n";
$msg = sprintf("start time: %s\n", date('H:i:s'));
echo $msg;
$n = 1;
if (array_key_exists('nrecs', $options)) {
$n = (int) $options['nrecs'];
}
if (!is_int($n) || $n < 1) {
throw new Exception("il numero di atti deve essere un intero\n");
}
if (count($args) > 0) {
$argomenti = array();
foreach ($args as $cnt => $arg) {
$id = TagPeer::getIdFromTagValue($arg);
$xml_url = sprintf("http://parlamento.openpolis.it/xml/indici/tag/%d.xml", $id);
$xsl_file = SF_ROOT_DIR . "/web/xml/indici/xslt/tagActsSorter.xslt";
printf("Argomento %s:\n", $arg, $id);
getImportantActs($xml_url, $xsl_file, $n);
print "\n";
}
}
$start_time = time();
$msg = sprintf("end time: %s\n", date('H:i:s'));
echo $msg;
$msg = sprintf("memory usage: %10d\n", memory_get_usage());
echo pakeColor::colorize($msg, array('fg' => 'red', 'bold' => false));
}