Example #1
0
 /**
  * @param string $mode
  */
 public function __construct($mode)
 {
     $searchPattern = '/(r|w|a|x|c)(b)?(\\+)?(\\d*)(f|h)?/';
     preg_match($searchPattern, $mode, $ratios);
     if (count($ratios) > 4 && $ratios[4]) {
         $this->_ratio = (int) $ratios[4];
     }
     if (count($ratios) == 6) {
         $this->_strategy = $ratios[5];
     }
     $mode = preg_replace($searchPattern, '\\1\\2\\3', $mode);
     parent::__construct($mode);
 }