API Documentation

Form/Decorator/Callback.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Decorator
Classes
Zend_Form_Decorator_Callback

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Form_Decorator_Callback

Extends from
Zend_Form_Decorator_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Decorator
version
$Id: Callback.php 20096 2010-01-06 02:05:09Z bkarwin $
Properties
$_callback
Methods
setCallback
getCallback
render

Description

Zend_Form_Decorator_Callback

Execute an arbitrary callback to decorate an element. Callbacks should take three arguments, $content, $element, and $options:

function mycallback($content, $element, array $options) { }

and should return a string. ($options are whatever options were provided to the decorator.)

To specify a callback, pass a valid callback as the 'callback' option.

Callback results will be either appended, prepended, or replace the provided content. To replace the content, specify a placement of boolean false; defaults to append content.

Properties

$_callback

string|array $_callback = ''

Callback

Details

$_callback
string|array
visibility
protected
default
final
false
static
false

Methods

getCallback

getCallback( ) : null|string|array

Get registered callback

If not previously registered, checks to see if it exists in registered options.

Output
null|string|array
Details
visibility
public
final
false
static
false

render

render( string $content ) : string

Render

If no callback registered, returns callback. Otherwise, gets return value of callback and either appends, prepends, or replaces passed in content.

Arguments
$content
string
Output
string
Details
visibility
public
final
false
static
false

setCallback

setCallback( callback $callback ) : Zend_Form_Decorator_Callback

Set callback

Arguments
$callback
callback
Details
visibility
public
final
false
static
false
throws
Documentation was generated by DocBlox.