Public Member Functions

ilMDIdentifier_ Class Reference

Inheritance diagram for ilMDIdentifier_:
Collaboration diagram for ilMDIdentifier_:

Public Member Functions

 ilMDIdentifier_ ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
 setCatalog ($a_catalog)
 getCatalog ()
 setEntry ($a_entry)
 getEntry ()
 save ()
 update ()
 delete ()
 __getFields ()
 read ()
 toXML (&$writer)
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
 ilMDIdentifier_ ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
 setCatalog ($a_catalog)
 getCatalog ()
 setEntry ($a_entry)
 getEntry ()
 save ()
 update ()
 delete ()
 __getFields ()
 read ()
 toXML (&$writer)
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)

Detailed Description

Definition at line 33 of file class.ilMDIdentifier_.php.


Member Function Documentation

ilMDIdentifier_::__getFields (  ) 

Definition at line 104 of file class.ilMDIdentifier_.php.

References getCatalog(), getEntry(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getParentId(), ilMDBase::getParentType(), ilMDBase::getRBACId(), and ilUtil::prepareDBString().

        {
                return array('rbac_id'  => $this->getRBACId(),
                                         'obj_id'       => $this->getObjId(),
                                         'obj_type'     => ilUtil::prepareDBString($this->getObjType()),
                                         'parent_type' => $this->getParentType(),
                                         'parent_id' => $this->getParentId(),
                                         'catalog'      => $this->getCatalog(),
                                         'entry'        => $this->getEntry());

        }

Here is the call graph for this function:

ilMDIdentifier_::__getFields (  ) 

Definition at line 104 of file class.ilMDIdentifier_.php.

References getCatalog(), getEntry(), ilMDBase::getObjId(), ilMDBase::getObjType(), ilMDBase::getParentId(), ilMDBase::getParentType(), ilMDBase::getRBACId(), and ilUtil::prepareDBString().

        {
                return array('rbac_id'  => $this->getRBACId(),
                                         'obj_id'       => $this->getObjId(),
                                         'obj_type'     => ilUtil::prepareDBString($this->getObjType()),
                                         'parent_type' => $this->getParentType(),
                                         'parent_id' => $this->getParentId(),
                                         'catalog'      => ilUtil::prepareDBString($this->getCatalog()),
                                         'entry'        => ilUtil::prepareDBString($this->getEntry()));

        }

Here is the call graph for this function:

ilMDIdentifier_::_getIds ( a_rbac_id,
a_obj_id,
a_parent_id,
a_parent_type 
)

Definition at line 151 of file class.ilMDIdentifier_.php.

References $query, $res, and $row.

        {
                global $ilDB;

                $query = "SELECT meta_identifier__id FROM il_meta_identifier_ ".
                        "WHERE rbac_id = '".$a_rbac_id."' ".
                        "AND obj_id = '".$a_obj_id."' ".
                        "AND parent_id = '".$a_parent_id."' ".
                        "AND parent_type = '".$a_parent_type."'";


                $res = $ilDB->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $ids[] = $row->meta_identifier__id;
                }
                return $ids ? $ids : array();
        }

ilMDIdentifier_::_getIds ( a_rbac_id,
a_obj_id,
a_parent_id,
a_parent_type 
)

Definition at line 151 of file class.ilMDIdentifier_.php.

References $query, $res, and $row.

        {
                global $ilDB;

                $query = "SELECT meta_identifier__id FROM il_meta_identifier_ ".
                        "WHERE rbac_id = '".$a_rbac_id."' ".
                        "AND obj_id = '".$a_obj_id."' ".
                        "AND parent_id = '".$a_parent_id."' ".
                        "AND parent_type = '".$a_parent_type."'";


                $res = $ilDB->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $ids[] = $row->meta_identifier__id;
                }
                return $ids ? $ids : array();
        }

ilMDIdentifier_::delete (  ) 

Reimplemented from ilMDBase.

Definition at line 89 of file class.ilMDIdentifier_.php.

References $query, and ilMDBase::getMetaId().

        {
                if($this->getMetaId())
                {
                        $query = "DELETE FROM il_meta_identifier_ ".
                                "WHERE meta_identifier__id = '".$this->getMetaId()."'";
                        
                        $this->db->query($query);
                        
                        return true;
                }
                return false;
        }

