getPlatformFactory() public method

Return a PlatformFactory.
public getPlatformFactory ( ) : PlatformFactory
return Protobuf\Binary\Platform\PlatformFactory
 public function testGetAndSetPlatformFactory()
 {
     $mock = $this->getMock('Protobuf\\Binary\\Platform\\PlatformFactory');
     $factory = $this->configuration->getPlatformFactory();
     $this->assertInstanceOf('Protobuf\\Binary\\Platform\\PlatformFactory', $factory);
     $this->configuration->setPlatformFactory($mock);
     $this->assertSame($mock, $this->configuration->getPlatformFactory());
 }
Example #2
0
 /**
  * Constructor
  *
  * @param \Protobuf\Configuration $config
  */
 public function __construct(Configuration $config)
 {
     $this->config = $config;
     $this->isBigEndian = BigEndian::isBigEndian();
     $this->negativeEncoder = $config->getPlatformFactory()->getNegativeEncoder();
 }