--- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_AmfFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_AmfFormat.php @@ -20 +20 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_CsvFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_CsvFormat.php @@ -18 +18 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_Format.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_Format.php @@ -13 +13 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_HtmlFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_HtmlFormat.php @@ -2 +1,0 @@ - @@ -9,0 +9 @@ +use Illuminate\View\Engines\PhpEngine; @@ -11 +10,0 @@ -use Illuminate\View\Engines\PhpEngine; @@ -22,4 +20,0 @@ -use Twig\Environment; -use Twig\Extension\DebugExtension; -use Twig\Loader\FilesystemLoader; -use Twig\TwigFunction; @@ -37 +32 @@ - * + * @version 3.0.0rc6 @@ -41,4 +35,0 @@ - const BLADE = 'Illuminate\View\View'; - const TWIG = 'Twig\Environment'; - const MUSTACHE = 'Mustache_Engine'; - @@ -96,2 +87 @@ - public function getDependencyMap() - { + public function getDependencyMap(){ @@ -99,3 +89,3 @@ - self::BLADE => 'illuminate/view:^8', - self::TWIG => 'twig/twig:^3', - self::MUSTACHE => 'mustache/mustache:dev-master', + 'Illuminate\View\View' => 'illuminate/view:4.2.*', + 'Twig_Environment' => 'twig/twig:v1.13.*', + 'Mustache_Engine' => 'mustache/mustache:dev-master', @@ -114 +104 @@ - $phpEngine = new PhpEngine($files); + $phpEngine = new PhpEngine(); @@ -141,16 +131,6 @@ - /** - * @param array|object $data - * @param bool $debug - * - * @return string - * @throws \Twig\Error\LoaderError - * @throws \Twig\Error\RuntimeError - * @throws \Twig\Error\SyntaxError - */ - public static function twig($data, $debug = true) - { - $loader = new FilesystemLoader(static::$viewPath); - $twig = new Environment($loader, array( - 'cache' => is_string(static::$cacheDirectory) - ? static::$cacheDirectory : false, - 'debug' => $debug, + public static function twig(array $data, $debug = true) + { + $loader = new \Twig_Loader_Filesystem(static::$viewPath); + $twig = new \Twig_Environment($loader, array( + 'cache' => static::$cacheDirectory, + 'debug' => $debug, @@ -159,3 +139,2 @@ - if ($debug) { - $twig->addExtension(new DebugExtension()); - } + if ($debug) + $twig->addExtension(new \Twig_Extension_Debug()); @@ -164 +143 @@ - new TwigFunction( + new \Twig_SimpleFunction( @@ -171 +150 @@ - new TwigFunction( + new \Twig_SimpleFunction( @@ -177 +156 @@ - new TwigFunction( + new \Twig_SimpleFunction( @@ -188 +167 @@ - return new TwigFunction( + return new \Twig_SimpleFunction( @@ -196,11 +175,5 @@ - $template = $twig->load(static::getViewFile()); - return $template->render((array)$data); - } - - /** - * @param array|object $data - * @param bool $debug - * - * @return string - */ - public static function handlebar($data, $debug = true) + $template = $twig->loadTemplate(static::getViewFile()); + return $template->render($data); + } + + public static function handlebar(array $data, $debug = true) @@ -211,10 +184,3 @@ - /** - * @param array|object $data - * @param bool $debug - * - * @return string - */ - public static function mustache($data, $debug = true) - { - $data = (array)$data; - if (!isset($data['nav'])) { + public static function mustache(array $data, $debug = true) + { + if (!isset($data['nav'])) @@ -222 +187,0 @@ - } @@ -224 +189 @@ - 'loader' => new \Mustache_Loader_FilesystemLoader( + 'loader' => new \Mustache_Loader_FilesystemLoader( @@ -238 +203 @@ - if (!$debug) { + if (!$debug) @@ -240 +204,0 @@ - } @@ -245,10 +209,3 @@ - /** - * @param array|object $data - * @param bool $debug - * - * @return string - * @throws RestException - */ - public static function php($data, $debug = true) - { - if (static::$view == 'debug') { + public static function php(array $data, $debug = true) + { + if (static::$view == 'debug') @@ -256 +212,0 @@ - } @@ -269 +224,0 @@ - $data = (array)$data; @@ -276 +231 @@ - if (!isset($data['form'])) { + if (!isset($data['form'])) @@ -278 +232,0 @@ - } @@ -285 +239 @@ - if (!isset($data['nav'])) { + if (!isset($data['nav'])) @@ -287,2 +240,0 @@ - } - @@ -305 +257 @@ - extract((array)$arr); + extract($arr); @@ -315 +267 @@ - if (count($args) < 2) { + if (count($args) < 2) @@ -317,2 +269 @@ - } - if (count($args) < 3) { + if (count($args) < 3) @@ -320 +270,0 @@ - } @@ -324 +274 @@ - if (isset($data[$task]) && is_callable($data[$task])) { + if (isset($data[$task]) && is_callable($data[$task])) @@ -326 +275,0 @@ - } @@ -334 +283 @@ - if (is_string($value)) { + if (is_string($value)) @@ -336 +284,0 @@ - } @@ -348,0 +297 @@ + * @throws \Exception @@ -350 +298,0 @@ - * @throws \Exception @@ -372,3 +320,3 @@ - 'stages' => $this->restler->getEvents(), - 'success' => $success, - 'error' => $error + 'stages' => $this->restler->getEvents(), + 'success' => $success, + 'error' => $error @@ -413,3 +361 @@ - if (is_array($data)) { - $data += static::$data; - } + $data += static::$data; @@ -426,2 +372 @@ - throw new RestException(500, - 'Unable to create cache directory `' . static::$cacheDirectory . '`'); + throw new RestException(500, 'Unable to create cache directory `' . static::$cacheDirectory . '`'); @@ -433 +378 @@ - $this->checkDependency(self::BLADE); + $this->checkDependency('Illuminate\View\View'); @@ -435 +380 @@ - $this->checkDependency(self::TWIG); + $this->checkDependency('Twig_Environment'); @@ -437 +382 @@ - $this->checkDependency(self::MUSTACHE); + $this->checkDependency('Mustache_Engine'); @@ -474 +419 @@ - if ($includeExtension) { + if ($includeExtension) @@ -476 +420,0 @@ - } --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_JsFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_JsFormat.php @@ -14 +14 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_JsonFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_JsonFormat.php @@ -18 +18 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_MultiFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_MultiFormat.php @@ -12 +12 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_PlistFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_PlistFormat.php @@ -21 +21 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_TsvFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_TsvFormat.php @@ -14 +14 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_UploadFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_UploadFormat.php @@ -16 +16 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_UrlEncodedFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_UrlEncodedFormat.php @@ -14 +14 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_XmlFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_XmlFormat.php @@ -19 +19 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_YamlFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_YamlFormat.php @@ -17 +17 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_iDecodeStream.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_iDecodeStream.php @@ -14 +14 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/github_19.0.3_iFormat.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Format/client_iFormat.php @@ -14 +14 @@ - * + * @version 3.0.0rc6