Subversion Repositories PHPX

Rev

Rev 70 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 70 Rev 71
Line 148... Line 148...
148
    $this->$name = $value;
148
    $this->$name = $value;
149
    return $value;
149
    return $value;
150
  }
150
  }
151
151
152
  /**
152
  /**
153
   * Adds a CSS resource (stylesheet) to the list of external
153
   * Adds an CSS resource (stylesheet)
154
   * stylesheets
154
   * to the list of external stylesheets
155
   *
155
   *
156
   * @param string $uri
156
   * @param string $uri
157
   *   Stylesheet URI
157
   *   Stylesheet URI
158
   * @param mixed $key (optional)
158
   * @param mixed $key (optional)
159
   *   Array key for the script.  May be used later to exclude
159
   *   Array key for the script.  May be used later to exclude
160
   *   or include the code for a specific stylesheet.
160
   *   or include the code for a specific stylesheet.
-
 
161
   * @return array
-
 
162
   *   The list of stylesheets
161
   */
163
   */
162
  public function addStylesheet ($uri, $key = null)
164
  public function addStylesheet ($uri, $key = null)
163
  {
165
  {
164
    $stylesheets =& $this->_stylesheets;
166
    $stylesheets =& $this->_stylesheets;
165
167
Line 169... Line 171...
169
    }
171
    }
170
    else
172
    else
171
    {
173
    {
172
      $stylesheets[] = $uri;
174
      $stylesheets[] = $uri;
173
    }
175
    }
-
 
176
-
 
177
    return $stylesheets;
-
 
178
  }
-
 
179
-
 
180
  /**
-
 
181
   * Adds several CSS resources (stylesheets)
-
 
182
   * to the list of external stylesheets
-
 
183
   *
-
 
184
   * @param array $uris
-
 
185
   *   Stylesheet URIs
-
 
186
   * @return array
-
 
187
   *   The list of stylesheets
-
 
188
   */
-
 
189
  public function addStylesheets (array $uris)
-
 
190
  {
-
 
191
    $stylesheets = $this->_stylesheets;
-
 
192
-
 
193
    foreach ($uris as $uri)
-
 
194
    {
-
 
195
      $stylesheets = $this->addStylesheet($uri);
-
 
196
    }
-
 
197
-
 
198
    return $stylesheets;
174
  }
199
  }
175
200
176
  /**
201
  /**
177
   * Adds an ECMAScript resource (script) to the list of external
202
   * Adds an ECMAScript resource (script)
178
   * scripts
203
   * to the list of external scripts
179
   *
204
   *
180
   * @param string $uri
205
   * @param string $uri
181
   *   Script URI
206
   *   Script URI
182
   * @param mixed $key (optional)
207
   * @param mixed $key (optional)
183
   *   Array key for the script.  May be used later to exclude
208
   *   Array key for the script.  May be used later to exclude
Line 193... Line 218...
193
    }
218
    }
194
    else
219
    else
195
    {
220
    {
196
      $scripts[] = $uri;
221
      $scripts[] = $uri;
197
    }
222
    }
-
 
223
-
 
224
    return $scripts;
-
 
225
  }
-
 
226
-
 
227
  /**
-
 
228
   * Adds several ECMAScript resources (scripts)
-
 
229
   * to the list of external scripts
-
 
230
   *
-
 
231
   * @param array $uris
-
 
232
   *   Script URIs
-
 
233
   * @return array
-
 
234
   *   The list of scripts
-
 
235
   */
-
 
236
  public function addScripts (array $uris)
-
 
237
  {
-
 
238
    $scripts = $this->_scripts;
-
 
239
-
 
240
    foreach ($uris as $uri)
-
 
241
    {
-
 
242
      $scripts = $this->addScript($uri);
-
 
243
    }
-
 
244
-
 
245
    return $scripts;
198
  }
246
  }
199
247
200
  /**
248
  /**
201
   * Renders the view by including a template
249
   * Renders the view by including a template
202
   *
250
   *