Ben ad kullanmaya çalışıyorum. Ben farklı bir ad içinde bir sınıfını genişletmek istiyorum. Sınıfın adı aynıdır. Örnek:
Veli:
namespace Base;
class Section extends Skeleton {
protected $id;
protected $title;
protected $stylesheet;
}
Çocuk:
namespace Base2;
use \Base\Section;
class Section
extends \Base\Section {
}
Bu Doktrini 2 ve Zend Framework kullanan bir uygulamadır. Taban / Bölüm tarafından kullanılan Skeleton sınıfı sihirli yöntemleri (__get, _set, vb) içeren sadece soyut bir sınıftır.
Ben bir \ temel2 \ Section sınıf örneğini çalıştığınızda bir hata atar:
Fatal error: Cannot declare class Base2\Section because the name is
already in use in /var/www/test/application/Models/Base2/Section.php
on line 7
Herhangi bir fikrin?