Zend Framework

Use a string as a replacement for class constant in the metacommand messages.

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Filter_Input
  • Labels:
    None
  • Fix Version Priority:
    Nice to Have

Description

Would it be possible to use a string which "match" the class constant instead of the class constant it self which need a require_one before we can use it.
The string can be evaluate later on with the function constant()

This is more readable than an integer key.

// Use this
$validators = array(
    'month'   => array('Int', array('Between', 1, 12), 'messages' => array ('Zend_Validate_Between::NOT_BETWEEN_STRICT' => 'doit ĂȘtre compris entre 1 et 12')  )    
); 

// instead of
$validators = array(
    'month'   => array('Int', array('Between', 1, 12), 'messages' => array (Zend_Validate_Between::NOT_BETWEEN_STRICT => 'doit ĂȘtre compris entre 1 et 12')  )    
);

Activity

Hide
Thomas Weidner added a comment -

Assigned to Bill

Show
Thomas Weidner added a comment - Assigned to Bill
Hide
Bill Karwin added a comment -

Changing to 'Unassigned'

Show
Bill Karwin added a comment - Changing to 'Unassigned'
Hide
Wil Sinclair added a comment -

This issue should have been fixed for the 1.5 release.

Show
Wil Sinclair added a comment - This issue should have been fixed for the 1.5 release.
Hide
Wil Sinclair added a comment -

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Show
Wil Sinclair added a comment - This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Hide
Wil Sinclair added a comment -

Please evaluate and categorize/assign as necessary.

Show
Wil Sinclair added a comment - Please evaluate and categorize/assign as necessary.
Hide
Michael Mazza added a comment -

What is the ETA for resolution on this issue?

Show
Michael Mazza added a comment - What is the ETA for resolution on this issue?
Hide
Wil Sinclair added a comment -

Ralph, can you please review this issue and recommend a course of action?

Show
Wil Sinclair added a comment - Ralph, can you please review this issue and recommend a course of action?
Hide
Thomas Weidner added a comment -

Any why not using an autoloader ?
I see no benefit by integrating this request.

It would, on the other side, add additional problems like a exception when there is a wrong written constant/classname at validation time.

Show
Thomas Weidner added a comment - Any why not using an autoloader ? I see no benefit by integrating this request. It would, on the other side, add additional problems like a exception when there is a wrong written constant/classname at validation time.
Hide
Till Klampaeckel added a comment -

+1 to what Thomas said.

Show
Till Klampaeckel added a comment - +1 to what Thomas said.
Hide
Thomas Weidner added a comment -

Closing as "Won't Fix".

After reviewing it again after a longer time and discussing it with other people my original intention has been confirmed.
The correct solution for the intended problem or request is using autoloaders.

Show
Thomas Weidner added a comment - Closing as "Won't Fix". After reviewing it again after a longer time and discussing it with other people my original intention has been confirmed. The correct solution for the intended problem or request is using autoloaders.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
2h
Original Estimate - 2 hours
Remaining:
2h
Remaining Estimate - 2 hours
Logged:
Not Specified
Time Spent - Not Specified