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 <?php
namespace Sookon\User\Event; namespace Westdc\User\Event;
use Zend\EventManager\EventInterface; use Zend\EventManager\EventInterface;

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<?php <?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\EventCollection;
use Zend\EventManager\ListenerAggregateInterface; use Zend\EventManager\ListenerAggregateInterface;
use Zend\EventManager\EventInterface; use Zend\EventManager\EventInterface;

View File

@ -1,7 +1,7 @@
<?php <?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\EventCollection;
use Zend\EventManager\ListenerAggregateInterface; use Zend\EventManager\ListenerAggregateInterface;
use Zend\EventManager\EventInterface; use Zend\EventManager\EventInterface;