@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace net\authorize\util; |
| 3 | 3 | |
| 4 | 4 | use net\authorize\util\LogFactory; |
| 5 | -use net\authorize\util\Log; |
|
| 6 | 5 | |
| 7 | 6 | /** |
| 8 | 7 | * A class to send a request to the XML API. |
@@ -4,6 +4,10 @@ |
||
| 4 | 4 | class LogFactory |
| 5 | 5 | { |
| 6 | 6 | private static $logger = NULL; |
| 7 | + |
|
| 8 | + /** |
|
| 9 | + * @param string $classType |
|
| 10 | + */ |
|
| 7 | 11 | public static function getLog($classType){ |
| 8 | 12 | if(NULL == self::$logger){ |
| 9 | 13 | self::$logger = new Log(); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * iteratively fetches the properties of the object (including from the base classes up the hierarchy), ... |
| 114 | 114 | * collects them in an array of ReflectionProperty and returns the array. |
| 115 | 115 | * |
| 116 | - * @param ReflectionObject $reflClass |
|
| 116 | + * @param \ReflectionObject $reflClass |
|
| 117 | 117 | * |
| 118 | 118 | * @return \ReflectionProperty[] |
| 119 | 119 | */ |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * |
| 138 | 138 | * Receives a ReflectionProperty and an object, and returns a masked object if the ReflectionProperty corresponds to a sensitive field, else returns false. |
| 139 | 139 | * |
| 140 | - * @param ReflectionProperty $prop |
|
| 140 | + * @param \ReflectionProperty $prop |
|
| 141 | 141 | * @param object $obj |
| 142 | 142 | * |
| 143 | 143 | * @return string|bool |
@@ -269,6 +269,9 @@ discard block |
||
| 269 | 269 | file_put_contents($this->logFile, $logString, $flags); |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | + /** |
|
| 273 | + * @param string $logMessage |
|
| 274 | + */ |
|
| 272 | 275 | public function debug($logMessage, $flags=FILE_APPEND) |
| 273 | 276 | { |
| 274 | 277 | if(ANET_LOG_DEBUG >= $this->logLevel){ |
@@ -294,6 +297,9 @@ discard block |
||
| 294 | 297 | } |
| 295 | 298 | } |
| 296 | 299 | |
| 300 | + /** |
|
| 301 | + * @param string $logLevelPrefix |
|
| 302 | + */ |
|
| 297 | 303 | private function logFormat($logLevelPrefix, $format, $objects, $flags){ |
| 298 | 304 | try { |
| 299 | 305 | foreach($objects as $i => $testObject){ |
@@ -53,6 +53,9 @@ discard block |
||
| 53 | 53 | // // return $this->classes[$classname]['properties'][$property]['type']; |
| 54 | 54 | // } |
| 55 | 55 | |
| 56 | + /** |
|
| 57 | + * @param string $class |
|
| 58 | + */ |
|
| 56 | 59 | public function getClass($class, $property){ |
| 57 | 60 | // make the first letter of property as lowercase as all properties are lowercase |
| 58 | 61 | $property = lcfirst($property); |
@@ -109,6 +112,9 @@ discard block |
||
| 109 | 112 | // return $this->classes[$classname]['properties'][$property]['type']; |
| 110 | 113 | } |
| 111 | 114 | |
| 115 | + /** |
|
| 116 | + * @param string $class |
|
| 117 | + */ |
|
| 112 | 118 | public function getXmlName($class){ |
| 113 | 119 | if(isset($this->classes[$class]['xml_root_name'])){ |
| 114 | 120 | return $this->classes[$class]['xml_root_name']; |