예제 #1
0
 /**
  * Parse the phpmentoring.org-page for apprentices and mentors
  *
  * This method is the endpoint for the console-action.
  *
  * @return void
  */
 public function getmentoringAction()
 {
     echo sprintf('Generating mentoring.json-File' . "\n");
     $config = $this->getServiceLocator()->get('config');
     $mentoring = new Mentoring($config['php.ug.mentoring']);
     $infos = $mentoring->parse('https://github.com/phpmentoring/phpmentoring.github.com/wiki/Mentors-and-Apprentices');
     $file = $config['php.ug.mentoring']['file'];
     $fh = fopen($file, 'w+');
     fwrite($fh, json_encode($infos));
     fclose($fh);
     echo sprintf('File "%s" has been stored' . "\n", $file);
 }
예제 #2
0
 public function testParsing()
 {
     $this->markTestSkipped('Still to implement');
     $parser = new MentoringParser(array(''));
     $parser->parse(__DIR__ . '/__files/mentoring.html');
 }