Location: PHPKode > projects > DIY Blog > diy-blog/classes/diy-blog/frontend/controller/FrontEndMapping.class.php
<?php

/**
 * Finds frontend Resources.
 * @package diy-blog.frontend.controller
 * @author	Martynas Jusevicius <hide@address.com>
 * @link	http://www.xml.lt
 */

class FrontEndMapping extends ResourceMapping
{

/**
 * URI of the host. Has to be properly set before running the website.
 */
	const HOST = "http://localhost/";

	const POSTLISTRESOURCE = FrontEndResourcePeer::CLASSKEY_POSTLISTRESOURCE;

	private static $instance = null;

	private function __construct() {}
	private function __clone() {}

	public static function findByURI($uri)
	{
		return FrontEndResourcePeer::retrieveByPK($uri);
	}

	public static function findByType($type)
	{
		$c = new Criteria();
		$c->add(FrontEndResourcePeer::TYPE, $type);
		$resources = FrontEndResourcePeer::doSelect($c);

		return $resources;
	}

	public static function getInstance()
	{
		if (self::$instance == null) self::$instance = new self();
		return self::$instance;
	}

	public static function getHost()
	{
		return self::HOST;
	}
}

?>
Return current item: DIY Blog