Author: COil
Date: 2010-01-17 20:17:53 +0100 (Sun, 17 Jan 2010)
New Revision: 26778

Modified:
   plugins/sfTCPDFPlugin/branches/1.2/README
   plugins/sfTCPDFPlugin/branches/1.2/config/config_handlers.yml
   plugins/sfTCPDFPlugin/branches/1.2/config/routing.yml
   plugins/sfTCPDFPlugin/branches/1.2/lib/sfTCPDF.class.php
   
plugins/sfTCPDFPlugin/branches/1.2/modules/sfTCPDF/lib/BasesfTCPDFActions.class.php
   plugins/sfTCPDFPlugin/branches/1.2/package.xml
Log:
[sfTCPDFPlugin]
* Updated demos to work with 1.2.10

Modified: plugins/sfTCPDFPlugin/branches/1.2/README
===================================================================
--- plugins/sfTCPDFPlugin/branches/1.2/README   2010-01-17 18:49:46 UTC (rev 
26777)
+++ plugins/sfTCPDFPlugin/branches/1.2/README   2010-01-17 19:17:53 UTC (rev 
26778)
@@ -272,7 +272,7 @@
 ====
 
 If you want to run the tests, enable the `sfTCPDF` module in your 
`settings.yml`
-file, then call `sfTCPDF/test` or `sfTCPDF/test2`. (If you have desactivated 
the 
+file, then call `sfTCPDF/test.pdf` or `sfTCPDF/test2.pdf`. (If you have 
desactivated the
 default symfony routes, a `routing.yml` file is included in the `config` folder
 of the plugin.
  

Modified: plugins/sfTCPDFPlugin/branches/1.2/config/config_handlers.yml
===================================================================
--- plugins/sfTCPDFPlugin/branches/1.2/config/config_handlers.yml       
2010-01-17 18:49:46 UTC (rev 26777)
+++ plugins/sfTCPDFPlugin/branches/1.2/config/config_handlers.yml       
2010-01-17 19:17:53 UTC (rev 26778)
@@ -1,3 +1,3 @@
 config/pdf_configs.yml:
   class: sfTCPDFPluginConfigHandler
-  file:   <?php echo realpath(dirname(__FILE__).'/..') 
?>/lib/config/sfTCPDFPluginConfigHandler.class.php
\ No newline at end of file
+  file:  <?php echo realpath(dirname(__FILE__).'/..') 
?>/lib/config/sfTCPDFPluginConfigHandler.class.php
\ No newline at end of file

Modified: plugins/sfTCPDFPlugin/branches/1.2/config/routing.yml
===================================================================
--- plugins/sfTCPDFPlugin/branches/1.2/config/routing.yml       2010-01-17 
18:49:46 UTC (rev 26777)
+++ plugins/sfTCPDFPlugin/branches/1.2/config/routing.yml       2010-01-17 
19:17:53 UTC (rev 26778)
@@ -1,3 +1,3 @@
-#sfTCPDF:
-  #url:   /sfTCPDF/:action
-  #param: { module: sfTCPDF, action: test }
\ No newline at end of file
+sfTCPDF:
+  url:   /sfTCPDF/:action
+  param: { module: sfTCPDF, action: test }
\ No newline at end of file

Modified: plugins/sfTCPDFPlugin/branches/1.2/lib/sfTCPDF.class.php
===================================================================
--- plugins/sfTCPDFPlugin/branches/1.2/lib/sfTCPDF.class.php    2010-01-17 
18:49:46 UTC (rev 26777)
+++ plugins/sfTCPDFPlugin/branches/1.2/lib/sfTCPDF.class.php    2010-01-17 
19:17:53 UTC (rev 26778)
@@ -5,102 +5,150 @@
  *
  * @package    sfTCPDFPlugin
  * @author     Vernet Loïc aka COil <qrf_coil]at[yahoo[dot]fr>
+ * @link       http://www.symfony-project.org/plugins/sfTCPDFPlugin
  * @link       http://sourceforge.net/projects/tcpdf/
  */
 
 class sfTCPDF extends TCPDF
 {
-   /**
-    * When set this method is called as a header function.
-    * The variable must be a valid argument to call_user_func
-    * @var mixed
-    */
-   public $headerCallback = null;
+  /**
+  * When set this method is called as a header function.
+  * The variable must be a valid argument to call_user_func
+  *
+  * @var mixed
+  */
+  public $headerCallback = null;
 
-   /**
-    * When set this method is called as a header function.
-    * The variable must be a valid argument to call_user_func
-    * @var mixed
-    */
-   public $footerCallback = null;
+  /**
+  * When set this method is called as a header function.
+  * The variable must be a valid argument to call_user_func
+  *
+  * @var mixed
+  */
+  public $footerCallback = null;
 
-   /**
-    * Holds the data set via php magic methods
-    */
-   protected $userData = array();
+ /**
+  * Holds the data set via php magic methods
+  */
+  protected $userData = array();
 
-   /**
-    * Instantiate TCPDF lib.
-    *
-    * @param string $orientation
-    * @param string $unit
-    * @param string $format
-    * @param boolean $unicode
-    * @param string $encoding
-    */
-   public function __construct($orientation = 'P', $unit = 'mm', $format = 
'A4', $unicode = true, $encoding = "UTF-8")
-   {
-      parent::__construct($orientation, $unit, $format, $unicode, $encoding);
-   }
+ /**
+  * Instantiate TCPDF lib.
+  *
+  * @param string $orientation
+  * @param string $unit
+  * @param string $format
+  * @param boolean $unicode
+  * @param string $encoding
+  */
+  public function __construct($orientation = 'P', $unit = 'mm', $format = 
'A4', $unicode = true, $encoding = "UTF-8")
+  {
+    parent::__construct($orientation, $unit, $format, $unicode, $encoding);
+  }
 
-   /**
-    * This method is used to render the page header.
-    * It is automatically called by AddPage() and could be overwritten using a 
Callback.
-    * @access public
-    * @see $headerCallback
-    */
-   public function Header()
-   {
-      if ($this->print_header)
-         if (is_null($this->headerCallback))
-            parent::Header();
-         else
-            call_user_func($this->headerCallback, $this);
-   }
+ /**
+  * This method is used to render the page header.
+  * It is automatically called by AddPage() and could be overwritten using a 
Callback.
+  * 
+  * @access public
+  * @see $headerCallback
+  */
+  /*
+  public function Header()
+  {
+    if ($this->print_header)
+    {
+      if (is_null($this->headerCallback))
+      {
+        parent::Header();
+      }
+      else
+      {
+        call_user_func($this->headerCallback, $this);
+      }
+    }
+  }
+  */
 
-   /**
-    * This method is used to render the page footer.
-    * It is automatically called by AddPage() and could be overwritten using a 
Callback.
-    * @access public
-    * @see $footerCallback
-    */
-   public function Footer()
-   {
-      if ($this->print_footer)
-         if (is_null($this->footerCallback))
-            parent::Footer();
-         else
-            call_user_func($this->footerCallback, $this);
-   }
-
-   public function __set($name, $value)
-   {
-      $this->userData[$name] = $value;
-   }
-
-   public function __get($name)
-   {
-      if (array_key_exists($name, $this->userData))
+ /**
+  * This method is used to render the page footer.
+  * It is automatically called by AddPage() and could be overwritten using a 
Callback.
+  *
+  * @access public
+  * @see $footerCallback
+  */
+  /*
+  public function Footer()
+  {
+    if ($this->print_footer)
+    {
+      if (is_null($this->footerCallback))
       {
-         return $this->userData[$name];
+        parent::Footer();
       }
+      else
+      {
+        call_user_func($this->footerCallback, $this);
+      }
+    }
+  }
+   */
 
-      $trace = debug_backtrace();
-      trigger_error(
-              'Undefined property via __get(): ' . $name .
-              ' in ' . $trace[0]['file'] .
-              ' on line ' . $trace[0]['line'],
-              E_USER_NOTICE);
-      return null;
-   }
+  /**
+   * Magic setter.
+   * 
+   * @param String $name
+   * @param mixed $value
+   */
+   /*
+  public function __set($name, $value)
+  {
+    $this->userData[$name] = $value;
+  }*/
 
-   public function __isset($name)
-   {
-      return isset($this->userData[$name]);
-   }
+  /**
+   * Magic getter.
+   *
+   * @param String $name Name of data key to return
+   * @return mixed
+   */
+   /*
+  public function __get($name)
+  {
+    if (array_key_exists($name, $this->userData))
+    {
+      return $this->userData[$name];
+    }
 
-   public function __unset($name)
-   {
-      unset($this->userData[$name]);
-   }
+    $trace = debug_backtrace();    
+    trigger_error(
+      'Undefined property call via __get(): '. $name. ' in ' . 
$trace[0]['file']. ' on line ' . $trace[0]['line'],
+      E_USER_NOTICE
+    );
+    
+    return null;
+  }*/
+
+  /**
+   * Test existence of user data.
+   *
+   * @param String $name
+   * @return Boolean
+   */
+   /*
+  public function __isset($name)
+  {
+    return isset($this->userData[$name]);
+  }*/
+
+  /**
+   * Unset user data.
+   *
+   * @param String $name
+   */
+   /*
+  public function __unset($name)
+  {
+    unset($this->userData[$name]);
+  }*/
 }
\ No newline at end of file

Modified: 
plugins/sfTCPDFPlugin/branches/1.2/modules/sfTCPDF/lib/BasesfTCPDFActions.class.php
===================================================================
--- 
plugins/sfTCPDFPlugin/branches/1.2/modules/sfTCPDF/lib/BasesfTCPDFActions.class.php
 2010-01-17 18:49:46 UTC (rev 26777)
+++ 
plugins/sfTCPDFPlugin/branches/1.2/modules/sfTCPDF/lib/BasesfTCPDFActions.class.php
 2010-01-17 19:17:53 UTC (rev 26778)
@@ -4,7 +4,7 @@
  * Base sfTCPDF actions for demos.
  *
  * @package    sfTCPDFPlugin
- * @author     Vernet Loïc aka COil <[email protected]>
+ * @author     Vernet Loïc aka COil <[email protected]>
  * @since      1.6.0 - 16 march 2007
  */
 
@@ -36,7 +36,8 @@
 
     // output
     $pdf->Output();
-    return sfView::NONE;
+
+    return $this->stopExecution();
   }
 
   /**
@@ -137,9 +138,18 @@
     $pdf->MultiCell(40, 5, "D test multicell line 1\ntest multicell line 
2\ntest multicell line 3", 1, 'J', 0, 2);
     $pdf->MultiCell(40, 5, "F test multicell line 1\ntest multicell line 
2\ntest multicell line 3", 1, 'J', 0);
 
-    //Close and output PDF document
+    // Close and output PDF document
     $pdf->Output();
 
+    return $this->stopExecution();
+  }
+
+  /**
+   * Why return sfView::NONE, does not work anymore (neither sfStopExecution)
+   */
+  protected function stopExecution()
+  {
+    //die();
     return sfView::NONE;
   }
 }
