Browse Source

doc blocks

euromark 11 years ago
parent
commit
29c0c02418
2 changed files with 13 additions and 6 deletions
  1. 9 5
      Lib/EmailLib.php
  2. 4 1
      Model/Behavior/JsonableBehavior.php

+ 9 - 5
Lib/EmailLib.php

@@ -144,12 +144,14 @@ class EmailLib extends CakeEmail {
 	/**
 	 * Add an inline attachment from file
 	 *
+	 * Options:
+	 * - mimetype
+	 * - contentDisposition
+	 *
 	 * @param string $file: absolute path
 	 * @param string $filename (optional)
 	 * @param string $contentId (optional)
-	 * @param array $options
-	 * - mimetype
-	 * - contentDisposition
+	 * @param array $options Options
 	 * @return mixed resource $EmailLib or string $contentId
 	 */
 	public function addEmbeddedAttachment($file, $name = null, $contentId = null, $options = array()) {
@@ -176,12 +178,14 @@ class EmailLib extends CakeEmail {
 	/**
 	 * Add an inline attachment as blob
 	 *
+	 * Options:
+	 * - contentDisposition
+	 *
 	 * @param binary $content: blob data
 	 * @param string $filename to attach it
 	 * @param string $mimeType (leave it empty to get mimetype from $filename)
 	 * @param string $contentId (optional)
-	 * @param array $options
-	 * - contentDisposition
+	 * @param array $options Options
 	 * @return mixed resource $EmailLib or string $contentId
 	 */
 	public function addEmbeddedBlobAttachment($content, $filename, $mimeType = null, $contentId = null, $options = array()) {

+ 4 - 1
Model/Behavior/JsonableBehavior.php

@@ -22,9 +22,12 @@ App::uses('ModelBehavior', 'Model');
  * - "list" is useful as some kind of pseudo enums or simple lists
  * - "params" is useful for multiple key/value pairs
  * - can be used to create dynamic forms (and tables)
- *
  * Also automatically cleans lists and works with custom separators etc
  *
+ * Tip: If you have other behaviors that might modify the array data prior to saving, better use a higher priority:
+ * public $actsAs = array('Tools.Jsonable' => array('priority' => 11, ...));
+ * So that it is run last.
+ *
  * @link http://www.dereuromark.de/2011/07/05/introducing-two-cakephp-behaviors/
  */
 class JsonableBehavior extends ModelBehavior {