当前位置: 首页>>代码示例>>PHP>>正文


PHP Card::isBasicLand方法代码示例

本文整理汇总了PHP中Card::isBasicLand方法的典型用法代码示例。如果您正苦于以下问题:PHP Card::isBasicLand方法的具体用法?PHP Card::isBasicLand怎么用?PHP Card::isBasicLand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Card的用法示例。


在下文中一共展示了Card::isBasicLand方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCardRenderer

 public function getCardRenderer(Card $card)
 {
     global $config;
     $renderer = array();
     // Determine the correct CardRenderer.
     if (strpos($card->title, "/") !== FALSE) {
         $renderer[] = new SplitRenderer($this->setDB);
     } else {
         if (array_key_exists(strtolower($card->title), $this->titleToLevel)) {
             $renderer[] = new LevelRenderer($this->setDB);
         } else {
             if (array_key_exists(strtolower($card->title), $this->titleToTransform) && strpos($card->legal, "\n-----\n") !== FALSE) {
                 $renderer[] = new TransformRenderer($this->setDB, $this->artDB, "day");
                 $renderer[] = new TransformRenderer($this->setDB, $this->artDB, "night");
             } else {
                 if (strpos($card->legal, "\n-----\n") !== FALSE) {
                     $renderer[] = new EighthFlipRenderer($this->setDB);
                 } else {
                     if ($card->set == "VAN" && $config['render.vanguard']) {
                         $renderer[] = new VanguardRenderer($this->setDB);
                     } else {
                         if (strpos($card->title, "Jace, the Mind Sculptor") !== FALSE && $config['render.planeswalker']) {
                             $renderer[] = new PlanesWalker4Renderer($this->setDB);
                         } else {
                             if (strpos($card->englishType, "Planeswalker") !== FALSE && $config['render.planeswalker']) {
                                 $renderer[] = new PlanesWalkerRenderer($this->setDB);
                             } else {
                                 if (strpos($card->englishType, "Plane") !== FALSE && $config['render.plane']) {
                                     $renderer[] = new PlaneRenderer($this->setDB);
                                 } else {
                                     $isPre8th = $this->setDB->isPre8th($card->set) && !$card->promo;
                                     if ($isPre8th && !$config['render.preEighth.basic.land.frames'] && $card->isBasicLand()) {
                                         $isPre8th = false;
                                     }
                                     if ($config['render.preEighth'] && ($isPre8th || !$config['render.eighth'])) {
                                         $renderer[] = new PreEighthRenderer($this->setDB);
                                     } else {
                                         if ($config['render.eighth']) {
                                             $renderer[] = new EighthRenderer($this->setDB);
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     if (empty($renderer)) {
         error('No renderer enabled for card: ' . $card);
     }
     foreach ($renderer as $r) {
         $r->card = $card;
         $r->writer = $this;
         $r->outputDir = $config['output.directory'];
         $r->outputName = $this->cleanOutputName($card, $r);
     }
     return $renderer;
 }
开发者ID:kyuumeitai,项目名称:cardgen,代码行数:60,代码来源:ImageWriter.php

示例2: getCardRenderer

	public function getCardRenderer (Card $card) {
		global $config;
		
		// Determine the correct CardRenderer.
		if (strpos($card->title, "/") !== FALSE)
			$renderer = new SplitRenderer($this->setDB);
		else if(strpos($card->legal, "\n-----\n") !== FALSE)
			$renderer = new EighthFlipRenderer($this->setDB);
		else if ($card->set == "VG" && $config['render.vanguard'])
			$renderer = new VanguardRenderer($this->setDB);
		else if (strpos($card->englishType, "Planeswalker")!== FALSE && $config['render.planeswalker'])
			$renderer = new PlanesWalkerRenderer($this->setDB);
		else if (strpos($card->englishType, "Plane")!== FALSE && $config['render.plane'])
			$renderer = new PlaneRenderer($this->setDB);
		else {
			$isPre8th = $this->setDB->isPre8th($card->set) && !$card->promo;
			if ($isPre8th && !$config['render.preEighth.basic.land.frames'] && $card->isBasicLand()) $isPre8th = false;
			if ($config['render.preEighth'] && ($isPre8th || !$config['render.eighth']))
				$renderer = new PreEighthRenderer($this->setDB);
			else if ($config['render.eighth']){
					$renderer = new EighthRenderer($this->setDB);
			}
		}
		if (!$renderer) error('No renderer enabled for card: ' . $card);

		$renderer->card = $card;
		$renderer->writer = $this;
		$renderer->outputDir = $config['output.directory'];

		$outputName = $card->title;
		if ($card->pic) $outputName .= ' (' . $card->pic . ')';
		$outputName .= $config['output.suffix'];

		// Filenames can't contain ".
		if (strpos($outputName, '"') !== FALSE) $outputName = str_replace('"', '',  $outputName);
		$renderer->outputName = $outputName;

		return $renderer;
	}
开发者ID:GarikRC,项目名称:arcane,代码行数:39,代码来源:ImageWriter.php


注:本文中的Card::isBasicLand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。