Skip to content
Permalink
Browse files

Adding skeletons for mootools engine

  • Loading branch information...
markstory committed Mar 15, 2009
1 parent 4b69023 commit 6b0058308eb4d8b51f3339e3f7e37722594762c5
@@ -0,0 +1,113 @@
<?php
/**
* MooTools Engine Helper for JsHelper
*
* Provides MooTools specific Javascript for JsHelper.
* Assumes that you have the following MooTools packages
*
* - Remote, Remote.HTML, Remote.JSON
* - Fx, Fx.Tween, Fx.Morph
* - Selectors, DomReady,
* - Drag, Drag.Move
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright 2006-2008, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.views.helpers
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
App::import('Helper', 'Js');
class MootoolsEngineHelper extends JsBaseEngineHelper {
/**
* Option mappings for MooTools
*
* @var array
**/
var $_optionMap = array(
'request' => array(
'type' => 'dataType',
'complete' => 'onComplete',
'request' => 'onRequest',
'error' => 'onFailure'
)
);
/**
* Create javascript selector for a CSS rule
*
* @param string $selector The selector that is targeted
* @param boolean $multiple Whether or not the selector could target more than one element.
* @return object instance of $this. Allows chained methods.
**/
function get($selector, $multiple = false) {
}
/**
* Add an event to the script cache. Operates on the currently selected elements.
*
* ### Options
*
* - 'wrap' - Whether you want the callback wrapped in an anonymous function. (defaults true)
* - 'stop' - Whether you want the event to stopped. (defaults true)
*
* @param string $type Type of event to bind to the current dom id
* @param string $callback The Javascript function you wish to trigger or the function literal
* @param array $options Options for the event.
* @return string completed event handler
**/
function event($type, $callback, $options = array()) {
}
/**
* Create a domReady event. This is a special event in many libraries
*
* @param string $functionBody The code to run on domReady
* @return string completed domReady method
**/
function domReady($functionBody) {
}
/**
* Create an iteration over the current selection result.
*
* @param string $method The method you want to apply to the selection
* @param string $callback The function body you wish to apply during the iteration.
* @return string completed iteration
**/
function each($callback) {
}
/**
* Trigger an Effect.
*
* @param string $name The name of the effect to trigger.
* @param array $options Array of options for the effect.
* @return string completed string with effect.
* @see JsBaseEngineHelper::effect()
**/
function effect($name, $options = array()) {
}
/**
* Create an $.ajax() call.
*
* @param mixed $url
* @param array $options
* @return string The completed ajax call.
**/
function request($url, $options = array()) {
}
}
?>
@@ -0,0 +1,92 @@
<?php
/**
* JqueryEngineTestCase
*
*
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright 2006-2008, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2006-2008, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake.tests
* @subpackage cake.tests.cases.views.helpers
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
App::import('Helper', array('Html', 'Js', 'MootoolsEngine'));
class JqueryEngineHelperTestCase extends CakeTestCase {
/**
* startTest
*
* @return void
**/
function startTest() {
$this->Moo =& new MootoolsEngineHelper();
}
/**
* end test
*
* @return void
**/
function endTest() {
unset($this->Moo);
}
/**
* test selector method
*
* @return void
**/
function testSelector() {
}
/**
* test event binding
*
* @return void
**/
function testEvent() {
}
/**
* test dom ready event creation
*
* @return void
**/
function testDomReady() {
}
/**
* test Each method
*
* @return void
**/
function testEach() {
}
/**
* test Effect generation
*
* @return void
**/
function testEffect() {
}
/**
* Test Request Generation
*
* @return void
**/
function testRequest() {
}
}
?>

0 comments on commit 6b00583

Please sign in to comment.
You can’t perform that action at this time.