Proyectos de Subversion LeadersLinked - Services

Rev

Rev 334 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 334 Rev 345
Línea 1... Línea 1...
1
<?php
1
<?php
2
 
-
 
3
declare(strict_types=1);
2
declare(strict_types = 1);
4
 
-
 
5
namespace LeadersLinked\Command;
3
namespace LeadersLinked\Command;
Línea 6... Línea 4...
6
 
4
 
7
use Symfony\Component\Console\Command\Command;
5
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Input\InputInterface;
Línea 11... Línea 9...
11
use Laminas\Log\LoggerInterface;
9
use Laminas\Log\LoggerInterface;
12
use Laminas\Mvc\I18n\Translator;
10
use Laminas\Mvc\I18n\Translator;
13
use LeadersLinked\Cache\CacheInterface;
11
use LeadersLinked\Cache\CacheInterface;
14
use PHPMailer\PHPMailer\PHPMailer;
12
use PHPMailer\PHPMailer\PHPMailer;
Línea 15... Línea -...
15
 
-
 
16
 
13
 
17
class TestCommand extends Command
14
class TestCommand extends Command
-
 
15
{
18
{
16
 
19
    /**
17
    /**
20
     *
18
     *
21
     * @var \Laminas\Db\Adapter\AdapterInterface
19
     * @var \Laminas\Db\Adapter\AdapterInterface
22
     */
20
     */
23
    private $adapter;
21
    private $adapter;
24
    
22
 
25
    /**
23
    /**
26
     *
24
     *
27
     * @var \LeadersLinked\Cache\CacheInterface
25
     * @var \LeadersLinked\Cache\CacheInterface
28
     */
26
     */
29
    private $cache;
-
 
30
    
27
    private $cache;
31
    
28
 
32
    /**
29
    /**
33
     *
30
     *
34
     * @var \Laminas\Log\LoggerInterface
31
     * @var \Laminas\Log\LoggerInterface
35
     */
32
     */
36
    private $logger;
33
    private $logger;
37
    
34
 
38
    /**
35
    /**
39
     *
36
     *
40
     * @var array
37
     * @var array
41
     */
38
     */
42
    private $config;
-
 
43
    
39
    private $config;
44
    
40
 
45
    /**
41
    /**
46
     *
42
     *
47
     * @var \Laminas\Mvc\I18n\Translator
43
     * @var \Laminas\Mvc\I18n\Translator
48
     */
44
     */
49
    private $translator;
-
 
50
    
45
    private $translator;
51
    
46
 
52
    /**
47
    /**
53
     *
48
     *
54
     * @param \Laminas\Db\Adapter\AdapterInterface $adapter
49
     * @param \Laminas\Db\Adapter\AdapterInterface $adapter
-
 
50
     * @param \LeadersLinked\Cache\CacheInterface $cache
55
     * @param \LeadersLinked\Cache\CacheInterface $cache
51
     * @param
56
     * @param \Laminas\Log\LoggerInterface
52
     *            \Laminas\Log\LoggerInterface
57
     * @param array $config
53
     * @param array $config
58
     * @param \Laminas\Mvc\I18n\Translator $translator
54
     * @param \Laminas\Mvc\I18n\Translator $translator
59
     */
55
     */
60
    public function __construct($adapter, $cache, $logger, $config, $translator)
56
    public function __construct($adapter, $cache, $logger, $config, $translator)
61
    {
57
    {
62
        $this->adapter      = $adapter;
58
        $this->adapter = $adapter;
63
        $this->cache        = $cache;
59
        $this->cache = $cache;
64
        $this->logger       = $logger;
60
        $this->logger = $logger;
65
        $this->config       = $config;
61
        $this->config = $config;
66
        $this->translator   = $translator;
62
        $this->translator = $translator;
67
        
63
 
68
        parent::__construct();
64
        parent::__construct();
Línea 69... Línea -...
69
    }
-
 
70
 
65
    }
71
    
66
 
72
    protected function execute(InputInterface $input, OutputInterface $output) : int
67
    protected function execute(InputInterface $input, OutputInterface $output): int
73
    {
-
 
74
        $output->writeln('Inicio del proceso');
68
    {
75
        
69
        $output->writeln('Inicio del proceso');
76
        
70
 
77
        $phpMailer = new PHPMailer();
-
 
78
                $phpMailer->isSMTP();
-
 
79
                
-
 
80
                $phpMailer->addAddress('eyanezve@gmail.com', 'efrain yanez');
-
 
81
                
-
 
82
                
-
 
83
 
-
 
84
                
-
 
85
                
-
 
86
                $phpMailer->setFrom('no-reply@leaderslinked.com', 'LeadersLinked');
-
 
87
                $phpMailer->SMTPDebug    = true; 
-
 
88
                $phpMailer->Host         = 'email-smtp.us-west-2.amazonaws.com';
-
 
89
                $phpMailer->Port         = 587;
-
 
90
                $phpMailer->IsHTML(true);
-
 
91
                $phpMailer->SMTPAuth    = true;
-
 
92
                $phpMailer->SMTPSecure   = 'tls';
-
 
93
                $phpMailer->SMTPAuth     = true;
-
 
94
                $phpMailer->Username     = 'AKIA4A6EDNEWNODSDUKH';
-
 
95
                $phpMailer->Password     = 'BDHVmeD2FVwHCF7ova0+eGcHQQ7fHbztIV9mrevubKgc';
-
 
96
                $phpMailer->Subject      = 'Asunto de prueba';
-
 
97
                $phpMailer->Body         = 'Mensaje de Prueba';
-
 
98
                $phpMailer->AltBody      = 'Mensaje de Prueba';
-
 
99
                $phpMailer->CharSet      = 'UTF-8';
-
 
100
                
-
 
101
               
-
 
102
                $result = $phpMailer->send();
-
 
103
                
-
 
104
                print_r($result);
-
 
105
                
-
 
106
                
-
 
107
        
-
 
108
        /*
-
 
109
        $source = 'data/background-61af7d08d1156.png';
-
 
110
        $target_path = 'test';
-
 
111
        $target_code = '001';
-
 
112
        $target_filename = 'background-61af7d08d1156.png';
-
 
113
        $target_width = 300;
-
 
114
        $target_height = 300;
-
 
115
        $crop_to_dimensions = false;
-
 
116
        $unlink_source = false;
-
 
117
        
-
 
Línea -... Línea 71...
-
 
71
        $phpMailer = new PHPMailer();
Línea -... Línea 72...
-
 
72
        $phpMailer->isSMTP();
-
 
73
 
-
 
74
        $phpMailer->addAddress('eyanezve@gmail.com', 'efrain yanez');
-
 
75
 
-
 
76
        $phpMailer->setFrom('no-reply@leaderslinked.com', 'LeadersLinked');
-
 
77
        $phpMailer->SMTPDebug = true;
-
 
78
        $phpMailer->Host = 'email-smtp.us-west-2.amazonaws.com';
-
 
79
        $phpMailer->Port = 587;
-
 
80
        $phpMailer->IsHTML(true);
-
 
81
        $phpMailer->SMTPAuth = true;
-
 
82
        $phpMailer->SMTPSecure = 'tls';
-
 
83
        $phpMailer->SMTPAuth = true;
-
 
84
        $phpMailer->Username = 'AKIA4A6EDNEWNODSDUKH';
-
 
85
        $phpMailer->Password = 'BDHVmeD2FVwHCF7ova0+eGcHQQ7fHbztIV9mrevubKgc';
-
 
86
        $phpMailer->Subject = 'Asunto de prueba';
-
 
87
        $phpMailer->Body = 'Mensaje de Prueba';
-
 
88
        $phpMailer->AltBody = 'Mensaje de Prueba';
-
 
89
        $phpMailer->CharSet = 'UTF-8';
-
 
90
 
-
 
91
        $result = $phpMailer->send();
-
 
92
 
-
 
93
        print_r($result);
-
 
94
 
-
 
95
        /*
-
 
96
         * $source = 'data/background-61af7d08d1156.png';
-
 
97
         * $target_path = 'test';
-
 
98
         * $target_code = '001';
-
 
99
         * $target_filename = 'background-61af7d08d1156.png';
-
 
100
         * $target_width = 300;
-
 
101
         * $target_height = 300;
-
 
102
         * $crop_to_dimensions = false;
-
 
103
         * $unlink_source = false;
-
 
104
         *
-
 
105
         * $image = \LeadersLinked\Library\Image::getInstance($this->config);
-
 
106
         * $response = $image->uploadProcessChangeSize($source, $target_path, $target_code, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source);
-
 
107
         *
-
 
108
         *
-
 
109
         *
Línea 118... Línea -...
118
        $image = \LeadersLinked\Library\Image::getInstance($this->config);
-
 
119
        $response = $image->uploadProcessChangeSize($source, $target_path, $target_code, $target_filename, $target_width, $target_height, $crop_to_dimensions, $unlink_source);
-
 
120
 
-
 
121
 
-
 
122
 
110
         * $output->writeln('Fin del proceso');
123
        $output->writeln('Fin del proceso');
111
         *
124
        
-
 
125
        print_r($response);*/
-
 
126
        
-
 
127
        return 0;
112
         * print_r($response);