original_string: public function search($query) {
          $found = array();
  
          foreach ($this->settings as $setting) {
              if ($setting->is_related($query)) {
                  $found[] = $setting;
              }
          }
  
          if ($found) {
              $result = new stdClass();
              $result->page     = $this;
              $result->settings = $found;
              return array($this->name => $result);
          }
  
          $found = false;
          if (strpos(strtolower($this->name), $query) !== false) {
              $found = true;
          } else if (strpos(core_text::strtolower($this->visiblename), $query) !== false) {
                  $found = true;
              }
          if ($found) {
              $result = new stdClass();
              $result->page     = $this;
              $result->settings = array();
              return array($this->name => $result);
          } else {
              return array();
          }
      }
code: public function search($query) {
          $found = array();
  
          foreach ($this->settings as $setting) {
              if ($setting->is_related($query)) {
                  $found[] = $setting;
              }
          }
  
          if ($found) {
              $result = new stdClass();
              $result->page     = $this;
              $result->settings = $found;
              return array($this->name => $result);
          }
  
          $found = false;
          if (strpos(strtolower($this->name), $query) !== false) {
              $found = true;
          } else if (strpos(core_text::strtolower($this->visiblename), $query) !== false) {
                  $found = true;
              }
          if ($found) {
              $result = new stdClass();
              $result->page     = $this;
              $result->settings = array();
              return array($this->name => $result);
          } else {
              return array();
          }
      }
code_tokens: public function search ( $ query ) { $ found = array ( ) ; foreach ( $ this -> settings as $ setting ) { if ( $ setting -> is_related ( $ query ) ) { $ found [ ] = $ setting ; } } if ( $ found ) { $ result = new stdClass ( ) ; $ result -> page = $ this ; $ result -> settings = $ found ; return array ( $ this -> name => $ result ) ; } $ found = false ; if ( strpos ( strtolower ( $ this -> name ) , $ query ) !== false ) { $ found = true ; } else if ( strpos ( core_text :: strtolower ( $ this -> visiblename ) , $ query ) !== false ) { $ found = true ; } if ( $ found ) { $ result = new stdClass ( ) ; $ result -> page = $ this ; $ result -> settings = array ( ) ; return array ( $ this -> name => $ result ) ; } else { return array ( ) ; } }
docstring: Search string in settings page.
  
  @param string $query
  @return array
docstring_tokens: Search string in settings page .