aliroExtension Class Reference

Inheritance diagram for aliroExtension:

aliroDatabaseRow aliroDBGeneralRow

List of all members.

Public Member Functions

 populateFromXML ($xmlobject)

Protected Attributes

 $DBclass = 'aliroCoreDatabase'
 $tableName = '#__extensions'
 $rowKey = 'id'

Static Private Attributes

static $legalTypes = array('component', 'module', 'mambot', 'plugin', 'template', 'language', 'patch')


Detailed Description

Definition at line 51 of file aliroExtensionHandler.php.


Member Function Documentation

aliroExtension::populateFromXML ( xmlobject  ) 

Definition at line 57 of file aliroExtensionHandler.php.

References aliroTemplateHandler::getInstance(), name, T_(), and timestamp.

00057                                                  {
00058         $purifier = new HTMLPurifier();
00059         $this->name = $purifier->purify((string) $xmlobject->getXML('name'));
00060         $this->type = $xmlobject->baseAttribute('type');
00061         if (!in_array($this->type, self::$legalTypes)) return T_('has no valid type');
00062         if ('plugin' == $this->type) $extension->type = 'mambot';
00063         $this->formalname = $purifier->purify((string) $xmlobject->getXML('formalname'));
00064         if (!$this->formalname AND 'component' == strtolower($this->type)) $this->formalname = 'com_'.str_replace(' ', '', strtolower($this->name));
00065         if (!$this->formalname) return T_('has no formal name');
00066         $this->admin = ('administrator' == $xmlobject->baseAttribute('client')) ? 2 : 1;
00067         if ('template' == $this->type) {
00068             $currentDefault = aliroTemplateHandler::getInstance()->getDefaultTemplateProperty('formalname', (2 == $this->admin));
00069             if (!$currentDefault OR $currentDefault == $this->formalname) $this->default_template = '1';
00070         }
00071         foreach (array('author', 'version', 'authoremail', 'authorurl', 'description', 'creationdate') as $field) {
00072             $this->$field = $purifier->purify((string) $xmlobject->getXML($field));
00073         }
00074         $this->date = $this->creationdate;
00075         unset($this->creationdate);
00076         foreach (array('adminclass', 'menuclass', 'exportclass') as $field) {
00077             $this->$field = $xmlobject->baseAttribute($field);
00078         }
00079         $this->class = $xmlobject->baseAttribute('userclass');
00080         $this->timestamp = date('Y-m-d');
00081         return false;
00082     }


Member Data Documentation

aliroExtension::$legalTypes = array('component', 'module', 'mambot', 'plugin', 'template', 'language', 'patch') [static, private]

Definition at line 52 of file aliroExtensionHandler.php.

aliroExtension::$DBclass = 'aliroCoreDatabase' [protected]

Definition at line 53 of file aliroExtensionHandler.php.

aliroExtension::$tableName = '#__extensions' [protected]

Definition at line 54 of file aliroExtensionHandler.php.

aliroExtension::$rowKey = 'id' [protected]

Definition at line 55 of file aliroExtensionHandler.php.


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

Generated on Thu Apr 17 13:03:29 2008 for ALIRO by  doxygen 1.5.5