src/Control/Session.php
public function clear($name)
    {
        // Get var by path
        $var = $this->nestedValue($name, $this->data);

        // Unset var
        if ($var !== null) {
            // Unset parent key
            $parentParts = explode('.', $name);
            $basePart = array_pop($parentParts);
            if ($parentParts) {
                $parent = &$this->nestedValueRef(implode('.', $parentParts), $this->data);
                unset($parent[$basePart]);
            } else {
                unset($this->data[$name]);
            }
            $this->markChanged($name);
        }
        return $this;
    }
public function clear($name)
    {
        // Get var by path
        $var = $this->nestedValue($name, $this->data);

        // Unset var
        if ($var !== null) {
            // Unset parent key
            $parentParts = explode('.', $name);
            $basePart = array_pop($parentParts);
            if ($parentParts) {
                $parent = &$this->nestedValueRef(implode('.', $parentParts), $this->data);
                unset($parent[$basePart]);
            } else {
                unset($this->data[$name]);
            }
            $this->markChanged($name);
        }
        return $this;
    }
public function clear ( $ name ) { // Get var by path $ var = $ this -> nestedValue ( $ name , $ this -> data ) ; // Unset var if ( $ var !== null ) { // Unset parent key $ parentParts = explode ( '.' , $ name ) ; $ basePart = array_pop ( $ parentParts ) ; if ( $ parentParts ) { $ parent = & $ this -> nestedValueRef ( implode ( '.' , $ parentParts ) , $ this -> data ) ; unset ( $ parent [ $ basePart ] ) ; } else { unset ( $ this -> data [ $ name ] ) ; } $ this -> markChanged ( $ name ) ; } return $ this ; }
Clear session value

@param string $name
@return $this
Clear session value