org-puremvc-php-multicore
[ class tree: org-puremvc-php-multicore ] [ index: org-puremvc-php-multicore ] [ all elements ]

Source for file IModel.php

Documentation is available at IModel.php

  1. <?php
  2. /**
  3.  * PureMVC Multicore Port to PHP
  4.  *
  5.  * Partly based on PureMVC Port to PHP by:
  6.  * - Omar Gonzalez <omar@almerblank.com>
  7.  * - and Hasan Otuome <hasan@almerblank.com>
  8.  *
  9.  * Created on Jully 24, 2009
  10.  *
  11.  * @version 1.0
  12.  * @author Michel Chouinard <michel.chouinard@gmail.com>
  13.  * @copyright PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
  14.  * @license http://creativecommons.org/licenses/by/3.0/ Creative Commons Attribution 3.0 Unported License
  15.  * @package org.puremvc.php.multicore
  16.  *
  17.  */
  18. /**
  19.  *
  20.  */
  21.  
  22. require_once 'org/puremvc/php/multicore/interfaces/IProxy.php';
  23.  
  24. /**
  25.  * The interface definition for a PureMVC Model.
  26.  *
  27.  * In PureMVC, <b>IModel</b> implementors provide
  28.  * access to <b>IProxy</b> objects by named lookup.
  29.  *
  30.  * An <b>IModel</b> assumes these responsibilities:
  31.  *
  32.  * - Maintain a cache of <b>IProxy</b> instances.
  33.  * - Provide methods for registering, retrieving, and removing <b>IProxy</b> instances.
  34.  *
  35.  *
  36.  * @package org.puremvc.php.multicore
  37.  */
  38. interface IModel
  39. {
  40.     /**
  41.      * Register Proxy
  42.      *
  43.      * Register an <b>IProxy</b> with the <b>Model</b>.
  44.      *
  45.      * @param IProxy $proxy The <b>IProxy</b> to be registered with the <b>Model</b>.
  46.      * @return void 
  47.      */
  48.     public function registerProxyIProxy $proxy );
  49.  
  50.     /**
  51.      * Retreive Proxy
  52.      *
  53.      * Retrieve a previously registered <b>IProxy</b> from the <b>Model</b> by name.
  54.      *
  55.      * @param string $proxyName Name of the <b>IProxy</b> instance to be retrieved.
  56.      * @return IProxy The <b>IProxy</b> previously regisetered by <var>proxyName</var> with the <b>Model</b>.
  57.      */
  58.     public function retrieveProxy$proxyName );
  59.  
  60.     /**
  61.      * Remove Proxy
  62.      *
  63.      * Remove a previously registered <b>IProxy</b> instance from the <b>Model</b> by name.
  64.      *
  65.      * @param string $proxyName Name of the <b>IProxy</b> to remove from the <b>Model</b>.
  66.      * @return IProxy The <b>IProxy</b> that was removed from the <b>Model</b>.
  67.      */
  68.     public function removeProxy$proxyName );
  69.  
  70.     /**
  71.      * Has Proxy
  72.      *
  73.      * Check if a Proxy is registered for the given <var>proxyName</var>.
  74.      *
  75.      * @param string $proxyName Name of the <b>Proxy</b> to check for.
  76.      * @return bool Boolean: Whether a <b>Proxy</b> is currently registered with the given <var>proxyName</var>.
  77.      */
  78.     public function hasProxy$proxyName );
  79.  
  80. }

Documentation generated on Mon, 03 Aug 2009 04:57:56 +0000 by phpDocumentor 1.4.2