Overview

Namespaces

  • Composer
    • Autoload
  • Illuminate
    • Support
      • Contracts
      • Facades
  • Laravella
    • Crud
      • Exceptions
      • Facades
  • None
  • PHP

Classes

  • ComposerAutoloaderInit0812ead62c33200f1cfc491b452f7c6a
  • CreateActionsTable
  • CreateAssetsTable
  • CreateAuditTable
  • CreateDisplayTypesTable
  • CreateEventsTable
  • CreateFieldsTable
  • CreateKeyFieldsTable
  • CreateKeysTable
  • CreateKeyTypesTable
  • CreateLogsTable
  • CreateMenuPermissionsTable
  • CreateMenusTable
  • CreateObjectEventsTable
  • CreateObjectsTable
  • CreateOptionsTable
  • CreateOptionTypesTable
  • CreatePageAssetsTable
  • CreatePagesTable
  • CreateSeveritiesTable
  • CreateTablesTable
  • CreateUserGroupPermissionsTable
  • CreateUsergroupsTable
  • CreateUserPermissionsTable
  • CreateViewsTable
  • CreateWidgetTypesTable
  • DbApiController
  • DbController
  • Domain
  • field
  • foreignKey
  • Model
  • PageController
  • primaryKey
  • Record
  • Relation
  • Table
  • xxxxAddMcollectionMediaTable
  • xxxxCreateUsersTable

Functions

  • action
  • app
  • app_path
  • array_add
  • array_build
  • array_divide
  • array_dot
  • array_except
  • array_fetch
  • array_first
  • array_flatten
  • array_forget
  • array_get
  • array_only
  • array_pluck
  • array_pull
  • array_set
  • array_sort
  • asset
  • base_path
  • camel_case
  • class_basename
  • csrf_token
  • dd
  • e
  • ends_with
  • head
  • last
  • link_to
  • link_to_action
  • link_to_asset
  • link_to_route
  • object_get
  • public_path
  • route
  • secure_asset
  • secure_url
  • snake_case
  • starts_with
  • storage_path
  • str_contains
  • str_finish
  • str_is
  • str_plural
  • str_random
  • str_singular
  • studly_case
  • trans
  • trans_choice
  • url
  • value
  • with
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php class Domain {
 2:     
 3:     //a collection of tables as listed in _db_tables
 4:     private $tables = array();
 5:     
 6:     private $log = array();
 7:     
 8:     /**
 9:      * 
10:      * @param type $severity
11:      * @param type $message
12:      */
13:     private function __log($severity, $message) {
14:         $this->log[] = array("severity"=>$severity, "message"=>$message);
15:     }
16: 
17:     /**
18:      * Getter for $log
19:      * 
20:      * @return type
21:      */
22:     public function getLog() {
23:         return $this->log;
24:     }
25: 
26:     /**
27:      * Replace _ with spaces and make first character of each word uppercase
28:      * 
29:      * @param type $name
30:      */
31:     private function __makeLabel($name)
32:     {
33:         return ucwords(str_replace('_', ' ', $name));
34:     }
35: 
36:     /**
37:      * Returns varchar if fieldType = varchar(100) etc.
38:      */
39:     private function __getFieldType($fieldType) {
40:         $start = strpos($fieldType,'(');
41:         if ($start > 0) {
42:             $fieldType = substr($fieldType, 0, $start);
43:             $this->__log("success", "fieldtype : $fieldType");
44:         }
45:         return $fieldType;
46:     }
47:     
48:     /**
49:      * Returns 100 if fieldType = varchar(100) etc.
50:      */
51:     private function __getFieldLength($fieldType) {
52:         $start = strpos($fieldType,'(')+1;
53:         $len = null;
54:         if ($start > 0) {
55:             $count = strpos($fieldType,')')-$start;
56:             $len = substr($fieldType, $start, $count);
57:             //$this->__log("success", "fieldtype : $fieldType, start : $start, count : $count, len : $len");
58:         }
59:         return $len;
60:     }
61:     
62:     /**
63:      * Try and calculate the width of the widget to display the field in 
64:      */
65:     private function __getFieldWidth($fieldType, $fieldLength) {
66:         return 100;
67:     }    
68:     
69:     /**
70:      * Try and calculate the best widget to display the field in. Define the widget in json
71:      */
72:     private function __getFieldWidget($fieldType, $fieldLength) {
73:         return ""; //'{widget" : "input", "attributes" : {"type" : "text"}}';
74:     }    
75:     
76: }
77: 
78: ?>
79: 
crud API documentation generated by ApiGen 2.8.0