本文整理汇总了PHP中Style::parse方法的典型用法代码示例。如果您正苦于以下问题:PHP Style::parse方法的具体用法?PHP Style::parse怎么用?PHP Style::parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style::parse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: startElement
function startElement($parser, $tagName, $attrs)
{
$this->tag = $tagName;
switch ($tagName) {
case "HOPS":
$hops = new Hops();
$hops->parse($parser, $this);
$this->hops = $hops;
break;
case "FERMENTABLES":
$fermentables = new Fermentables();
$fermentables->parse($parser, $this);
$this->fermentables = $fermentables;
break;
case "YEASTS":
$yeasts = new Yeasts();
$yeasts->parse($parser, $this);
$this->yeasts = $yeasts;
break;
case "STYLE":
$style = new Style();
$style->parse($parser, $this);
$this->style = $style;
break;
case "MASH":
$mash = new Mash();
$mash->parse($parser, $this);
$this->mash = $mash;
break;
case "WATER":
// beerXML SPEC DOES NOT INCLUDE A WATERS TAG, ONLY WATER...BEERSMITH IS IMPLEMENTING INCORRECTLY
$water = new Waters();
$water->parse($parser, $this);
$this->water = $water;
break;
case "MISCS":
$miscs = new Miscs();
$miscs->parse($parser, $this);
$this->miscs = $miscs;
break;
case "EQUIPMENT":
// SKIPPING EQUIPMENTS OBJECT AS BEERSMITH DOES NOT IMPLEMENT CORRECTLY
$equipment = new Equipment();
$equipment->parse($parser, $this);
$this->equipments = $equipment;
break;
default:
break;
}
}