get() публичный Метод

Returns a route parameter.
public get ( string $parameterName, mixed $defaultValue = null, boolean $deep = false ) : mixed
$parameterName string
$defaultValue mixed
$deep boolean
Результат mixed
 public function testDownloadNameOverrideWorks()
 {
     $content = $this->getCompleteContent();
     $routeReference = new RouteReference(ContentDownloadRouteReferenceListener::ROUTE_NAME, [ContentDownloadRouteReferenceListener::OPT_CONTENT => $content, ContentDownloadRouteReferenceListener::OPT_FIELD_IDENTIFIER => 'file', ContentDownloadRouteReferenceListener::OPT_DOWNLOAD_NAME => 'My-custom-filename.pdf']);
     $event = new RouteReferenceGenerationEvent($routeReference, new Request());
     $eventListener = $this->getListener();
     $eventListener->onRouteReferenceGeneration($event);
     self::assertEquals('My-custom-filename.pdf', $routeReference->get(ContentDownloadRouteReferenceListener::OPT_DOWNLOAD_NAME));
 }
 public function testRemoveParam()
 {
     $reference = new RouteReference('foo');
     $reference->set('foo', 'bar');
     $this->assertTrue($reference->has('foo'));
     $this->assertSame('bar', $reference->get('foo'));
     $reference->remove('foo');
     $this->assertFalse($reference->has('foo'));
 }
 public function testOnRouteReferenceGeneration()
 {
     $language = 'fre-FR';
     $routeReference = new RouteReference('foo', array('language' => $language));
     $event = new RouteReferenceGenerationEvent($routeReference, new Request());
     $expectedSiteAccess = 'phoenix_rises';
     $this->translationHelper->expects($this->once())->method('getTranslationSiteAccess')->with($language)->will($this->returnValue($expectedSiteAccess));
     $listener = new LanguageSwitchListener($this->translationHelper);
     $listener->onRouteReferenceGeneration($event);
     $this->assertFalse($routeReference->has('language'));
     $this->assertTrue($routeReference->has('siteaccess'));
     $this->assertSame($expectedSiteAccess, $routeReference->get('siteaccess'));
 }