/** * Konstruktor * * *Description* * * @param * * @return header */ public function __construct() { $this->request = array_merge($_GET, $_POST); $this->response = new \Framework\Response(); $this->response->errorReporting(); $this->xml = new \View\XML(\Framework\Utility::getCharset()); $this->entries = new \Model\GetContent(); }
/** * Zeichensatz DB setzen * * *Description* Globalen Zeichensatz verwenden * * @param * * @return string */ private static function setMySQLCharset() { self::$charset = \Framework\Utility::getCharset(1); }
/** * Validiere Variablen * * *Description* * * @param array * * @return array */ public function validVarsSetting($request) { $settings = $this->entries->getSiteSettings(); foreach ($this->required_fields['settings'] as $key) { if (!array_key_exists($key, $request)) { $request[$key] = $settings[$key]; } } // HTML Entities kodieren foreach ($request as $key => $value) { if ($key != 'email') { $request[$key] = !empty($request[$key]) ? htmlentities(strip_tags($value), ENT_QUOTES, \Framework\Utility::getCharset()) : ''; } } return $request; }
/** * Setzt Variablen für Verwendung im Template * * *Description* * * @param * * @return object */ private function setValues() { // HTML-Gerüst Head, Closing Structure $arr_allowed = array('firstname', 'lastname', 'street', 'postalzip', 'city', 'phone', 'email', 'company', 'opening', 'variable', 'keywords', 'description', 'slogan', 'headline', 'content', 'title', 'indexation', 'panel1', 'panel2', 'panel3', 'pathTemplate', 'searchform', 'charset'); // Lade alle Daten in einen Array $var = array_merge($this->entries->getEntry($this->page), $this->Panel(), $this->entries->getSiteSettings(), array('pathTemplate' => $this->pathTemplate, 'searchform' => $this->getHTMLForms('Search'), 'charset' => \Framework\Utility::getCharset())); foreach ($var as $key => $value) { if (in_array($key, $arr_allowed)) { $name = ucfirst($key); //Handling Content if ($key == 'content') { // Compile Content $this->site->{$name} = !empty($this->searchRequest) ? $this->searchRequest : $this->compileContent($value); } elseif ($key == 'panel1' or $key == 'panel2' or $key == 'panel3') { // Compile Panel $this->site->{$name} = $this->compileContent($value); } else { // Other Values ... $this->site->{$name} = $value; } } } }
/** * Set content type * * *Description* * * @param string $type * @return mixed Returns a string value upon success. Returns false upon failure. */ private function setContentType($type) { if (in_array($type, $this->listMimeType)) { return $type . '; charset=' . \Framework\Utility::getCharset(); } else { return FALSE; } }