Class Mage_Sendfriend_Model_Sendfriend

Description

Magento

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@magentocommerce.com so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade Magento to newer versions in the future. If you wish to customize Magento for your needs please refer to http://www.magentocommerce.com for more information.

Located in /Sendfriend/Model/Sendfriend.php (line 27)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Sendfriend_Model_Sendfriend
Variable Summary
Method Summary
Variables
array $_emails = array() (line 41)

Recipient Emails

  • access: protected
string $_lastCookieValue = array() (line 69)

Last values for Cookie

  • access: protected
array $_names = array() (line 34)

Recipient Names

  • access: protected
Mage_Catalog_Model_Product $_product (line 55)

Product Instance

  • access: protected
array $_sender = array() (line 48)

Sender data array

  • access: protected
int $_sentCount (line 62)

Count of sent in last period

  • access: protected

Inherited Variables

Inherited from Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::$_cacheTag
Mage_Core_Model_Abstract::$_dataSaveAllowed
Mage_Core_Model_Abstract::$_eventObject
Mage_Core_Model_Abstract::$_eventPrefix
Mage_Core_Model_Abstract::$_isObjectNew
Mage_Core_Model_Abstract::$_resource
Mage_Core_Model_Abstract::$_resourceCollectionName
Mage_Core_Model_Abstract::$_resourceName
Methods
canEmailToFriend (line 433)

Check if user is allowed to email product to a friend

  • access: public
boolean canEmailToFriend ()
getCookie (line 216)

Retrieve Cookie instance

  • throws: Mage_Core_Exception
  • access: public
Mage_Core_Model_Cookie getCookie ()
getMaxRecipients (line 423)

Get max allowed recipients for "Send to a Friend" function

  • access: public
integer getMaxRecipients ()
getMaxSendsToFriend (line 403)

Get max allowed uses of "Send to Friend" function per hour

  • access: public
integer getMaxSendsToFriend ()
getProduct (line 338)

Retrieve Product instance

  • throws: Mage_Core_Exception
  • access: public
getRecipients (line 308)

Retrieve Recipients object

  • access: public
Varien_Object getRecipients ()
getRemoteAddr (line 242)

Retrieve Visitor Remote Address

  • access: public
int getRemoteAddr ()
getSendCount (line 386)
  • deprecated: after 1.3.2.4 For get count sent letters use Mage_Sendfriend_Model_Sendfriend::getSentCount or Mage_Sendfriend_Model_Sendfriend::isExceedLimit
  • access: public
int getSendCount ([int $ip = null], [int $startTime = null])
  • int $ip
  • int $startTime
getSender (line 368)

Retrieve Sender Information Object

  • throws: Mage_Core_Exception
  • access: public
Varien_Object getSender ()
getSentCount (line 454)

Return count of sent in last period

  • access: public
int getSentCount ([bool $useCache = true])
  • bool $useCache: - flag, is allow to use value of attribute of model if it is processed last time
getTemplate (line 413)

Get current Email "Send to friend" template

  • access: public
string getTemplate ()
getWebsiteId (line 264)

Retrieve Website Id

  • access: public
int getWebsiteId ()
isExceedLimit (line 443)

Check if user is exceed limit

  • access: public
boolean isExceedLimit ()
register (line 550)

Register self in global register with name send_to_friend_model

  • access: public
send (line 100)
  • access: public
void send ()
setCookie (line 205)

Set cookie instance

  • access: public
Mage_Sendfriend_Model_Sendfriend setCookie ( $cookie, Mage_Core_Model_Cookie $product)
setProduct (line 327)

Set product instance

  • access: public
setRecipients (line 275)

Set Recipients

  • access: public
Mage_Sendfriend_Model_Sendfriend setRecipients (array $recipients)
  • array $recipients
setRemoteAddr (line 231)

Set Visitor Remote Address

  • access: public
Mage_Sendfriend_Model_Sendfriend setRemoteAddr (int $ipAddr)
  • int $ipAddr: the IP address on Long Format
setSender (line 353)

Set Sender Information array

  • access: public
Mage_Sendfriend_Model_Sendfriend setSender (array $sender)
  • array $sender
setWebsiteId (line 253)

Set Website Id

  • access: public
Mage_Sendfriend_Model_Sendfriend setWebsiteId (int $id)
  • int $id: - website id
toOptionArray (line 96)

Retrieve Option Array

  • deprecated: It Is a not Source model
  • access: public
array toOptionArray ()
validate (line 156)

Validate Form data

  • access: public
bool|array validate ()
_amountByCookies (line 564)
  • deprecated: after 1.3.2.4 use Mage_Sendfriend_Model_Sendfriend::_sentCountByCookies
  • access: protected
int _amountByCookies ()
_amountByIp (line 575)
  • deprecated: after 1.3.2.4 use Mage_Sendfriend_Model_Sendfriend::_sentCountByIp
  • access: protected
int _amountByIp ()
_construct (line 75)

Initialize resource model

  • access: protected
void _construct ()
_getHelper (line 85)

Retrieve Data Helper

  • access: protected
_incrementSentCount (line 475)

Increase count of sent

  • access: protected
int _incrementSentCount ()
_sentCountByCookies (line 493)

Return count of sent in last period by cookie

  • access: protected
int _sentCountByCookies ([bool $increment = false])
  • bool $increment: - flag, increase count before return value
_sentCountByIp (line 530)

Return count of sent in last period by IP address

  • access: protected
int _sentCountByIp ([bool $increment = false])
  • bool $increment: - flag, increase count before return value

Inherited Methods

Inherited From Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::afterCommitCallback()
Mage_Core_Model_Abstract::afterLoad()
Mage_Core_Model_Abstract::cleanModelCache()
Mage_Core_Model_Abstract::clearInstance()
Mage_Core_Model_Abstract::delete()
Mage_Core_Model_Abstract::getCacheIdTags()
Mage_Core_Model_Abstract::getCacheTags()
Mage_Core_Model_Abstract::getCollection()
Mage_Core_Model_Abstract::getEntityId()
Mage_Core_Model_Abstract::getId()
Mage_Core_Model_Abstract::getIdFieldName()
Mage_Core_Model_Abstract::getResource()
Mage_Core_Model_Abstract::getResourceCollection()
Mage_Core_Model_Abstract::getResourceName()
Mage_Core_Model_Abstract::isObjectNew()
Mage_Core_Model_Abstract::load()
Mage_Core_Model_Abstract::save()
Mage_Core_Model_Abstract::setId()
Mage_Core_Model_Abstract::_afterDelete()
Mage_Core_Model_Abstract::_afterDeleteCommit()
Mage_Core_Model_Abstract::_afterLoad()
Mage_Core_Model_Abstract::_afterSave()
Mage_Core_Model_Abstract::_afterSaveCommit()
Mage_Core_Model_Abstract::_beforeDelete()
Mage_Core_Model_Abstract::_beforeLoad()
Mage_Core_Model_Abstract::_beforeSave()
Mage_Core_Model_Abstract::_clearData()
Mage_Core_Model_Abstract::_clearReferences()
Mage_Core_Model_Abstract::_getEventData()
Mage_Core_Model_Abstract::_getResource()
Mage_Core_Model_Abstract::_hasModelChanged()
Mage_Core_Model_Abstract::_init()
Mage_Core_Model_Abstract::_protectFromNonAdmin()
Mage_Core_Model_Abstract::_setResourceModel()

Documentation generated on Fri, 11 Feb 2011 17:12:10 +0200 by phpDocumentor 1.4.3