Skip to content

Instantly share code, notes, and snippets.

@avdg
Created February 13, 2012 21:28
Show Gist options
  • Save avdg/1820635 to your computer and use it in GitHub Desktop.
Save avdg/1820635 to your computer and use it in GitHub Desktop.
<?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