Skip to content

Commit

Permalink
added Zen Garden Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Aug 4, 2018
1 parent 936a29d commit 59353b9
Show file tree
Hide file tree
Showing 215 changed files with 3,738 additions and 0 deletions.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require-dev": {
"phpunit/phpunit": "7"
}
}
Binary file added images/benefits_top.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/bullet2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/archives.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/favicon.ico
Binary file not shown.
Binary file added images/business/footer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/heading01.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/heading02.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/heading03.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/heading04.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/heading05.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/business/resources.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/PoorRichard.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/benefits-h3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/explanation-h3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/favicon.ico
Binary file not shown.
Binary file added images/cnote/larchives-h3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/logo-on-sunburst.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/lresources-h3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/lselect-h3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/masthead.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/participation-h3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/preamble-h3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/preamble-p1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/quickSummary.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/requirements-h3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cnote/serial.gif
Binary file added images/cnote/sidebody.gif
Binary file added images/cnote/watermark.png
Binary file added images/container_bg.gif
Binary file added images/contempo/favicon.ico
Binary file not shown.
Binary file added images/contempo/z-background2.gif
Binary file added images/contempo/z-cl.gif
Binary file added images/contempo/z-cr.gif
Binary file added images/contempo/z-d.gif
Binary file added images/contempo/z-e.gif
Binary file added images/contempo/z-h1.gif
Binary file added images/contempo/z-h2.gif
Binary file added images/contempo/z-h3.gif
Binary file added images/contempo/z-h4.gif
Binary file added images/contempo/z-header2.gif
Binary file added images/contempo/z-leaf2.gif
Binary file added images/contempo/z-leaf3.gif
Binary file added images/contempo/z-s3.gif
Binary file added images/contempo/z-s4.gif
Binary file added images/contempo/z-s5.gif
Binary file added images/contempo/zbg.gif
Binary file added images/cssco/bg_body.gif
Binary file added images/cssco/bg_container.gif
Binary file added images/cssco/bg_footer.gif
Binary file added images/cssco/bg_intro.jpg
Binary file added images/cssco/bg_linkList.gif
Binary file added images/cssco/bg_lresources.gif
Binary file added images/cssco/bg_lselect.gif
Binary file added images/cssco/bg_preamble.jpg
Binary file added images/cssco/cont_img_01.jpg
Binary file added images/cssco/cont_img_02.jpg
Binary file added images/cssco/favicon.ico
Binary file not shown.
Binary file added images/cssco/h1_larchives.gif
Binary file added images/cssco/h1_lresources.gif
Binary file added images/cssco/h1_lselect.gif
Binary file added images/cssco/hl_benefits.gif
Binary file added images/cssco/hl_participation.gif
Binary file added images/cssco/hl_requirements.gif
Binary file added images/cssco/hl_roadto.gif
Binary file added images/cssco/hl_sowhat.gif
Binary file added images/cubegarden/archives_tit.gif
Binary file added images/cubegarden/arrow.gif
Binary file added images/cubegarden/body_bg.gif
Binary file added images/cubegarden/favicon.ico
Binary file not shown.
Binary file added images/cubegarden/header_bg.gif
Binary file added images/cubegarden/leaf.gif
Binary file added images/cubegarden/leftside_bg.gif
Binary file added images/cubegarden/list_bg.gif
Binary file added images/cubegarden/logo.gif
Binary file added images/cubegarden/rightside_top.gif
Binary file added images/cubegarden/select_tit.gif
Binary file added images/cubegarden/tit_01.gif
Binary file added images/cubegarden/tit_02.gif
Binary file added images/cubegarden/tit_03.gif
Binary file added images/cubegarden/tit_04.gif
Binary file added images/cubegarden/tit_05.gif
Binary file added images/explanation_top.gif
Binary file added images/extradiv1_bg.gif
Binary file added images/favicon.ico
Binary file not shown.
Binary file added images/footer_top.gif
Binary file added images/larchives_top.gif
Binary file added images/lresources_top.gif
Binary file added images/lselect_top.gif
Binary file added images/main_title.gif
Binary file added images/movies/bas.png
Binary file added images/movies/cote.png
Binary file added images/movies/ecran.gif
Binary file added images/movies/favicon.ico
Binary file not shown.
Binary file added images/movies/haut1.png
Binary file added images/movies/haut2.png
Binary file added images/movies/sous-titre.png
Binary file added images/movies/sponsorts.png
Binary file added images/movies/titre.png
Binary file added images/ninja/about.gif
Binary file added images/ninja/ben.gif
Binary file added images/ninja/body.gif
Binary file added images/ninja/favicon.ico
Binary file not shown.
Binary file added images/ninja/ferlauf.png
Binary file added images/ninja/footer.gif
Binary file added images/ninja/h3about.gif
Binary file added images/ninja/h3arc.gif
Binary file added images/ninja/h3ben.gif
Binary file added images/ninja/h3part.gif
Binary file added images/ninja/h3req.gif
Binary file added images/ninja/h3res.gif
Binary file added images/ninja/h3road.gif
Binary file added images/ninja/h3sel.gif
Binary file added images/ninja/header.jpg
Binary file added images/ninja/herLegs.gif
Binary file added images/ninja/lamp.gif
Binary file added images/ninja/ninjapac.gif
Binary file added images/ninja/part.gif
Binary file added images/ninja/req.gif
Binary file added images/ninja/road.gif
Binary file added images/ninja/shuriken.gif
Binary file added images/nouveau/arrow.gif
Binary file added images/nouveau/bg.gif
Binary file added images/nouveau/bullet.gif
Binary file added images/nouveau/favicon.ico
Binary file not shown.
Binary file added images/nouveau/h3-archives.gif
Binary file added images/nouveau/h3-benefits.gif
Binary file added images/nouveau/h3-download.gif
Binary file added images/nouveau/h3-participation.gif
Binary file added images/nouveau/h3-requirements.gif
Binary file added images/nouveau/h3-resources.gif
Binary file added images/nouveau/h3-select.gif
Binary file added images/nouveau/h3-sowhat.gif
Binary file added images/nouveau/h3-theroad.gif
Binary file added images/nouveau/list-bg.jpg
Binary file added images/nouveau/main.jpg
Binary file added images/nouveau/top.jpg
Binary file added images/ordered/bg.gif
Binary file added images/ordered/bg_container.gif
Binary file added images/ordered/bullet_normal.gif
Binary file added images/ordered/bullet_styles.gif
Binary file added images/ordered/button_html.gif
Binary file added images/ordered/favicon.ico
Binary file not shown.
Binary file added images/ordered/link_list_h3.gif
Binary file added images/ordered/page_header.jpg
Binary file added images/ordered/quick_summary_p1.jpg
Binary file added images/ordered/title_benefits.gif
Binary file added images/ordered/title_participation.gif
Binary file added images/ordered/title_requirements.gif
Binary file added images/ordered/title_so_what.gif
Binary file added images/ordered/title_the_road.gif
Binary file added images/participation_top.gif
Binary file added images/preamble_top.gif
Binary file added images/proud/bg.jpg
Binary file added images/proud/bg_container.gif
Binary file added images/proud/bg_req.gif
Binary file added images/proud/favicon.ico
Binary file not shown.
Binary file added images/proud/h_archives.gif
Binary file added images/proud/h_get-started.gif
Binary file added images/proud/h_merit-benefits.gif
Binary file added images/proud/h_other-scouts.gif
Binary file added images/proud/h_participation.gif
Binary file added images/proud/h_path-to-achieve.gif
Binary file added images/proud/h_requirements.gif
Binary file added images/proud/h_resources.gif
Binary file added images/proud/h_what-is-about.gif
Binary file added images/proud/leader.gif
Binary file added images/proud/make-em-proud.jpg
Binary file added images/proud/merit-badges.gif
Binary file added images/proud/zen-troop-seal.gif
Binary file added images/quickSummary_button.gif
Binary file added images/quickSummary_main.gif
Binary file added images/requirements_top.gif
Binary file added images/teatime/bg.gif
Binary file added images/teatime/favicon.ico
Binary file not shown.
Binary file added images/teatime/h1.gif
Binary file added images/teatime/h2.gif
Binary file added images/teatime/h3_a.gif
Binary file added images/teatime/h3_archives.gif
Binary file added images/teatime/h3_b.gif
Binary file added images/teatime/h3_c.gif
Binary file added images/teatime/h3_d.gif
Binary file added images/teatime/h3_resources.gif
Binary file added images/teatime/h3_select.gif
Binary file added images/teatime/h3_the_road.gif
Binary file added images/teatime/leave_piece_1.gif
Binary file added images/teatime/leaves_neu.gif
Binary file added images/teatime/pattern.gif
Binary file added images/teatime/teacup.jpg
39 changes: 39 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* PureMVC PHP Basic Demo
* PureMVC Port to PHP originally translated by Asbjørn Sloth Tønnesen
*
* @author Omar Gonzalez :: omar@almerblank.com
* @author Hasan Otuome :: hasan@almerblank.com
*
* Created on Sep 24, 2008
* PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
* Your reuse is governed by the Creative Commons Attribution 3.0 Unported License
*/

