title: I want to Add custom property from php object class
body: <p>I want to add new property for each object. My code is shown below:</p>
  
  <pre><code> function getCitationDataofquotes($var1){
      $query = "SELECT `id`,`title`,`source`,`content`,`page`,`city`,`publisher` FROM `#__gpo_citations_quotes`";
      $query .= " WHERE `id`='" . $var1 . "'";
      if (!empty($query))
      {
          $some= array();
          $this-&gt;_db-&gt;setQuery($query);
          $data = $this-&gt;_db-&gt;loadObject();
          return $data; 
  
      }
   $value = $datapages-&gt;getCitationDataofquotes($var1);
   $getdataofcitation['citations'][] = $value;
  </code></pre>
  
  <p>Then my output of this return data is below</p>
  
  <pre><code>{id: "12091",
  title: "Homicide Victims by Year and Jurisdiction, 1989–90 to 2010–12",
  source: "Homicide in Australia: 2010–11 to 2011–12: National Homicide Monitoring Program report",
  content: " ACT = Australian Capital Territory]",
  page: "p. 37",
  city: "Canberra",
  publisher: "Australian Institute of Criminology"
  },
  
  {
  id: "8901",
  title: "test",
  source: null,
  content: "",
  page: null,
  city: null,
  publisher: null
  },
  </code></pre>
  
  <p>Now I want to add new property for each object. I want this output for each object.</p>
  
  <pre><code>{ id: "8901",
   title: "test",
   source: null,
   content: "",
   page: null,
   city: null,
   publisher: null ,
   **new property: something**}
  </code></pre>