Beispiel #1
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (extension_loaded($this->getOption('extension'))) {
         $this->_impl = new Binary\Extension($options);
     } else {
         $this->_impl = new Binary\Native($options);
     }
 }
Beispiel #2
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->_reader = new Protobuf\Codec\Binary\NativeReader();
 }