Skip to content

Instantly share code, notes, and snippets.

@manuakasam
Created April 2, 2013 12:22
Show Gist options
  • Select an option

  • Save manuakasam/5291814 to your computer and use it in GitHub Desktop.

Select an option

Save manuakasam/5291814 to your computer and use it in GitHub Desktop.
Data:
array(8) {
["salutation"] => string(4) "Herr"
["title"] => string(1) "1"
["firstName"] => string(1) "2"
["familyName"] => string(1) "3"
["address"] => string(1) "4"
["cityCode"] => string(1) "5"
["city"] => string(1) "6"
["id"] => string(0) ""
}
Object.pre:
object(NotaryRequest\Entity\NotaryPersonData)#488 (8) {
["id":protected] => NULL
["salutation":protected] => NULL
["title":protected] => NULL
["firstName":protected] => NULL
["familyName":protected] => NULL
["address":protected] => NULL
["city":protected] => NULL
["cityCode":protected] => NULL
}
Object.past:
object(NotaryRequest\Entity\NotaryPersonData)#488 (8) {
["id":protected] => string(0) ""
["salutation":protected] => string(4) "Herr"
["title":protected] => string(1) "1"
["firstName":protected] => string(1) "2"
["familyName":protected] => string(1) "3"
["address":protected] => string(1) "4"
["city":protected] => string(1) "6"
["cityCode":protected] => string(1) "5"
}
Data:
array(3) {
["certificateNumber"] => string(1) "7"
["contractDate"] => string(10) "2013-04-02"
["id"] => string(0) ""
}
Object.pre:
object(NotaryRequest\Entity\ContractData)#527 (3) {
["id":protected] => NULL
["certificateNumber":protected] => NULL
["contractDate":protected] => NULL
}
Object.past:
object(NotaryRequest\Entity\ContractData)#527 (3) {
["id":protected] => string(0) ""
["certificateNumber":protected] => string(1) "7"
["contractDate":protected] => object(DateTime)#914 (3) {
["date"] => string(19) "2013-04-02 00:00:00"
["timezone_type"] => int(3)
["timezone"] => string(13) "Europe/Berlin"
}
}
Data:
array(8) {
["salutation"] => string(4) "Herr"
["title"] => string(1) "8"
["firstName"] => string(1) "9"
["familyName"] => string(2) "10"
["address"] => string(2) "11"
["cityCode"] => string(2) "12"
["city"] => string(2) "13"
["id"] => string(0) ""
}
Object.pre:
object(NotaryRequest\Entity\SalesPersonData)#562 (8) {
["id":protected] => NULL
["salutation":protected] => NULL
["title":protected] => NULL
["firstName":protected] => NULL
["familyName":protected] => NULL
["address":protected] => NULL
["city":protected] => NULL
["cityCode":protected] => NULL
}
Object.past:
object(NotaryRequest\Entity\SalesPersonData)#562 (8) {
["id":protected] => string(0) ""
["salutation":protected] => string(4) "Herr"
["title":protected] => string(1) "8"
["firstName":protected] => string(1) "9"
["familyName":protected] => string(2) "10"
["address":protected] => string(2) "11"
["city":protected] => string(2) "13"
["cityCode":protected] => string(2) "12"
}
Data:
array(8) {
["salutation"] => string(4) "Herr"
["title"] => string(2) "14"
["firstName"] => string(2) "15"
["familyName"] => string(2) "16"
["address"] => string(2) "17"
["cityCode"] => string(2) "18"
["city"] => string(2) "19"
["id"] => string(0) ""
}
Object.pre:
object(NotaryRequest\Entity\AcquirerPersonData)#595 (8) {
["id":protected] => NULL
["salutation":protected] => NULL
["title":protected] => NULL
["firstName":protected] => NULL
["familyName":protected] => NULL
["address":protected] => NULL
["city":protected] => NULL
["cityCode":protected] => NULL
}
Object.past:
object(NotaryRequest\Entity\AcquirerPersonData)#595 (8) {
["id":protected] => string(0) ""
["salutation":protected] => string(4) "Herr"
["title":protected] => string(2) "14"
["firstName":protected] => string(2) "15"
["familyName":protected] => string(2) "16"
["address":protected] => string(2) "17"
["city":protected] => string(2) "19"
["cityCode":protected] => string(2) "18"
}
Data:
array(6) {
["location"] => string(2) "20"
["mark"] => string(2) "21"
["floor"] => string(2) "22"
["floorPieces"] => string(2) "23"
["size"] => string(2) "24"
["id"] => string(0) ""
}
Object.pre:
object(NotaryRequest\Entity\EstateData)#645 (6) {
["id":protected] => NULL
["location":protected] => NULL
["mark":protected] => NULL
["floor":protected] => NULL
["floorPieces":protected] => NULL
["size":protected] => NULL
}
Object.past:
object(NotaryRequest\Entity\EstateData)#645 (6) {
["id":protected] => string(0) ""
["location":protected] => string(2) "20"
["mark":protected] => string(2) "21"
["floor":protected] => string(2) "22"
["floorPieces":protected] => string(2) "23"
["size":protected] => string(2) "24"
}
Data:
array(6) {
["criteria"] => string(1) "0"
["notary-person-data-fieldset"] => object(NotaryRequest\Entity\NotaryPersonData)#488 (8) {
["id":protected] => string(0) ""
["salutation":protected] => string(4) "Herr"
["title":protected] => string(1) "1"
["firstName":protected] => string(1) "2"
["familyName":protected] => string(1) "3"
["address":protected] => string(1) "4"
["city":protected] => string(1) "6"
["cityCode":protected] => string(1) "5"
}
["contracts"] => array(1) {
[0] => object(NotaryRequest\Entity\ContractData)#527 (3) {
["id":protected] => string(0) ""
["certificateNumber":protected] => string(1) "7"
["contractDate":protected] => object(DateTime)#914 (3) {
["date"] => string(19) "2013-04-02 00:00:00"
["timezone_type"] => int(3)
["timezone"] => string(13) "Europe/Berlin"
}
}
}
["sales-person-data-fieldset"] => object(NotaryRequest\Entity\SalesPersonData)#562 (8) {
["id":protected] => string(0) ""
["salutation":protected] => string(4) "Herr"
["title":protected] => string(1) "8"
["firstName":protected] => string(1) "9"
["familyName":protected] => string(2) "10"
["address":protected] => string(2) "11"
["city":protected] => string(2) "13"
["cityCode":protected] => string(2) "12"
}
["acquirer-person-data-fieldset"] => object(NotaryRequest\Entity\AcquirerPersonData)#595 (8) {
["id":protected] => string(0) ""
["salutation":protected] => string(4) "Herr"
["title":protected] => string(2) "14"
["firstName":protected] => string(2) "15"
["familyName":protected] => string(2) "16"
["address":protected] => string(2) "17"
["city":protected] => string(2) "19"
["cityCode":protected] => string(2) "18"
}
["estates"] => array(1) {
[0] => object(NotaryRequest\Entity\EstateData)#645 (6) {
["id":protected] => string(0) ""
["location":protected] => string(2) "20"
["mark":protected] => string(2) "21"
["floor":protected] => string(2) "22"
["floorPieces":protected] => string(2) "23"
["size":protected] => string(2) "24"
}
}
}
Object.pre:
object(NotaryRequest\Entity\Request)#438 (7) {
["id":protected] => NULL
["estates":protected] => object(Doctrine\Common\Collections\ArrayCollection)#440 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(0) {
}
}
["contracts":protected] => object(Doctrine\Common\Collections\ArrayCollection)#439 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(0) {
}
}
["notaryPersonData":protected] => NULL
["acquirerPersonData":protected] => NULL
["salesPersonData":protected] => NULL
["criteria":protected] => NULL
}
Object.past:
object(NotaryRequest\Entity\Request)#438 (7) {
["id":protected] => NULL
["estates":protected] => object(Doctrine\Common\Collections\ArrayCollection)#440 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(1) {
[0] => object(NotaryRequest\Entity\EstateData)#645 (6) {
["id":protected] => string(0) ""
["location":protected] => string(2) "20"
["mark":protected] => string(2) "21"
["floor":protected] => string(2) "22"
["floorPieces":protected] => string(2) "23"
["size":protected] => string(2) "24"
}
}
}
["contracts":protected] => object(Doctrine\Common\Collections\ArrayCollection)#439 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(0) {
}
}
["notaryPersonData":protected] => NULL
["acquirerPersonData":protected] => NULL
["salesPersonData":protected] => NULL
["criteria":protected] => string(1) "0"
}
Data:
array(3) {
["duitsecutiry"] => string(32) "6c006f021c84bf7db3bea05adb6c816a"
["createRequestSubmit"] => string(17) "Antrag einreichen"
["request-fieldset"] => object(NotaryRequest\Entity\Request)#438 (7) {
["id":protected] => NULL
["estates":protected] => object(Doctrine\Common\Collections\ArrayCollection)#440 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(1) {
[0] => object(NotaryRequest\Entity\EstateData)#645 (6) {
["id":protected] => string(0) ""
["location":protected] => string(2) "20"
["mark":protected] => string(2) "21"
["floor":protected] => string(2) "22"
["floorPieces":protected] => string(2) "23"
["size":protected] => string(2) "24"
}
}
}
["contracts":protected] => object(Doctrine\Common\Collections\ArrayCollection)#439 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(0) {
}
}
["notaryPersonData":protected] => NULL
["acquirerPersonData":protected] => NULL
["salesPersonData":protected] => NULL
["criteria":protected] => string(1) "0"
}
}
Object.pre:
object(NotaryRequest\Entity\Request)#653 (7) {
["id":protected] => NULL
["estates":protected] => object(Doctrine\Common\Collections\ArrayCollection)#655 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(0) {
}
}
["contracts":protected] => object(Doctrine\Common\Collections\ArrayCollection)#654 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(0) {
}
}
["notaryPersonData":protected] => NULL
["acquirerPersonData":protected] => NULL
["salesPersonData":protected] => NULL
["criteria":protected] => NULL
}
Object.past:
object(NotaryRequest\Entity\Request)#653 (7) {
["id":protected] => NULL
["estates":protected] => object(Doctrine\Common\Collections\ArrayCollection)#655 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(0) {
}
}
["contracts":protected] => object(Doctrine\Common\Collections\ArrayCollection)#654 (1) {
["_elements":"Doctrine\Common\Collections\ArrayCollection":private] => array(0) {
}
}
["notaryPersonData":protected] => NULL
["acquirerPersonData":protected] => NULL
["salesPersonData":protected] => NULL
["criteria":protected] => NULL
}
@manuakasam
Copy link
Copy Markdown
Author

As per xDebug what's happening:
First Loop of DoctrineObject->hydrate($hData, $object) -> hydrateByValue()
setCriteria(0)
addEstates() - working
setContracts() - wrong, he should be using addContracts() for the collection
setNotary-person-data-fieldset() => (obviously not working, it's a fieldset!)
setSales-person-data-fieldset() => (obviously not working, it's a fieldset!)
setAcquirer-person-data-fieldset() => (obviously not working, it's a fieldset!)

After that the Object looks good as for what has happened - criteria and estates are set, everything else is null. This was expected so far.

After THAT however, a second loop of DoctrineObject->hydrate() begins to run.

Then suddenly he tries a setter from the baseFieldset setRequest-fieldset and after that the bound objects is all nullified :S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment