Neos\Flow\Core\ApplicationContext::getParent PHP Method

getParent() public method

Returns the parent context object, if any
public getParent ( ) : ApplicationContext
return ApplicationContext the parent context or NULL, if there is none
    public function getParent()
    {
        return $this->parentContext;
    }

Usage Example

コード例 #1
0
 /**
  * @test
  */
 public function parentContextIsConnectedRecursively()
 {
     $context = new ApplicationContext('Production/Foo/Bar');
     $parentContext = $context->getParent();
     $this->assertSame('Production/Foo', (string) $parentContext);
     $rootContext = $parentContext->getParent();
     $this->assertSame('Production', (string) $rootContext);
 }