Author: skonsoft
Date: 2010-02-18 22:32:05 +0100 (Thu, 18 Feb 2010)
New Revision: 28127

Modified:
   plugins/sfTeraWurflPlugin/trunk/lib/sfTeraWurfl.class.php
Log:
fixing sfTeraWurfl

Modified: plugins/sfTeraWurflPlugin/trunk/lib/sfTeraWurfl.class.php
===================================================================
--- plugins/sfTeraWurflPlugin/trunk/lib/sfTeraWurfl.class.php   2010-02-18 
21:31:14 UTC (rev 28126)
+++ plugins/sfTeraWurflPlugin/trunk/lib/sfTeraWurfl.class.php   2010-02-18 
21:32:05 UTC (rev 28127)
@@ -353,6 +353,40 @@
                }
        }
        /**
+        * return the current user agent max width screen, it's a short link to 
$this->capabilities ['display'] ['max_image_width'];
+        * @return int
+        */
+       public function getUserAgentWidthScreen(){
+               $user = sfContext::getInstance()->getUser();
+               if ($user->hasAttribute("user_agent_screen_max_width")){
+                       return 
$user->getAttribute("user_agent_screen_max_width");
+               }
+               if (count($this->capabilities)==0) {
+                       $this->getDeviceCapabilitiesFromAgent(NULL,TRUE);
+                       
+               }
+               $width =  $this->capabilities ['display'] ['max_image_width'];
+               $user->setAttribute("user_agent_screen_max_width",$width);
+               return $width;          
+       }
+       /**
+        * return the current user agent max height screen, it's a short link 
to $this->capabilities ['display'] ['max_image_height'];
+        * @return int
+        */
+       public function getUserAgentHeightScreen(){
+               $user = sfContext::getInstance()->getUser();
+               if ($user->hasAttribute("user_agent_screen_max_height")){
+                       return 
$user->getAttribute("user_agent_screen_max_height");
+               }
+               if (count($this->capabilities)==0) {
+                       $this->getDeviceCapabilitiesFromAgent(NULL,TRUE);
+                       
+               }
+               $height =  $this->capabilities ['display'] ['max_image_height'];
+               $user->setAttribute("user_agent_screen_max_height",$height);
+               return $height; 
+       }
+       /**
         * should be removed on next update !
         * use sfTeraWurflConfig::getDataDir() method 
         * @deprecated 

-- 
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