use puremvc\php\multicore\demos\basic;

require __DIR__ . '/puremvc_autoloader.php';

// name of file user browsed to
$filename = $_SERVER[ 'PHP_SELF' ];

// css file name from css zen garden styles click
if (isset( $_GET['c'] ))
{
$cssName = $_GET['c'];
}
else
{
$cssName = 'default';
}

function html_debug( $stack )
{
print( $stack . '<br/>' );
}

// start php application
$basicDemo = new basic\BasicDemo();
// start up the view by sending in the variables.
$basicDemo->startView( $filename, $cssName );
65 changes: 65 additions & 0 deletions puremvc_autoloader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php
/**
* PureMVC PHP Class Autoloader
* @author Omar Gonzalez :: omar@almerblank.com
* @author Hasan Otuome :: hasan@almerblank.com
*
* Class auto-loader for use with the PureMVC Port for PHP.
*
* While it's usage is completely optional, usage will reduce
* the amount of require(), require_once(), include() and include_once()
* statements you would need to write.
*
* It also provides the benefit of allowing you to centralize the location of
* your PureMVC framework to just one location.
*
* USAGE:
* 1) Change the paths listed in the $_includePaths array to match your PureMVC PHP install paths.
* 2) Add a require_once() statement to your index or bootstrap PHP file.
* ie., require_once 'path/to/puremvc_autoloader.php';
*/

