fkooman\RemoteStorage\Path::getModuleName PHP Method

getModuleName() public method

public getModuleName ( )
    public function getModuleName()
    {
        $moduleNamePosition = $this->getIsPublic() ? 3 : 2;
        if (count($this->pathParts) > $moduleNamePosition + 1) {
            return $this->pathParts[$moduleNamePosition];
        }
        return false;
    }

Usage Example

Esempio n. 1
0
 public function testPublicFolder()
 {
     $p = new Path('/admin/public/path/to/Folder/');
     $this->assertEquals('admin', $p->getUserId());
     $this->assertTrue($p->getIsPublic());
     $this->assertTrue($p->getIsFolder());
     $this->assertFalse($p->getIsDocument());
     $this->assertEquals('path', $p->getModuleName());
 }
All Usage Examples Of fkooman\RemoteStorage\Path::getModuleName