Here is the call graph for this function:

ilMDIdentifier_::delete (  ) 

Reimplemented from ilMDBase.

Definition at line 89 of file class.ilMDIdentifier_.php.

References $query, and ilMDBase::getMetaId().

        {
                if($this->getMetaId())
                {
                        $query = "DELETE FROM il_meta_identifier_ ".
                                "WHERE meta_identifier__id = '".$this->getMetaId()."'";
                        
                        $this->db->query($query);
                        
                        return true;
                }
                return false;
        }

Here is the call graph for this function:

ilMDIdentifier_::getCatalog (  ) 

Definition at line 47 of file class.ilMDIdentifier_.php.

Referenced by __getFields(), and toXML().

        {
                return $this->catalog;
        }

Here is the caller graph for this function:

ilMDIdentifier_::getCatalog (  ) 

Definition at line 47 of file class.ilMDIdentifier_.php.

        {
                return $this->catalog;
        }

ilMDIdentifier_::getEntry (  ) 

Definition at line 55 of file class.ilMDIdentifier_.php.

        {
                return $this->entry;
        }

ilMDIdentifier_::getEntry (  ) 

Definition at line 55 of file class.ilMDIdentifier_.php.

Referenced by __getFields(), and toXML().

        {
                return $this->entry;
        }

Here is the caller graph for this function:

ilMDIdentifier_::ilMDIdentifier_ ( a_rbac_id = 0,
a_obj_id = 0,
a_obj_type = '' 
)

Definition at line 35 of file class.ilMDIdentifier_.php.

References ilMDBase::ilMDBase().

        {
                parent::ilMDBase($a_rbac_id,
                                                 $a_obj_id,
                                                 $a_obj_type);
        }

Here is the call graph for this function:

ilMDIdentifier_::ilMDIdentifier_ ( a_rbac_id = 0,
a_obj_id = 0,
a_obj_type = '' 
)

Definition at line 35 of file class.ilMDIdentifier_.php.

References ilMDBase::ilMDBase().

        {
                parent::ilMDBase($a_rbac_id,
                                                 $a_obj_id,
                                                 $a_obj_type);
        }

Here is the call graph for this function:

ilMDIdentifier_::read (  ) 

Definition at line 116 of file class.ilMDIdentifier_.php.

