Ejemplo n.º 1
0
 /**
  * 构造函数
  *
  * @return FLEA_Rbac
  */
 function FLEA_Rbac()
 {
     $this->_sessionKey = FLEA::getAppInf('RBACSessionKey');
     if ($this->_sessionKey == 'RBAC_USERDATA') {
         trigger_error(_ET(0x701005), E_USER_WARNING);
     }
 }
 /**
  * 构造函数
  *
  * @param string $filename
  *
  * @return FLEA_Exception_ExpectedFile
  */
 function FLEA_Exception_ExpectedFile($filename)
 {
     $this->filename = $filename;
     $code = 0x102001;
     $msg = sprintf(_ET($code), $filename);
     parent::FLEA_Exception($msg, $code);
 }
 /**
  * 构造函数
  *
  * @param string $prototypeMethod
  *
  * @return FLEA_Exception_MustOverwrite
  */
 function FLEA_Exception_MustOverwrite($prototypeMethod)
 {
     $this->prototypeMethod = $prototypeMethod;
     $code = 0x102008;
     $msg = sprintf(_ET($code), $prototypeMethod);
     parent::FLEA_Exception($msg, $code);
 }
Ejemplo n.º 4
0
 /**
  * 构造函数
  *
  * @param $dsn
  *
  * @return FLEA_Db_Exception_InvalidDSN
  */
 function FLEA_Db_Exception_InvalidDSN($dsn)
 {
     unset($this->dsn['password']);
     $this->dsn = $dsn;
     $code = 0x6ff001;
     parent::FLEA_Exception(_ET($code), $code);
 }
Ejemplo n.º 5
0
 /**
  * 构造函数
  *
  * @param string $pk
  * @param mixed $pkValue
  *
  * @return FLEA_Db_Exception_PrimaryKeyExists
  */
 function FLEA_Db_Exception_PrimaryKeyExists($pk, $pkValue = null)
 {
     $this->primaryKey = $pk;
     $this->pkValue = $pkValue;
     $code = 0x6ff004;
     $msg = sprintf(_ET($code), $pk, $pkValue);
     parent::FLEA_Exception($msg, $code);
 }
Ejemplo n.º 6
0
 /**
  * 构造函数
  *
  * @param array $result
  * @param mixed $data
  *
  * @return FLEA_Exception_ValidationFailed
  */
 function FLEA_Exception_ValidationFailed($result, $data = null)
 {
     $this->result = $result;
     $this->data = $data;
     $code = 0x407001;
     $msg = sprintf(_ET($code), implode(', ', array_keys((array) $result)));
     parent::FLEA_Exception($msg, $code);
 }
Ejemplo n.º 7
0
 /**
  * 构造函数
  *
  * @param string $opeation
  *
  * @return FLEA_Exception_FileOperation
  */
 function FLEA_Exception_FileOperation($opeation)
 {
     $this->operation = $opeation;
     $args = func_get_args();
     array_shift($args);
     $this->args = $args;
     $func = $opeation . '(' . implode(', ', $args) . ')';
     parent::FLEA_Exception(sprintf(_ET(0x102005), $func));
 }
 /**
  * 构造函数
  *
  * @param string $arg
  * @param string $expected
  * @param string $actual
  *
  * @return FLEA_Exception_TypeMismatch
  */
 function FLEA_Exception_TypeMismatch($arg, $expected, $actual)
 {
     $this->arg = $arg;
     $this->expected = $expected;
     $this->actual = $actual;
     $code = 0x10200c;
     $msg = sprintf(_ET($code), $arg, $expected, $actual);
     parent::FLEA_Exception($msg, $code);
 }
 /**
  * 构造函数
  *
  * @param string $controllerName
  * @param string $actionName
  * @param array $act
  * @param array $roles
  *
  * @return FLEA_Dispatcher_Exception_CheckFailed
  */
 function FLEA_Dispatcher_Exception_CheckFailed($controllerName, $actionName, $act = null, $roles = null)
 {
     $this->controllerName = $controllerName;
     $this->actionName = $actionName;
     $this->act = $act;
     $this->roles = $roles;
     $code = 0x701004;
     $msg = sprintf(_ET($code), $controllerName, $actionName);
     parent::FLEA_Exception($msg, $code);
 }
