Qoob Portfolio

The open qoob is a php mvc framework created to speed up the process of creating dynamic sites. This is the code running this website!

Qoob Portfolio

qoob/app/model/code_model.php


<?php
/**
 * code model
 *
 * @author 		andrew harrison <andrew@harrison.nu>
 * @copyright 	creative commons attribution-shareAlike 3.0 unported
 * @license 	http://creativecommons.org/licenses/by-sa/3.0/ 
 * @version 	0.1.0
 * @package		app
 * @subpackage	model
 */
namespace app\model;
class code_model extends portfolio_model {
	/**
	 * repos
	 * get all repos
	 *
	 * @return array
	 */
	public function repos() {
		return $this->query(
			"SELECT * FROM `code`;",
			array()
		);
	}
	/**
	 * get repo
	 * return repo meta
	 *
	 * @param string $repo
	 * @return array
	 */
	public function get_repo($repo) {
		return $this->query(
			"SELECT * FROM `code` WHERE `url` = ':repo' LIMIT 1;",
			array(
				'repo' => $repo
			)
		);
	}

}

Download

raw zip tar