original_string: public function requires($addon = 'atk', $v, $location = null)
      {
          $cv = $this->getVersion($addon);
          if (version_compare($cv, $v) < 0) {
              if ($addon == 'atk') {
                  $e = $this->exception('Agile Toolkit version is too old');
              } else {
                  $e = $this->exception('Add-on is outdated')
                      ->addMoreInfo('addon', $addon);
              }
              $e->addMoreInfo('required', $v)
                  ->addMoreInfo('you have', $cv);
              if ($location !== null) {
                  $e->addMoreInfo('download_location', $location);
              }
              throw $e;
          }
  
          // Possibly we need to enable compatibility version
          if ($addon == 'atk') {
              if (version_compare($v, '4.2') < 0 && version_compare($v, '4.1.4') >= 0) {
                  $this->add('Controller_Compat');
  
                  return true;
              }
          }
  
          return true;
      }
code: public function requires($addon = 'atk', $v, $location = null)
      {
          $cv = $this->getVersion($addon);
          if (version_compare($cv, $v) < 0) {
              if ($addon == 'atk') {
                  $e = $this->exception('Agile Toolkit version is too old');
              } else {
                  $e = $this->exception('Add-on is outdated')
                      ->addMoreInfo('addon', $addon);
              }
              $e->addMoreInfo('required', $v)
                  ->addMoreInfo('you have', $cv);
              if ($location !== null) {
                  $e->addMoreInfo('download_location', $location);
              }
              throw $e;
          }
  
          // Possibly we need to enable compatibility version
          if ($addon == 'atk') {
              if (version_compare($v, '4.2') < 0 && version_compare($v, '4.1.4') >= 0) {
                  $this->add('Controller_Compat');
  
                  return true;
              }
          }
  
          return true;
      }
code_tokens: public function requires ( $ addon = 'atk' , $ v , $ location = null ) { $ cv = $ this -> getVersion ( $ addon ) ; if ( version_compare ( $ cv , $ v ) < 0 ) { if ( $ addon == 'atk' ) { $ e = $ this -> exception ( 'Agile Toolkit version is too old' ) ; } else { $ e = $ this -> exception ( 'Add-on is outdated' ) -> addMoreInfo ( 'addon' , $ addon ) ; } $ e -> addMoreInfo ( 'required' , $ v ) -> addMoreInfo ( 'you have' , $ cv ) ; if ( $ location !== null ) { $ e -> addMoreInfo ( 'download_location' , $ location ) ; } throw $ e ; } // Possibly we need to enable compatibility version if ( $ addon == 'atk' ) { if ( version_compare ( $ v , '4.2' ) < 0 && version_compare ( $ v , '4.1.4' ) >= 0 ) { $ this -> add ( 'Controller_Compat' ) ; return true ; } } return true ; }
docstring: Verifies version. Should be used by addons. For speed improvement,
  redefine this into empty function.
  
  @param string $addon
  @param string $v
  @param string $location
  
  @return bool
docstring_tokens: Verifies version . Should be used by addons . For speed improvement redefine this into empty function .