change the namespaces in User module

This commit is contained in:
Jianxuan Li 2015-01-13 11:06:14 +08:00
parent cc2406aee5
commit fed47b03ca
7 changed files with 21 additions and 24 deletions

View File

@ -1,5 +1,5 @@
<?php
namespace Sookon\User\Event;
namespace Westdc\User\Event;
use Zend\EventManager\EventInterface;

View File

@ -1,5 +1,5 @@
<?php
namespace Sookon\User;
namespace Westdc\User;
class Gravatar{

View File

@ -1,13 +1,13 @@
<?php
namespace Sookon\User\Handle;
namespace Westdc\User\Handle;
use Sookon\Mail\Mail;
use Sookon\Helpers\View as view;
use Sookon\Helpers\Pdo;
use Sookon\Helpers\Config;
use Westdc\Mail\Mail;
use Westdc\Helpers\View as view;
use Westdc\Helpers\Pdo;
use Westdc\Helpers\Config;
use Zend\EventManager\EventInterface;
class EditHandle implements \Sookon\User\Event\EditEvent
class EditHandle
{
private $db; //传入PDO对象
public $tbl_member = "tbl_member";

View File

@ -1,13 +1,12 @@
<?php
namespace Sookon\User\Handle;
namespace Westdc\User\Handle;
use Sookon\Helpers\Dbh as dbh;
use Sookon\Helpers\PDO as Db;
use Sookon\User\Gravatar;
use Sookon\Helpers\View as view;
use Westdc\Db\Dbh as dbh;
use Westdc\Db\Pdo as Db;
use Westdc\User\Gravatar;
use Zend\EventManager\EventInterface;
class LoginHandle implements \Sookon\User\Event\LoginEvent
class LoginHandle
{
private $db; //传入PDO对象
public $tbl_member = "tbl_member";
@ -17,8 +16,6 @@ class LoginHandle implements \Sookon\User\Event\LoginEvent
public $FieldEmail = "email";
public $FieldLastloginIp = "last_login_ip";
public $FieldGravatarEmail = "gravatar_email";
private $DefaultFetchMode = \PDO::FETCH_BOTH; //默认检索模式防止出现sdtClass错误
private $config; //全局配置
function __construct()
{
@ -55,7 +52,7 @@ class LoginHandle implements \Sookon\User\Event\LoginEvent
$sql = "SELECT id,{$this->FieldPasword},status FROM {$this->tbl_member} WHERE {$this->FieldUsername}=?";
$sth = $this->db->prepare($sql);
$rs = $sth->execute(array($data[$this->FieldUsername]));
$row = $sth->fetch();
$row = $sth->fetch(\PDO::FETCH_ASSOC);
if(isset($row['id']) && !empty($row['id']))
{

View File

@ -1,8 +1,8 @@
<?php
namespace Sookon\User\Listener;
namespace Westdc\User\Listener;
use Sookon\User\Handle\RegisterHandle;
use Sookon\User\Handle\LoginHandle;
use Westdc\User\Handle\RegisterHandle;
use Westdc\User\Handle\LoginHandle;
use Zend\EventManager\EventCollection;
use Zend\EventManager\ListenerAggregateInterface;
use Zend\EventManager\EventInterface;

View File

@ -1,7 +1,7 @@
<?php
namespace Sookon\User\Listener;
namespace Westdc\User\Listener;
use Sookon\User\Handle\EditHandle;
use Westdc\User\Handle\EditHandle;
use Zend\EventManager\EventCollection;
use Zend\EventManager\ListenerAggregateInterface;
use Zend\EventManager\EventInterface;

View File

@ -1,7 +1,7 @@
<?php
namespace Sookon\User\Listener;
namespace Westdc\User\Listener;
use Sookon\User\Handle\PwdHandle;
use Westdc\User\Handle\PwdHandle;
use Zend\EventManager\EventCollection;
use Zend\EventManager\ListenerAggregateInterface;
use Zend\EventManager\EventInterface;