symfony의 propel : build-model 또는 doctrine : build-model (사용하는 ORM에 따라 다름) 및 Base의 상위 디렉토리에있는 BaseContent 매개 변수와 메소드를 Content 클래스에 추가하거나 무시합니다 수업. 이렇게하면 스키마를 변경할 때 개인별 맞춤법을 다시 작성할 필요가 없습니다.
추진 예 : 이
// lib/model/om/BaseContent.php
// Don't touch as it may be overwritten
abstract class BaseContent extends BaseObject implements Persistent {
...
public function getParameter()
{
return $this->parameter;
}
...
}
// lib/model/Content.php
// add or override here
class Content extends BaseContent {
public function getParameter()
{
//Do something more
return parent::getParameter();
}
}
어디서나 심포니 프로젝트 내에서 항상 기본 클래스를 상속 비 기본 클래스를 사용합니다.
기본 클래스 또는 교리 (폴더 아래에 '기본') 스키마에 정의 된 내용에 그 (것)들을 내놓고 (폴더 '톰'과 '지도'아래) PHP으로 ORMs 추진에 의해 생성됩니다.
무시할 수있는 것과 대체 할 수없는 것에 대해 합의점을 갖기 위해 동료와 이야기하십시오. – deceze
http://www.php.net/manual/en/language.oop5.final.php –
아마도 svn과 같은 일부 버전 소프트웨어를 구현해야합니다. –