Exemplo n.º 1
0
	private function GetEntries()
	{
		require_once "Records/card.php";
		require_once "Records/entry.php";
		$s = Card::GetAllCardsQuery()
			->join(array("e" => Entry::$TABLE), "e.card = ca.id", array())
			->where("e.cube = ?", $this->id);
		$r = DB::zdb()->fetchAll($s);
		$this->cards = array();
		foreach ( $r as $rr )
			$this->cards[] = new Card($rr);
	}
Exemplo n.º 2
0
	public function __construct($card)
	{
		if ( !is_array($card) )
		{
			$s = Card::GetAllCardsQuery()
				->where("ca.id = ?", $card);
			$card = DB::zdb()->fetchRow($s);
		}
		
		$this->data = $card;

		$this->id = $card["id"];
		$this->name = $card["name"];
		$this->cardFrame = $card["frame_url"];
		$this->text = $card["text"];
		
		unset($this->data["id"]);
	}