function __construct($db, $id, $word)
 {
     $this->_id = $id;
     $this->issql = ISSQLDB($db);
     $this->_word = $word !== NULL ? $word : NULL;
     if ($_fid = $this->_getpath()) {
         $this->_path = PATH($this->word(), $_fid);
     } elseif ($word !== NULL) {
         $this->_path = PATH($this->word());
     } else {
         $this->_path = NULL;
     }
     return $this;
 }
Exemple #2
0
 function __construct($db, $id, $mgr, $lang)
 {
     if (is_array($id) and $mgr !== NULL) {
         $id = $db->new_word($mgr, $id, $lang);
     }
     $this->_db = $db;
     $this->issql = ISSQLDB($db);
     if ($this->issql and is_string($id)) {
         $id = $db->id_find_word($id, $lang);
     }
     $this->_id = $id;
     #var_dump($this->id(), $this->lang(), $this->speechpart());
     if ($mgr === NULL) {
         if (!is_scalar($id)) {
             _die("_WORD.id " . var_export($id, 1) . " needs to be scalar");
         }
         // defer $this->_mgr = $db->get_mgrW($this); to $this->mgr()
     }
     $this->_mgr = $mgr;
     $this->_path = NULL;
     return $this;
 }