Пример #1
0
 /**
  * Generate an empty object with the fields initialized to null.
  *
  * @return array Empty data object.
  */
 public function createEmptyObject()
 {
     $data = ObjectUtil::createEmptyObject($this->_objType);
     if ($data) {
         $this->_objData = $data;
     }
     return $this->_objData;
 }
Пример #2
0
 /**
  * Generate an empty object with the fields initialized to null.
  *
  * @param integer $num Number of empty objects.
  *
  * @return array The generated object.
  */
 public function generateEmptyObjectArray($num = 1)
 {
     $item = ObjectUtil::createEmptyObject($this->_objType);
     if ($item) {
         $data = array();
         for ($i = 0; $i < $num; $i++) {
             $data[] = $item;
         }
         $this->_objData = $data;
     }
     return $this->_objData;
 }