original_string: public function getFilters($sql)
      {
          $classes    = array();
          $filterRows = $this->db->fetchAll($sql);
          $output     = array();
  
          // \MUtil_Echo::track($filterRows);
          foreach ($filterRows as $key => $filter) {
              $className = $filter['gaf_class'];
              if (! isset($classes[$className])) {
                  $classes[$className] = $this->newFilterObject($className);
              }
              $filterObject = clone $classes[$className];
              if ($filterObject instanceof AppointmentFilterInterface) {
                  $filterObject->exchangeArray($filter);
                  $output[$key] = $filterObject;
              }
          }
          // \MUtil_Echo::track(count($filterRows), count($output));
  
          return $output;
      }
code: public function getFilters($sql)
      {
          $classes    = array();
          $filterRows = $this->db->fetchAll($sql);
          $output     = array();
  
          // \MUtil_Echo::track($filterRows);
          foreach ($filterRows as $key => $filter) {
              $className = $filter['gaf_class'];
              if (! isset($classes[$className])) {
                  $classes[$className] = $this->newFilterObject($className);
              }
              $filterObject = clone $classes[$className];
              if ($filterObject instanceof AppointmentFilterInterface) {
                  $filterObject->exchangeArray($filter);
                  $output[$key] = $filterObject;
              }
          }
          // \MUtil_Echo::track(count($filterRows), count($output));
  
          return $output;
      }
code_tokens: public function getFilters ( $ sql ) { $ classes = array ( ) ; $ filterRows = $ this -> db -> fetchAll ( $ sql ) ; $ output = array ( ) ; // \MUtil_Echo::track($filterRows); foreach ( $ filterRows as $ key => $ filter ) { $ className = $ filter [ 'gaf_class' ] ; if ( ! isset ( $ classes [ $ className ] ) ) { $ classes [ $ className ] = $ this -> newFilterObject ( $ className ) ; } $ filterObject = clone $ classes [ $ className ] ; if ( $ filterObject instanceof AppointmentFilterInterface ) { $ filterObject -> exchangeArray ( $ filter ) ; $ output [ $ key ] = $ filterObject ; } } // \MUtil_Echo::track(count($filterRows), count($output)); return $ output ; }
docstring: Get the filters from the database
  
  @param $sql SQL statement
  @return AppointmentFilterInterface[]
docstring_tokens: Get the filters from the database