Created
February 13, 2012 21:28
-
-
Save avdg/1820635 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Example code | |
abstract class PPI_Array_Rename { | |
/* | |
spl array binder methods which uses the translator method | |
*/ | |
/* @returns string */ | |
protected abstract function translator($name); | |
} | |
abstract class PPI_Array_Rename_Function extends PPI_Array_Rename { | |
protected $_function = null; | |
protected $_array = null; | |
public function __construct($function, $array /* could be optional */) { | |
$this->_function = $function; | |
$this->_array = $array; | |
} | |
protected function translator($name) { | |
return $this->function($name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment