ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> Programming

Doctrine inheritance issue

Author Message
dprecup



Joined: 25 Mar 2016
Posts: 1

PostPosted: Fri Mar 25, 2016 3:11 pm    Post subject: Doctrine inheritance issue Reply with quote

I'm using Doctrine and Zend Framework 2 in a project and I have the following situation:
I have a base entity class which contains a function, toArray, with the parameter object
public function toArray($object = false)
{
....
}

and a new entity class which extend the base entity class, let's name it class A.
I obfuscated the code and, when doctrine is generated the entity classes, the A class contains the function toArray without the default value, so I have:
public function toArray($object)
{
....
}
so I get the error:
A::toArray() should be compatible with BaseEntity::toArray($object = )
Can somebody help me with this?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> Programming All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum