Fix All Comment
This commit is contained in:
parent
b3c5a09349
commit
d3001ecc28
@ -1,11 +1,10 @@
|
||||
<?php namespace UElearning\Config\Exception;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 設定檔的例外
|
||||
*
|
||||
* @package UElearning
|
||||
* @subpackage Config
|
||||
* 設定檔的例外檔案
|
||||
*/
|
||||
|
||||
class ConfigNoFoundException extends \UnexpectedValueException {}
|
||||
namespace UElearning\Config\Exception;
|
||||
|
||||
/*class ConfigNoFoundException extends \UnexpectedValueException {}
|
||||
class ConfigErrException extends \UnexpectedValueException {}
|
||||
*/
|
@ -1,13 +1,12 @@
|
||||
<?php namespace UElearning\Database;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 整體資料庫操作
|
||||
*
|
||||
* 此檔案針對整體資料庫的功能,像是建立此資料庫、建立表格、清空...等等
|
||||
*
|
||||
* @package UElearning
|
||||
* @subpackage Database
|
||||
*/
|
||||
|
||||
namespace UElearning\Database;
|
||||
|
||||
require_once UELEARNING_LIB_ROOT.'Database/Database.php';
|
||||
require_once UELEARNING_LIB_ROOT.'Database/Exceptions.php';
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
<?php namespace UElearning\Database;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 使用者資料表
|
||||
*
|
||||
* 此檔案針對使用者資料表的功能。
|
||||
*
|
||||
* @package UElearning
|
||||
* @subpackage Database
|
||||
*/
|
||||
|
||||
namespace UElearning\Database;
|
||||
|
||||
require_once UELEARNING_LIB_ROOT.'Database/Database.php';
|
||||
require_once UELEARNING_LIB_ROOT.'Database/Exceptions.php';
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php namespace UElearning\Database;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 整體資料庫操作
|
||||
*
|
||||
* 此檔案針對整體資料庫的功能,像是建立此資料庫、建立表格、清空...等等
|
||||
*
|
||||
* @package UElearning
|
||||
* @subpackage Database
|
||||
*/
|
||||
|
||||
namespace UElearning\Database;
|
||||
|
||||
require_once UELEARNING_LIB_ROOT.'Database/MySQLDB.php';
|
||||
require_once UELEARNING_LIB_ROOT.'Database/Exceptions.php';
|
||||
use UElearning\Database\Exception;
|
||||
|
@ -1,20 +1,21 @@
|
||||
<?php namespace UElearning\Database\Exception;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 設定檔的例外
|
||||
*
|
||||
* @package UElearning
|
||||
* @subpackage Database
|
||||
*
|
||||
* 資料庫相關的例外檔案
|
||||
*/
|
||||
|
||||
namespace UElearning\Database\Exception;
|
||||
|
||||
/**
|
||||
* 沒有支援的資料庫系統例外
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class DatabaseNoSupportException extends \UnexpectedValueException {
|
||||
private $type;
|
||||
|
||||
/**
|
||||
* 欲使用的資料庫系統名稱
|
||||
* @type string
|
||||
*/
|
||||
private $type;
|
||||
|
||||
/**
|
||||
* 沒有支援的資料庫系統
|
||||
|
@ -1,12 +1,13 @@
|
||||
<?php namespace UElearning\Database;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 資料庫連接專用
|
||||
*
|
||||
* 有用到的Define:
|
||||
* DB_NAME, DB_HOST, DB_USER, DB_PASS
|
||||
*/
|
||||
|
||||
namespace UElearning\Database;
|
||||
|
||||
use \PDO;
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 使用者班級群組類別檔案
|
||||
*/
|
||||
|
||||
namespace UElearning\User;
|
||||
// TODO: write this code
|
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 班級群組管理類別檔案
|
||||
*/
|
||||
|
||||
namespace UElearning\User;
|
||||
// TODO: write this code
|
@ -1,16 +1,15 @@
|
||||
<?php namespace UElearning\User\Exception;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 設定檔的例外
|
||||
*
|
||||
* @package UElearning
|
||||
* @subpackage User
|
||||
*
|
||||
* 使用者帳號群組相關例外類別檔案
|
||||
*/
|
||||
|
||||
namespace UElearning\User\Exception;
|
||||
|
||||
/**
|
||||
* 使用者帳號例外
|
||||
* @since 3.0.0
|
||||
* @package UElearning
|
||||
* @subpackage User
|
||||
*/
|
||||
abstract class UserException extends \UnexpectedValueException {
|
||||
|
||||
@ -22,7 +21,7 @@ abstract class UserException extends \UnexpectedValueException {
|
||||
|
||||
/**
|
||||
* 使用者帳號例外
|
||||
* @param array $userId 輸入的使用者名稱
|
||||
* @param string $userId 輸入的使用者名稱
|
||||
* @param string $description 描述
|
||||
*/
|
||||
public function __construct($userId, $description) {
|
||||
@ -45,6 +44,10 @@ abstract class UserException extends \UnexpectedValueException {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class UserNoFoundException extends UserException {
|
||||
/**
|
||||
* 沒有找到此帳號
|
||||
* @param string $userId 輸入的使用者名稱
|
||||
*/
|
||||
public function __construct($userId) {
|
||||
parent::__construct($userId, 'User: "'.$this->type.'" is no found.');
|
||||
}
|
||||
@ -55,6 +58,10 @@ class UserNoFoundException extends UserException {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class UserPasswordErrException extends UserException {
|
||||
/**
|
||||
* 沒有找到此帳號
|
||||
* @param string $userId 輸入的使用者名稱
|
||||
*/
|
||||
public function __construct($userId) {
|
||||
parent::__construct($userId, 'User: "'.$this->type.'" password is wrong.');
|
||||
}
|
||||
@ -65,6 +72,10 @@ class UserPasswordErrException extends UserException {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class UserNoActivatedException extends UserException {
|
||||
/**
|
||||
* 此帳號未啟用
|
||||
* @param string $userId 輸入的使用者名稱
|
||||
*/
|
||||
public function __construct($userId) {
|
||||
parent::__construct($userId, 'User: "'.$this->type.'" is no activated.');
|
||||
}
|
||||
@ -76,6 +87,10 @@ class UserNoActivatedException extends UserException {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class UserIdExistException extends UserException {
|
||||
/**
|
||||
* 已有重複的使用者名稱
|
||||
* @param string $userId 輸入的使用者名稱
|
||||
*/
|
||||
public function __construct($userId) {
|
||||
parent::__construct($userId, 'UserId: "'.$this->type.'" is exist.');
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php namespace UElearning\User;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 此位使用者的相關操作
|
||||
*
|
||||
* @todo: ew
|
||||
*/
|
||||
// @todo fdnskfjn
|
||||
|
||||
namespace UElearning\User;
|
||||
|
||||
// TODO: write this code
|
@ -1,17 +1,15 @@
|
||||
<?php namespace UElearning\User;
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* 管理使用者的操作
|
||||
*
|
||||
* @package UElearning
|
||||
* @subpackage User
|
||||
*/
|
||||
|
||||
namespace UElearning\User;
|
||||
|
||||
/**
|
||||
* 使用者帳號管理
|
||||
* 管理使用者的操作
|
||||
*
|
||||
* @author Yuan Chiu <chyuaner@gmail.com>
|
||||
* @version 3.0
|
||||
* @version 2.0.0
|
||||
* @package UElearning
|
||||
* @subpackage User
|
||||
*/
|
||||
@ -19,7 +17,7 @@ class UserControl {
|
||||
|
||||
/**
|
||||
* 建立使用者
|
||||
* @since 3.0.0
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function create() {
|
||||
// TODO: Fill code in
|
||||
@ -30,7 +28,7 @@ class UserControl {
|
||||
*
|
||||
* @param string $userName 帳號名稱
|
||||
* @return bool 已有相同的帳號名稱
|
||||
* @since 3.0.0
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function isExist($userName) {
|
||||
// TODO: Fill code in
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 使用者群組類別檔案
|
||||
*/
|
||||
|
||||
namespace UElearning\User;
|
||||
// TODO: write this code
|
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 使用者群組管理類別檔案
|
||||
*/
|
||||
|
||||
namespace UElearning\User;
|
||||
// TODO: write this code
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 使用者登入階段管理類別檔案
|
||||
*/
|
||||
* 使用者登入階段管理類別檔案
|
||||
*/
|
||||
|
||||
namespace UElearning\User;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user