Symfony\Component\BrowserKit\Cookie::getPath PHP Метод

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

Gets the path of the cookie.
public getPath ( ) : string
Результат string The cookie path
    public function getPath()
    {
        return null !== $this->path ? $this->path : '/';
    }

Usage Example

Пример #1
0
 public function testGetPath()
 {
     $cookie = new Cookie('foo', 'bar', 0);
     $this->assertEquals('/', $cookie->getPath(), '->getPath() returns / is no path is defined');
     $cookie = new Cookie('foo', 'bar', 0, '/foo');
     $this->assertEquals('/foo', $cookie->getPath(), '->getPath() returns the cookie path');
 }