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

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

class BackEndMapping extends ResourceMapping
{

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

	const ADMINPOSTLISTRESOURCE = BackEndResourcePeer::CLASSKEY_ADMINPOSTLISTRESOURCE;
	const ADMINPAGELISTRESOURCE = BackEndResourcePeer::CLASSKEY_ADMINPAGELISTRESOURCE;
	const ADMINUSERLISTRESOURCE = BackEndResourcePeer::CLASSKEY_ADMINUSERLISTRESOURCE;

	private static $instance = null;

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

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

	public static function findByType($type)
	{
		$c = new Criteria();
		$c->add(BackEndResourcePeer::TYPE, $type);
		$resources = BackEndResourcePeer::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