Zend Framework

Zend_Translate - Implements __call() magic method

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.3
  • Component/s: Zend_Translate
  • Labels:
    None

Description

I propose to implement the __call() magic method in Zend_Translate to reduce php code lines, class maintenance, to improve performance and to isolate the facace from the abstract component.
This can be translated in a smaller file and framework size, in less headache when the abstract class Zend_Translate_Adapter is modified, in less time spelt to parse php code and in the avoiding any repetition of code (enemy of any programmer).

public fucntion __call($method, array $arguments)
{
    return call_user_func_array(array($this->_adapter, $method), $arguments) ;
}

Everything under the line 115 can be removed.
133 lines of php code less.

Activity

Hide
Thomas Weidner added a comment -

I implemented the change with SVN 6547...

But I had to change your proposed code a little bit, because PHP didn't want to work with "fucntion".

Show
Thomas Weidner added a comment - I implemented the change with SVN 6547... But I had to change your proposed code a little bit, because PHP didn't want to work with "fucntion".

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: