Permalink
Browse files

Documented Mobile_Detect.

  • Loading branch information...
1 parent 01b53d3 commit cc3d838739025d8aa686dc08a10e0cd3fbf8e666 @Alfaniel-Aldavan Alfaniel-Aldavan committed Jun 9, 2012
Showing with 17 additions and 3 deletions.
  1. +17 −3 Sources/CommonAPI.php
View
20 Sources/CommonAPI.php
@@ -683,6 +683,9 @@ class Mobile_Detect {
'GenericBrowser' => 'NokiaBrowser|OviBrowser'
);
+ /**
+ * Construct and init this instance.
+ */
function __construct(){
// Merge all rules together.
@@ -718,11 +721,20 @@ function __construct(){
}
+ /**
+ * Get detection rules.
+ */
public function getRules()
{
return $this->detectionRules;
}
+ /**
+ * Magic method to route the checks
+ *
+ * @param string $name
+ * @param array $arguments
+ */
public function __call($name, $arguments)
{
@@ -731,6 +743,11 @@ public function __call($name, $arguments)
}
+ /**
+ * Run the checks
+ *
+ * @param string $key
+ */
private function _detect($key='')
{
@@ -795,10 +812,7 @@ public function isTablet()
}
return false;
-
}
-
-
}
class Topiclist {

0 comments on commit cc3d838

Please sign in to comment.