Skip to content
Permalink
Browse files

Adding docs to explain buffering control.

  • Loading branch information...
markstory committed Mar 29, 2009
1 parent 8eeb00b commit 57ceba5c9c32ddedfeda27913fd97d16c40e68a8
Showing with 23 additions and 4 deletions.
  1. +23 −4 cake/libs/view/helpers/js.php
@@ -93,12 +93,24 @@ function __construct($settings = array()) {
parent::__construct();
}
/**
* call__
* call__ Allows for dispatching of methods to the Engine Helper.
* methods in the Engines bufferedMethods list will be automatically buffered.
* You can control buffering with the buffer param as well. By setting the last parameter to
* any engine method to a boolean you can force or disable buffering.
*
* e.g. ```$js->get('#foo')->effect('fadeIn', array('speed' => 'slow'), true);```
*
* Will force buffering for the effect method. If the method takes an options array you may also add
* a 'buffer' param to the options array and control buffering there as well.
*
* e.g. ```$js->get('#foo')->event('click', $functionContents, array('buffer' => true));
*
* The buffer parameter will not be passed onto the EngineHelper.
*
* @param string $method Method to be called
* @param array $params Parameters for the method being called.
* @access public
* @return void
* @return mixed
**/
function call__($method, $params) {
if (isset($this->{$this->__engineName}) && method_exists($this->{$this->__engineName}, $method)) {
@@ -246,8 +258,8 @@ function __object($name, $var) {
}
/**
* JsEngineBaseClass
*
* JsEngineBaseClass
*
* Abstract Base Class for All JsEngines to extend. Provides generic methods.
*
* @package cake.view.helpers
@@ -273,6 +285,13 @@ class JsBaseEngineHelper extends AppHelper {
* @var array
**/
var $_optionMap = array();
/**
* An array of Methods in the Engine that are buffered unless otherwise disabled. This allows specific 'end point'
* methods to be automatically buffered by the JsHelper.
*
* @var string
**/
var $bufferedMethods = array();
/**
* Constructor.
*

0 comments on commit 57ceba5

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