Changeset 437103
- Timestamp:
- 09/12/2011 10:42:50 PM (15 years ago)
- Location:
- wp-mvc
- Files:
-
- 2 added
- 10 edited
- 1 copied
-
tags/1.1.1 (copied) (copied from wp-mvc/trunk)
-
tags/1.1.1/core/helpers/mvc_form_helper.php (modified) (1 diff)
-
tags/1.1.1/core/helpers/mvc_helper.php (modified) (2 diffs)
-
tags/1.1.1/core/shells/destroy_shell.php (modified) (4 diffs)
-
tags/1.1.1/core/shells/generate_shell.php (modified) (5 diffs)
-
tags/1.1.1/readme.txt (modified) (1 diff)
-
tags/1.1.1/wpmvc.bat (added)
-
trunk/core/helpers/mvc_form_helper.php (modified) (1 diff)
-
trunk/core/helpers/mvc_helper.php (modified) (2 diffs)
-
trunk/core/shells/destroy_shell.php (modified) (4 diffs)
-
trunk/core/shells/generate_shell.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wpmvc.bat (added)
Legend:
- Unmodified
- Added
- Removed
-
wp-mvc/tags/1.1.1/core/helpers/mvc_form_helper.php
r390534 r437103 71 71 $defaults = array( 72 72 'id' => $this->input_id($field_name), 73 'name' => $this->input_name($field_name) ,74 'type' => 'text'75 );76 $ options = array_merge($defaults, $options);77 $html = $this->before_input($field_name, $options); 78 $html .= '<textarea id="'.$options['id'].'" name="'.$this->input_name($field_name).'">'.$options['value'].'</textarea>';73 'name' => $this->input_name($field_name) 74 ); 75 $options = array_merge($defaults, $options); 76 $attributes_html = self::attributes_html($options, 'textarea'); 77 $html = $this->before_input($field_name, $options); 78 $html .= '<textarea'.$attributes_html.'>'.$options['value'].'</textarea>'; 79 79 $html .= $this->after_input($field_name, $options); 80 80 return $html; -
wp-mvc/tags/1.1.1/core/helpers/mvc_helper.php
r390534 r437103 80 80 'accept', 81 81 'access_key', 82 'align', 82 83 'alt', 83 84 'checked', … … 97 98 'type', 98 99 'value', 100 'xml:lang', 101 $event_attributes['form'] 102 ), 103 'textarea' => array( 104 'access_key', 105 'class', 106 'cols', 107 'dir', 108 'disabled', 109 'id', 110 'lang', 111 'name', 112 'readonly', 113 'rows', 114 'style', 115 'tabindex', 116 'title', 99 117 'xml:lang', 100 118 $event_attributes['form'] -
wp-mvc/tags/1.1.1/core/shells/destroy_shell.php
r390534 r437103 5 5 public function controllers($args) { 6 6 list($plugin, $name) = $this->get_plugin_model_args($args); 7 $this->destroy_controllers($ name);7 $this->destroy_controllers($plugin, $name); 8 8 } 9 9 10 10 public function model($args) { 11 11 list($plugin, $name) = $this->get_plugin_model_args($args); 12 $this->destroy_model($ name);12 $this->destroy_model($plugin, $name); 13 13 } 14 14 15 15 public function scaffold($args) { 16 16 list($plugin, $name) = $this->get_plugin_model_args($args); 17 $this->destroy_controllers($ name);18 $this->destroy_model($ name);19 $this->destroy_views($ name);17 $this->destroy_controllers($plugin, $name); 18 $this->destroy_model($plugin, $name); 19 $this->destroy_views($plugin, $name); 20 20 } 21 21 22 22 public function views($args) { 23 23 list($plugin, $name) = $this->get_plugin_model_args($args); 24 $this->destroy_views($ name);24 $this->destroy_views($plugin, $name); 25 25 } 26 26 27 27 private function destroy_controllers($plugin, $name) { 28 $plugin_app_path = mvc_plugin_app_path($plugin);28 $plugin_app_path = $this->get_plugin_app_path($plugin); 29 29 $file = new MvcFile(); 30 30 $name_tableized = MvcInflector::tableize($name); … … 35 35 36 36 private function destroy_model($plugin, $name) { 37 $plugin_app_path = mvc_plugin_app_path($plugin);37 $plugin_app_path = $this->get_plugin_app_path($plugin); 38 38 $file = new MvcFile(); 39 39 $name_underscore = MvcInflector::underscore($name); … … 43 43 44 44 private function destroy_views($plugin, $name) { 45 $plugin_app_path = mvc_plugin_app_path($plugin);45 $plugin_app_path = $this->get_plugin_app_path($plugin); 46 46 $name_tableized = MvcInflector::tableize($name); 47 47 $public_directory = $plugin_app_path.'views/'.$name_tableized; … … 59 59 return $args; 60 60 } 61 62 private function get_plugin_path($plugin_name) { 63 $plugin_underscored = MvcInflector::underscore($plugin_name); 64 $plugin_hyphenized = str_replace('_', '-', $plugin_underscored); 65 $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/'; 66 return $plugin_path; 67 } 68 69 private function get_plugin_app_path($plugin_name) { 70 $plugin_path = $this->get_plugin_path($plugin_name); 71 $plugin_app_path = $plugin_path.'app/'; 72 return $plugin_app_path; 73 } 61 74 62 75 } -
wp-mvc/tags/1.1.1/core/shells/generate_shell.php
r390534 r437103 47 47 $plugin_hyphenized = str_replace('_', '-', $plugin_underscored); 48 48 49 $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/';50 $plugin_app_path = $ plugin_path.'app/';49 $plugin_path = $this->get_plugin_path($plugin); 50 $plugin_app_path = $this->get_plugin_app_path($plugin); 51 51 52 52 $directory = new MvcDirectory(); … … 85 85 private function generate_controllers($plugin, $name) { 86 86 87 $plugin_app_path = mvc_plugin_app_path($plugin);87 $plugin_app_path = $this->get_plugin_app_path($plugin); 88 88 89 89 $name_tableized = MvcInflector::tableize($name); … … 101 101 102 102 private function generate_model($plugin, $name) { 103 $plugin_app_path = mvc_plugin_app_path($plugin);103 $plugin_app_path = $this->get_plugin_app_path($plugin); 104 104 $name_camelized = MvcInflector::camelize($name); 105 105 $name_underscored = MvcInflector::underscore($name); … … 111 111 private function generate_views($plugin, $name) { 112 112 113 $plugin_app_path = mvc_plugin_app_path($plugin);113 $plugin_app_path = $this->get_plugin_app_path($plugin); 114 114 115 115 $name_tableized = MvcInflector::tableize($name); … … 147 147 return $args; 148 148 } 149 150 private function get_plugin_path($plugin_name) { 151 $plugin_underscored = MvcInflector::underscore($plugin_name); 152 $plugin_hyphenized = str_replace('_', '-', $plugin_underscored); 153 $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/'; 154 return $plugin_path; 155 } 156 157 private function get_plugin_app_path($plugin_name) { 158 $plugin_path = $this->get_plugin_path($plugin_name); 159 $plugin_app_path = $plugin_path.'app/'; 160 return $plugin_app_path; 161 } 149 162 150 163 } -
wp-mvc/tags/1.1.1/readme.txt
r390557 r437103 3 3 Tags: mvc, framework, model, view, controller, development, plugin 4 4 Requires at least: 3.0 5 Tested up to: 3. 1.16 Stable tag: 1.1 5 Tested up to: 3.2.1 6 Stable tag: 1.1.1 7 7 8 8 WP MVC is a full-fledged MVC framework, similar to CakePHP and Rails, that developers can use to create WordPress plugins. -
wp-mvc/trunk/core/helpers/mvc_form_helper.php
r390534 r437103 71 71 $defaults = array( 72 72 'id' => $this->input_id($field_name), 73 'name' => $this->input_name($field_name) ,74 'type' => 'text'75 );76 $ options = array_merge($defaults, $options);77 $html = $this->before_input($field_name, $options); 78 $html .= '<textarea id="'.$options['id'].'" name="'.$this->input_name($field_name).'">'.$options['value'].'</textarea>';73 'name' => $this->input_name($field_name) 74 ); 75 $options = array_merge($defaults, $options); 76 $attributes_html = self::attributes_html($options, 'textarea'); 77 $html = $this->before_input($field_name, $options); 78 $html .= '<textarea'.$attributes_html.'>'.$options['value'].'</textarea>'; 79 79 $html .= $this->after_input($field_name, $options); 80 80 return $html; -
wp-mvc/trunk/core/helpers/mvc_helper.php
r390534 r437103 80 80 'accept', 81 81 'access_key', 82 'align', 82 83 'alt', 83 84 'checked', … … 97 98 'type', 98 99 'value', 100 'xml:lang', 101 $event_attributes['form'] 102 ), 103 'textarea' => array( 104 'access_key', 105 'class', 106 'cols', 107 'dir', 108 'disabled', 109 'id', 110 'lang', 111 'name', 112 'readonly', 113 'rows', 114 'style', 115 'tabindex', 116 'title', 99 117 'xml:lang', 100 118 $event_attributes['form'] -
wp-mvc/trunk/core/shells/destroy_shell.php
r390534 r437103 5 5 public function controllers($args) { 6 6 list($plugin, $name) = $this->get_plugin_model_args($args); 7 $this->destroy_controllers($ name);7 $this->destroy_controllers($plugin, $name); 8 8 } 9 9 10 10 public function model($args) { 11 11 list($plugin, $name) = $this->get_plugin_model_args($args); 12 $this->destroy_model($ name);12 $this->destroy_model($plugin, $name); 13 13 } 14 14 15 15 public function scaffold($args) { 16 16 list($plugin, $name) = $this->get_plugin_model_args($args); 17 $this->destroy_controllers($ name);18 $this->destroy_model($ name);19 $this->destroy_views($ name);17 $this->destroy_controllers($plugin, $name); 18 $this->destroy_model($plugin, $name); 19 $this->destroy_views($plugin, $name); 20 20 } 21 21 22 22 public function views($args) { 23 23 list($plugin, $name) = $this->get_plugin_model_args($args); 24 $this->destroy_views($ name);24 $this->destroy_views($plugin, $name); 25 25 } 26 26 27 27 private function destroy_controllers($plugin, $name) { 28 $plugin_app_path = mvc_plugin_app_path($plugin);28 $plugin_app_path = $this->get_plugin_app_path($plugin); 29 29 $file = new MvcFile(); 30 30 $name_tableized = MvcInflector::tableize($name); … … 35 35 36 36 private function destroy_model($plugin, $name) { 37 $plugin_app_path = mvc_plugin_app_path($plugin);37 $plugin_app_path = $this->get_plugin_app_path($plugin); 38 38 $file = new MvcFile(); 39 39 $name_underscore = MvcInflector::underscore($name); … … 43 43 44 44 private function destroy_views($plugin, $name) { 45 $plugin_app_path = mvc_plugin_app_path($plugin);45 $plugin_app_path = $this->get_plugin_app_path($plugin); 46 46 $name_tableized = MvcInflector::tableize($name); 47 47 $public_directory = $plugin_app_path.'views/'.$name_tableized; … … 59 59 return $args; 60 60 } 61 62 private function get_plugin_path($plugin_name) { 63 $plugin_underscored = MvcInflector::underscore($plugin_name); 64 $plugin_hyphenized = str_replace('_', '-', $plugin_underscored); 65 $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/'; 66 return $plugin_path; 67 } 68 69 private function get_plugin_app_path($plugin_name) { 70 $plugin_path = $this->get_plugin_path($plugin_name); 71 $plugin_app_path = $plugin_path.'app/'; 72 return $plugin_app_path; 73 } 61 74 62 75 } -
wp-mvc/trunk/core/shells/generate_shell.php
r390534 r437103 47 47 $plugin_hyphenized = str_replace('_', '-', $plugin_underscored); 48 48 49 $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/';50 $plugin_app_path = $ plugin_path.'app/';49 $plugin_path = $this->get_plugin_path($plugin); 50 $plugin_app_path = $this->get_plugin_app_path($plugin); 51 51 52 52 $directory = new MvcDirectory(); … … 85 85 private function generate_controllers($plugin, $name) { 86 86 87 $plugin_app_path = mvc_plugin_app_path($plugin);87 $plugin_app_path = $this->get_plugin_app_path($plugin); 88 88 89 89 $name_tableized = MvcInflector::tableize($name); … … 101 101 102 102 private function generate_model($plugin, $name) { 103 $plugin_app_path = mvc_plugin_app_path($plugin);103 $plugin_app_path = $this->get_plugin_app_path($plugin); 104 104 $name_camelized = MvcInflector::camelize($name); 105 105 $name_underscored = MvcInflector::underscore($name); … … 111 111 private function generate_views($plugin, $name) { 112 112 113 $plugin_app_path = mvc_plugin_app_path($plugin);113 $plugin_app_path = $this->get_plugin_app_path($plugin); 114 114 115 115 $name_tableized = MvcInflector::tableize($name); … … 147 147 return $args; 148 148 } 149 150 private function get_plugin_path($plugin_name) { 151 $plugin_underscored = MvcInflector::underscore($plugin_name); 152 $plugin_hyphenized = str_replace('_', '-', $plugin_underscored); 153 $plugin_path = WP_PLUGIN_DIR.'/'.$plugin_hyphenized.'/'; 154 return $plugin_path; 155 } 156 157 private function get_plugin_app_path($plugin_name) { 158 $plugin_path = $this->get_plugin_path($plugin_name); 159 $plugin_app_path = $plugin_path.'app/'; 160 return $plugin_app_path; 161 } 149 162 150 163 } -
wp-mvc/trunk/readme.txt
r390557 r437103 3 3 Tags: mvc, framework, model, view, controller, development, plugin 4 4 Requires at least: 3.0 5 Tested up to: 3. 1.16 Stable tag: 1.1 5 Tested up to: 3.2.1 6 Stable tag: 1.1.1 7 7 8 8 WP MVC is a full-fledged MVC framework, similar to CakePHP and Rails, that developers can use to create WordPress plugins.
Note: See TracChangeset
for help on using the changeset viewer.