Hi there,
I installed PHP 7 TZS (Thread safe / pthreads) and Phalcon 3.
I putted a Phalcon Model into a class extends "Threaded":
class ResponseObject extends \Threaded {
private $nestedObject;
public function __construct(\Model $myModel) {
$this->nestedObject = $myModel;
}
public function shout() {
echo "***** SHOUT **** (" .$this->nestedObject->getId(). ")\n";
}
}
When I call the "shout()" function above, and the script tries to get access to the "getId()" function of the Phalcon Model, I get the error below:
PHP Fatal error: Uncaught Error: Access to undeclared static property: Phalcon\Di::$_default in ***/ResponseObject.php:15
Stack trace:
#0 [internal function]: Phalcon\Di::getDefault()
#1 ***/ResponseObject.php(15): Phalcon\Mvc\Model->unserialize('a:30:{s:4:"iiid...')
#2 ***/Response.php(39): ***/ResponseObject->shout()
#3 [internal function]: ***\Response->run()
#4 {main}
thrown in ***/ResponseObject.php on line 15
I executed the function via PHP CLI
The only thing, that doesn't work, is that the Phalcon\Di has problems in the run() method of the Thread.
Phalcon Methods running fine, but when the code wants to get access to Di, this error appears:
Next Error: Access to undeclared static property: Phalcon\Di::$_default in /***/MyResponse.php:126
Stack trace:
#0 [internal function]: Phalcon\Di->__construct()
#1 [internal function]: Phalcon\Di\FactoryDefault->__construct()
Really strange. Anybody now a solution?