Overview

Classes

  • Api1
  • Array1
  • ArrayObject1
  • Auth1
  • AuthModel1
  • Chat1
  • Class1
  • Color1
  • Console1
  • Controller1
  • Converter1
  • Cookie1
  • Date1
  • DateManager1
  • Db1
  • DbPref1
  • EasyBook
  • EasyCountry
  • EasyGenerator
  • EasyProduct
  • EasyProject
  • EasySchool
  • EasyStatus
  • exApiController1
  • exBlade1
  • exClass
  • exData1
  • exMail1
  • exRoute1
  • exTranslate1
  • exUrl1
  • FileManager1
  • FilePref1
  • Form1
  • Function1
  • Header1
  • Html1
  • HtmlAsset1
  • HtmlForm1
  • HtmlStyle1
  • HtmlWidget1
  • Math1
  • Model1
  • Model1FileLocator
  • Number1
  • Object1
  • Page1
  • Picture1
  • Popup1
  • QUESTION_TYPE
  • RecursiveArrayObject1
  • RegEx1
  • ResultObject1
  • ResultStatus1
  • ServerRequest1
  • Session1
  • SessionPreferenceSave1
  • String1
  • TaskManager1
  • Url1
  • Validation1
  • Value1

Interfaces

  • Controller1RouteInterface
  • Model1ActionInterface
  • Model1PageInterface

Functions

  • __
  • api_and_form_default_route
  • app
  • app_api_list
  • app_class_list
  • app_class_paths
  • app_class_with_interface
  • app_controller_list
  • app_dashboard_list
  • app_db_model_list
  • app_db_table_list
  • app_model_list
  • app_page_list
  • asset
  • csrf_token
  • current_layout_asset
  • current_plugin_asset
  • current_resources_asset_path
  • d
  • dd
  • file_base
  • file_session
  • file_session_get
  • file_session_remove
  • file_session_save
  • form_call_api
  • form_call_controller
  • form_token
  • get_all_view_in_directory
  • get_valid_view_path
  • is_token_valid
  • is_ajax_request
  • layout_asset
  • mailer
  • mailer_send_mail_to_list
  • make_default_route
  • makeRoute
  • normalizeSharedPath
  • now
  • now_date
  • now_time
  • old
  • paginate
  • path_app
  • path_asset
  • path_asset_url
  • path_clear_cache
  • path_main
  • path_main_url
  • path_shared
  • path_shared_app
  • path_shared_asset
  • path_shared_asset_url
  • path_shared_resources
  • path_to_viewpath
  • plugin_asset
  • pre
  • redirect
  • redirect_back
  • redirect_failed
  • redirect_to_view
  • register_path_for_layout_asset
  • request
  • resources_path
  • resources_path_asset
  • resources_path_cache
  • resources_path_plugin
  • resources_path_view
  • resources_path_view_cache
  • resources_path_view_layout
  • route
  • routes
  • shared_asset
  • token
  • translate_language
  • translated_language
  • url
  • view
  • view_exists
  • view_make
  • viewpath_to_path
  • Overview
  • Class

Class DbPref1

Preference is a key value class, it save and get value just like session / cookie This is a plan to save string value, Object, Model1, in database Class DbPref1

Abstract
Located at easycore/EasyDb.php
Methods summary
public static Model1
# toModel( )

Returns

Model1
public static
# tableCreate( )
public static
# tableTruncate( )
public static
# tableReset( )
public static boolean|mysqli_result|null
# save( $name, null $object_or_keyValueArray = null, string $user_id = '', boolean $replace = true )

Insert New / Append / Override Existing data

Insert New / Append / Override Existing data

Parameters

$name
$object_or_keyValueArray
$user_id
$replace

Returns

boolean|mysqli_result|null

Throws

Exception
public static boolean
# delete( null $name = null, string $user_id = '' )

Parameters

$name
$user_id

Returns

boolean

Throws

Exception
public static boolean
# deleteRaw( array $where = ['name'=>'', 'user_id'=>''], string $login = ' AND ', string $operator = ' = ' )

Parameters

$where
$login
$operator

Returns

boolean

Throws

Exception
public static array
# normalizeRawRows( array $rowList = [] )

Convert List of Data to Object Like

Convert List of Data to Object Like

Parameters

$rowList

Returns

array
public static array|Model1
# get( $name, string $user_id = '', null $convertToClassName = null )

Get Normalized Data

Get Normalized Data

Parameters

$name
$user_id
$convertToClassName

Returns

array|Model1
public static array|Model1
# getMany( string $nameLike = '_', string $user_id = '', string $nameFormat = '%{data}%' )

Get Likely Data Using With

Get Likely Data Using With

Parameters

$nameLike
$user_id
$nameFormat
: use $nameFormat '%{data}%' for like data, or single % for either left or right

Returns

array|Model1
public static array|Model1
# getManyIfStartWith( string $namePrefix = '_', string $user_id = '' )

Get Start With Data

Get Start With Data

Parameters

$namePrefix
$user_id

Returns

array|Model1
public static array|Model1
# getManyIfContain( string $name = '_', string $user_id = '' )

Get Start With Data

Get Start With Data

Parameters

$name
$user_id

Returns

array|Model1
public static array|Model1
# getManyIfEndWith( string $nameSuffix = '_', string $user_id = '' )

Get End With Data

Get End With Data

Parameters

$nameSuffix
$user_id

Returns

array|Model1
public static array|ArrayObject|boolean|mysqli_result|null
# getRawRows( array $where = ['name'=>'', 'user_id'=>''], string $login = ' AND ', string $operator = ' = ' )

Get All Row

Get All Row

Parameters

$where
$login
$operator

Returns

array|ArrayObject|boolean|mysqli_result|null
public static array
# getByUser( string $user_id = '' )

Get Associated User Info

Get Associated User Info

Parameters

$user_id

Returns

array
public static boolean
# exists( $name, string $user_id = '' )

Is Model Exists

Is Model Exists

Parameters

$name
$user_id

Returns

boolean
Properties summary
public static Model1; $model
# null
API documentation generated by ApiGen