\ No newline at end of file

Modified: plugins/sfTCPDFPlugin/branches/1.2/package.xml
===================================================================
--- plugins/sfTCPDFPlugin/branches/1.2/package.xml      2010-01-17 18:49:46 UTC 
(rev 26777)
+++ plugins/sfTCPDFPlugin/branches/1.2/package.xml      2010-01-17 19:17:53 UTC 
(rev 26778)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <package packagerversion="1.4.1" version="2.0" 
xmlns="http://pear.php.net/dtd/package-2.0"; 
xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 
http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 
http://pear.php.net/dtd/package-2.0.xsd";>
   <name>sfTCPDFPlugin</name>
   <channel>pear.symfony-project.com</channel>
@@ -71,8 +71,8 @@
         <name>symfony</name>
         <channel>pear.symfony-project.com</channel>
         <min>1.2.0</min>
-        <max>1.3.0</max>
-        <exclude>1.3.0</exclude>
+        <max>1.5.0</max>
+        <exclude>1.5.0</exclude>
       </package>
     </required>
   </dependencies>
@@ -80,6 +80,25 @@
   <changelog>
     <release>
       <version>
+        <release>1.6.2</release>
+        <api>1.6.2</api>
+      </version>
+      <stability>
+       <release>stable</release>
+       <api>stable</api>
+      </stability>
+      <license uri="http://www.symfony-project.com/license";>MIT 
license</license>
+      <date>2010-01-17</date>
+      <license>MIT</license>
+      <notes>
+        * Modified return sfView::NONE to die (symfony bug ?)
+        * Tested plugin with TCPDF 4_8_024 (2010-01-15)
+        * Modifications to fit symfony cs
+        * extended with callbacks for header and footer functions added magic 
functions
+      </notes>
+    </release>  
+    <release>
+      <version>
         <release>1.6.1</release>
         <api>1.6.1</api>
       </version>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.


Reply via email to