cphalcon
cphalcon copied to clipboard
[2.0.0]Registry functionality missing from 1.3.4
Not supporting this very useful functionality from 1.3.4
$di->set('registry', function() {
return new Phalcon\Registry();
}, true);
//not working in 2.0.0
$this->registry->user = [];
$this->registry->user['id'] = 1;
//must doing this
$this->registry->user = ['id' => 1];
and if you collecting data from entire application you need to do this:
$data = [];
if($this->registry->offsetExists('data'){//by the way isset($this->registry->data) always return false in 2.0.0
$data = $this->registry->data;
}
$data['asd'] = 'asd';
$this->registry->data = $data;
//instead
$this->registry->data['asd'];
@eclipse88 I corrected only part of the problem. The rest of the fix is not possible, because Zephir not support links!
It works
if ( $this->registry->data) {
...
}
if (isset($this->registry->data)) {
...
}
@KorsaR-ZN Marshmallow ?
@KorsaR-ZN Marshmallow LOL :smile_cat:
@andresgutierrez Marshmallow = Transliterate Zephir to Russian and translate to English

@andresgutierrez, @sergeyklay :) Now this is a new name for Zephir :D
@andresgutierrez fixed in 2.0.1