public static function getSpinnerCombinations($text)
    {
        $matches = self::getSpinnerMatches($text);

        foreach ($matches as $row) {
            if(!preg_match('/[{}]/', $row)) {
                $all[] = explode('|', $row);
            }
        }

        $combinations = call_user_func_array(__CLASS__ . '::arrayCartesian', $all);
        foreach($combinations as $item) {
            $out[] = implode('', $item);
        }

        return array_values($out);
    }
public static function getSpinnerCombinations($text)
    {
        $matches = self::getSpinnerMatches($text);

        foreach ($matches as $row) {
            if(!preg_match('/[{}]/', $row)) {
                $all[] = explode('|', $row);
            }
        }

        $combinations = call_user_func_array(__CLASS__ . '::arrayCartesian', $all);
        foreach($combinations as $item) {
            $out[] = implode('', $item);
        }

        return array_values($out);
    }
public static function getSpinnerCombinations ( $ text ) { $ matches = self :: getSpinnerMatches ( $ text ) ; foreach ( $ matches as $ row ) { if ( ! preg_match ( '/[{}]/' , $ row ) ) { $ all [ ] = explode ( '|' , $ row ) ; } } $ combinations = call_user_func_array ( __CLASS__ . '::arrayCartesian' , $ all ) ; foreach ( $ combinations as $ item ) { $ out [ ] = implode ( '' , $ item ) ; } return array_values ( $ out ) ; }
Get all combinations for spinner sentence
@param string $text
@return array
Get all combinations for spinner sentence