Skip to content

Instantly share code, notes, and snippets.

@rauchg
Created May 14, 2009 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rauchg/111565 to your computer and use it in GitHub Desktop.
Save rauchg/111565 to your computer and use it in GitHub Desktop.
<?php
class ForgeMDParser
{
var $errors = array();
public function __construct($data){
$this->data = $data;
$this->parse();
}
public function parse(){
$this->html = sfMarkdown::doConvert($this->data);
$xml = simplexml_load_string($this->html);
var_dump($xml);
}
public function hasErrors(){
return !empty($this->errors);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment