To use associative arrays violates the principles of OOP?

Hello everyone,
I am an university student who needs to develop a web application for a project in software engineering.

Having to respect the principles of OOP, I asked myself some questions:
Using MVC should be no independence between the levels ... but in many video tutorials (youtube) known as the use of associative arrays.
Let me explain:
class ControllerX extends controller
function inserisciX()
$options['nome']= $_POST['nome'];

$id = $this->fornitore_model->aggi

class ModelX extends model
function aggiungi($options=array())
      $fornitore = array(  'p_iva_f'=>$options['p_iva_f'],'nome'=>$options['nome'],
             return $this->db->insert_id();
Now if I change in the controller:
$options[‘p_iva_f’] in $options[‘p_iva_fornitore’]
I have to change even in the Model!
The independence between the layers is lost in this way ???!!!

So,I decided to create a class ( in library):
class Fornitore
... attributes
Now step away from control to model an object of that class! In your opinion is as good solution for a more OO? Or you have other solutions?

Thanks in advance

Messages In This Thread
To use associative arrays violates the principles of OOP? - by El Forum - 04-26-2010, 10:29 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.