when I was looking for some MVC framework, I got the website: http://www.phppatterns.com/docs/design/archive/model_view_controller_pattern
however, like the code listed there makes me confused about references. For example:
$dao=& new DataAccess ('localhost','user','pass','dbname');
$productModel=& new ProductModel($dao);
yapar her örnek, bu '&' ekler new operatörü önce, tam olarak ne anlama geliyor? örneğine referans? Aslında tüm '&' kaldırıldı örneklerini ve tüm kodu bu tür hala mükemmel çalışıyor önce.
Başka, kodlar gibi:
function ProductView (&$model) {
$this->model=& $model;
}
Ben gerçekten böyle revize edilebileceği düşünüyorum:
function ProductView (&$model) {
$this->model=$model;
}
Haklı mıyım? Bu ikisi arasındaki fark nedir? Aslında MVC kod örneği yukarıda listelenen gibi? Ben yaptığım gibi kod gözden eğer, kod hala çalışıyor.
Then, I got this post somewhere else: http://schlueters.de/blog/archives/125-Do-not-use-PHP-references.html
mantıklı mı? Bu konuda herhangi bir öneriniz yararlı olacaktır.