compared with
Current by Thomas Weidner
on Apr 15, 2009 11:39.

This line was removed.
This word was removed. This word was added.
This line was added.

Changes (29)

View Page History
{info:title=New Proposal Template}
This page has been created from a template that uses "zones." To proceed:
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}

# Edit the page
# Replace sample content within each zone-data tag with your own content
# Remove this notice
# Save the page
# When you are ready for community review, move this page to the [Ready for Review] section on the edit page.

{note:title=No placeholders allowed!}
Please do not create placeholders. Wait until you have sufficient content to replace all sample data in the proposal template before creating your proposal document.

{zone-template-instance:ZFPROP:Proposal Zone Template}


1.0 - 1 January 2008: 12 April 2009: Initial Draft.

* [Harry Houdini Wikipedia Entry|]
* [|]
* [Zend_Filter|]

Most requirements take the form of "foo will do ...." or "foo will not support ...", although different words and sentence structure might be used. Adding functionality to your proposal is requirements creep (bad), unless listed below. Discuss major changes with your team first, and then open a "feature improvement" issue against this component.

* This component *will* correctly reads a developers mind for intent and generate the right configuration file.
* The generated config file *will not* support XML, but will provide an extension point in the API.
* This component *will* use no more memory than twice the size of all data it contains.
* This component *will* include a factory method.
* This component *will not* allow subclassing. (i.e. when reviewed, we expect to see "final" keyword in code)
* This component *will* only generate data exports strictly complying with RFC 12345.
* This component *will* validate input data against formats supported by ZF component Foo.
* This component *will not* save any data using Zend_Cache or the filesystem. All transient data *will be* saved using Zend_Session.
* This component *will* pad a string to a given length
* This component *will* allow to pad/extend a string on both sides
* This component *will* allow to use any character to pad the string

* Zend_Exception Zend_Filter

The component is instantiated with a mind-link that ...
This component allows to pad/extend a string to a given length the same way as str_pad would be.

Describe some intermediate state of this component in terms of design notes, additional material added to this page, and / code. Note any significant dependencies here, such as, "Milestone #3 can not be completed until feature Foo has been added to ZF component XYZ." Milestones will be required for acceptance of future proposals. They are not hard, and many times you will only need to think of the first three below.
* Milestone 1: [design notes will be published here|]
* Milestone 2: Working prototype checked into the incubator supporting use cases #1, #2, ...
* Milestone 3: Working prototype checked into the incubator supporting use cases #3 and #4.
* Milestone 1: \[DONE\] Proposal finished
* Milestone 2: Proposal accepted
* Milestone 3: Working implementation
* Milestone 4: Unit tests exist, work, and are checked into SVN.
* Milestone 5: Initial documentation exists. Documentation

If a milestone is already done, begin the description with "\[DONE\]", like this:
* Milestone #: \[DONE\] Unit tests ...
* Milestone 6: Moved to core

* Zend_Magic_Exception Zend_Filter_StringPad
* Zend_Magic (factory class)
* Zend_Magic_MindProbe
* Zend_Magic_MindProbe_Intent
* Zend_Magic_Action
* Zend_Magic_CodeGen

Pad a string to 15 chars
$filter = new Zend_Filter_StringPad(15);
$filter->filter('My string');
// returns 'My string '
Pad a string to 15 chars, using another pad char
$filter = new Zend_Filter_StringPad(array('length' => 15, 'char' => '.'));
$filter->filter('My string');
// returns 'My string......'
Pad a string to 15 chars, using another pad char and another direction
$filter = new Zend_Filter_StringPad(array('length' => 15, 'char' => '.', 'type' => Zend_Filter_StringPad::LEFT));
$filter->filter('My string');
// returns '......My string'

... (see good use cases book)

class Zend_Magic_Exception extends Zend_Exception {}
class Zend_Filter_StringPad implements Zend_Filter_Interface {
* @param string|integer|array $options (Optional) Options to set
public function __construct($options = array())

class Zend_Magic {
* @param integer $length Length to pad to
* @return Zend_Filter_StringPad
public function setLength($length)
* @return integer
public function getLength()

* @param string $character Character to use for padding
* @return Zend_Filter_StringPad
public function setChar($character)

* @return string
public function getChar()

* @param string $type Type to use for padding
* @return Zend_Filter_StringPad
public function setType($type)

* @return string
public function getType()

* @param string @value Value to filter
public function filter($value)