Class Mage_Core_Model_File_Validator_AvailablePath
Validator for check not protected/available path
Mask symbols from path: "?" - something directory with any name "" - something directory structure, which can not exist Note: For set directory structure which must be exist, need to set mask "/?/*/" Mask symbols from filename: "" - something symbols in file name Example:
//set available path $validator->setAvailablePath(array('/path/to/?/*fileMask.xml')); $validator->isValid('/path/to/MyDir/Some-fileMask.xml'); //return true $validator->setAvailablePath(array('/path/to/*/*.xml')); $validator->isValid('/path/to/my.xml'); //return true, because directory structure can't exist
- Zend_Validate_Abstract
- Mage_Core_Model_File_Validator_AvailablePath
Package: Mage\Core
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Core/Model/File/Validator/AvailablePath.php
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Core/Model/File/Validator/AvailablePath.php
public
|
|
protected
Mage_Adminhtml_Model_Core_File_Validator_SavePath_Available
|
|
public
Mage_Adminhtml_Model_Core_File_Validator_SavePath_Available
|
|
public
Mage_Adminhtml_Model_Core_File_Validator_SavePath_Available
|
|
public
Mage_Adminhtml_Model_Core_File_Validator_SavePath_Available
|
|
public
array
|
|
public
Mage_Adminhtml_Model_Core_File_Validator_SavePath_Available
|
|
public
Mage_Adminhtml_Model_Core_File_Validator_SavePath_Available
|
|
public
array
|
|
public
boolean
|
|
protected
boolean
|
#
_isValidByPaths( array $valuePathInfo, array $paths, boolean $protected )
Validate value by path masks |
string |
PROTECTED_PATH
|
'protectedPath' |
|
string |
NOT_AVAILABLE_PATH
|
'notAvailablePath' |
|
string |
PROTECTED_LFI
|
'protectedLfi' |
protected
string
|
$_value |
|
#
The path |
protected
array
|
$_protectedPaths | array() |
#
Protected paths |
protected
array
|
$_availablePaths | array() |
#
Available paths |
protected
array
|
$_pathsData |
|
#
Cache of made regular expressions from path masks |