本文整理匯總了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;
}
}