Welcome Guest, Not a member yet? Register   Sign In
Variable Scope
#2

The CI Loader handles the variables in the view:


PHP Code:
    /**
     * Set Variables
     *
     * Once variables are set they become available within
     * the controller class and its "view" files.
     *
     * @param    array|object|string    $vars
     *                    An associative array or object containing values
     *                    to be set, or a value's name if string
     * @param     string    $val    Value to set, only used if $vars is a string
     * @return    object
     */
    
public function vars($vars$val '')

    
/**
     * Clear Cached Variables
     *
     * Clears the cached variables.
     *
     * @return    CI_Loader
     */
    
public function clear_vars()

    
/**
     * Get Variable
     *
     * Check if a variable is set and retrieve it.
     *
     * @param    string    $key    Variable name
     * @return    mixed    The variable or NULL if not found
     */
    
public function get_var($key)

    
/**
     * Get Variables
     *
     * Retrieves all loaded variables.
     *
     * @return    array
     */
    
public function get_vars() 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Variable Scope - by paulkd - 04-30-2016, 02:06 AM
RE: Variable Scope - by InsiteFX - 04-30-2016, 03:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB