mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 20:42:42 +00:00
microptimize options and default merge and other string key array merges
This commit is contained in:
parent
8d47ef43e5
commit
0ece694a75
35 changed files with 121 additions and 133 deletions
|
@ -81,7 +81,7 @@ class PhpAcl extends Object implements AclInterface {
|
|||
*/
|
||||
public function initialize(Component $Component) {
|
||||
if (!empty($Component->settings['adapter'])) {
|
||||
$this->options = array_merge($this->options, $Component->settings['adapter']);
|
||||
$this->options = $Component->settings['adapter'] + $this->options;
|
||||
}
|
||||
|
||||
App::uses('PhpReader', 'Configure');
|
||||
|
@ -546,7 +546,7 @@ class PhpAro {
|
|||
* @return void
|
||||
*/
|
||||
public function addAlias(array $alias) {
|
||||
$this->aliases = array_merge($this->aliases, $alias);
|
||||
$this->aliases = $alias + $this->aliases;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -603,7 +603,7 @@ class RequestHandlerComponent extends Component {
|
|||
if (Configure::read('App.encoding') !== null) {
|
||||
$defaults['charset'] = Configure::read('App.encoding');
|
||||
}
|
||||
$options = array_merge($defaults, $options);
|
||||
$options += $defaults;
|
||||
|
||||
if ($type === 'ajax') {
|
||||
$controller->layout = $this->ajaxLayout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue