src/schemas/ands_lom.php
private function addElement($elem, $to_add)
    {
        //debug_var_dump("to_add->$elem", $to_add->$elem);
        if (isset($to_add->$elem) && !empty($to_add->$elem) && $to_add->$elem != ' ') {//&& !empty(str_replace(' ', '', $to_add->$elem)) ){
            $elem_to_add = str_replace('&', '-and-', $to_add->$elem); //replace amperstamps for -and-
            if (!in_array($elem_to_add, $this->$elem)) {
                array_push($this->$elem, $elem_to_add);
                //debug_var_dump("this->$elem", $this->$elem);
            }
        }
    }
private function addElement($elem, $to_add)
    {
        //debug_var_dump("to_add->$elem", $to_add->$elem);
        if (isset($to_add->$elem) && !empty($to_add->$elem) && $to_add->$elem != ' ') {//&& !empty(str_replace(' ', '', $to_add->$elem)) ){
            $elem_to_add = str_replace('&', '-and-', $to_add->$elem); //replace amperstamps for -and-
            if (!in_array($elem_to_add, $this->$elem)) {
                array_push($this->$elem, $elem_to_add);
                //debug_var_dump("this->$elem", $this->$elem);
            }
        }
    }
private function addElement ( $ elem , $ to_add ) { //debug_var_dump("to_add->$elem", $to_add->$elem); if ( isset ( $ to_add -> $ elem ) && ! empty ( $ to_add -> $ elem ) && $ to_add -> $ elem != ' ' ) { //&& !empty(str_replace(' ', '', $to_add->$elem)) ){ $ elem_to_add = str_replace ( '&' , '-and-' , $ to_add -> $ elem ) ; //replace amperstamps for -and- if ( ! in_array ( $ elem_to_add , $ this -> $ elem ) ) { array_push ( $ this -> $ elem , $ elem_to_add ) ; //debug_var_dump("this->$elem", $this->$elem); } } }
adds a db element only if it is new
adds a db element only if it is new