Return a PlatformFactory.
public getPlatformFactory ( ) : |
||
Результат |
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()); }
/** * Constructor * * @param \Protobuf\Configuration $config */ public function __construct(Configuration $config) { $this->config = $config; $this->isBigEndian = BigEndian::isBigEndian(); $this->negativeEncoder = $config->getPlatformFactory()->getNegativeEncoder(); }