public function process() { $attributes = array(); $attributesToGet = explode(',', $this->getProperty('attributes', '')); foreach ($attributesToGet as $attribute) { $attributes[$attribute] = $this->transport->getAttribute($attribute); /* if setup options, include setup file */ if ($attribute == 'setup-options') { @ob_start(); $options = $this->package->toArray(); $options[xPDOTransport::PACKAGE_ACTION] = $this->package->previousVersionInstalled() ? xPDOTransport::ACTION_UPGRADE : xPDOTransport::ACTION_INSTALL; $attributeFile = $this->modx->getOption('core_path') . 'packages/' . $this->package->signature . '/' . $attribute . '.php'; if (file_exists($attributeFile) && $attribute != '') { $modx =& $this->modx; $attributes['setup-options'] = (include $attributeFile); } @ob_end_clean(); } else { if (in_array($attribute, array('readme', 'license', 'changelog'))) { $attributes[$attribute] = htmlentities($attributes[$attribute], ENT_COMPAT, 'UTF-8'); } } } return $this->success('', $attributes); }