Dzięki NoIdea, znalazłem jeszcze (fragment po przeróbce) :
protected function showAllCombinations($string, $traits, $i, $limit) {
if (count ( $this->_replaced
) >= $limit) return;
if ($i >= count ( $traits )) { $this->_replaced
[] = trim ( $string ); } else {
foreach ( $traits [$i] as $trait ) {
$string_temp = (! empty ( $string )) ?
"$string" . KEYWORD_SEPARATOR
. "$trait" : "$trait"; $this->showAllCombinations ( $string_temp, $traits, $i + 1, $limit );
}
}
}
generalnie wiedziałem że funkcja ma być wywoływana wewnątrz ale głowa mnie już od tego bolała i robiłem dziwne zonki

dzięki i pozdrawiam
ps. w sumie to prawie to samo ...