References $query, $res, $row, ilMDBase::getMetaId(), setCatalog(), setEntry(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setParentId(), ilMDBase::setParentType(), and ilMDBase::setRBACId().

        {
                if($this->getMetaId())
                {
                        $query = "SELECT * FROM il_meta_identifier_ ".
                                "WHERE meta_identifier__id = '".$this->getMetaId()."'";

                        $res = $this->db->query($query);
                        while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                        {
                                $this->setRBACId($row->rbac_id);
                                $this->setObjId($row->obj_id);
                                $this->setObjType($row->obj_type);
                                $this->setParentId($row->parent_id);
                                $this->setParentType($row->parent_type);
                                $this->setCatalog($row->catalog);
                                $this->setEntry($row->entry);
                        }
                }
                return true;
        }

Here is the call graph for this function:

ilMDIdentifier_::read (  ) 

Definition at line 116 of file class.ilMDIdentifier_.php.

References $query, $res, $row, ilMDBase::getMetaId(), setCatalog(), setEntry(), ilMDBase::setObjId(), ilMDBase::setObjType(), ilMDBase::setParentId(), ilMDBase::setParentType(), ilMDBase::setRBACId(), and ilUtil::stripSlashes().

        {
                if($this->getMetaId())
                {
                        $query = "SELECT * FROM il_meta_identifier_ ".
                                "WHERE meta_identifier__id = '".$this->getMetaId()."'";

                        $res = $this->db->query($query);
                        while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                        {
                                $this->setRBACId($row->rbac_id);
                                $this->setObjId($row->obj_id);
                                $this->setObjType($row->obj_type);
                                $this->setParentId($row->parent_id);
                                $this->setParentType($row->parent_type);
                                $this->setCatalog(ilUtil::stripSlashes($row->catalog));
                                $this->setEntry(ilUtil::stripSlashes($row->entry));
                        }
                }
                return true;
        }

Here is the call graph for this function:

ilMDIdentifier_::save (  ) 

Reimplemented from ilMDBase.

Definition at line 61 of file class.ilMDIdentifier_.php.

References ilMDBase::getMetaId(), and ilMDBase::setMetaId().

        {
                if($this->db->autoExecute('il_meta_identifier_',
                                                                  $this->__getFields(),
                                                                  DB_AUTOQUERY_INSERT))
                {
                        $this->setMetaId($this->db->getLastInsertId());

                        return $this->getMetaId();
                }
                return false;
        }

Here is the call graph for this function:

ilMDIdentifier_::save (  ) 

Reimplemented from ilMDBase.

Definition at line 61 of file class.ilMDIdentifier_.php.

References ilMDBase::getMetaId(), and ilMDBase::setMetaId().

        {
                if($this->db->autoExecute('il_meta_identifier_',
                                                                  $this->__getFields(),
                                                                  DB_AUTOQUERY_INSERT))
                {
                        $this->setMetaId($this->db->getLastInsertId());

                        return $this->getMetaId();
                }
                return false;
        }

Here is the call graph for this function:

ilMDIdentifier_::setCatalog ( a_catalog  ) 

Definition at line 43 of file class.ilMDIdentifier_.php.

Referenced by read().

        {
                $this->catalog = $a_catalog;
        }

Here is the caller graph for this function:

ilMDIdentifier_::setCatalog ( a_catalog  ) 

Definition at line 43 of file class.ilMDIdentifier_.php.

        {
                $this->catalog = $a_catalog;
        }

ilMDIdentifier_::setEntry ( a_entry  ) 

Definition at line 51 of file class.ilMDIdentifier_.php.

Referenced by read().

        {
                $this->entry = $a_entry;
        }

Here is the caller graph for this function:

ilMDIdentifier_::setEntry ( a_entry  ) 

Definition at line 51 of file class.ilMDIdentifier_.php.

        {
                $this->entry = $a_entry;
        }

ilMDIdentifier_::toXML ( &$  writer  ) 

Reimplemented from ilMDBase.

Definition at line 143 of file class.ilMDIdentifier_.php.

References getCatalog(), and getEntry().

        {
                $writer->xmlElement('Identifier_',array('Catalog' => $this->getCatalog(),
                                                                                                'Entry'   => $this->getEntry()));
        }

Here is the call graph for this function:

ilMDIdentifier_::toXML ( &$  writer  ) 

Reimplemented from ilMDBase.

Definition at line 143 of file class.ilMDIdentifier_.php.

References getCatalog(), and getEntry().

        {
                $writer->xmlElement('Identifier_',array('Catalog' => $this->getCatalog(),
                                                                                                'Entry'   => $this->getEntry() ? $this->getEntry() : "ID1"));
        }

Here is the call graph for this function:

ilMDIdentifier_::update (  ) 

Reimplemented from ilMDBase.

Definition at line 74 of file class.ilMDIdentifier_.php.

References ilMDBase::getMetaId().

        {
                if($this->getMetaId())
                {
                        if($this->db->autoExecute('il_meta_identifier_',
                                                                          $this->__getFields(),
                                                                          DB_AUTOQUERY_UPDATE,
                                                                          "meta_identifier__id = '".$this->getMetaId()."'"))
                        {
                                return true;
                        }
                }
                return false;
        }

Here is the call graph for this function:

ilMDIdentifier_::update (  ) 

Reimplemented from ilMDBase.

Definition at line 74 of file class.ilMDIdentifier_.php.

References ilMDBase::getMetaId().

        {
                if($this->getMetaId())
                {
                        if($this->db->autoExecute('il_meta_identifier_',
                                                                          $this->__getFields(),
                                                                          DB_AUTOQUERY_UPDATE,
                                                                          "meta_identifier__id = '".$this->getMetaId()."'"))
                        {
                                return true;
                        }
                }
                return false;
        }

Here is the call graph for this function:


The documentation for this class was generated from the following files: