コード例 #1
0
ファイル: WImage.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     if (isset($elem['alt'])) {
         $this->setAlt((string) $elem['alt']);
     }
     if (isset($elem['height'])) {
         $this->setHeight((string) $elem['height']);
     }
     if (isset($elem['width'])) {
         $this->setWidth((string) $elem['width']);
     }
     if (isset($elem['src'])) {
         $this->setSrc((string) $elem['src']);
     }
     if (isset($elem['max_width'])) {
         $this->setMaxWidth((string) $elem['max_width']);
     }
     if (isset($elem['max_height'])) {
         $this->setMaxHeight((string) $elem['max_height']);
     }
     if (isset($elem['with_preview'])) {
         $this->setWithPreview((string) $elem['with_preview']);
     }
     if (isset($elem['subst_src'])) {
         $this->setSubstSrc((string) $elem['subst_src']);
     }
     $this->addToMemento(array("alt", "height", "width", "src", "align", "max_width", "max_height", "with_preview", "use_cache", "subst_src"));
     parent::parseParams($elem);
 }
コード例 #2
0
ファイル: WNavigator.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param array $params
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     if (isset($elem['text'])) {
         $this->setText((string) $elem['text']);
     } else {
         $this->setText(requestURI());
     }
     $this->addToMemento(array("text"));
     parent::parseParams($elem);
 }
コード例 #3
0
ファイル: WHTML.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     if (isset($elem['src'])) {
         $this->setSrc((string) $elem['src']);
     } else {
         $this->setText(trim((string) $elem));
     }
     $this->addToMemento(array("src", "text"));
     parent::parseParams($elem);
 }
コード例 #4
0
ファイル: WFeedLink.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     if (isset($elem['title'])) {
         $this->setTitle((string) $elem['title']);
     }
     if (isset($elem['href'])) {
         $this->setHREF((string) $elem['href']);
     }
     if (isset($elem['type'])) {
         $this->setType((string) $elem['type']);
     }
     parent::parseParams($elem);
 }
コード例 #5
0
ファイル: WInlineScript.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array $elem
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     if (isset($elem) && (string) $elem != "") {
         $this->setCode((string) $elem);
     }
     if (isset($elem['condition'])) {
         $this->setCond((string) $elem['condition']);
     }
     if (isset($elem['use_lang'])) {
         $this->setUseLang((string) $elem['use_lang']);
     }
     parent::parseParams($elem);
 }
コード例 #6
0
ファイル: WPageTitle.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     $h = Header::get();
     if (isset($elem->separator)) {
         $h->setTitleSeparator(Language::encodePair((string) $elem->separator));
     }
     if (isset($elem->start)) {
         $h->setTitleStart(Language::encodePair((string) $elem->start));
     }
     if (isset($elem->end)) {
         $h->setTitleEnd(Language::encodePair((string) $elem->end));
     }
     if (trim((string) $elem)) {
         $h->addTitleItem(Language::encodePair((string) $elem));
     }
     parent::parseParams($elem);
 }
コード例 #7
0
ファイル: WFlash.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     if (isset($elem['height'])) {
         $this->setHeight((string) $elem['height']);
     }
     if (isset($elem['width'])) {
         $this->setWidth((string) $elem['width']);
     }
     if (isset($elem['src'])) {
         $this->setSrc((string) $elem['src']);
     }
     if (isset($elem['bgcolor'])) {
         $this->setBgColor((string) $elem['bgcolor']);
     }
     $this->addToMemento(array("height", "width", "src", "bgcolor"));
     parent::parseParams($elem);
 }
コード例 #8
0
ファイル: WSelectOption.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     if (isset($elem['text'])) {
         $this->setText((string) $elem['text']);
     } elseif (!count($elem->children) && (string) $elem) {
         $this->setText((string) $elem);
     }
     if (isset($elem['selected'])) {
         $this->setSelected((string) $elem['selected']);
     }
     if (isset($elem['value'])) {
         $this->setValue((string) $elem['value']);
     } else {
         $this->setValue($this->getText());
     }
     $this->addToMemento(array("text", "selected", "value"));
     parent::parseParams($elem);
 }
