public function addData($data)
    {
        if(is_object($data))
        {
            $complete = true;
            foreach($this->requiredObjectFields as $property)
            {
                if(!isset($data->$property))
                {
                    $complete = false;
                    break;
                }
            }
            if($complete)
            {
                $this->data[] = $data;
            }
        }
        else
        {
            if(is_array($data))
            {
                $complete = true;
                foreach($this->requiredObjectFields as $property)
                {
                    if(!isset($data[$property]))
                    {
                        $complete = false;
                        break;
                    }
                }
                if($complete)
                {
                    $this->data[] = $data;
                }
            }
        }
        return $this;
    }
public function addData($data)
    {
        if(is_object($data))
        {
            $complete = true;
            foreach($this->requiredObjectFields as $property)
            {
                if(!isset($data->$property))
                {
                    $complete = false;
                    break;
                }
            }
            if($complete)
            {
                $this->data[] = $data;
            }
        }
        else
        {
            if(is_array($data))
            {
                $complete = true;
                foreach($this->requiredObjectFields as $property)
                {
                    if(!isset($data[$property]))
                    {
                        $complete = false;
                        break;
                    }
                }
                if($complete)
                {
                    $this->data[] = $data;
                }
            }
        }
        return $this;
    }
public function addData ( $ data ) { if ( is_object ( $ data ) ) { $ complete = true ; foreach ( $ this -> requiredObjectFields as $ property ) { if ( ! isset ( $ data -> $ property ) ) { $ complete = false ; break ; } } if ( $ complete ) { $ this -> data [ ] = $ data ; } } else { if ( is_array ( $ data ) ) { $ complete = true ; foreach ( $ this -> requiredObjectFields as $ property ) { if ( ! isset ( $ data [ $ property ] ) ) { $ complete = false ; break ; } } if ( $ complete ) { $ this -> data [ ] = $ data ; } } } return $ this ; }
Adds an element to the data array

@param stdClass $data

@return $this
Adds an element to the data array