* @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 ) ); } }