/**
  *
  * @return JsonObject a Json object with the code and message of the error
  */
 public function toJson()
 {
     $error = new JsonObject();
     $error . addProperty("code", $this->code);
     $error . addProperty("message", $this->message);
     return $error;
 }
Exemple #2
0
function coordMarkupCall($arguments)
{
    global $coordMarkupState;
    $coord = addProperty($coordMarkupState, $arguments, 'coord');
    if ($coord) {
        return coordHtml($coord);
    }
    return '';
}
function parseProjects($fulltext)
{
    $projects = array();
    global $projectsMarkup;
    if (preg_match_all($projectsMarkup, $fulltext, $matches) > 0) {
        $state = array();
        //die($fulltext);
        //die(print_r($matches[1], true));
        foreach ($matches[1] as $match) {
            //array_push($projects, $match);
            $project = addProperty($state, $match, 'project');
            if ($project) {
                array_push($projects, $project);
            }
        }
    }
    return $projects;
}