Class Mage_Downloadable_Model_Link_Api_Validator
Downloadable links validator
Package: Mage\Downloadable
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/Downloadable/Model/Link/Api/Validator.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/Downloadable/Model/Link/Api/Validator.php
public
array
|
|
public
boolean
|
#
validateType( string $type )
Validate resourceType, it should be one of (links|samples|link_samples) |
public
|
#
validateAttributes( array & $resource, string $resourceType )
Validate all parameters and loads default values for omitted parameters. |
public
|
|
public
|
|
protected
|
|
public
|
|
public
|
|
public
|
#
validateNumOfDownloads( integer & $var )
Validate variable, in case of fault loads default entity. |
public
|
#
validateUnlimited( integer|boolean & $var )
Validate variable, in case of fault loads default entity. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
protected
array
|
$_types | array('link', 'sample') |
#
Acceptable resourceTypes array |
protected
array
|
$_uploadTypes | array('file', 'url') |
#
Acceptable upload types array |
protected
array
|
$_defaultAttributes | array(
'link' => array(
'title' => 'Title', // $1
'price' => 'Price', // $2
'number_of_downloads' => 'NumOfDownloads', // if no set is_unlimited to 1 $3
'is_unlimited' => 'Unlimited', // 1|0 $4
'is_shareable' => 'Shareable', // 1|0|2 (2) $5
'type' => 'UploadType', // file|url (file) $6
'file' => 'File', // array(name, base64_content) $7
'link_url' => 'Url', // URL $8
'sort_order' => 'Order', // int (0) $9
'sample' => array(
'type' => 'UploadType', // file|url (file) $6
'file' => 'File', // array(name, base64_content) $7
'url' => 'Url' // URL $8
)
),
'sample' => array(
'title' => 'Title', // $1
'type' => 'UploadType', // file|url (file) $6
'file' => 'File', // array(name, base64_content) $7
'sample_url' => 'Url', // URL $8
'sort_order' => 'Order' // int (0) $9
)
) |
#
List of all attributes and names endings of validation functions |