Exemplo n.º 1
0
 public function fullParse()
 {
     return fullParsePi($this->pageText);
     $this->allCmds = $this->extractPiCommandsFromString($this->pageText);
     $itrsFinished = false;
     while (!$itrsFinished) {
         //////var_dump($this->pageText);
         //echo("hrer\n");
         $tempTxt = $this->pageText;
         //var_dump($this->pageText);
         $this->pageText = $this->setupIterators();
         $itrsFinished = $this->pageText == $tempTxt;
         $this->allCmds = $this->extractPiCommandsFromString($this->pageText);
     }
     while (count($this->allCmds) > 0) {
         $last = array_pop($this->allCmds);
         $this->pageText = $last->fillWithResult($this->pageText);
         $this->allCmds = $this->extractPiCommandsFromString($this->pageText);
     }
     return $this->pageText;
 }
Exemplo n.º 2
0
function shortcodeWrapper($atts, $content = '')
{
    return fullParsePi($content);
}
Exemplo n.º 3
0
<?php

include __DIR__ . "/piPress.php";
//var_dump($_POST);
//die();
//$_POST["payload"] = '[piEcho:"Tests" + "\n"]';
if (isset($_POST["payload"])) {
    //echo base64_decode($_POST["payload"]);
    $data = base64_decode(base64_decode($_POST["payload"]));
    echo fullParsePi($data);
}
Exemplo n.º 4
0
        }
        $genStr .= "function " . $point["ShortCode"] . '($' . implode(', $', $adjusted) . ") {" . '
		$method = "' . $point["Method"] . '";
		$endpoint = endpointWith("' . $point["Path"] . '", $method);
		global $verbose;
		checkAuth();
		
		$data = array(' . implode(",\n\t", $arrCreator) . '
		);
		
		if ($method != "GET") {
			$data = formattedParametersWithData($endpoint, $data);
		}
		
		$newPath = fillEndpointPathWithRequirements($endpoint, $data);
		$data = cleanEndpointRequirementsFromData($endpoint, $data);
		return send' . $point["Method"] . '(defaultHeader(), $data, $newPath);' . "\n}\n\n";
        $cnt++;
    }
    $genStr .= '?>';
    echo $genStr;
    file_put_contents("autogen/piShort-auto.php", $genStr);
}
//genShortCodes();
$verbose = false;
if ($verbose) {
    $verbose = false;
    $testPage = file_get_contents("tests/newPiSyntax.js");
    $modded = fullParsePi($testPage);
    echo "******************\nParsed File:\n" . $modded . "\n******************\n";
}