@@ -29,19 +29,19 @@ |
||
| 29 | 29 | |
| 30 | 30 | if (!function_exists('vendorPath')) { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @return bool|string returns path of composer vendor folder, and false if folder does not exist |
|
| 34 | - */ |
|
| 35 | - function vendorPath() { |
|
| 32 | + /** |
|
| 33 | + * @return bool|string returns path of composer vendor folder, and false if folder does not exist |
|
| 34 | + */ |
|
| 35 | + function vendorPath() { |
|
| 36 | 36 | |
| 37 | - if (file_exists(__DIR__ . '/vendor/')) { |
|
| 38 | - return __DIR__ . '/vendor'; |
|
| 39 | - } else { |
|
| 40 | - if (!file_exists(__DIR__ . '/../../')) { |
|
| 41 | - return false; |
|
| 42 | - } else { |
|
| 43 | - return __DIR__ . '/../..'; |
|
| 44 | - } |
|
| 45 | - } |
|
| 46 | - } |
|
| 37 | + if (file_exists(__DIR__ . '/vendor/')) { |
|
| 38 | + return __DIR__ . '/vendor'; |
|
| 39 | + } else { |
|
| 40 | + if (!file_exists(__DIR__ . '/../../')) { |
|
| 41 | + return false; |
|
| 42 | + } else { |
|
| 43 | + return __DIR__ . '/../..'; |
|
| 44 | + } |
|
| 45 | + } |
|
| 46 | + } |
|
| 47 | 47 | } |
| 48 | 48 | \ No newline at end of file |
@@ -112,6 +112,10 @@ |
||
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + /** |
|
| 116 | + * @param string $csl |
|
| 117 | + * @param string $lang |
|
| 118 | + */ |
|
| 115 | 119 | private function init($csl, $lang) { |
| 116 | 120 | // define field values appropriate to your data in the csl_mapper class and un-comment the next line. |
| 117 | 121 | $this->mapper = new Mapper(); |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | */ |
| 109 | 109 | function __construct($csl = NULL, $lang = 'en') { |
| 110 | 110 | if ($csl) { |
| 111 | - $this->init($csl, $lang); |
|
| 111 | + $this->init($csl, $lang); |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
@@ -35,6 +35,9 @@ |
||
| 35 | 35 | parent::initFormatting(); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | + /** |
|
| 39 | + * @param string $mode |
|
| 40 | + */ |
|
| 38 | 41 | public function render($data, $mode = null) |
| 39 | 42 | { |
| 40 | 43 | //$text = ''; |
@@ -91,6 +91,9 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | protected $styleLocale; |
| 93 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $lang |
|
| 96 | + */ |
|
| 94 | 97 | private static function getLocalesFileName($lang) { |
| 95 | 98 | |
| 96 | 99 | include_once __DIR__.'/../vendorPath.php'; |
@@ -136,6 +139,10 @@ discard block |
||
| 136 | 139 | } |
| 137 | 140 | } |
| 138 | 141 | |
| 142 | + /** |
|
| 143 | + * @param string $type |
|
| 144 | + * @param string $arg3 |
|
| 145 | + */ |
|
| 139 | 146 | public function locale($type, $arg1, $arg2 = NULL, $arg3 = NULL) { |
| 140 | 147 | |
| 141 | 148 | switch ($type) { |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | public function __construct($lang = 'en') { |
| 114 | 114 | |
| 115 | 115 | $this->module_path = dirname(__FILE__); |
| 116 | - $this->locale = new \SimpleXMLElement(self::getLocalesFileName($lang)); |
|
| 116 | + $this->locale = new \SimpleXMLElement(self::getLocalesFileName($lang)); |
|
| 117 | 117 | |
| 118 | 118 | if ($this->locale) { |
| 119 | 119 | $this->locale->registerXPathNamespace('cs', 'http://purl.org/net/xbiblio/csl'); |
@@ -306,6 +306,9 @@ |
||
| 306 | 306 | $print, $punct, $space, $upper, $word, $patternModifiers); |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | + /** |
|
| 310 | + * @return string |
|
| 311 | + */ |
|
| 309 | 312 | protected function format($text, $part = 'base') |
| 310 | 313 | { |
| 311 | 314 | |