src/MVC/View/Libs/Views.php
public function with($data, $value = null)
    {
        if (is_string($data)) {
            $this->data = array_merge($this->data, [$data => $value]);
        } elseif (is_array($data)) {
            $this->data = array_merge($this->data, $data);
        }

        return $this;
    }
public function with($data, $value = null)
    {
        if (is_string($data)) {
            $this->data = array_merge($this->data, [$data => $value]);
        } elseif (is_array($data)) {
            $this->data = array_merge($this->data, $data);
        }

        return $this;
    }
public function with ( $ data , $ value = null ) { if ( is_string ( $ data ) ) { $ this -> data = array_merge ( $ this -> data , [ $ data => $ value ] ) ; } elseif ( is_array ( $ data ) ) { $ this -> data = array_merge ( $ this -> data , $ data ) ; } return $ this ; }
Add variables to the view.

@param array|string $data
@param string       $value

@return Vinala\Kernel\MVC\views
Add variables to the view .