CrossPHP
  • Namespace
  • Class
  • Download

Namespaces

  • Cross
    • Auth
    • Cache
      • Driver
      • Request
    • Core
    • DB
      • Connecter
      • Drivers
      • SQLAssembler
    • Exception
    • Http
    • I
    • Lib
      • Document
    • Module
    • MVC
    • Runtime
  • None

Classes

  • Annotate
  • Application
  • ArrayMap
  • Config
  • CrossArray
  • Delegate
  • FrameBase
  • Helper
  • HttpAuth
  • Loader
  • Rest
  • Router

Class FrameBase

Direct known subclasses

Cross\MVC\Controller, Cross\MVC\Module, Cross\MVC\View

Indirect known subclasses

Cross\Module\SQLModule

Namespace: Cross\Core
Package: Cross\Core
Author:

wonli wonli@live.com Class FrameBase


Located at Core/FrameBase.php

Methods summary

public
# __construct( )
public Cross\Core\Config
# getConfig( )

Returns

Cross\Core\Config
public Cross\Core\Delegate
# getDelegate( )

Returns

Cross\Core\Delegate
public array|string
# result( integer $status = 1, string|array $message = '', boolean $json_encode = false )

返回一个数组或JSON字符串

返回一个数组或JSON字符串

Parameters

$status
$message
$json_encode

Returns

array|string

Throws

Cross\Exception\CoreException
public Cross\Core\Config
# loadConfig( string $config_file )

读取配置文件

读取配置文件

Parameters

$config_file

Returns

Cross\Core\Config

Throws

Cross\Exception\CoreException
public mixed
# parseGetFile( string $name, boolean $get_file_content = false )

Parameters

$name
$get_file_content

Returns

mixed

Throws

Cross\Exception\CoreException

See

Cross\Core\Loader::read()
public string
# getFilePath( string $name )

解析文件路径

格式如下:
 1 ::[path/file_name] 从当前项目根目录查找
 2 app::[path/file_name] 当前app路径
 3 static::[path/file_name] 静态资源目录
 4 cache::[path/file_name] 缓存路径
 5 config::[path/file_name] 配置路径

解析文件路径

格式如下:
 1 ::[path/file_name] 从当前项目根目录查找
 2 app::[path/file_name] 当前app路径
 3 static::[path/file_name] 静态资源目录
 4 cache::[path/file_name] 缓存路径
 5 config::[path/file_name] 配置路径

Parameters

$name

Returns

string
protected boolean
# setAuth( string $key, string $value, integer $expire = 86400 )

加密会话 sys=>auth中指定是cookie/session

加密会话 sys=>auth中指定是cookie/session

Parameters

$key
key
$value
值
$expire
过期时间(默认一天过期)

Returns

boolean

Throws

Cross\Exception\CoreException
protected boolean|mixed|string
# getAuth( string $key, boolean $deCode = false )

解密会话

解密会话

Parameters

$key
$deCode

Returns

boolean|mixed|string

Throws

Cross\Exception\CoreException
protected boolean|string
# urlEncrypt( string $params, string $type = 'encode' )

uri参数加密

uri参数加密

Parameters

$params
$type

Returns

boolean|string
protected string
# getUrlEncryptKey( string $type = 'auth' )

获取uri加密/解密时用到的key

获取uri加密/解密时用到的key

Parameters

$type

Returns

string
protected boolean|string
# sParams( boolean $use_annotate = true, string $params = null )

还原加密后的参数

还原加密后的参数

Parameters

$use_annotate
$params

Returns

boolean|string
protected mixed
# initView( )

初始化视图控制器

初始化视图控制器

Returns

mixed
public Cross\Http\Response|Cross\Http\Request|Cross\MVC\View|Cross\Core\Config|null
# __get( string $property )

request response view

request response view

Parameters

$property

Returns

Cross\Http\Response|Cross\Http\Request|Cross\MVC\View|Cross\Core\Config|null

Properties summary

protected string $action

action名称

action名称

#
protected array $params

参数列表

参数列表

#
protected string $controller

控制器名称

控制器名称

#
protected Cross\Core\Delegate $delegate
#
protected string $view_controller

视图控制器命名空间

视图控制器命名空间

#
protected array $action_annotate

当前方法的注释配置

当前方法的注释配置

#
public static Cross\Core\Delegate $app_delegate
#

Magic properties

public Cross\Core\Config $config
public Cross\Http\Request $request
public Cross\Http\Response $response
public Cross\MVC\View $view
CrossPHP API documentation generated by ApiGen