if (isset($Element['text'])) { $markup .= '>'; if (isset($Element['handler'])) { $markup .= $this->$Element['handler']($Element['text']); } else
if (isset($Element['text'])) { $markup .= '>'; if (isset($Element['handler'])) { $markup .= $this->$Element['handler']($Element['text']); } else
if (is_string($Element)) # because of Markup { $markup .= $Element; continue; } $markup .= $this->element($Element); }
$Elements []= $CurrentBlock['element']; unset($Elements[0]); # ~ $markup = $this->elements($Elements); # ~
# remove surrounding line breaks $text = trim($text, "\n"); # split text into lines $lines = explode("\n", $text); # iterate through lines to identify blocks $markup = $this->lines($lines); # trim line breaks
} # # ~ function text($text) { $markup = parent::text($text); # merge consecutive dl elements
self::$parsers['markdown'] = $parser; } } // parse for markdown if (strtolower(Config::get('markdown_parser', 'standard')) === "parsedown") { $result = self::$parsers['markdown']->text($string); } else { $result = self::$parsers['markdown']->transform($string);
public static function transform($content, $content_type=NULL) { $content_type = Helper::pick($content_type, Config::getContentType()); // render HTML from the given $content_type switch (strtolower($content_type)) { case "markdown": case "md": $content = Parse::markdown($content); break;
$parse_order = Config::getParseOrder(); if ($parse_order[0] == 'tags') { $output = Parse::template($template_data, $data); $output = self::transform($output, $type); } else { $output = self::transform($template_data, $type); $output = Parse::template($output, $data); }
// content file exists if ($content_file && File::exists($content_file)) { // make this $raw_file = substr(File::get($content_file), 3); $divide = strpos($raw_file, "\n---"); $item_content['content_raw'] = trim(substr($raw_file, $divide + 4)); $item_content['content'] = Content::parse($item_content['content_raw'], $item); }
* @return array */ public function get($parse_content=true, $supplement=true) { if ($supplement) { $this->supplement(); } $this->prepare($parse_content); return $this->content; }
public static function get($url, $parse_content=true, $supplement=true) { $hash = Debug::markStart('content', 'getting'); $url_hash = Helper::makeHash($url, $parse_content, $supplement); if (!isset(self::$fetched_content[$url_hash])) { $content_set = ContentService::getContentByURL($url); $content = $content_set->get($parse_content, $supplement); self::$fetched_content[$url_hash] = (isset($content[0])) ? $content[0] : array(); }
$more = 'Visitor came directly to this page and may have typed the URL incorrectly.'; $aspect = 'visitor'; } Log::error("404 - Page not found. " . $more, $aspect, "content"); } $data = Content::get(Path::tidy(Config::getSiteRoot() . "/404")); $template_list = array('404'); $response_code = 404;
//Invoke middleware foreach ($route->getMiddleware() as $mw) { call_user_func_array($mw, array($route)); } //Invoke callable call_user_func_array($route->getCallable(), array_values($route->getParams())); return true;
ob_start(); $this->applyHook('slim.before.router'); $dispatched = false; $matchedRoutes = $this->router->getMatchedRoutes($this->request->getMethod(), $this->request->getResourceUri()); foreach ($matchedRoutes as $route) { try { $this->applyHook('slim.before.dispatch'); $dispatched = $this->router->dispatch($route); $this->applyHook('slim.after.dispatch'); if ($dispatched) {
{ //Read flash messaging from previous request if available $this->loadMessages(); //Prepare flash messaging for current request $env = $this->app->environment(); $env['slim.flash'] = $this; $this->next->call(); $this->save(); }
$req = new \Slim\Http\Request($env); $method = $req->post($this->settings['key']); if ($method) { $env['slim.method_override.original_method'] = $env['REQUEST_METHOD']; $env['REQUEST_METHOD'] = strtoupper($method); } } $this->next->call(); } }
$app->config('whoops', new Run); $app->config('whoops')->pushHandler($app->config('whoops.error_page_handler')); $app->config('whoops')->pushHandler($app->config('whoops.error_json_handler')); $app->config('whoops')->pushHandler($app->config('whoops.slim_info_handler')); $app->error(array($app->config('whoops'), Run::EXCEPTION_HANDLER)); } $this->next->call(); } }
/** * Call */ public function call() { try { $this->next->call(); } catch (\Exception $e) { $env = $this->app->environment();
{ set_error_handler(array('\Slim\Slim', 'handleErrors')); //Apply final outer middleware layers $this->add(new \Slim\Middleware\PrettyExceptions()); //Invoke middleware and application stack $this->middleware[0]->call(); //Fetch status, header, and body
| All the heavy initialization and configuration happens right here. | Let's get going! | */ $app = require_once BASE_PATH . '/_app/start.php'; $app->run();
Key | Value |
Charset | |
Locale | <none> |
Application Class | Slim\Slim |
Route Name | <none> |
Route Pattern | /(:segments+) |
Route Middleware | <none> |
Key | Value |
URI | |
Request URI | /startups/%E2%80%9Dhttps:/twitter.com/intent/tweet |
Path | /startups/%E2%80%9Dhttps:/twitter.com/intent/tweet |
Query String | Array ( [url] => https://twitter.com//status/ [text] => Don’t ) |
HTTP Method | GET |
Script Name | |
Base URL | http://ww.coca-colafounders.com |
Scheme | http |
Port | 80 |
Host | ww.coca-colafounders.com |
Key | Value |
PATH | /usr/local/bin:/usr/bin:/bin |
REDIRECT_HANDLER | php-script |
REDIRECT_STATUS | 200 |
UNIQUE_ID | ZCFPkd1BKWP7yeqRVVvhAgAAACs |
SCRIPT_URL | /startups/”https:/twitter.com/intent/tweet |
SCRIPT_URI | http://ww.coca-colafounders.com/startups/”https:/twitter.com/intent/tweet |
WM_UCONTROL_XMLRPC_SERVER | http://10.0.0.13 |
ACCESS_DOMAIN | s196550.gridserver.com |
DATABASE_SERVER | internal-db.s196550.gridserver.com |
SITE_ROOT | /home/196550 |
SITE_CGIROOT | /home/196550/cgi-bin |
SITE_HTMLROOT | /home/196550/domains/coca-colafounders.com/html |
HTTP_PHPCONF | 2072969219 |
HTTP_HOST | ww.coca-colafounders.com |
HTTP_X_FORWARDED_FOR | 3.236.209.138 |
HTTP_X_FORWARDED_TYPE | http |
HTTP_CONNECTION | close |
HTTP_USER_AGENT | CCBot/2.0 (https://commoncrawl.org/faq/) |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
HTTP_ACCEPT_LANGUAGE | en-US,en;q=0.5 |
HTTP_IF_MODIFIED_SINCE | Wed, 05 Oct 2022 09:50:21 GMT |
HTTP_ACCEPT_ENCODING | br,gzip |
SERVER_SIGNATURE | <address>Apache/2.4.51 Server at ww.coca-colafounders.com Port 80</address> |
SERVER_SOFTWARE | Apache/2.4.51 |
SERVER_NAME | ww.coca-colafounders.com |
SERVER_ADDR | 127.0.0.1 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.236.209.138 |
DOCUMENT_ROOT | /home/196550/domains/coca-colafounders.com/html |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | /gs-bin/ |
CONTEXT_DOCUMENT_ROOT | /etc/apache2/gs-bin/ |
SERVER_ADMIN | webmaster@coca-colafounders.com |
SCRIPT_FILENAME | /home/196550/domains/coca-colafounders.com/html/index.php |
REMOTE_PORT | 44892 |
REDIRECT_URL | /index.php |
REDIRECT_QUERY_STRING | url=https://twitter.com//status/&text=Don%E2%80%99t |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.0 |
REQUEST_METHOD | GET |
QUERY_STRING | url=https://twitter.com//status/&text=Don%E2%80%99t |
REQUEST_URI | /startups/%E2%80%9Dhttps:/twitter.com/intent/tweet?url=https://twitter.com//status/&text=Don%E2%80%99t |
SCRIPT_NAME | /index.php |
ORIG_SCRIPT_FILENAME | /etc/apache2/gs-bin/php-legacy |
ORIG_PATH_INFO | /index.php |
ORIG_PATH_TRANSLATED | /home/196550/domains/coca-colafounders.com/html/index.php |
ORIG_SCRIPT_NAME | /gs-bin/php-legacy |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1679904657.7028 |
REQUEST_TIME | 1679904657 |
argv | Array ( [0] => url=https://twitter.com//status/&text=Don%E2%80%99t ) |
argc | 1 |
Key | Value |
url | https://twitter.com//status/ |
text | Don’t |
Key | Value |
PATH | /usr/local/bin:/usr/bin:/bin |
REDIRECT_HANDLER | php-script |
REDIRECT_STATUS | 200 |
UNIQUE_ID | ZCFPkd1BKWP7yeqRVVvhAgAAACs |
SCRIPT_URL | /startups/”https:/twitter.com/intent/tweet |
SCRIPT_URI | http://ww.coca-colafounders.com/startups/”https:/twitter.com/intent/tweet |
WM_UCONTROL_XMLRPC_SERVER | http://10.0.0.13 |
ACCESS_DOMAIN | s196550.gridserver.com |
DATABASE_SERVER | internal-db.s196550.gridserver.com |
SITE_ROOT | /home/196550 |
SITE_CGIROOT | /home/196550/cgi-bin |
SITE_HTMLROOT | /home/196550/domains/coca-colafounders.com/html |
HTTP_PHPCONF | 2072969219 |
HTTP_HOST | ww.coca-colafounders.com |
HTTP_X_FORWARDED_FOR | 3.236.209.138 |
HTTP_X_FORWARDED_TYPE | http |
HTTP_CONNECTION | close |
HTTP_USER_AGENT | CCBot/2.0 (https://commoncrawl.org/faq/) |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
HTTP_ACCEPT_LANGUAGE | en-US,en;q=0.5 |
HTTP_IF_MODIFIED_SINCE | Wed, 05 Oct 2022 09:50:21 GMT |
HTTP_ACCEPT_ENCODING | br,gzip |
SERVER_SIGNATURE | <address>Apache/2.4.51 Server at ww.coca-colafounders.com Port 80</address> |
SERVER_SOFTWARE | Apache/2.4.51 |
SERVER_NAME | ww.coca-colafounders.com |
SERVER_ADDR | 127.0.0.1 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.236.209.138 |
DOCUMENT_ROOT | /home/196550/domains/coca-colafounders.com/html |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | /gs-bin/ |
CONTEXT_DOCUMENT_ROOT | /etc/apache2/gs-bin/ |
SERVER_ADMIN | webmaster@coca-colafounders.com |
SCRIPT_FILENAME | /home/196550/domains/coca-colafounders.com/html/index.php |
REMOTE_PORT | 44892 |
REDIRECT_URL | /index.php |
REDIRECT_QUERY_STRING | url=https://twitter.com//status/&text=Don%E2%80%99t |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.0 |
REQUEST_METHOD | GET |
QUERY_STRING | url=https://twitter.com//status/&text=Don%E2%80%99t |
REQUEST_URI | /startups/%E2%80%9Dhttps:/twitter.com/intent/tweet?url=https://twitter.com//status/&text=Don%E2%80%99t |
SCRIPT_NAME | /index.php |
ORIG_SCRIPT_FILENAME | /etc/apache2/gs-bin/php-legacy |
ORIG_PATH_INFO | /index.php |
ORIG_PATH_TRANSLATED | /home/196550/domains/coca-colafounders.com/html/index.php |
ORIG_SCRIPT_NAME | /gs-bin/php-legacy |