Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Address
  • Attachment
  • Body
  • Header
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  1: <?php
  2: 
  3: /**
  4:  * Jyxo PHP Library
  5:  *
  6:  * LICENSE
  7:  *
  8:  * This source file is subject to the new BSD license that is bundled
  9:  * with this package in the file license.txt.
 10:  * It is also available through the world-wide-web at this URL:
 11:  * https://github.com/jyxo/php/blob/master/license.txt
 12:  */
 13: 
 14: namespace Jyxo\Mail\Email;
 15: 
 16: /**
 17:  * Email header.
 18:  *
 19:  * @category Jyxo
 20:  * @package Jyxo\Mail
 21:  * @subpackage Email
 22:  * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.
 23:  * @license https://github.com/jyxo/php/blob/master/license.txt
 24:  * @author Jaroslav HanslĂ­k
 25:  */
 26: class Header extends \Jyxo\Spl\Object
 27: {
 28:     /**
 29:      * Header name.
 30:      *
 31:      * @var string
 32:      */
 33:     private $name = '';
 34: 
 35:     /**
 36:      * Value.
 37:      *
 38:      * @var string
 39:      */
 40:     private $value = '';
 41: 
 42:     /**
 43:      * Creates a header.
 44:      *
 45:      * @param string $name Header name
 46:      * @param string $value Value
 47:      */
 48:     public function __construct($name, $value)
 49:     {
 50:         $this->setName($name);
 51:         $this->setValue($value);
 52:     }
 53: 
 54:     /**
 55:      * Returns header name.
 56:      *
 57:      * @return string
 58:      */
 59:     public function getName()
 60:     {
 61:         return $this->name;
 62:     }
 63: 
 64:     /**
 65:      * Sets header name.
 66:      *
 67:      * @param string $name Name
 68:      * @return \Jyxo\Mail\Email\Header
 69:      */
 70:     public function setName($name)
 71:     {
 72:         $this->name = (string) $name;
 73: 
 74:         return $this;
 75:     }
 76: 
 77:     /**
 78:      * Returns value.
 79:      *
 80:      * @return string
 81:      */
 82:     public function getValue()
 83:     {
 84:         return $this->value;
 85:     }
 86: 
 87:     /**
 88:      * Sets value.
 89:      *
 90:      * @param string $value Value
 91:      * @return \Jyxo\Mail\Email\Header
 92:      */
 93:     public function setValue($value)
 94:     {
 95:         $this->value = (string) $value;
 96: 
 97:         return $this;
 98:     }
 99: }
100: 
Jyxo PHP Library API documentation generated by ApiGen 2.3.0