/**
* Defines a constant that indicates that the base directory ("root") for lookups should be
* the directory in which this file is located in.
*/
//define( 'PMVC_BASE_DIR', __DIR__ );

/**
* Checks all paths defined in $_includePaths for
* the existence of $class and loads $class if found.
*
* @param string $class The class to search for.
*/


/**
* @see http://www.php-fig.org/psr/psr-4/examples/
*/
spl_autoload_register(function ($class) {
// project-specific namespace prefix
$prefix = 'puremvc\php\multicore\\';

// base directory for the namespace prefix
$base_dir = __DIR__ . '/src/org/puremvc/php/multicore/';

// does the class use the namespace prefix?
$len = strlen($prefix);

if (0 !== strncmp($prefix, $class, $len)) {
return;
}

// get the relative class name
$relativeClass = substr($class, $len);

// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = $base_dir . str_replace('\\', '/', $relativeClass) . '.php';

// if the file exists, require it
if (file_exists($file)) {
require $file;
}
});
77 changes: 77 additions & 0 deletions src/org/puremvc/php/multicore/demos/basic/ApplicationFacade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php
namespace puremvc\php\multicore\demos\basic;
use puremvc\php\multicore\interfaces\IFacade;
use puremvc\php\multicore\patterns\facade\Facade;
use puremvc\php\multicore\demos\basic\controller\commands\StartApplicationCommand;

/**
* PureMVC PHP Basic Demo
* @author Omar Gonzalez :: omar@almerblank.com
* @author Hasan Otuome :: hasan@almerblank.com
*
* Created on Sep 24, 2008
* PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
* Your reuse is governed by the Creative Commons Attribution 3.0 Unported License
*/
//require_once 'org/puremvc/php/patterns/facade/Facade.php';

// demo requires
//require_once 'org/puremvc/php/demos/basic/controller/commands/StartApplicationCommand.php';

/**
* ApplicationFacade for the BasicDemo starts the Model, View
* Controller for the application.
*/
class ApplicationFacade extends Facade
{
/**
* Notification constant that starts the application.
*/
const START_APPLICATION = 'startApplication';
/**
* Notification constant sent when view data is ready to be displayed.
*/
const VIEW_DATA_READY = 'viewDataReady';

/**
* <b>Facade</b> Multiton Factory method
*
* This <b>IFacade</b> implementation is a Multiton,
* so you MUST not call the constructor
* directly, but instead call this static Factory method,
* passing the unique key for this instance
*
* @param string $key Unique key for this instance.
* @return IFacade Instance for this key
*/
public static function getInstance( $key )
{
if (!isset( self::$instanceMap[ $key ] ) )
{
self::$instanceMap[ $key ] = new ApplicationFacade( $key );
}
return self::$instanceMap[ $key ];
}

/**
* Starts the application by sending a START_APPLICATION notification.
* The filename (/index.php) is sent along to demonstrate passing
* data along.
* @param mixed $filename
* @param mixed $cssName
*/
public function startUp($filename, $cssName)
{
$this->sendNotification(self::START_APPLICATION, $filename, $cssName);
}

/**
* Initializes the controller and gives you an opportunity to register application
* specific commands that extend SimpleCommand or MacroCommand with the PureMVC framework.
*/
protected function initializeController()
{
parent::initializeController();
$this->registerCommand(self::START_APPLICATION, StartApplicationCommand::class);
}
}
35 changes: 35 additions & 0 deletions src/org/puremvc/php/multicore/demos/basic/BasicDemo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
namespace puremvc\php\multicore\demos\basic;
use puremvc\php\multicore\demos\basic\ApplicationFacade;
/**
* PureMVC PHP Basic Demo
* PureMVC Port to PHP originally translated by Asbjørn Sloth Tønnesen
*
* @author Omar Gonzalez :: omar@almerblank.com
* @author Hasan Otuome :: hasan@almerblank.com
*
* Created on Sep 24, 2008
* PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
* Your reuse is governed by the Creative Commons Attribution 3.0 Unported License
*/

