[Openfirst-cvscommit] base/includes modules.php,1.4,1.5
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-05-27 13:53:30
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26298/includes Modified Files: modules.php Log Message: Added property-getting functions Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/modules.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** modules.php 27 May 2005 00:02:24 -0000 1.4 --- modules.php 27 May 2005 13:53:19 -0000 1.5 *************** *** 62,71 **** $this->mIncludes = array(); // Handle includes ! $IncludeTags = $this->mIncludesTag->Contents; ! foreach($IncludeTags as $tag) { ! if (is_object($tag) && is_a($tag, 'xmlElement')) { ! $this->mIncludes[] = $tag->Contents[0]; } ! } } --- 62,73 ---- $this->mIncludes = array(); // Handle includes ! if (is_object($this->mIncludesTag)) { ! $IncludeTags = $this->mIncludesTag->Contents; ! foreach($IncludeTags as $tag) { ! if (is_object($tag) && is_a($tag, 'xmlElement')) { ! $this->mIncludes[] = $tag->Contents[0]; ! } } ! } } *************** *** 91,94 **** --- 93,145 ---- } + /*** PUBLIC PROPERTIES ***/ + /*public*/ function getName() { + return $this->mName; + } + + /*public*/ function getID() { + return $this->mID; + } + + /*public*/ function getVersion() { + return $this->mVersion; + } + + /*public*/ function getAuthor() { + return $this->mAuthor; + } + + /*public*/ function getMaintainer() { + return $this->mMaintainer; + } + + /*public*/ function getIncludes() { + return $this->mIncludes; + } + + /*public*/ function getNavBar() { + return $this->mNavBar; + } + + /*public*/ function getAdminBar() { + return $this->mAdminBar; + } + + /*public*/ function getTables() { + return $this->mTables; + } + + /*public*/ function getSetupScript() { + return $this->mSetupScript; + } + + /*public*/ function getRemoveScript() { + return $this->mRemoveScript; + } + + /*public*/ function getUpgradeScript() { + return $this->mUpgradeScript; + } + /*** PRIVATE FUNCTIONS ***/ /*private*/ function getModuleDTD() { *************** *** 118,129 **** if (isset($this->mxmlCurTag)) { $this->mxmlCurTag =& $this->mxmlCurTag->addElement($name, $attrs); - $this->mRootElement =& $this->mxmlCurTag; } else { $this->mxmlCurTag =& new xmlElement($name, $attrs, $this); } ! if ($name == 'module') { if (isset($attrs['ID'])) $this->mID = $attrs['ID']; ! } else if ($name == 'script') { if (!isset($attrs['rel']) || !isset($attrs['src'])) break; $type = $attrs['rel']; --- 169,180 ---- if (isset($this->mxmlCurTag)) { $this->mxmlCurTag =& $this->mxmlCurTag->addElement($name, $attrs); } else { $this->mxmlCurTag =& new xmlElement($name, $attrs, $this); + $this->mRootElement =& $this->mxmlCurTag; } ! if ($name == 'MODULE') { if (isset($attrs['ID'])) $this->mID = $attrs['ID']; ! } else if ($name == 'SCRIPT') { if (!isset($attrs['rel']) || !isset($attrs['src'])) break; $type = $attrs['rel']; *************** *** 140,158 **** function endElement($parser, $name) { ! if ($name == 'name') { $this->mName = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'version') { $this->mVersion = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'author') { $this->mAuthor = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'maintainer') { $this->mMaintainer = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'navbar') { $this->mNavbar = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'adminbar') { $this->mAdminbar = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'includes') { $this->mIncludesTag =& $this->mxmlCurTag; ! } else if ($name == 'db') { $this->mDBTag =& $this->mxmlCurTag; } --- 191,209 ---- function endElement($parser, $name) { ! if ($name == 'NAME') { $this->mName = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'VERSION') { $this->mVersion = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'AUTHOR') { $this->mAuthor = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'MAINTAINER') { $this->mMaintainer = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'NAVBAR') { $this->mNavbar = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'ADMINBAR') { $this->mAdminbar = $this->mxmlCurTag->Contents[0]; ! } else if ($name == 'INCLUDES') { $this->mIncludesTag =& $this->mxmlCurTag; ! } else if ($name == 'DB') { $this->mDBTag =& $this->mxmlCurTag; } |