Platformsh\Cli\Local\LocalApplication::getName PHP Method

getName() public method

public getName ( ) : string | null
return string | null
    public function getName()
    {
        $config = $this->getConfig();
        return !empty($config['name']) ? $config['name'] : null;
    }

Usage Example

 public function testGetAppConfigNested()
 {
     $fakeAppRoot = 'tests/data/repositories/multiple/nest/nested';
     $app = new LocalApplication($fakeAppRoot);
     $config = $app->getConfig();
     $this->assertEquals(['name' => 'nested1'], $config);
     $this->assertEquals('nested1', $app->getName());
     $this->assertEquals('nested1', $app->getId());
 }
All Usage Examples Of Platformsh\Cli\Local\LocalApplication::getName