コード例 #9
0
ファイル: WCSS.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     if (isset($elem['src'])) {
         $this->setSrc((string) $elem['src']);
     } elseif ((string) $elem) {
         $this->setText(trim((string) $elem));
     }
     if (isset($elem['priority'])) {
         $this->setPriority((string) $elem['priority']);
     }
     if (isset($elem['condition'])) {
         $this->setCond((string) $elem['condition']);
     }
     if (isset($elem['media'])) {
         $this->setMedia((string) $elem['media']);
     }
     $this->addToMemento(array("src", "condition", "media", "text"));
     parent::parseParams($elem);
 }
コード例 #10
0
ファイル: WMeta.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     $attr = array();
     if (isset($elem['http-equiv'])) {
         $attr['http-equiv'] = (string) $elem['http-equiv'];
     }
     if (isset($elem['name'])) {
         $attr['name'] = (string) $elem['name'];
     }
     if (isset($elem['content'])) {
         $attr['content'] = (string) $elem['content'];
     }
     if (isset($elem['scheme'])) {
         $attr['scheme'] = (string) $elem['scheme'];
     }
     if (!empty($attr['content'])) {
         // content is required
         Header::get()->addMeta($attr);
     }
     if (isset($elem['nofollow']) && (string) $elem['nofollow']) {
         Header::get()->nofollow();
     }
     if (isset($elem['noindex']) && (string) $elem['noindex']) {
         Header::get()->noindex();
     }
     $attr = array();
     if (isset($elem['charset'])) {
         $attr['charset'] = (string) $elem['charset'];
     }
     if (isset($elem['href'])) {
         $attr['href'] = (string) $elem['href'];
     }
     if (isset($elem['hreflang'])) {
         $attr['hreflang'] = (string) $elem['hreflang'];
     }
     if (isset($elem['type'])) {
         $attr['type'] = (string) $elem['type'];
     }
     if (isset($elem['rel'])) {
         $attr['rel'] = (string) $elem['rel'];
     }
     if (isset($elem['rev'])) {
         $attr['rev'] = (string) $elem['rev'];
     }
     if (isset($elem['title'])) {
         $attr['title'] = (string) $elem['title'];
     }
     if (isset($elem['cond'])) {
         $attr['cond'] = (string) $elem['cond'];
     }
     if (isset($elem['media'])) {
         $attr['media'] = (string) $elem['media'];
     }
     if (!empty($attr)) {
         Header::get()->addLink($attr);
     }
     parent::parseParams($elem);
 }
コード例 #11
0
ファイル: WJSON.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     parent::parseParams($elem);
 }
コード例 #12
0
ファイル: WControl.php プロジェクト: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    array
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     $val = (string) $elem;
     if (isset($val)) {
         $this->setValue($val);
     }
     if (isset($elem['value'])) {
         $this->setValue((string) $elem['value']);
     }
     if (isset($elem['name'])) {
         $this->setName((string) $elem['name']);
         // DISALLOW. Id sets in constructor
         /*if(!isset($elem['id']))
         		$this->setId((string)$elem['name']);*/
     }
     if (isset($elem['readonly'])) {
         $this->setReadOnly((string) $elem['readonly']);
     }
     if (isset($elem['disabled'])) {
         $this->setDisabled((string) $elem['disabled']);
     }
     if (isset($elem['tabindex'])) {
         $this->setTabIndex((string) $elem['tabindex']);
     }
     if (isset($elem['defaul'])) {
         $this->setTabIndex(1);
     }
     $this->addToMemento(array("value", "name", "readonly", "disabled", "alt", "additional_id", "filter_error_string", "name_w_braces", "tabindex"));
     parent::parseParams($elem);
 }