PHP 클래스 Scalr_UI_Controller

파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$cryptoKey
$db ADODB_mysqli
$request Scalr_UI_Request
$response Scalr_UI_Response
$uiCacheKeyPattern string
$unusedPathChunks
$user Scalr_Account_User

보호된 프로퍼티들

프로퍼티 타입 설명
$_environment Scalr\Model\Entity\Account\Environment
$environment Scalr_Environment
$sortParams

공개 메소드들

메소드 설명
__construct ( )
addUiCacheKeyPatternChunk ( $chunk )
auditLog ( string $event, variadic $extra ) : boolean AuditLogger wrapper
call ( $pathChunks = [], $permissionFlag = true )
callActionMethod ( $method )
controller ( boolean $checkPermissions = false ) : Scalr_UI_Controller Create controller object from current class
getContainer ( ) : Container Gets DI Container
getEnvironment ( ) : Scalr_Environment Gets current environment
getEnvironmentEntity ( ) : Environment Get current environment as Entity
getEnvironmentId ( boolean $silent = false ) : integer Returns identifier of the current Environment which is selected by the User.
getParam ( string $key, boolean $rawValue = false ) : mixed
getUser ( ) : User | null Gets the User Entity for the current request
handleRequest ( $pathChunks )
hasAccess ( ) : boolean Restricts access to controller's actions
init ( )
loadController ( $controller, $prefix = 'Scalr_UI_Controller', $checkPermissions = false ) : Scalr_UI_Controller

보호된 메소드들

메소드 설명
buildResponseFromData ( array $data, array $filterFields = [], boolean $ignoreLimit = false ) : array
buildResponseFromSql ( string $sql, array $filterFields = [], string $groupSQL = "", boolean | true $simpleQuery = true, boolean | false $noLimit = false ) : mixed
buildResponseFromSql2 ( $sql, $sortFields = [], $filterFields = [], $args = [], $noLimit = false )
getCrypto ( ) : Scalr\Util\CryptoTool
getSortOrder ( ) : array Parse and validate input parameter sort (json-encoded array), and return as array [[property, direction], .
sort ( $item1, $item2 )

메소드 상세

__construct() 공개 메소드

public __construct ( )

addUiCacheKeyPatternChunk() 공개 메소드

public addUiCacheKeyPatternChunk ( $chunk )

auditLog() 공개 메소드

AuditLogger wrapper
public auditLog ( string $event, variadic $extra ) : boolean
$event string Event name, aka tag
$extra variadic optional Array of additionally provided information
리턴 boolean Whether operation was successful

buildResponseFromData() 보호된 메소드

protected buildResponseFromData ( array $data, array $filterFields = [], boolean $ignoreLimit = false ) : array
$data array
$filterFields array New format: [field1 => query, ... ], old format: [field1, field2] For new format: - Conjuction: AND (all fields should be found) - Field could be list of fields ('field1,field2,field3'), in that case any of given fields should be found
$ignoreLimit boolean If true return all results
리턴 array

buildResponseFromSql() 보호된 메소드

사용 중단:
protected buildResponseFromSql ( string $sql, array $filterFields = [], string $groupSQL = "", boolean | true $simpleQuery = true, boolean | false $noLimit = false ) : mixed
$sql string
$filterFields array
$groupSQL string
$simpleQuery boolean | true
$noLimit boolean | false
리턴 mixed

buildResponseFromSql2() 보호된 메소드

protected buildResponseFromSql2 ( $sql, $sortFields = [], $filterFields = [], $args = [], $noLimit = false )

call() 공개 메소드

public call ( $pathChunks = [], $permissionFlag = true )

callActionMethod() 공개 메소드

public callActionMethod ( $method )

controller() 공개 정적인 메소드

Create controller object from current class
public static controller ( boolean $checkPermissions = false ) : Scalr_UI_Controller
$checkPermissions boolean
리턴 Scalr_UI_Controller

getContainer() 공개 메소드

Gets DI Container
public getContainer ( ) : Container
리턴 Scalr\DependencyInjection\Container Returns DI Container

getCrypto() 보호된 메소드

protected getCrypto ( ) : Scalr\Util\CryptoTool
리턴 Scalr\Util\CryptoTool

getEnvironment() 공개 메소드

Gets current environment
public getEnvironment ( ) : Scalr_Environment
리턴 Scalr_Environment

getEnvironmentEntity() 공개 메소드

Get current environment as Entity
public getEnvironmentEntity ( ) : Environment
리턴 Scalr\Model\Entity\Account\Environment Current environment

getEnvironmentId() 공개 메소드

If environment hasn't been set it will throw an exception unless silent is turned on.
public getEnvironmentId ( boolean $silent = false ) : integer
$silent boolean optional On false throw Exception
리턴 integer Returns identifier of the Environment

getParam() 공개 메소드

사용 중단:
public getParam ( string $key, boolean $rawValue = false ) : mixed
$key string
$rawValue boolean if true returns rawValue (not stripped) only once, don't save in cache
리턴 mixed

getSortOrder() 보호된 메소드

..]
protected getSortOrder ( ) : array
리턴 array Array of sort orders [[property => '', direction => '']]

getUser() 공개 메소드

Gets the User Entity for the current request
public getUser ( ) : User | null
리턴 Scalr\Model\Entity\Account\User | null Returns the User entity for the current Request

handleRequest() 공개 정적인 메소드

public static handleRequest ( $pathChunks )

hasAccess() 공개 메소드

Restricts access to controller's actions
public hasAccess ( ) : boolean
리턴 boolean Returns true if user has access.

init() 공개 메소드

public init ( )

loadController() 공개 정적인 메소드

public static loadController ( $controller, $prefix = 'Scalr_UI_Controller', $checkPermissions = false ) : Scalr_UI_Controller
리턴 Scalr_UI_Controller

sort() 보호된 메소드

protected sort ( $item1, $item2 )

프로퍼티 상세

$_environment 보호되어 있는 프로퍼티

protected Environment,Scalr\Model\Entity\Account $_environment
리턴 Scalr\Model\Entity\Account\Environment

$cryptoKey 공개적으로 프로퍼티

public $cryptoKey

$db 공개적으로 프로퍼티

public ADODB_mysqli $db
리턴 ADODB_mysqli

$environment 보호되어 있는 프로퍼티

protected Scalr_Environment $environment
리턴 Scalr_Environment

$request 공개적으로 프로퍼티

public Scalr_UI_Request $request
리턴 Scalr_UI_Request

$response 공개적으로 프로퍼티

public Scalr_UI_Response $response
리턴 Scalr_UI_Response

$sortParams 보호되어 있는 프로퍼티

protected $sortParams

$uiCacheKeyPattern 공개적으로 프로퍼티

public string $uiCacheKeyPattern
리턴 string

$unusedPathChunks 공개적으로 프로퍼티

public $unusedPathChunks

$user 공개적으로 프로퍼티

public Scalr_Account_User $user
리턴 Scalr_Account_User