Swift_Spool
last analyzed

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 38
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
start() 0 1 ?
stop() 0 1 ?
isStarted() 0 1 ?
queueMessage() 0 1 ?
flushQueue() 0 1 ?
1
<?php
2
3
/*
4
 * This file is part of SwiftMailer.
5
 * (c) 2009 Fabien Potencier <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
/**
12
 * Interface for spools.
13
 *
14
 * @author Fabien Potencier
15
 */
16
interface Swift_Spool
0 ignored issues
show
Coding Style Compatibility introduced by
Each interface must be in a namespace of at least one level (a top-level vendor name)

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
17
{
18
    /**
19
     * Starts this Spool mechanism.
20
     */
21
    public function start();
22
23
    /**
24
     * Stops this Spool mechanism.
25
     */
26
    public function stop();
27
28
    /**
29
     * Tests if this Spool mechanism has started.
30
     *
31
     * @return bool
32
     */
33
    public function isStarted();
34
35
    /**
36
     * Queues a message.
37
     *
38
     * @param Swift_Mime_Message $message The message to store
39
     *
40
     * @return bool Whether the operation has succeeded
41
     */
42
    public function queueMessage(Swift_Mime_Message $message);
43
44
    /**
45
     * Sends messages using the given transport instance.
46
     *
47
     * @param Swift_Transport $transport        A transport instance
48
     * @param string[]        $failedRecipients An array of failures by-reference
49
     *
50
     * @return int The number of sent emails
51
     */
52
    public function flushQueue(Swift_Transport $transport, &$failedRecipients = null);
53
}
54