/** * Verify URL video * @param $url * @return string */ public static function checkout_url($url) { if (magixcjquery_filter_isVar::isURL($url)) { return $url; } else { throw new Exception('is not a valid URL'); } }
/** * create childnode url * @param URL $loc * @param void $writeImageLoc */ public function writeMakeNodeImage($loc, $imageloc, $uri = '', $forimage = false) { if ($this->validElement($loc) == true) { $this->writer->startElement('url'); // [2] Second Node $this->writer->writeElement('loc', magixcjquery_filter_isVar::isURL(magixcjquery_filter_var::escapeHTML($loc))); if ($forimage != false) { foreach ($forimage as $img) { if ($img[$imageloc] != NULL) { self::writeImageLoc($uri . $img[$imageloc]); } } } else { self::writeImageLoc($uri . $imageloc); } $this->writer->endElement(); } }
/** * create childnode url from parent urlset * @param $encode * @return void */ function elementWriteAtom($title, $update, $link, $ext = null, $summary = false) { $date = new DateTime($update); $this->writer->startElement('entry'); // [2] Second Node $this->writer->writeElement('title', $title); $this->writer->startElement('link'); $this->writer->writeAttribute('rel', 'alternate'); $this->writer->writeAttribute('type', 'text/html'); $this->writer->writeAttribute('href', magixcjquery_filter_isVar::isURL(magixcjquery_html_helpersHtml::getUrl() . $link . $ext)); $this->writer->writeAttribute('title', magixcjquery_filter_isVar::isURL(magixcjquery_html_helpersHtml::getUrl() . $link . $ext)); $this->writer->endElement(); $this->writer->writeElement('update', $date->format(DATE_ATOM)); $this->writer->writeElement('id', magixcjquery_filter_isVar::isURL(magixcjquery_html_helpersHtml::getUrl() . $link . $ext)); $this->writer->startElement('summary'); $this->writer->writeAttribute('type', 'html'); $this->writer->text($summary ? $summary : false); $this->writer->endElement(); $this->writer->endElement(); }