Dutch PHP Conference 2027

Yaf_Session::start

(Yaf >=1.0.0)

Yaf_Session::startStart the session

Açıklama

public function Yaf_Session::start(): Yaf_Session

Starts the session if it has not been started yet. This calls PHP's native session start mechanism. Calling this method multiple times is safe.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Returns the Yaf_Session instance.

Örnekler

Örnek 1 Yaf_Session::start() example

<?php
// typically done once per request, e.g. in a bootstrap
$session = Yaf_Session::getInstance();
$session->start();

$session->set("user_id", 42);
echo $session->get("user_id");
?>

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top