TRUE , // array( // 'slug' => '<1 to 64 character variable name like string>' // 'array_storage_value_from' => array( // 'method' => '<1 to 64 character alphanumeric underscore dash like string>' // ...0 to 2 more args... // ) // ) // ... // ) // // So for all fields:- // o "slug" is set and valid // o "array_storgae_value_from" is an array - with at least a "method" element. // Where the method name looks to be valid. // // However:- // o Whether or not the field's method name is recognised/supported, // and; // o Whether or not the field's "instance" and "args" elements are // supplied and valid for the method concerned, has NOT been // checked. // // RETURNS:- // On SUCCESS! // - - - - - - // TRUE // And the caller's:- // $all_application_dataset_definitions, and; // $selected_datasets_dmdd // have been updated as follows:- // o ...['array_storage_record_structure']['checked_defaulted_ok'] = TRUE // o With the remaining "array_storage_record_structure" // elements defaulted as required // // On FAILURE! // - - - - - - // $error_message STRING // ------------------------------------------------------------------------- // ------------------------------------------------------------------------- // $selected_datasets_dmdd['array_storage_record_structure'] should be // like (eg):- // // $selected_datasets_dmdd['array_storage_record_structure'] = array( // // // --------------------------------------------------------------------- // // // // 'slug' MUST be specified (variable name type string) // // // // 'array_storgae_value_from' OPTIONAL // // // // o If specified, must be one of:- // // // // # array( // // 'method' => 'created-server-datetime-utc' // // // "instance" and "args", if specified, are IGNORED // // ) // // // // # array( // // 'method' => 'last-modified-server-datetime-utc' // // // "instance" and "args", if specified, are IGNORED // // ) // // // // # array( // // 'method' => 'unique-key' // // // "instance" and "args", if specified, are IGNORED // // ) // // // // # array( // // 'method' => 'literal' , // // 'instance' => // // // "args", if specified, is IGNORED // // ) // // // // # array( // // 'method' => 'get' , // // 'instance' => '' // // // If "instance" is unspecified - or is anything but a // // // non-empty string, then '' defaults to // // // the field's "slug" // // // "args", if specified, is IGNORED // // ) // // // // # array( // // 'method' => 'post' , // // 'instance' => '' // // // If "instance" is unspecified - or is anything but a // // // non-empty string, then '' defaults to // // // the field's "slug" // // // "args", if specified, is IGNORED // // ) // // // // # array( // // 'method' => 'server' , // // 'instance' => '' // // // If "instance" is unspecified - or is anything but a // // // non-empty string, then '' defaults to // // // the field's "slug" // // // "args", if specified, is IGNORED // // ) // // // // # array( // // 'method' => 'cookie' , // // 'instance' => '' // // // If "instance" is unspecified - or is anything but a // // // non-empty string, then '' defaults to // // // the field's "slug" // // // "args", if specified, is IGNORED // // ) // // // // # array( // // 'method' => 'function' , // // 'instance' => '' , // // 'args' => // // Though if multiple values are to be // // supplied, will usually be an // // associative array. Eg:- // // array( // // 'name_1' => // // 'name_2' => // // ... ... // // 'name_N' => // // ) // // ) // // // // o If NOT specified, the field's value will be set to the // // empty string. // // // // --------------------------------------------------------------------- // // array( // 'slug' => 'created_server_datetime_UTC' , // 'array_storgae_value_from' => array( // 'method' => 'created-server-datetime-utc' // ) // ) , // // array( // 'slug' => 'last_modified_server_datetime_UTC' , // 'array_storgae_value_from' => array( // 'method' => 'last-modified-server-datetime-utc' // ) // ) , // // array( // 'slug' => 'key' , // 'array_storgae_value_from' => array( // 'method' => 'unique-key' // ) // ) , // // array( // 'slug' => 'parent_key' , // 'array_storgae_value_from' => array( // 'method' => 'post' , // 'instance' => 'parent_key' // ) // ) , // // array( // 'slug' => 'parent_is' , // "project" or "category" // 'array_storgae_value_from' => array( // 'method' => 'post' , // 'instance' => 'parent_is' // ) // ) , // // array( // 'slug' => 'title' , // 'array_storgae_value_from' => array( // 'method' => 'post' , // 'instance' => 'title' // ) // ) , // // array( // 'slug' => 'notes_slash_comments' , // 'array_storgae_value_from' => array( // 'method' => 'post' , // 'instance' => 'notes_slash_comments' // ) // ) // // ) ; // // // ------------------------------------------------------------------------- // ========================================================================= // Init. // ========================================================================= $ns = __NAMESPACE__ ; $fn = __FUNCTION__ ; // ========================================================================= // ISSET ? // ========================================================================= if ( $selected_datasets_dmdd['array_storage_record_structure'] === NULL || ! isset( $selected_datasets_dmdd['array_storage_record_structure'] ) ) { return << $this_field ) { // --------------------------------------------------------------------- $field_number = $this_index + 1 ; // ===================================================================== // IS_ARRAY ? // ===================================================================== if ( ! is_array( $this_field ) ) { return << 64 ) { return << 'literal' , // 'instance' => '' // ) // --------------------------------------------------------------------- if ( ! array_key_exists( 'array_storage_value_from' , $this_field ) ) { $new_array_storage_record_structure[ $this_index ] = array( 'add-edit' => array( 'method' => 'literal' , 'instance' => '' ) ) ; continue ; } // --------------------------------------------------------------------- if ( ! is_array( $this_field['array_storage_value_from'] ) ) { return << $value_from_details ) { // ----------------------------------------------------------------- if ( ! in_array( $add_edit , array( 'add' , 'edit' , 'add-edit' ) ) ) { return << 3 ) { return << 64 ) { return <<