ElggSession::has PHP Метод

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

Has the attribute been defined
С версии: 1.9
public has ( string $name ) : boolean
$name string Name of the attribute
Результат boolean
    public function has($name)
    {
        return $this->storage->has($name);
    }

Usage Example

 public function testMigrate()
 {
     $session = new ElggSession(new Elgg_Http_MockSessionStorage());
     $session->start();
     $session->set('foo', 5);
     $id = $session->getId();
     $this->assertTrue($session->migrate());
     $this->assertTrue($session->has('foo'));
     $this->assertNotEquals($id, $session->getId());
     $this->assertTrue($session->has('__elgg_session'));
 }