src/Library/HttpFundamental/Cookie.php
public function addInCookie($variable_name, $variable_value, $cookie_name = null)
    {
        if (!empty($cookie_name)) {
            $this->setName($cookie_name);
        }
        if (!empty($variable_value)) {
            $this->setValue($variable_value);
        }
        return $this
            ->setName($this->getName().'['.$variable_name.']')
            ->send();
    }
public function addInCookie($variable_name, $variable_value, $cookie_name = null)
    {
        if (!empty($cookie_name)) {
            $this->setName($cookie_name);
        }
        if (!empty($variable_value)) {
            $this->setValue($variable_value);
        }
        return $this
            ->setName($this->getName().'['.$variable_name.']')
            ->send();
    }
public function addInCookie ( $ variable_name , $ variable_value , $ cookie_name = null ) { if ( ! empty ( $ cookie_name ) ) { $ this -> setName ( $ cookie_name ) ; } if ( ! empty ( $ variable_value ) ) { $ this -> setValue ( $ variable_value ) ; } return $ this -> setName ( $ this -> getName ( ) . '[' . $ variable_name . ']' ) -> send ( ) ; }
Add a variable value in a cookie

@param string $variable_name
@param string $variable_value
@param string $cookie_name
@return bool
Add a variable value in a cookie