__construct($attributes)
39: public function __construct($attributes) {
41: $this->attributes = $attributes[0];
42: $arg = explode('/',$attributes[0]);
43:
45: if (count($arg) > 1) {
46: $this->localization = '/' . preg_replace('/^//','',preg_replace('//'.end($arg).'$/','', $this->attributes));
47: }
48:
50: $this->file_name = Inflector :: singularize(end($arg));
51:
53: $this->table_name = Inflector :: pluralize($this->file_name);
54:
56: $this->model_name = inflector :: camelize($this->file_name);
57:
59: $this->controller_name = $this->model_name . 'Controller';
60:
62: $this->helper_name = $this->model_name . 'Helper';
63:
65: $attributes = array_slice($attributes, 1);
66:
68: foreach ($attributes as $attribute) {
69: $args = explode(':', $attribute);
70: $this->fields[$args[0]] = $args[1];
71: }
72:
73: $this->controller();
74: $this->model();
75: $this->helper();
76: $this->view();
77:
78: }
File: lib/scaffold/scaffold.php, #line 39
controller()
84: public function controller() {
85: $template = $this->template('controller');
86: Generate :: controller($this->attributes, array (), $template);
87: }
File: lib/scaffold/scaffold.php, #line 84
model()
93: public function model() {
94: Generate :: model($this->file_name);
95: }
File: lib/scaffold/scaffold.php, #line 93
helper()
101: public function helper() {
102: Generate :: helper($this->attributes);
103: }
File: lib/scaffold/scaffold.php, #line 101
view()
109: public function view() {
110: foreach ($this->actions as $action) {
111: $template = $this->template("{$action}");
112: $scaffold[$action] = $template;
113: }
114: Generate :: view($this->attributes, $this->actions, $scaffold);
115: }
File: lib/scaffold/scaffold.php, #line 109
template($template_name)
123: public function template($template_name) {
124: ob_start();
125: include DIR_SCAFFOLD . '/templates/' . $template_name;
126: $template = ob_get_contents();
127: ob_end_clean();
128: return $template;
129: }
File: lib/scaffold/scaffold.php, #line 123
