Skip to content

Commit

Permalink
Removed wrap method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Apr 17, 2011
1 parent 5815743 commit 8457c8f
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions lib/Cake/Controller/Component/EmailComponent.php
Expand Up @@ -488,39 +488,6 @@ function _findFiles($attachment) {
return null;
}

/**
* Wrap the message using EmailComponent::$lineLength
*
* @param string $message Message to wrap
* @param integer $lineLength Max length of line
* @return array Wrapped message
* @access protected
*/
function _wrap($message, $lineLength = null) {
$message = $this->_strip($message, true);
$message = str_replace(array("\r\n","\r"), "\n", $message);
$lines = explode("\n", $message);
$formatted = array();

if ($this->_lineLength !== null) {
trigger_error(__d('cake_dev', '_lineLength cannot be accessed please use lineLength'), E_USER_WARNING);
$this->lineLength = $this->_lineLength;
}

if (!$lineLength) {
$lineLength = $this->lineLength;
}

foreach ($lines as $line) {
if (substr($line, 0, 1) == '.') {
$line = '.' . $line;
}
$formatted = array_merge($formatted, explode("\n", wordwrap($line, $lineLength, "\n", true)));
}
$formatted[] = '';
return $formatted;
}

/**
* Encode the specified string using the current charset
*
Expand Down

0 comments on commit 8457c8f

Please sign in to comment.