本文整理汇总了PHP中AEAbstractFilter类的典型用法代码示例。如果您正苦于以下问题:PHP AEAbstractFilter类的具体用法?PHP AEAbstractFilter怎么用?PHP AEAbstractFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AEAbstractFilter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->object = 'dir';
$this->subtype = 'content';
$this->method = 'direct';
$this->filter_name = 'PlatformSkipfiles';
if (AEFactory::getKettenrad()->getTag() == 'restorepoint') {
$this->enabled = false;
}
// We take advantage of the filter class magic to inject our custom filters
$configuration = AEFactory::getConfiguration();
$jreg = JFactory::getConfig();
if (version_compare(JVERSION, '3.0', 'ge')) {
$tmpdir = $jreg->get('tmp_path');
} else {
$tmpdir = $jreg->getValue('config.tmp_path');
}
// Get the site's root
if ($configuration->get('akeeba.platform.override_root', 0)) {
$root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
} else {
$root = '[SITEROOT]';
}
$this->filter_data[$root] = array(self::treatDirectory($configuration->get('akeeba.basic.output_directory')), self::treatDirectory($tmpdir), 'tmp', self::treatDirectory(JPATH_CACHE), self::treatDirectory(JPATH_ADMINISTRATOR . '/cache'), self::treatDirectory(JPATH_ROOT . '/cache'), 'cache', 'administrator/cache', self::treatDirectory(JPATH_ROOT . '/installation'), 'installation', self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/cache'), self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/administrator/cache'), 'administrator/components/com_akeeba/backup', self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/components/libraries/cmslib/cache'), 'components/libraries/cmslib/cache', 'logs');
parent::__construct();
}
示例2: __construct
public function __construct()
{
$this->object = 'dir';
$this->subtype = 'inclusion';
$this->method = 'direct';
// FIXME This filter doesn't work very well on many live hosts. Disabled for now.
parent::__construct();
return;
if (empty($this->filter_name)) {
$this->filter_name = strtolower(basename(__FILE__, '.php'));
}
// Get the saved library path and compare it to the default
$jlibdir = AEPlatform::getInstance()->get_platform_configuration_option('jlibrariesdir', '');
if (empty($jlibdir)) {
if (defined('JPATH_LIBRARIES')) {
$jlibdir = JPATH_LIBRARIES;
} elseif (defined('JPATH_PLATFORM')) {
$jlibdir = JPATH_PLATFORM;
} else {
$jlibdir = false;
}
}
if ($jlibdir !== false) {
$jlibdir = AEUtilFilesystem::TranslateWinPath($jlibdir);
$defaultLibraries = AEUtilFilesystem::TranslateWinPath(JPATH_SITE . '/libraries');
if ($defaultLibraries != $jlibdir) {
// The path differs, add it here
$this->filter_data['JPATH_LIBRARIES'] = $jlibdir;
}
} else {
$this->filter_data = array();
}
parent::__construct();
}
示例3: __construct
public function __construct()
{
// This is a directory inclusion filter.
$this->object = 'db';
$this->subtype = 'inclusion';
$this->method = 'direct';
$this->filter_name = 'PlatformSitedb';
// Add a new record for the core Joomla! database
// Get core database options
$options = AEPlatform::getInstance()->get_platform_database_options();
$host = $options['host'];
$port = NULL;
$socket = NULL;
$targetSlot = substr(strstr($host, ":"), 1);
if (!empty($targetSlot)) {
// Get the port number or socket name
if (is_numeric($targetSlot)) {
$port = $targetSlot;
} else {
$socket = $targetSlot;
}
// Extract the host name only
$host = substr($host, 0, strlen($host) - (strlen($targetSlot) + 1));
// This will take care of the following notation: ":3306"
if ($host == '') {
$host = 'localhost';
}
}
// This is the format of the database inclusion filters
$entry = array('host' => $host, 'port' => is_null($socket) ? is_null($port) ? '' : $port : $socket, 'username' => $options['user'], 'password' => $options['password'], 'database' => $options['database'], 'prefix' => $options['prefix'], 'dumpFile' => 'joomla.sql', 'driver' => AEPlatform::getInstance()->get_default_database_driver(true));
// We take advantage of the filter class magic to inject our custom filters
$configuration =& AEFactory::getConfiguration();
$this->filter_data['[SITEDB]'] = $entry;
parent::__construct();
}
示例4:
function __construct()
{
$this->object = 'dir';
$this->subtype = 'content';
$this->method = 'direct';
if(empty($this->filter_name)) $this->filter_name = strtolower(basename(__FILE__,'.php'));
parent::__construct();
}
示例5: __construct
public function __construct()
{
$this->object = 'dir';
$this->subtype = 'all';
$this->method = 'direct';
$this->filter_name = 'PlatformFolders';
// We take advantage of the filter class magic to inject our custom filters
$this->filter_data['[SITEROOT]'] = array('awstats', 'cgi-bin');
parent::__construct();
}
示例6: __construct
public function __construct()
{
$this->object = 'file';
$this->subtype = 'all';
$this->method = 'direct';
$this->filter_name = 'PlatformFiles';
// We take advantage of the filter class magic to inject our custom filters
$this->filter_data['[SITEROOT]'] = array('kickstart.php', 'error_log', 'administrator/error_log');
parent::__construct();
}
示例7:
function __construct()
{
$this->object = 'dbobject';
$this->subtype = 'all';
$this->method = 'direct';
if(AEFactory::getKettenrad()->getTag() == 'restorepoint') $this->enabled = false;
if(empty($this->filter_name)) $this->filter_name = strtolower(basename(__FILE__,'.php'));
parent::__construct();
}
示例8: strtolower
function __construct()
{
$this->object = 'file';
$this->subtype = 'all';
$this->method = 'regex';
if (empty($this->filter_name)) {
$this->filter_name = strtolower(basename(__FILE__, '.php'));
}
parent::__construct();
$this->filter_data['[SITEROOT]'] = array('#/Thumbs.db$#', '#^Thumbs.db$#', '#/.DS_Store$#i', '#^.DS_Store$#i');
}
示例9: __construct
public function __construct()
{
$this->object = 'dbobject';
$this->subtype = 'content';
$this->method = 'direct';
$this->filter_name = 'PlatformTabledata';
// We take advantage of the filter class magic to inject our custom filters
$this->filter_data['[SITEDB]'] = array('#__session', '#__guardxt_runs');
if (AEFactory::getKettenrad()->getTag() == 'restorepoint') {
$this->enabled = false;
}
parent::__construct();
}
示例10: __construct
public function __construct()
{
$this->object = 'components';
$this->subtype = 'all';
$this->method = 'direct';
if (empty($this->filter_name)) {
$this->filter_name = strtolower(basename(__FILE__, '.php'));
}
if (AEFactory::getKettenrad()->getTag() == 'restorepoint') {
$this->enabled = false;
}
$this->joomla16 = !@file_exists(JPATH_SITE . '/includes/joomla.php');
parent::__construct();
}
示例11: hasFilters
public function hasFilters()
{
// Reset the filters
$this->filter_data = array();
// Add filters for modules
$admin = substr(JPATH_ADMINISTRATOR, strlen(JPATH_SITE) + 1);
$filterObjects = array(array('modules', 'frontend', 'modules'), array('modules', 'backend', $admin . '/modules'));
foreach ($filterObjects as $filterObject) {
$this->createFilterEntry($filterObject[0], $filterObject[1], $filterObject[2]);
}
// Plugins are a special case. They're stored in the front end, but
// there are subdirectories based on type. Extensions can define custom types,
// therefore there is no predetermined set of directories. We have to scan for it.
$this->createPluginFilters();
return parent::hasFilters();
}
示例12: __construct
public function __construct()
{
// This is a directory inclusion filter.
$this->object = 'dir';
$this->subtype = 'inclusion';
$this->method = 'direct';
$this->filter_name = 'PlatformSiteroot';
// Directory inclusion format:
// array(real_directory, add_path)
$add_path = null;
// A null add_path means that we dump this dir's contents in the archive's root
// We take advantage of the filter class magic to inject our custom filters
$configuration =& AEFactory::getConfiguration();
$this->filter_data[] = array('[SITEROOT]', $add_path);
parent::__construct();
}
示例13: __construct
public function __construct()
{
$this->object = 'dir';
$this->subtype = 'children';
$this->method = 'direct';
$this->filter_name = 'PlatformSkipdirs';
// We take advantage of the filter class magic to inject our custom filters
$configuration = AEFactory::getConfiguration();
if (defined('AKEEBACLI')) {
$tmpdir = AEUtilJconfig::getValue('tmp_path');
} else {
$jreg = JFactory::getConfig();
$tmpdir = $jreg->getValue('config.tmp_path');
}
$this->filter_data['[SITEROOT]'] = array(self::treatDirectory($configuration->get('akeeba.basic.output_directory')), self::treatDirectory($tmpdir), self::treatDirectory(JPATH_CACHE), self::treatDirectory(JPATH_ADMINISTRATOR . '/cache'), self::treatDirectory(JPATH_ROOT . '/cache'), self::treatDirectory(JPATH_ROOT . '/installation'), self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/cache'), self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/administrator/cache'), 'administrator/components/com_akeeba/backup', self::treatDirectory(AEPlatform::getInstance()->get_site_root() . '/components/libraries/cmslib/cache'), 'logs');
parent::__construct();
}
示例14: __construct
public function __construct()
{
$this->object = 'dir';
$this->subtype = 'all';
$this->method = 'direct';
$this->filter_name = 'PlatformFolders';
// Get the site's root
$configuration = AEFactory::getConfiguration();
if ($configuration->get('akeeba.platform.override_root', 0)) {
$root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
} else {
$root = '[SITEROOT]';
}
// We take advantage of the filter class magic to inject our custom filters
$this->filter_data[$root] = array('awstats', 'cgi-bin');
parent::__construct();
}
示例15: strtolower
function __construct()
{
$this->object = 'file';
$this->subtype = 'all';
$this->method = 'regex';
if (empty($this->filter_name)) {
$this->filter_name = strtolower(basename(__FILE__, '.php'));
}
parent::__construct();
// Get the site's root
$configuration = AEFactory::getConfiguration();
if ($configuration->get('akeeba.platform.override_root', 0)) {
$root = $configuration->get('akeeba.platform.newroot', '[SITEROOT]');
} else {
$root = '[SITEROOT]';
}
$this->filter_data[$root] = array('#/Thumbs.db$#', '#^Thumbs.db$#', '#/.DS_Store$#i', '#^.DS_Store$#i');
}