src/snac/server/database/DBUser.php
/**
     * Insert or update a privilege into the database
     *
     * Insert update a privilege. If insert, call setID() with the returned ID. Return the privilege, which if
     * inserted, will have an ID.
     *
     * @param \snac\data\Privilege $privilege the privilege object
     *
     * @return \snac\data\Privilege Privilege object with it's newly associated ID
     */
Insert or update a privilege into the database
Insert update a privilege. If insert, call setID() with the returned ID. Return the privilege, which if
inserted, will have an ID.

@param \snac\data\Privilege $privilege the privilege object

@return \snac\data\Privilege Privilege object with it's newly associated ID
Insert or update a privilege into the database Insert update a privilege . If insert call setID () with the returned ID . Return the privilege which if inserted will have an ID . @param \ snac \ data \ Privilege $privilege the privilege object @return \ snac \ data \ Privilege Privilege object with it ' s newly associated ID
public function writePrivilege($privilege)
    {
        if ($privilege->getID())
        {
            $this->sql->updatePrivilege($privilege->getID(),
                                        $privilege->getLabel(),
                                        $privilege->getDescription());
        }
        else
        {
            $pid = $this->sql->insertPrivilege($privilege->getLabel(),
                                               $privilege->getDescription());
            $privilege->setID($pid);
        }
                return $privilege;
    }
public function writePrivilege ( $ privilege ) { if ( $ privilege -> getID ( ) ) { $ this -> sql -> updatePrivilege ( $ privilege -> getID ( ) , $ privilege -> getLabel ( ) , $ privilege -> getDescription ( ) ) ; } else { $ pid = $ this -> sql -> insertPrivilege ( $ privilege -> getLabel ( ) , $ privilege -> getDescription ( ) ) ; $ privilege -> setID ( $ pid ) ; } return $ privilege ; }
Insert or update a privilege into the database
 Insert update a privilege.
Insert or update a privilege into the database Insert update a privilege .
// Objects are passed by referece. How does it make sense to return an arg passed by reference?
