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

[eluser]Yorick Peterse[/eluser]
Code:
<?php
class Some_controller extends Controller
{
private $data;

function __construct()
{
$this->$data['categories'] = $this->MCategory->getAllCategories();
}

function index()
{
// do something with $this->data;
}
}
?>


Messages In This Thread
Variable Scope - Class Wide Variable - by El Forum - 10-03-2009, 07:58 AM
Variable Scope - Class Wide Variable - by El Forum - 10-03-2009, 09:25 AM
Variable Scope - Class Wide Variable - by El Forum - 10-03-2009, 10:38 AM
Variable Scope - Class Wide Variable - by El Forum - 10-03-2009, 12:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB