imap skelton added
This commit is contained in:
parent
e9c9ff44af
commit
a9843f7272
39
src/Core/Connection.php
Normal file
39
src/Core/Connection.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/**
|
||||
* @author clivern <hello@clivern.com>
|
||||
*/
|
||||
|
||||
namespace Clivern\Imap\Core;
|
||||
|
||||
/**
|
||||
* Connection Class
|
||||
*
|
||||
* @package Clivern\Imap\Core
|
||||
*/
|
||||
class Connection
|
||||
{
|
||||
protected $server;
|
||||
protected $port;
|
||||
protected $email;
|
||||
protected $password;
|
||||
protected $stream;
|
||||
|
||||
public function __construct($server, $port, $email, $password)
|
||||
{
|
||||
$this->server = $server;
|
||||
$this->port = $port;
|
||||
$this->email = $email;
|
||||
$this->password = $password;
|
||||
}
|
||||
|
||||
public function connect()
|
||||
{
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getStream()
|
||||
{
|
||||
return $this->stream;
|
||||
}
|
||||
}
|
16
src/Core/Message.php
Normal file
16
src/Core/Message.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* @author clivern <hello@clivern.com>
|
||||
*/
|
||||
|
||||
namespace Clivern\Imap\Core;
|
||||
|
||||
/**
|
||||
* Message Class
|
||||
*
|
||||
* @package Clivern\Imap\Core
|
||||
*/
|
||||
class Message
|
||||
{
|
||||
#~
|
||||
}
|
18
src/Core/MessageIterator.php
Normal file
18
src/Core/MessageIterator.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* @author clivern <hello@clivern.com>
|
||||
*/
|
||||
|
||||
namespace Clivern\Imap\Core;
|
||||
|
||||
use Clivern\Imap\Core\Message;
|
||||
|
||||
/**
|
||||
* Message Iterator Class
|
||||
*
|
||||
* @package Clivern\Imap\Core
|
||||
*/
|
||||
class MessageIterator
|
||||
{
|
||||
#~
|
||||
}
|
34
src/Core/Search.php
Normal file
34
src/Core/Search.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* @author clivern <hello@clivern.com>
|
||||
*/
|
||||
|
||||
namespace Clivern\Imap\Core;
|
||||
|
||||
/**
|
||||
* Search Class
|
||||
*
|
||||
* @package Clivern\Imap\Core
|
||||
*/
|
||||
class Search
|
||||
{
|
||||
protected $stream;
|
||||
protected $filters;
|
||||
|
||||
public function __construct($stream)
|
||||
{
|
||||
$this->stream = $stream;
|
||||
}
|
||||
|
||||
public function addFilter($filter)
|
||||
{
|
||||
$this->filters[] = $filter;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFilters()
|
||||
{
|
||||
return $this->filters;
|
||||
}
|
||||
}
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
namespace Clivern\Imap;
|
||||
|
||||
use Clivern\Imap\Core\Connection;
|
||||
use Clivern\Imap\Core\Search;
|
||||
use Clivern\Imap\Core\MessageIterator;
|
||||
|
||||
/**
|
||||
* MailBox Class
|
||||
*
|
||||
|
@ -12,6 +16,26 @@ namespace Clivern\Imap;
|
|||
*/
|
||||
class MailBox
|
||||
{
|
||||
|
||||
protected $connection;
|
||||
protected $search;
|
||||
protected $message_iterator;
|
||||
|
||||
public function __construct(Connection $connection, Search $search, MessageIterator $message_iterator)
|
||||
{
|
||||
$this->connection = $connection;
|
||||
$this->search = $search;
|
||||
$this->message_iterator = $message_iterator;
|
||||
}
|
||||
|
||||
|
||||
public function getMessageIterator()
|
||||
{
|
||||
return $this->message_iterator;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function get()
|
||||
{
|
||||
return "test";
|
||||
|
|
|
@ -16,7 +16,6 @@ class MailBoxTest extends TestCase
|
|||
{
|
||||
public function testGet()
|
||||
{
|
||||
$mb = new \Clivern\Imap\MailBox();
|
||||
$this->assertEquals($mb->get(), 'test');
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue