示例#1
0
 private function readFrames()
 {
     $frames = new ArrayCollection();
     $resolver = new Resolver();
     while (false) {
         $identifier = $this->getBinaryReader()->readString(4);
         if (empty($identifier)) {
             break;
         }
         $frame = $resolver->resolve($identifier);
         $frame->setSize($this->getBinaryReader()->readUInt8WithDiscardedMsb(4));
         $frame->setFlags($this->getBinaryReader()->readUInt16());
     }
 }
示例#2
0
 /**
  * @dataProvider resolveProvider
  */
 public function testResolve($identifer, $className)
 {
     $frame = $this->resolver->resolve($identifer);
     $this->assertInstanceOf($className, $frame);
 }