本文整理匯總了PHP中ArrayUtils::mergeUnique方法的典型用法代碼示例。如果您正苦於以下問題:PHP ArrayUtils::mergeUnique方法的具體用法?PHP ArrayUtils::mergeUnique怎麽用?PHP ArrayUtils::mergeUnique使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ArrayUtils
的用法示例。
在下文中一共展示了ArrayUtils::mergeUnique方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: mergeSelf
/**
* @param UncacherBaseDaoWorker $uncacher
* @return UncacherBaseDaoWorker
*/
private function mergeSelf(UncacherBaseDaoWorker $uncacher)
{
foreach ($uncacher->getClassNameMap() as $className => $idKeys) {
if (isset($this->classNameMap[$className])) {
$this->classNameMap[$className] = ArrayUtils::mergeUnique($this->classNameMap[$className], $idKeys);
} else {
$this->classNameMap[$className] = $idKeys;
}
}
return $this;
}
示例2: mergeSelf
private function mergeSelf(UncacherGenericDAO $uncacher)
{
foreach ($uncacher->getDaoMap() as $daoClass => $daoMap) {
if (isset($this->daoMap[$daoClass])) {
//merge identities
$this->daoMap[$daoClass][0] = ArrayUtils::mergeUnique($this->daoMap[$daoClass][0], $daoMap[0]);
//merge workers uncachers
$this->daoMap[$daoClass][1]->merge($daoMap[1]);
} else {
$this->daoMap[$daoClass] = $daoMap;
}
}
return $this;
}
示例3: mergeSelf
private function mergeSelf(UncacherTaggableDaoWorker $uncacher)
{
foreach ($uncacher->getClassNameMap() as $className => $uncaches) {
if (!isset($this->classNameMap[$className])) {
$this->classNameMap[$className] = $uncaches;
} else {
//merging idkeys
$this->classNameMap[$className][0] = ArrayUtils::mergeUnique($this->classNameMap[$className][0], $uncaches[0]);
//merging tags
$this->classNameMap[$className][1] = ArrayUtils::mergeUnique($this->classNameMap[$className][1], $uncaches[1]);
}
}
return $this;
}