本文整理汇总了PHP中CostbenefitprojectionHelper::checkJson方法的典型用法代码示例。如果您正苦于以下问题:PHP CostbenefitprojectionHelper::checkJson方法的具体用法?PHP CostbenefitprojectionHelper::checkJson怎么用?PHP CostbenefitprojectionHelper::checkJson使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CostbenefitprojectionHelper
的用法示例。
在下文中一共展示了CostbenefitprojectionHelper::checkJson方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDummyComp
protected function getDummyComp()
{
// insure we only get this once
if (!CostbenefitprojectionHelper::checkArray($this->dummyComp)) {
// Create a new query object.
$query = $this->db->getQuery(true);
// Get from #__costbenefitprojection_service_provider as a
$query->select($this->db->quoteName(array('a.testcompanies'), array('testcompanies')));
$query->from($this->db->quoteName('#__costbenefitprojection_service_provider', 'a'));
// load the query
$this->db->setQuery($query);
$this->db->execute();
if ($this->db->getNumRows()) {
// get the test companies
$testcompanies = $this->db->loadColumn();
// global Ids
$global = array();
// okay now we loop the test companies to build a global id set
foreach ($testcompanies as $json) {
if (CostbenefitprojectionHelper::checkJson($json)) {
$global = array_merge($global, json_decode($json, true));
}
}
// now insure the ids are unique
$this->dummyComp = array_unique($global);
}
}
return $this->dummyComp;
}