wp_generate_uuid4(), 'category' => 'Info', 'level' => 'Info', 'location' => '', 'indicator' => '', 'explanation' => '', 'preview' => '', 'artifacts' => array(), 'identifiers' => array(), 'relationships'=> array(), ); $this->data = wp_parse_args( $data, $defaults ); $this->data['artifacts'] = array_values( array_unique( array_filter( array_map( 'strval', (array) $this->data['artifacts'] ) ) ) ); $this->data['identifiers'] = array_values( array_unique( array_filter( array_map( 'strval', (array) $this->data['identifiers'] ) ) ) ); $this->data['relationships'] = array_values( array_unique( array_filter( array_map( 'strval', (array) $this->data['relationships'] ) ) ) ); } public function to_array() { return $this->data; } }