Ejemplo n.º 10
0
 /**
  * 构造函数
  *
  * @param mixed $args
  *
  * @return FLEA_Exception_MissingArguments
  */
 function FLEA_Exception_MissingArguments($args)
 {
     $this->args = $args;
     if (is_array($args)) {
         $args = implode(', ', $args);
     }
     $code = 0x102007;
     $msg = sprintf(_ET($code), $args);
     parent::FLEA_Exception($msg, $code);
 }
 /**
  * 构造函数
  *
  * @param string $controllerName
  * @param string $actionName
  * @param mixed $arguments
  * @param string $controllerClass
  * @param string $actionMethod
  *
  * @return FLEA_Exception_MissingController
  */
 function FLEA_Exception_MissingController($controllerName, $actionName, $arguments = null, $controllerClass = null, $actionMethod = null, $controllerClassFilename = null)
 {
     $this->controllerName = $controllerName;
     $this->actionName = $actionName;
     $this->arguments = $arguments;
     $this->controllerClass = $controllerClass;
     $this->actionMethod = $actionMethod;
     $this->controllerClassFilename = $controllerClassFilename;
     $code = 0x103002;
     parent::FLEA_Exception(sprintf(_ET($code), $controllerName));
 }
Ejemplo n.º 12
0
 /**
  * 构造函数
  *
  * @param string $sql
  * @param string $msg
  * @param int $code
  *
  * @return FLEA_Db_Exception_SqlQuery
  */
 function FLEA_Db_Exception_SqlQuery($sql, $msg = 0, $code = 0)
 {
     $this->sql = $sql;
     if ($msg) {
         $code = 0x6ff005;
         $msg = sprintf(_ET($code), $msg, $sql, $code);
     } else {
         $code = 0x6ff006;
         $msg = sprintf(_ET($code), $sql, $code);
     }
     parent::FLEA_Exception($msg, $code);
 }
Ejemplo n.º 13
0
 /**
  * 构造函数
  *
  * @param string $method
  * @param string $class
  *
  * @return FLEA_Exception_NotImplemented
  */
 function FLEA_Exception_NotImplemented($method, $class = '')
 {
     $this->className = $class;
     $this->methodName = $method;
     if ($class) {
         $code = 0x10200a;
         parent::FLEA_Exception(sprintf(_ET($code), $class, $method));
     } else {
         $code = 0x10200b;
         parent::FLEA_Exception(sprintf(_ET($code), $method));
     }
 }
 /**
  * 构造函数
  *
  * @param string $className
  * @param string $file
  * @param boolean $fileExists
  *
  * @return FLEA_Exception_ExpectedClass
  */
 function FLEA_Exception_ExpectedClass($className, $file = null, $fileExists = false)
 {
     $this->className = $className;
     $this->classFile = $file;
     $this->fileExists = $fileExists;
     if ($file) {
         $code = 0x102002;
         $msg = sprintf(_ET($code), $file, $className);
     } else {
         $code = 0x102003;
         $msg = sprintf(_ET($code), $className);
     }
     parent::FLEA_Exception($msg, $code);
 }
 /**
  * 构造函数
  *
  * @param string $actFilename
  * @param string $controllerName
  * @param mixed $act
  *
  * @return FLEA_Rbac_Exception_InvalidACTFile
  */
 function FLEA_Rbac_Exception_InvalidACTFile($actFilename, $act, $controllerName = null)
 {
     $this->actFilename = $actFilename;
     $this->act = $act;
     $this->controllerName = $controllerName;
     if ($controllerName) {
         $code = 0x701002;
         $msg = sprintf(_ET($code), $actFilename, $controllerName);
     } else {
         $code = 0x701003;
         $msg = sprintf(_ET($code), $actFilename);
     }
     parent::FLEA_Exception($msg, $code);
 }
Ejemplo n.º 16
0
 function FLEA_View_Exception_InitSmartTemplateFailed($filename)
 {
     $this->filename = $filename;
     $code = 0x903002;
     parent::FLEA_Exception(sprintf(_ET($code), $filename), $code);
 }
Ejemplo n.º 17
0
 /**
  * 构造函数
  *
  * @param string $arg
  * @param mixed $value
  *
  * @return FLEA_Exception_InvalidArguments
  */
 function FLEA_Exception_InvalidArguments($arg, $value = null)
 {
     $this->arg = $arg;
     $this->value = $value;
     parent::FLEA_Exception(sprintf(_ET(0x102006), $arg));
 }
Ejemplo n.º 18
0
 /**
  * 构造函数
  *
  * @param string $option
  *
  * @return FLEA_Db_Exception_MissingLinkOption
  */
 function FLEA_Db_Exception_MissingLinkOption($option)
 {
     $this->option = $option;
     $code = 0x202002;
     parent::FLEA_Exception(sprintf(_ET($code), $option));
 }
