( ! ) Warning: Undefined array key "id" in /var/www/html/php7cookbook/source/Application/Entity/Base.php on line 33
Call Stack
#TimeMemoryFunctionLocation
10.0007360088{main}( ).../chap_05_entity_to_query_save.php:0
20.0020404888Application\Entity\Base::arrayToEntity( $data = ['name' => 'Doug Bierer', 'balance' => 326.33, 'email' => 'doug181@unlikelysource.com', 'password' => 'password', 'status' => 1, 'security_question' => 'Who\'s on first?', 'confirm_code' => 12345, 'level' => 'ADV'], $instance = class Application\Entity\Customer { protected $id = 0; protected $mapping = ['id' => 'id', 'name' => 'name', 'balance' => 'balance', 'email' => 'email', 'password' => 'password', 'status' => 'status', 'security_question' => 'securityQuestion', 'confirm_code' => 'confirmCode', 'profile_id' => 'profileId', 'level' => 'level']; protected $name = ''; protected $balance = 0; protected $email = ''; protected $password = ''; protected $status = ''; protected $securityQuestion = ''; protected $confirmCode = ''; protected $profileId = 0; protected $level = ''; protected $purchases = [] } ).../chap_05_entity_to_query_save.php:33

( ! ) Warning: Undefined array key "profile_id" in /var/www/html/php7cookbook/source/Application/Entity/Base.php on line 33
Call Stack
#TimeMemoryFunctionLocation
10.0007360088{main}( ).../chap_05_entity_to_query_save.php:0
20.0020404888Application\Entity\Base::arrayToEntity( $data = ['name' => 'Doug Bierer', 'balance' => 326.33, 'email' => 'doug181@unlikelysource.com', 'password' => 'password', 'status' => 1, 'security_question' => 'Who\'s on first?', 'confirm_code' => 12345, 'level' => 'ADV'], $instance = class Application\Entity\Customer { protected $id = 0; protected $mapping = ['id' => 'id', 'name' => 'name', 'balance' => 'balance', 'email' => 'email', 'password' => 'password', 'status' => 'status', 'security_question' => 'securityQuestion', 'confirm_code' => 'confirmCode', 'profile_id' => 'profileId', 'level' => 'level']; protected $name = 'Doug Bierer'; protected $balance = 326.33; protected $email = 'doug181@unlikelysource.com'; protected $password = 'password'; protected $status = 1; protected $securityQuestion = 'Who\'s on first?'; protected $confirmCode = 12345; protected $profileId = 0; protected $level = ''; protected $purchases = [] } ).../chap_05_entity_to_query_save.php:33
Customer ID BEFORE Insert: 0 Customer ID AFTER Insert: 397 Customer Balance BEFORE Update: 326.33 Customer Balance AFTER Update: 999.99
/var/www/html/php7cookbook/source/chapter05/chap_05_entity_to_query_save.php:45:
object(Application\Entity\Customer)[7]
  protected 'id' => int 397
  protected 'mapping' => 
    array (size=10)
      'id' => string 'id' (length=2)
      'name' => string 'name' (length=4)
      'balance' => string 'balance' (length=7)
      'email' => string 'email' (length=5)
      'password' => string 'password' (length=8)
      'status' => string 'status' (length=6)
      'security_question' => string 'securityQuestion' (length=16)
      'confirm_code' => string 'confirmCode' (length=11)
      'profile_id' => string 'profileId' (length=9)
      'level' => string 'level' (length=5)
  protected 'name' => string 'Doug Bierer' (length=11)
  protected 'balance' => float 999.99
  protected 'email' => string 'doug181@unlikelysource.com' (length=26)
  protected 'password' => string 'password' (length=8)
  protected 'status' => int 1
  protected 'securityQuestion' => string 'Who's on first?' (length=15)
  protected 'confirmCode' => string '12345' (length=5)
  protected 'profileId' => int 0
  protected 'level' => string 'ADV' (length=3)
  protected 'purchases' => 
    array (size=0)
      empty