| 1028 | | $this->options = str_replace(array('b', 'C', 'd', 'D', |
|---|
| 1029 | | 'e', 'E', 'F', 'i', |
|---|
| 1030 | | 'I', 'l', 'o', 'P', |
|---|
| 1031 | | 'r', 's', 't', 'T', |
|---|
| 1032 | | 'x', 'X'), '', $this->options); |
|---|
| | 1029 | $meetme_only = array('b', 'C', 'd', 'D', |
|---|
| | 1030 | 'e', 'E', 'F', 'i', |
|---|
| | 1031 | 'I', 'l', 'o', 'P', |
|---|
| | 1032 | 'r', 's', 't', 'T', |
|---|
| | 1033 | 'x', 'X'); |
|---|
| | 1034 | |
|---|
| | 1035 | //find asterisk variables in $this->options, if any |
|---|
| | 1036 | if (preg_match_all('/\$|}/', $this->options, $matches, PREG_OFFSET_CAPTURE)) { |
|---|
| | 1037 | $matches = $matches[0]; |
|---|
| | 1038 | //build a range of start and endpoints of any asterisk variables |
|---|
| | 1039 | for($i = 0; $i < count($matches); $i += 2) { |
|---|
| | 1040 | if ($matches[$i][0] == '$') { |
|---|
| | 1041 | $range[] = array( $matches[$i][1], $matches[$i + 1][1]); |
|---|
| | 1042 | } |
|---|
| | 1043 | } |
|---|
| | 1044 | |
|---|
| | 1045 | //loop through each charachter in $this->options. If its not in the |
|---|
| | 1046 | //range of asterisk variables $range, replace its charachter it its in $meetme_only |
|---|
| | 1047 | $str_array = str_split($this->options); |
|---|
| | 1048 | for ($i = 0; $i < count($str_array); $i++) { |
|---|
| | 1049 | if (!$this->in_ast_var_range($i, $range)) { |
|---|
| | 1050 | $str_array[$i] = str_replace($meetme_only, '', $stra[$i]); |
|---|
| | 1051 | } |
|---|
| | 1052 | } |
|---|
| | 1053 | $this->options = implode($str_array); |
|---|
| | 1054 | } else { |
|---|
| | 1055 | $this->options = str_replace($meetme_only, '', $this->options); |
|---|
| | 1056 | } |
|---|
| | 1057 | |
|---|