Ejemplo n.º 19
0
 /**
  * 构造函数
  *
  * @return FLEA_Db_Exception_InvalidInsertID
  */
 function FLEA_Db_Exception_InvalidInsertID()
 {
     $code = 0x6ff008;
     parent::FLEA_Exception(_ET($code), $code);
 }
 /**
  * 构造函数
  *
  * @param string $pk
  *
  * @return FLEA_Db_Exception_MissingPrimaryKey
  */
 function FLEA_Db_Exception_MissingPrimaryKey($pk)
 {
     $this->primaryKey = $pk;
     $code = 0x6ff003;
     parent::FLEA_Exception(sprintf(_ET($code), $pk));
 }
 /**
  * 构造函数
  *
  * @param string $cacheDir
  *
  * @return FLEA_Exception_CacheDisabled
  */
 function FLEA_Exception_CacheDisabled($cacheDir)
 {
     $this->cacheDir = $cacheDir;
     parent::FLEA_Exception(_ET(0x10200d));
 }
Ejemplo n.º 22
0
 /**
  * 构造函数
  *
  * @param mixed $act
  *
  * @return FLEA_Rbac_Exception_InvalidACT
  */
 function FLEA_Rbac_Exception_InvalidACT($act)
 {
     $this->act = $act;
     $code = 0x701001;
     parent::FLEA_Exception(_ET($code), $code);
 }
Ejemplo n.º 23
0
 /**
  * 构造函数
  *
  * @return FLEA_Db_Exception_MissingDSN
  */
 function FLEA_Db_Exception_MissingDSN()
 {
     $code = 0x6ff002;
     parent::FLEA_Exception(_ET($code), $code);
 }
Ejemplo n.º 24
0
 /**
  * 从默认 ACT 文件中载入指定控制器的 ACT
  *
  * @param string $controllerName
  */
 function getControllerACTFromDefaultFile($controllerName)
 {
     $actFilename = realpath(FLEA::getAppInf('defaultControllerACTFile'));
     if (!$actFilename) {
         if (FLEA::getAppInf('controllerACTLoadWarning')) {
             trigger_error(sprintf(_ET(0x701006), $controllerName), E_USER_WARNING);
         }
         return FLEA::getAppInf('defaultControllerACT');
     }
     $ACT = $this->_loadACTFile($actFilename);
     if ($ACT === false) {
         return false;
     }
     $ACT = array_change_key_case($ACT, CASE_UPPER);
     $controllerName = strtoupper($controllerName);
     return isset($ACT[$controllerName]) ? $ACT[$controllerName] : FLEA::getAppInf('defaultControllerACT');
 }
 /**
  * 构造函数
  *
  * @param string $tableName
  *
  * @return FLEA_Db_Exception_MetaColumnsFailed
  */
 function FLEA_Db_Exception_MetaColumnsFailed($tableName)
 {
     $code = 0x6ff007;
     parent::FLEA_Exception(sprintf(_ET($code), $tableName), $code);
 }
 /**
  * 构造函数
  *
  * @param string $keyname
  *
  * @return FLEA_Exception_NotExistsKeyName
  */
 function FLEA_Exception_NotExistsKeyName($keyname)
 {
     $this->keyname = $keyname;
     parent::FLEA_Exception(sprintf(_ET(0x102009), $keyname));
 }
 /**
  * 构造函数
  *
  * @param $type
  *
  * @return FLEA_Db_Exception_InvalidDSN
  */
 function FLEA_Db_Exception_InvalidLinkType($type)
 {
     $this->type = $type;
     $code = 0x202001;
     parent::FLEA_Exception(sprintf(_ET($code), $type), $code);
 }
 function FLEA_View_Exception_NotConfigurationLite()
 {
     $code = 0x904001;
     parent::FLEA_Exception(_ET($code), $code);
 }
 function FLEA_View_Exception_NotConfigurationSmartTemplate()
 {
     $code = 0x903001;
     parent::FLEA_Exception(_ET($code), $code);
 }
 /**
  * 构造函数
  *
  * @param $name
  *
  * @return FLEA_Db_Exception_MissingLink
  */
 function FLEA_Db_Exception_MissingLink($name)
 {
     $this->name = $name;
     $code = 0x6ff009;
     parent::FLEA_Exception(sprintf(_ET($code), $name), $code);
 }