/** * Ethna_Handle constructor (stub for php4) * * @access public */ public function __construct($controller, $type, $name) { parent::__construct($controller, $type, $name); $id = $name; $id = preg_replace('/^([A-Z])/e', "strtolower('\$1')", $id); $id = preg_replace('/([A-Z])/e', "'-' . strtolower('\$1')", $id); $this->id = $id; }
/** * Ethna_Handle constructor (stub for php4) * * @access public */ public function __construct($controller, $type, $name) { parent::__construct($controller, $type, $name); $id = $name; $id = preg_replace_callback('/^([A-Z])/', function (array $matches) { return strtolower($matches[1]); }, $id); $id = preg_replace_callback('/([A-Z])/', function (array $matches) { return '-' . strtolower($matches[1]); }, $id); $this->id = $id; }