/**
* PureMVC PHP Basic demo base class. The index starts an
* instance of the BasicDemo object to start the application
* view calling the <code>startView()</code> method.
*/
class BasicDemo
{

/**
* Starts the PureMVC framework passing in variables
* from the index.php
* @param mixed $filename
* @param mixed $cssName
*/
public function startView($filename, $cssName)
{
$facade = ApplicationFacade::getInstance( 'BasicDemo');
$facade->startUp($filename, $cssName);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
namespace puremvc\php\multicore\demos\basic\controller\commands;
use puremvc\php\multicore\patterns\command\MacroCommand;
use puremvc\php\multicore\patterns\facade\Facade;


/**
* PureMVC PHP Basic Demo
* @author Omar Gonzalez :: omar@almerblank.com
* @author Hasan Otuome :: hasan@almerblank.com
*
* Created on Sep 24, 2008
* PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
* Your reuse is governed by the Creative Commons Attribution 3.0 Unported License
*/

/**
* The <code>StartApplicationCommand</code> prepares the view first
* so that it is ready to display data when the model is done loading.
*/
class StartApplicationCommand extends MacroCommand
{
protected $facade;

public function __construct()
{
parent::__construct();
$this->facade = Facade::getInstance('StartViewCommand');

}
/**
* The <code>initializeMacroCommand</code> is overridden to
* add references to instances of SimpleCommand that should
* be executed.
*/
protected function initializeMacroCommand()
{
$this->addSubCommand(StartViewCommand::class);
$this->addSubCommand(StartModelCommand::class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
namespace puremvc\php\multicore\demos\basic\controller\commands;
use puremvc\php\multicore\demos\basic\model\proxy\ApplicationDataProxy;
use puremvc\php\multicore\interfaces\INotification;
use puremvc\php\multicore\patterns\command\SimpleCommand;
use puremvc\php\multicore\patterns\facade\Facade;

/**
* PureMVC PHP Basic Demo
* @author Omar Gonzalez :: omar@almerblank.com
* @author Hasan Otuome :: hasan@almerblank.com
*
* Created on Sep 24, 2008
* PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
* Your reuse is governed by the Creative Commons Attribution 3.0 Unported License
*/

/**
* Starts the application model, for the basic demo
* this command loads the CSS file selected on the index.php page.
*/
class StartModelCommand extends SimpleCommand
{
protected $facade;

public function __construct()
{
$this->facade = Facade::getInstance('StartViewCommand');
}
/**
* Override execute to add logic. In the <code>StartModelCommand</code>
* the ApplicationDataProxy is started and registered, and then
* the selected CSS file is loaded.
* @param INotification $notification
*/
public function execute(INotification $notification)
{
$view = $notification->getBody();
$cssFileName = $notification->getType();

$applicationDataProxy = new ApplicationDataProxy();
$this->facade->registerProxy($applicationDataProxy);

$applicationDataProxy->loadCSS($cssFileName);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
namespace puremvc\php\multicore\demos\basic\controller\commands;
use puremvc\php\multicore\interfaces\INotification;
use puremvc\php\multicore\patterns\command\SimpleCommand;
use puremvc\php\multicore\patterns\facade\Facade;
use puremvc\php\multicore\demos\basic\view\ApplicationView;
use puremvc\php\multicore\demos\basic\view\ApplicationMediator;
/**
* PureMVC PHP Basic Demo
* @author Omar Gonzalez :: omar@almerblank.com
* @author Hasan Otuome :: hasan@almerblank.com
*
* Created on Sep 24, 2008
* PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
* Your reuse is governed by the Creative Commons Attribution 3.0 Unported License
*/

/**
* Starts the view class which initializes php/html templates.
*/
class StartViewCommand extends SimpleCommand
{
protected $facade;

public function __construct()
{
$this->facade = Facade::getInstance('StartViewCommand');
}
/**
* The <code>execute()</code> method is overridden in order
* to add your application logic for this specific command.
* @param INotification $notification
*/
public function execute(INotification $notification)
{
$view = $notification->getBody();
$this->facade->registerMediator(new ApplicationMediator(new ApplicationView($view)));
}
}
Loading

0 comments on commit 59353b9

Please sign in to comment.