Welcome Guest, Not a member yet? Register   Sign In
Confused by senior developer by talk of objects in a view
#1

[eluser]sico87[/eluser]
Hi There,

I have started a new project at work today and my senior developer has asked me to look into changing the way I work and implementing objects into my views to I can do checks within my view using the object.

To me this seems wrong, as surely this is the work of the Model and/or controller? Or am I wrong? I assume he is wanting me to implement something like this?

Code:
<?php if($user->can()) : ?>
Hello You can do this
<? endif; ?>

$user would be the object.

Is this possible? Is it the right way to do things? How would I do this?


Messages In This Thread
Confused by senior developer by talk of objects in a view - by El Forum - 08-10-2010, 06:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB