From 9647293f1b687d70703de88584fcf5fae895fab7 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 18 Dec 2014 17:11:30 +0100 Subject: [PATCH 001/280] Add our own dispatcher prototype for namespaced controllers refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 62 ++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 library/Icinga/Web/Controller/Dispatcher.php diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php new file mode 100644 index 000000000..51e492ab5 --- /dev/null +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -0,0 +1,62 @@ +setResponse($response); + $controllerName = $request->getControllerName(); + if (! $controllerName) { + throw new LogicException('Controller name not found'); + } + $controllerName = ucfirst($controllerName) . 'Controller'; + if ($this->_defaultModule === $this->_curModule) { + $controllerClass = 'Icinga\\Controllers\\' . $controllerName; + } else { + $controllerClass = 'Icinga\\Module\\' . $this->_curModule . '\\Controllers\\' . $controllerName; + } + if (! class_exists($controllerClass)) { + return parent::dispatch($request, $response); + } + $controller = new $controllerClass($request, $response, $this->getParams()); + $actionName = $request->getActionName(); + if (! $actionName) { + throw new LogicException('Action name not found'); + } + $actionName = $actionName . 'Action'; + $request->setDispatched(true); + // Buffer output by default + $disableOb = $this->getParam('disableOutputBuffering'); + $obLevel = ob_get_level(); + if (empty($disableOb)) { + ob_start(); + } + try { + $controller->dispatch($actionName); + } catch (Exception $e) { + // Clean output buffer on error + $curObLevel = ob_get_level(); + if ($curObLevel > $obLevel) { + do { + ob_get_clean(); + $curObLevel = ob_get_level(); + } while ($curObLevel > $obLevel); + } + throw $e; + } + if (empty($disableOb)) { + $content = ob_get_clean(); + $response->appendBody($content); + } + } +} From fdd06697b3778be0c0911449f434444a6c5eb149 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 18 Dec 2014 17:12:11 +0100 Subject: [PATCH 002/280] Web: Use our own dispatcher refs #5786 --- library/Icinga/Application/Web.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index 37ec5138a..fefb14fef 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -12,6 +12,7 @@ use Icinga\Exception\ConfigurationError; use Icinga\Exception\NotReadableError; use Icinga\Application\Logger; use Icinga\Util\TimezoneDetect; +use Icinga\Web\Controller\Dispatcher; use Icinga\Web\Request; use Icinga\Web\Response; use Icinga\Web\View; @@ -232,6 +233,8 @@ class Web extends ApplicationBootstrap { $this->frontController = Zend_Controller_Front::getInstance(); + $this->frontController->setDispatcher(new Dispatcher()); + $this->frontController->setRequest($this->request); $this->frontController->setControllerDirectory($this->getApplicationDir('/controllers')); @@ -335,6 +338,10 @@ class Web extends ApplicationBootstrap 'Icinga\\Forms', $this->getApplicationDir('forms') ); + $this->getLoader()->registerNamespace( + 'Icinga\\Controllers', + $this->getApplicationDir('controllers') + ); return $this; } } From f972a034e798abe68e115f37f54ebef172e6229a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 13:08:41 +0200 Subject: [PATCH 003/280] Fix license header in Dispatcher refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index 51e492ab5..54384baf9 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -1,6 +1,5 @@ Date: Mon, 17 Aug 2015 13:10:01 +0200 Subject: [PATCH 004/280] Add PHPDoc to the Dispatcher refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index 54384baf9..923f3072a 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -9,8 +9,14 @@ use Zend_Controller_Dispatcher_Standard; use Zend_Controller_Request_Abstract; use Zend_Controller_Response_Abstract; +/** + * Dispatcher supporting Zend-style and namespaced controllers + */ class Dispatcher extends Zend_Controller_Dispatcher_Standard { + /** + * {@inheritdoc} + */ public function dispatch(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response) { $this->setResponse($response); From d4de7c0519f6ea63caaec525e933ff6916eb5add Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 13:29:15 +0200 Subject: [PATCH 005/280] lib: Make Loader::registerNamespace() fluent refs #5786 --- library/Icinga/Application/Loader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/Icinga/Application/Loader.php b/library/Icinga/Application/Loader.php index 8c1c0b9e7..a0564667b 100644 --- a/library/Icinga/Application/Loader.php +++ b/library/Icinga/Application/Loader.php @@ -33,6 +33,7 @@ class Loader * @param string $namespace * @param string $directory * + * @return $this * @throws ProgrammingError */ public function registerNamespace($namespace, $directory) @@ -46,6 +47,8 @@ class Loader } $this->namespaces[$namespace] = $directory; + + return $this; } /** From 8b32edd6e9339a21cf1d1ff6f86f1f8a11e675ad Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 13:29:47 +0200 Subject: [PATCH 006/280] Default to Zend's dispatcher if the controller name is empty refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index 923f3072a..853e1c3e0 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -11,18 +11,23 @@ use Zend_Controller_Response_Abstract; /** * Dispatcher supporting Zend-style and namespaced controllers + * + * Does not support a namespaced default controller in combination w/ the Zend parameter useDefaultControllerAlways. */ class Dispatcher extends Zend_Controller_Dispatcher_Standard { /** - * {@inheritdoc} + * Dispatch request to a controller and action + * + * @param Zend_Controller_Request_Abstract $request + * @param Zend_Controller_Response_Abstract $resposne */ public function dispatch(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response) { $this->setResponse($response); $controllerName = $request->getControllerName(); if (! $controllerName) { - throw new LogicException('Controller name not found'); + return parent::dispatch($request, $response); } $controllerName = ucfirst($controllerName) . 'Controller'; if ($this->_defaultModule === $this->_curModule) { From 965fee1e9e5b951549285b5ccfbeb348b3b7817d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 13:31:05 +0200 Subject: [PATCH 007/280] Fix 'void' method result used in the Dispatcher refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index 853e1c3e0..d1e0bdb82 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -27,7 +27,8 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard $this->setResponse($response); $controllerName = $request->getControllerName(); if (! $controllerName) { - return parent::dispatch($request, $response); + parent::dispatch($request, $response); + return; } $controllerName = ucfirst($controllerName) . 'Controller'; if ($this->_defaultModule === $this->_curModule) { @@ -36,7 +37,8 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard $controllerClass = 'Icinga\\Module\\' . $this->_curModule . '\\Controllers\\' . $controllerName; } if (! class_exists($controllerClass)) { - return parent::dispatch($request, $response); + parent::dispatch($request, $response); + return; } $controller = new $controllerClass($request, $response, $this->getParams()); $actionName = $request->getActionName(); From 1e1d4531c698442aa8d6db8bd14635a9e621ff49 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 13:31:26 +0200 Subject: [PATCH 008/280] Register the controller namespace refs #5786 --- library/Icinga/Application/Web.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index ed9ba5c8f..5556b4cd4 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -89,7 +89,7 @@ class Web extends EmbeddedWeb ->setupLogger() ->setupInternationalization() ->setupZendMvc() - ->setupFormNamespace() + ->setupNamespaces() ->setupModuleManager() ->setupUserBackendFactory() ->loadSetupModuleIfNecessary() @@ -298,16 +298,22 @@ class Web extends EmbeddedWeb } /** - * Setup an autoloader namespace for Icinga\Forms + * Setup auto loader namespaces for Icinga\Controllers and Icinga\Forms * * @return $this */ - private function setupFormNamespace() + private function setupNamespaces() { - $this->getLoader()->registerNamespace( - 'Icinga\\Forms', - $this->getApplicationDir('forms') - ); + $this + ->getLoader() + ->registerNamespace( + 'Icinga\\Controllers', + $this->getApplicationDir('controllers') + ) + ->registerNamespace( + 'Icinga\\Forms', + $this->getApplicationDir('forms') + ); return $this; } } From e26a7fd4d15bd5c3aa6aed3c0a0762874e6a3a48 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 13:34:47 +0200 Subject: [PATCH 009/280] Use Zend_Cotroller_Dispatcher_Standard::getActionMethod() in the Dispatcher refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index d1e0bdb82..c96805fa1 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -4,7 +4,6 @@ namespace Icinga\Web\Controller; use Exception; -use LogicException; use Zend_Controller_Dispatcher_Standard; use Zend_Controller_Request_Abstract; use Zend_Controller_Response_Abstract; @@ -19,8 +18,10 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard /** * Dispatch request to a controller and action * - * @param Zend_Controller_Request_Abstract $request - * @param Zend_Controller_Response_Abstract $resposne + * @param Zend_Controller_Request_Abstract $request + * @param Zend_Controller_Response_Abstract $response + * + * @throws Exception If dispatching the request fails */ public function dispatch(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response) { @@ -41,11 +42,7 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard return; } $controller = new $controllerClass($request, $response, $this->getParams()); - $actionName = $request->getActionName(); - if (! $actionName) { - throw new LogicException('Action name not found'); - } - $actionName = $actionName . 'Action'; + $action = $this->getActionMethod($request); $request->setDispatched(true); // Buffer output by default $disableOb = $this->getParam('disableOutputBuffering'); @@ -54,7 +51,7 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard ob_start(); } try { - $controller->dispatch($actionName); + $controller->dispatch($action); } catch (Exception $e) { // Clean output buffer on error $curObLevel = ob_get_level(); From 06e879f078600c8937d0317af72ade4a7e4a4091 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 13:38:16 +0200 Subject: [PATCH 010/280] Throw an expcetion in our Dispatcher if the controller is not an instance of Zend_Controller_Action_Interface refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index c96805fa1..efa0e02b2 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -4,6 +4,9 @@ namespace Icinga\Web\Controller; use Exception; +use Zend_Controller_Action; +use Zend_Controller_Action_Interface; +use Zend_Controller_Dispatcher_Exception; use Zend_Controller_Dispatcher_Standard; use Zend_Controller_Request_Abstract; use Zend_Controller_Response_Abstract; @@ -21,7 +24,9 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard * @param Zend_Controller_Request_Abstract $request * @param Zend_Controller_Response_Abstract $response * - * @throws Exception If dispatching the request fails + * @throws Zend_Controller_Dispatcher_Exception If the controller is not an instance of + * Zend_Controller_Action_Interface + * @throws Exception If dispatching the request fails */ public function dispatch(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response) { @@ -42,6 +47,13 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard return; } $controller = new $controllerClass($request, $response, $this->getParams()); + if (! $controller instanceof Zend_Controller_Action + && ! $controller instanceof Zend_Controller_Action_Interface + ) { + throw new Zend_Controller_Dispatcher_Exception( + 'Controller "' . $controllerClass . '" is not an instance of Zend_Controller_Action_Interface' + ); + } $action = $this->getActionMethod($request); $request->setDispatched(true); // Buffer output by default From 7252f3237aeddd2adec515c91a16a25dca43aee8 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 13:43:34 +0200 Subject: [PATCH 011/280] Introduce a constant for the controller namespace refs #5786 --- library/Icinga/Application/Web.php | 2 +- library/Icinga/Web/Controller/Dispatcher.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index 5556b4cd4..85ad0949e 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -307,7 +307,7 @@ class Web extends EmbeddedWeb $this ->getLoader() ->registerNamespace( - 'Icinga\\Controllers', + 'Icinga\\' . Dispatcher::CONTROLLER_NAMESPACE, $this->getApplicationDir('controllers') ) ->registerNamespace( diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index efa0e02b2..6e1f32e02 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -18,6 +18,13 @@ use Zend_Controller_Response_Abstract; */ class Dispatcher extends Zend_Controller_Dispatcher_Standard { + /** + * Controller namespace + * + * @var string + */ + const CONTROLLER_NAMESPACE = 'Controller'; + /** * Dispatch request to a controller and action * @@ -38,9 +45,10 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard } $controllerName = ucfirst($controllerName) . 'Controller'; if ($this->_defaultModule === $this->_curModule) { - $controllerClass = 'Icinga\\Controllers\\' . $controllerName; + $controllerClass = 'Icinga\\' . self::CONTROLLER_NAMESPACE . '\\' . $controllerName; } else { - $controllerClass = 'Icinga\\Module\\' . $this->_curModule . '\\Controllers\\' . $controllerName; + $controllerClass = 'Icinga\\Module\\' . $this->_curModule . '\\' . self::CONTROLLER_NAMESPACE . '\\' + . $controllerName; } if (! class_exists($controllerClass)) { parent::dispatch($request, $response); From 7563a7a0baa6c74dde7ca44b2d262f78449a3000 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 14:34:39 +0200 Subject: [PATCH 012/280] Rename Loader::unRegister() to Loader::register() --- library/Icinga/Application/Loader.php | 4 ++-- test/php/library/Icinga/Application/LoaderTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Application/Loader.php b/library/Icinga/Application/Loader.php index a0564667b..d3cd0ef40 100644 --- a/library/Icinga/Application/Loader.php +++ b/library/Icinga/Application/Loader.php @@ -24,7 +24,7 @@ class Loader */ public function __destruct() { - $this->unRegister(); + $this->unregister(); } /** @@ -134,7 +134,7 @@ class Loader /** * Detach autoloader from spl registration */ - public function unRegister() + public function unregister() { spl_autoload_unregister(array(&$this, 'loadClass')); } diff --git a/test/php/library/Icinga/Application/LoaderTest.php b/test/php/library/Icinga/Application/LoaderTest.php index 3ae94f8d3..2b6fdd977 100644 --- a/test/php/library/Icinga/Application/LoaderTest.php +++ b/test/php/library/Icinga/Application/LoaderTest.php @@ -56,7 +56,7 @@ EOD; } $this->assertTrue($check); - $loader->unRegister(); + $loader->unregister(); $check = true; foreach (spl_autoload_functions() as $functions) { From b6fdbf055e44da3f94853e66b108daf7b7d97a90 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 17 Aug 2015 14:35:35 +0200 Subject: [PATCH 013/280] Remove unnecessary pass by refenrece in the loader refs #5786 --- library/Icinga/Application/Loader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Application/Loader.php b/library/Icinga/Application/Loader.php index d3cd0ef40..70f2877ed 100644 --- a/library/Icinga/Application/Loader.php +++ b/library/Icinga/Application/Loader.php @@ -128,7 +128,7 @@ class Loader { // Think about to add class pathes to php include path // this could be faster (tg) - spl_autoload_register(array(&$this, 'loadClass')); + spl_autoload_register(array($this, 'loadClass')); } /** @@ -136,6 +136,6 @@ class Loader */ public function unregister() { - spl_autoload_unregister(array(&$this, 'loadClass')); + spl_autoload_unregister(array($this, 'loadClass')); } } From 13fc7e16f2fb875c8b4b07c39cbd861f403f9653 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 09:06:58 +0200 Subject: [PATCH 014/280] Rename Loader to ClassLoader refs #5786 --- library/Icinga/Application/ApplicationBootstrap.php | 8 ++++---- .../Application/{Loader.php => ClassLoader.php} | 2 +- test/php/bootstrap.php | 4 ++-- test/php/library/Icinga/Application/LoaderTest.php | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) rename library/Icinga/Application/{Loader.php => ClassLoader.php} (99%) diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index a8d185023..ab18e35a5 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -80,7 +80,7 @@ abstract class ApplicationBootstrap /** * Icinga auto loader * - * @var Loader + * @var ClassLoader */ private $loader; @@ -183,7 +183,7 @@ abstract class ApplicationBootstrap /** * Getter for class loader * - * @return Loader + * @return ClassLoader */ public function getLoader() { @@ -345,9 +345,9 @@ abstract class ApplicationBootstrap */ public function setupAutoloader() { - require $this->libDir . '/Icinga/Application/Loader.php'; + require $this->libDir . '/Icinga/Application/ClassLoader.php'; - $this->loader = new Loader(); + $this->loader = new ClassLoader(); $this->loader->registerNamespace('Icinga', $this->libDir. '/Icinga'); $this->loader->register(); diff --git a/library/Icinga/Application/Loader.php b/library/Icinga/Application/ClassLoader.php similarity index 99% rename from library/Icinga/Application/Loader.php rename to library/Icinga/Application/ClassLoader.php index 70f2877ed..051c2ae12 100644 --- a/library/Icinga/Application/Loader.php +++ b/library/Icinga/Application/ClassLoader.php @@ -5,7 +5,7 @@ namespace Icinga\Application; use Icinga\Exception\ProgrammingError; -class Loader +class ClassLoader { /** * Namespace separator diff --git a/test/php/bootstrap.php b/test/php/bootstrap.php index 6a41e7eab..4757c5018 100644 --- a/test/php/bootstrap.php +++ b/test/php/bootstrap.php @@ -22,9 +22,9 @@ require_once 'Mockery/Loader.php'; $mockeryLoader = new \Mockery\Loader; $mockeryLoader->register(); -require_once($libraryPath . '/Icinga/Application/Loader.php'); +require_once($libraryPath . '/Icinga/Application/ClassLoader.php'); -$loader = new Icinga\Application\Loader(); +$loader = new Icinga\Application\ClassLoader(); $loader->registerNamespace('Tests', $testLibraryPath); $loader->registerNamespace('Icinga', $libraryPath . '/Icinga'); $loader->registerNamespace('Icinga\\Forms', $applicationPath . '/forms'); diff --git a/test/php/library/Icinga/Application/LoaderTest.php b/test/php/library/Icinga/Application/LoaderTest.php index 2b6fdd977..ec62a5975 100644 --- a/test/php/library/Icinga/Application/LoaderTest.php +++ b/test/php/library/Icinga/Application/LoaderTest.php @@ -4,7 +4,7 @@ namespace Tests\Icinga\Application; use Icinga\Test\BaseTestCase; -use Icinga\Application\Loader; +use Icinga\Application\ClassLoader; class LoaderTest extends BaseTestCase { @@ -43,7 +43,7 @@ EOD; public function testObjectCreation1() { - $loader = new Loader(); + $loader = new ClassLoader(); $loader->register(); $check = false; @@ -71,7 +71,7 @@ EOD; public function testNamespaces() { - $loader = new Loader(); + $loader = new ClassLoader(); $loader->registerNamespace('Test\\Laola', '/tmp'); $loader->registerNamespace('Dings\\Var', '/var/tmp'); @@ -89,7 +89,7 @@ EOD; $classFile = $this->baseDir. self::$classFile; $this->assertFileExists($classFile); - $loader = new Loader(); + $loader = new ClassLoader(); $loader->registerNamespace('My\\Library', dirname($classFile)); $this->assertFalse($loader->loadClass('DOES\\NOT\\EXISTS')); $this->assertTrue($loader->loadClass('My\\Library\\TestStruct')); @@ -100,7 +100,7 @@ EOD; $classFile = $this->baseDir. self::$classFile; $this->assertFileExists($classFile); - $loader = new Loader(); + $loader = new ClassLoader(); $loader->registerNamespace('My\\Library', dirname($classFile)); $loader->register(); @@ -113,7 +113,7 @@ EOD; */ public function testNonexistingDirectory() { - $loader = new Loader(); + $loader = new ClassLoader(); $loader->registerNamespace('My\\Library', '/trullalla/123'); } } From a382a563d512fbd0c9e7bf6bb47c77767e230784 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 09:10:23 +0200 Subject: [PATCH 015/280] Move Loader::__destruct to the bottom of the method list refs #5786 --- library/Icinga/Application/ClassLoader.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/Icinga/Application/ClassLoader.php b/library/Icinga/Application/ClassLoader.php index 051c2ae12..17d7e9e33 100644 --- a/library/Icinga/Application/ClassLoader.php +++ b/library/Icinga/Application/ClassLoader.php @@ -19,14 +19,6 @@ class ClassLoader */ private $namespaces = array(); - /** - * Detach spl autoload method from stack - */ - public function __destruct() - { - $this->unregister(); - } - /** * Register new namespace for directory * @@ -138,4 +130,12 @@ class ClassLoader { spl_autoload_unregister(array($this, 'loadClass')); } + + /** + * Detach spl autoload method from stack + */ + public function __destruct() + { + $this->unregister(); + } } From ac99e54f17295e58183c1e3ce94982eaeaabc0fe Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 09:27:34 +0200 Subject: [PATCH 016/280] Fix PHPDoc in ClassLoader refs #5786 --- library/Icinga/Application/ClassLoader.php | 29 +++++++++++----------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/library/Icinga/Application/ClassLoader.php b/library/Icinga/Application/ClassLoader.php index 17d7e9e33..e31aa49af 100644 --- a/library/Icinga/Application/ClassLoader.php +++ b/library/Icinga/Application/ClassLoader.php @@ -5,6 +5,9 @@ namespace Icinga\Application; use Icinga\Exception\ProgrammingError; +/** + * PSR-4 class loader + */ class ClassLoader { /** @@ -13,14 +16,14 @@ class ClassLoader const NAMESPACE_SEPARATOR = '\\'; /** - * List of namespaces + * Namespaces * * @var array */ private $namespaces = array(); /** - * Register new namespace for directory + * Register a base directory for a namespace prefix * * @param string $namespace * @param string $directory @@ -44,9 +47,9 @@ class ClassLoader } /** - * Test if a namespace exists + * Test whether a namespace exists * - * @param string $namespace + * @param string $namespace * * @return bool */ @@ -56,13 +59,11 @@ class ClassLoader } /** - * Class loader + * Load the given class or interface * - * Ignores all but classes in registered namespaces. + * @param string $class Name of the class or interface * - * @param string $class - * - * @return boolean + * @return bool Whether the class or interface has been loaded */ public function loadClass($class) { @@ -82,7 +83,7 @@ class ClassLoader } /** - * Test if we have a registered namespaces for this class + * Get the namespace for the given class * * Return is the longest match in the array found * @@ -114,17 +115,15 @@ class ClassLoader } /** - * Effectively registers the autoloader the PHP/SPL way + * Register {@link loadClass()} as an autoloader */ public function register() { - // Think about to add class pathes to php include path - // this could be faster (tg) spl_autoload_register(array($this, 'loadClass')); } /** - * Detach autoloader from spl registration + * Unregister {@link loadClass()} as an autoloader */ public function unregister() { @@ -132,7 +131,7 @@ class ClassLoader } /** - * Detach spl autoload method from stack + * Unregister this as an autloader */ public function __destruct() { From 5ecde41ba3b2343559c94a05ec82351d602f0313 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 09:31:26 +0200 Subject: [PATCH 017/280] Rename LoaderTest to ClassLoaderTest refs #5786 --- .../Icinga/Application/{LoaderTest.php => ClassLoaderTest.php} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/php/library/Icinga/Application/{LoaderTest.php => ClassLoaderTest.php} (98%) diff --git a/test/php/library/Icinga/Application/LoaderTest.php b/test/php/library/Icinga/Application/ClassLoaderTest.php similarity index 98% rename from test/php/library/Icinga/Application/LoaderTest.php rename to test/php/library/Icinga/Application/ClassLoaderTest.php index ec62a5975..ebc3c7572 100644 --- a/test/php/library/Icinga/Application/LoaderTest.php +++ b/test/php/library/Icinga/Application/ClassLoaderTest.php @@ -6,7 +6,7 @@ namespace Tests\Icinga\Application; use Icinga\Test\BaseTestCase; use Icinga\Application\ClassLoader; -class LoaderTest extends BaseTestCase +class ClassLoaderTest extends BaseTestCase { private static $classFile = 'test/My/Library/TestStruct.php'; From 234dc951d26f5991b74f513adeacf3ef022aa7e5 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 09:32:00 +0200 Subject: [PATCH 018/280] Remove the is_dir check from the ClassLoader refs #5786 --- library/Icinga/Application/ClassLoader.php | 9 --------- test/php/library/Icinga/Application/ClassLoaderTest.php | 9 --------- 2 files changed, 18 deletions(-) diff --git a/library/Icinga/Application/ClassLoader.php b/library/Icinga/Application/ClassLoader.php index e31aa49af..ab3326f84 100644 --- a/library/Icinga/Application/ClassLoader.php +++ b/library/Icinga/Application/ClassLoader.php @@ -29,18 +29,9 @@ class ClassLoader * @param string $directory * * @return $this - * @throws ProgrammingError */ public function registerNamespace($namespace, $directory) { - if (!is_dir($directory)) { - throw new ProgrammingError( - 'Directory "%s" for namespace "%s" does not exist', - $directory, - $namespace - ); - } - $this->namespaces[$namespace] = $directory; return $this; diff --git a/test/php/library/Icinga/Application/ClassLoaderTest.php b/test/php/library/Icinga/Application/ClassLoaderTest.php index ebc3c7572..86975df43 100644 --- a/test/php/library/Icinga/Application/ClassLoaderTest.php +++ b/test/php/library/Icinga/Application/ClassLoaderTest.php @@ -107,13 +107,4 @@ EOD; $o = new \My\Library\TestStruct(); $this->assertTrue($o->testFlag()); } - - /** - * @expectedException Icinga\Exception\ProgrammingError - */ - public function testNonexistingDirectory() - { - $loader = new ClassLoader(); - $loader->registerNamespace('My\\Library', '/trullalla/123'); - } } From fae2e0979a06f900a371266cb998a424e5be70cb Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 10:50:29 +0200 Subject: [PATCH 019/280] Fix class loading to not rely on the longest namespace match refs #5786 --- library/Icinga/Application/ClassLoader.php | 74 ++++++++-------------- 1 file changed, 28 insertions(+), 46 deletions(-) diff --git a/library/Icinga/Application/ClassLoader.php b/library/Icinga/Application/ClassLoader.php index ab3326f84..3247d3250 100644 --- a/library/Icinga/Application/ClassLoader.php +++ b/library/Icinga/Application/ClassLoader.php @@ -3,8 +3,6 @@ namespace Icinga\Application; -use Icinga\Exception\ProgrammingError; - /** * PSR-4 class loader */ @@ -49,6 +47,30 @@ class ClassLoader return array_key_exists($namespace, $this->namespaces); } + /** + * Get the source file of the given class or interface + * + * @param string $class Name of the class or interface + * + * @return string|null + */ + public function getSourceFile($class) + { + foreach ($this->namespaces as $namespace => $dir) { + if ($class === strstr($class, $namespace)) { + $classPath = str_replace( + self::NAMESPACE_SEPARATOR, + DIRECTORY_SEPARATOR, + substr($class, strlen($namespace)) + ) . '.php'; + if (file_exists($file = $dir . $classPath)) { + return $file; + } + } + } + return null; + } + /** * Load the given class or interface * @@ -58,50 +80,10 @@ class ClassLoader */ public function loadClass($class) { - $namespace = $this->getNamespaceForClass($class); - - if ($namespace) { - $file = $this->namespaces[$namespace] . preg_replace('/^' . preg_quote($namespace) . '/', '', $class); - $file = str_replace(self::NAMESPACE_SEPARATOR, '/', $file) . '.php'; - - if (@file_exists($file)) { - require_once $file; - return true; - } + if ($file = $this->getSourceFile($class)) { + require $file; + return true; } - - return false; - } - - /** - * Get the namespace for the given class - * - * Return is the longest match in the array found - * - * @param string $className - * - * @return bool|string - */ - private function getNamespaceForClass($className) - { - $testNamespace = ''; - $testLength = 0; - - foreach (array_keys($this->namespaces) as $namespace) { - $stub = preg_replace( - '/^' . preg_quote($namespace) . '(' . preg_quote(self::NAMESPACE_SEPARATOR) . '|$)/', '', $className - ); - $length = strlen($className) - strlen($stub); - if ($length > $testLength) { - $testLength = $length; - $testNamespace = $namespace; - } - } - - if ($testLength > 0) { - return $testNamespace; - } - return false; } @@ -122,7 +104,7 @@ class ClassLoader } /** - * Unregister this as an autloader + * Unregister this as an autoloader */ public function __destruct() { From e31dce97a9bd1fc0d4ff6b6bf431f98b81c2a5c8 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 11:11:28 +0200 Subject: [PATCH 020/280] Fix dispatching namespaced module controllers refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index 6e1f32e02..b7f8d2c5e 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -44,10 +44,10 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard return; } $controllerName = ucfirst($controllerName) . 'Controller'; - if ($this->_defaultModule === $this->_curModule) { + if ($this->_defaultModule === $moduleName = $request->getModuleName()) { $controllerClass = 'Icinga\\' . self::CONTROLLER_NAMESPACE . '\\' . $controllerName; } else { - $controllerClass = 'Icinga\\Module\\' . $this->_curModule . '\\' . self::CONTROLLER_NAMESPACE . '\\' + $controllerClass = 'Icinga\\Module\\' . ucfirst($moduleName) . '\\' . self::CONTROLLER_NAMESPACE . '\\' . $controllerName; } if (! class_exists($controllerClass)) { From cb8fb93ab0a11afe4635f274ed956637bfeebcbe Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 12:50:46 +0200 Subject: [PATCH 021/280] Fix PHPDoc in ApplicationBootstrap to read class loader instead of auto loader refs #5786 --- library/Icinga/Application/ApplicationBootstrap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index ab18e35a5..c46aa3a27 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -78,7 +78,7 @@ abstract class ApplicationBootstrap protected $configDir; /** - * Icinga auto loader + * Icinga class loader * * @var ClassLoader */ @@ -339,7 +339,7 @@ abstract class ApplicationBootstrap } /** - * Setup Icinga auto loader + * Setup Icinga class loader * * @return $this */ From d267686ef45f45f1fb0e44bb5e54dec065ea273b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 12:51:46 +0200 Subject: [PATCH 022/280] Fix PHPDoc in Web to read class loader instead of auto loader refs #5786 --- library/Icinga/Application/Web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index 85ad0949e..d77afc0d8 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -298,7 +298,7 @@ class Web extends EmbeddedWeb } /** - * Setup auto loader namespaces for Icinga\Controllers and Icinga\Forms + * Setup class loader namespaces for Icinga\Controllers and Icinga\Forms * * @return $this */ From 3c812e6d2b09a77e5a0026b55f3482bcc3cc5038 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 13:02:54 +0200 Subject: [PATCH 023/280] Register module controller namespace refs #5786 --- library/Icinga/Application/Modules/Module.php | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 9ec35b565..41fdb762d 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -4,23 +4,24 @@ namespace Icinga\Application\Modules; use Exception; -use Zend_Controller_Router_Route_Abstract; +use Icinga\Web\Controller\Dispatcher; use Zend_Controller_Router_Route as Route; +use Zend_Controller_Router_Route_Abstract; use Zend_Controller_Router_Route_Regex as RegexRoute; use Icinga\Application\ApplicationBootstrap; use Icinga\Application\Config; use Icinga\Application\Icinga; use Icinga\Application\Logger; use Icinga\Data\ConfigObject; +use Icinga\Exception\IcingaException; +use Icinga\Exception\ProgrammingError; +use Icinga\Module\Setup\SetupWizard; +use Icinga\Util\File; use Icinga\Util\Translator; use Icinga\Web\Hook; use Icinga\Web\Menu; use Icinga\Web\Widget; use Icinga\Web\Widget\Dashboard\Pane; -use Icinga\Module\Setup\SetupWizard; -use Icinga\Util\File; -use Icinga\Exception\ProgrammingError; -use Icinga\Exception\IcingaException; /** * Module handling @@ -934,7 +935,7 @@ class Module } /** - * Register module namespaces on the autoloader + * Register module namespaces on our class loader * * @return $this */ @@ -944,16 +945,25 @@ class Module return $this; } + $loader = $this->app->getLoader(); $moduleName = ucfirst($this->getName()); $moduleLibraryDir = $this->getLibDir(). '/'. $moduleName; if (is_dir($moduleLibraryDir)) { - $this->app->getLoader()->registerNamespace('Icinga\\Module\\' . $moduleName, $moduleLibraryDir); + $loader->registerNamespace('Icinga\\Module\\' . $moduleName, $moduleLibraryDir); } $moduleFormDir = $this->getFormDir(); if (is_dir($moduleFormDir)) { - $this->app->getLoader()->registerNamespace('Icinga\\Module\\' . $moduleName. '\\Forms', $moduleFormDir); + $loader->registerNamespace('Icinga\\Module\\' . $moduleName. '\\Forms', $moduleFormDir); + } + + $moduleControllerDir = $this->getControllerDir(); + if (is_dir($moduleControllerDir)) { + $loader->registerNamespace( + 'Icinga\\Module\\' . $moduleName . '\\' . Dispatcher::CONTROLLER_NAMESPACE, + $moduleControllerDir + ); } $this->registeredAutoloader = true; From c2d5d8f33997cccf8c7d7304c7989a9374d37c20 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 13:03:25 +0200 Subject: [PATCH 024/280] Namespace the DashboardController refs #5786 --- application/controllers/DashboardController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index b00ddf2b8..7a2101527 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -1,6 +1,8 @@ Date: Tue, 18 Aug 2015 13:06:43 +0200 Subject: [PATCH 025/280] Optimize imports in the DashboardController refs #5786 --- application/controllers/DashboardController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index 7a2101527..47e39d1f5 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -6,9 +6,9 @@ namespace Icinga\Controller; use Icinga\Exception\ProgrammingError; use Icinga\Forms\ConfirmRemovalForm; use Icinga\Forms\Dashboard\DashletForm; +use Icinga\Web\Controller\ActionController; use Icinga\Web\Form; use Icinga\Web\Notification; -use Icinga\Web\Controller\ActionController; use Icinga\Web\Url; use Icinga\Web\Widget\Dashboard; use Icinga\Web\Widget\Tabextension\DashboardSettings; From fba9780405745b05f8c0e16bf9f1ce4db0c6fadc Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 13:07:01 +0200 Subject: [PATCH 026/280] Add missing imports in the DashboardController after namespacing refs #5786 --- application/controllers/DashboardController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index 47e39d1f5..b67912384 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -3,6 +3,8 @@ namespace Icinga\Controller; +use Exception; +use Zend_Controller_Action_Exception; use Icinga\Exception\ProgrammingError; use Icinga\Forms\ConfirmRemovalForm; use Icinga\Forms\Dashboard\DashletForm; From 0a7a8d377e95ae1cecd58d3264ac0cbfa5a14f40 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 13:34:14 +0200 Subject: [PATCH 027/280] Remove unnecessary import in the PivotTable refs #9333 --- library/Icinga/Data/PivotTable.php | 1 - 1 file changed, 1 deletion(-) diff --git a/library/Icinga/Data/PivotTable.php b/library/Icinga/Data/PivotTable.php index cf703ae9c..29fbca75c 100644 --- a/library/Icinga/Data/PivotTable.php +++ b/library/Icinga/Data/PivotTable.php @@ -4,7 +4,6 @@ namespace Icinga\Data; use Icinga\Data\Filter\Filter; -use Icinga\Data\SimpleQuery; use Icinga\Application\Icinga; use Icinga\Web\Paginator\Adapter\QueryAdapter; use Zend_Paginator; From d0f288736723735806ea39fa5a9ff8bc5677bd44 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 13:35:50 +0200 Subject: [PATCH 028/280] Fix PHPDoc indents in the PivotTable refs #9333 --- library/Icinga/Data/PivotTable.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/Icinga/Data/PivotTable.php b/library/Icinga/Data/PivotTable.php index 29fbca75c..2966c94ad 100644 --- a/library/Icinga/Data/PivotTable.php +++ b/library/Icinga/Data/PivotTable.php @@ -62,7 +62,7 @@ class PivotTable /** * Create a new pivot table * - * @param SimpleQuery $query The query to fetch as pivot table + * @param SimpleQuery $query The query to fetch as pivot table * @param string $xAxisColumn The column that contains the labels for the x axis * @param string $yAxisColumn The column that contains the labels for the y axis */ @@ -106,7 +106,7 @@ class PivotTable * @param string $param The parameter name to return * @param int $default The default value to return * - * @return int + * @return int */ protected function getPaginationParameter($axis, $param, $default = null) { @@ -124,7 +124,7 @@ class PivotTable /** * Query horizontal (x) axis * - * @return SimpleQuery + * @return SimpleQuery */ protected function queryXAxis() { @@ -149,7 +149,7 @@ class PivotTable /** * Query vertical (y) axis * - * @return SimpleQuery + * @return SimpleQuery */ protected function queryYAxis() { @@ -236,7 +236,7 @@ class PivotTable /** * Return the pivot table as array * - * @return array + * @return array */ public function toArray() { From d1f9c5ff0d93593e220e14077c801392567b747a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 13:42:06 +0200 Subject: [PATCH 029/280] Don't call setUseSubqueryCount() in the PivotTable The query implementation handles this automatically. refs #9333 --- library/Icinga/Data/PivotTable.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/Icinga/Data/PivotTable.php b/library/Icinga/Data/PivotTable.php index 2966c94ad..3a2941bfb 100644 --- a/library/Icinga/Data/PivotTable.php +++ b/library/Icinga/Data/PivotTable.php @@ -132,7 +132,6 @@ class PivotTable $this->xAxisQuery = clone $this->baseQuery; $this->xAxisQuery->group($this->xAxisColumn); $this->xAxisQuery->columns(array($this->xAxisColumn)); - $this->xAxisQuery->setUseSubqueryCount(); if ($this->xAxisFilter !== null) { $this->xAxisQuery->addFilter($this->xAxisFilter); @@ -157,7 +156,6 @@ class PivotTable $this->yAxisQuery = clone $this->baseQuery; $this->yAxisQuery->group($this->yAxisColumn); $this->yAxisQuery->columns(array($this->yAxisColumn)); - $this->yAxisQuery->setUseSubqueryCount(); if ($this->yAxisFilter !== null) { $this->yAxisQuery->addFilter($this->yAxisFilter); From f2f1e12b8ea615651939ce2e8f98834556a01e41 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 14:17:07 +0200 Subject: [PATCH 030/280] Let PivotTable implement Sortable refs #9333 --- library/Icinga/Data/PivotTable.php | 76 +++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 21 deletions(-) diff --git a/library/Icinga/Data/PivotTable.php b/library/Icinga/Data/PivotTable.php index 3a2941bfb..b3b8c7a79 100644 --- a/library/Icinga/Data/PivotTable.php +++ b/library/Icinga/Data/PivotTable.php @@ -8,7 +8,7 @@ use Icinga\Application\Icinga; use Icinga\Web\Paginator\Adapter\QueryAdapter; use Zend_Paginator; -class PivotTable +class PivotTable implements Sortable { /** * The query to fetch as pivot table @@ -17,20 +17,6 @@ class PivotTable */ protected $baseQuery; - /** - * The query to fetch the x axis labels - * - * @var SimpleQuery - */ - protected $xAxisQuery; - - /** - * The query to fetch the y axis labels - * - * @var SimpleQuery - */ - protected $yAxisQuery; - /** * The column that contains the labels for the x axis * @@ -59,6 +45,27 @@ class PivotTable */ protected $yAxisFilter; + /** + * The query to fetch the x axis labels + * + * @var SimpleQuery + */ + protected $xAxisQuery; + + /** + * The query to fetch the y axis labels + * + * @var SimpleQuery + */ + protected $yAxisQuery; + + /** + * Column for sorting the result set + * + * @var array + */ + protected $order = array(); + /** * Create a new pivot table * @@ -73,6 +80,31 @@ class PivotTable $this->yAxisColumn = $yAxisColumn; } + /** + * {@inheritdoc} + */ + public function getOrder() + { + return $this->order; + } + + /** + * {@inheritdoc} + */ + public function hasOrder() + { + return ! empty($this->order); + } + + /** + * {@inheritdoc} + */ + public function order($field, $direction = null) + { + $this->order[$field] = $direction; + return $this; + } + /** * Set the filter to apply on the query for the x axis * @@ -137,9 +169,10 @@ class PivotTable $this->xAxisQuery->addFilter($this->xAxisFilter); } - if (! $this->xAxisQuery->hasOrder($this->xAxisColumn)) { - $this->xAxisQuery->order($this->xAxisColumn, 'asc'); - } + $this->xAxisQuery->order( + $this->xAxisColumn, + isset($this->order[$this->xAxisColumn]) ? $this->order[$this->xAxisColumn] : self::SORT_ASC + ); } return $this->xAxisQuery; @@ -161,9 +194,10 @@ class PivotTable $this->yAxisQuery->addFilter($this->yAxisFilter); } - if (! $this->yAxisQuery->hasOrder($this->yAxisColumn)) { - $this->yAxisQuery->order($this->yAxisColumn, 'asc'); - } + $this->yAxisQuery->order( + $this->yAxisColumn, + isset($this->order[$this->yAxisColumn]) ? $this->order[$this->yAxisColumn] : self::SORT_ASC + ); } return $this->yAxisQuery; From 1492218962ee85af4e921398bf5f205e1fb18989 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 14:18:48 +0200 Subject: [PATCH 031/280] Fix SortBox not usable w/o SortRules The SortBox assumes the first avaiable sort column as default column if the given Sortable does not implement the SortRules interface. When changing the direction of the default sort column, the sort box did not pass the column to Sortable::sort(). Thus the Sortable did not know by which column to sort. Now the SortBox passes the sort column even if the direction of the default column is changed. refs #9333 --- library/Icinga/Web/Widget/SortBox.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/library/Icinga/Web/Widget/SortBox.php b/library/Icinga/Web/Widget/SortBox.php index c9d38f2b7..862dad22c 100644 --- a/library/Icinga/Web/Widget/SortBox.php +++ b/library/Icinga/Web/Widget/SortBox.php @@ -118,12 +118,12 @@ class SortBox extends AbstractWidget if ($request === null) { $request = Icinga::app()->getRequest(); } - - if (($sort = $request->getParam('sort'))) { - $this->query->order($sort, $request->getParam('dir')); - } elseif (($dir = $request->getParam('dir'))) { - $this->query->order(null, $dir); + if (null === $sort = $request->getParam('sort')) { + list($sort, $dir) = $this->getSortDefaults(); + } else { + list($_, $dir) = $this->getSortDefaults($sort); } + $this->query->order($sort, $request->getParam('dir', $dir)); } return $this; @@ -148,8 +148,10 @@ class SortBox extends AbstractWidget if ($column !== null && isset($sortRules[$column]['order'])) { $direction = strtoupper($sortRules[$column]['order']) === Sortable::SORT_DESC ? 'desc' : 'asc'; } + } elseif ($column === null) { + reset($this->sortFields); + $column = key($this->sortFields); } - return array($column, $direction); } From d449ff661ed64f589fefdeb4cb1db679c0c5eb07 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 14:23:12 +0200 Subject: [PATCH 032/280] monitoring/service grid: Set up the sort control for the pivot table instead of the service status query refs #9333 --- .../monitoring/application/controllers/ListController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index d26cc0c52..364e5957b 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -591,16 +591,16 @@ class Monitoring_ListController extends Controller )); $this->filterQuery($query); $this->applyRestriction('monitoring/filter/objects', $query); - $this->setupSortControl(array( - 'host_name' => $this->translate('Hostname'), - 'service_description' => $this->translate('Service description') - ), $query); $pivot = $query->pivot( 'service_description', 'host_name', $problems ? Filter::where('service_problem', 1) : null, $problems ? Filter::where('service_problem', 1) : null ); + $this->setupSortControl(array( + 'host_name' => $this->translate('Hostname'), + 'service_description' => $this->translate('Service description') + ), $pivot); $this->view->pivot = $pivot; $this->view->horizontalPaginator = $pivot->paginateXAxis(); $this->view->verticalPaginator = $pivot->paginateYAxis(); From f5ffa8047c97023b2b53b8404957c9ff1306ba85 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 16:36:00 +0200 Subject: [PATCH 033/280] monitoring: Fix handling of collated columns w/ PostgreSQL fixes #9954 fxies #9955 --- .../Monitoring/Backend/Ido/Query/IdoQuery.php | 81 ++++++------------- 1 file changed, 25 insertions(+), 56 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php index 85d9169a9..da2815e98 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php @@ -461,17 +461,24 @@ abstract class IdoQuery extends DbQuery if ($filter->getExpression() === '*') { return; // Wildcard only filters are ignored so stop early here to avoid joining a table for nothing } - - $col = $filter->getColumn(); - $this->requireColumn($col); - - if ($this->isCustomvar($col)) { - $col = $this->getCustomvarColumnName($col); + $alias = $filter->getColumn(); + $this->requireColumn($alias); + if ($this->isCustomvar($alias)) { + $column = $this->getCustomvarColumnName($alias); } else { - $col = $this->aliasToColumnName($col); + $column = $this->aliasToColumnName($alias); } + if (isset($this->columnsWithoutCollation[$alias])) { + // $column = 'LOWER(' . $column . ')'; + $expression = $filter->getExpression(); + if (is_array($expression)) { + $filter->setExpression(array_map('strtolower', $expression)); + } else { + $filter->setExpression(strtolower($expression)); - $filter->setColumn($col); + } + } + $filter->setColumn($column); } else { foreach ($filter->filters() as $filter) { $this->requireFilterColumns($filter); @@ -485,48 +492,11 @@ abstract class IdoQuery extends DbQuery return parent::addFilter($filter); } - /** - * Recurse the given filter and ensure that any string conversion is case-insensitive - * - * @param Filter $filter - */ - protected function lowerColumnsWithoutCollation(Filter $filter) - { - if ($filter instanceof FilterExpression) { - if ( - in_array($filter->getColumn(), $this->columnsWithoutCollation) - && strpos($filter->getColumn(), 'LOWER') !== 0 - ) { - $filter->setColumn('LOWER(' . $filter->getColumn() . ')'); - $expression = $filter->getExpression(); - if (is_array($expression)) { - $filter->setExpression(array_map('strtolower', $expression)); - } else { - $filter->setExpression(strtolower($expression)); - } - } - } else { - foreach ($filter->filters() as $chainedFilter) { - $this->lowerColumnsWithoutCollation($chainedFilter); - } - } - } - - protected function applyFilterSql($select) - { - if (! empty($this->columnsWithoutCollation)) { - $this->lowerColumnsWithoutCollation($this->filter); - } - - parent::applyFilterSql($select); - } - public function where($condition, $value = null) { if ($value === '*') { return $this; // Wildcard only filters are ignored so stop early here to avoid joining a table for nothing } - $this->requireColumn($condition); $col = $this->getMappedField($condition); if ($col === null) { @@ -574,7 +544,6 @@ abstract class IdoQuery extends DbQuery if (! empty($this->columnsWithoutCollation)) { return in_array($column, $this->columnsWithoutCollation) || strpos($column, 'LOWER') !== 0; } - return preg_match('/ COLLATE .+$/', $column) === 1; } @@ -599,27 +568,27 @@ abstract class IdoQuery extends DbQuery } /** - * Apply postgresql specific query initialization + * Apply PostgreSQL specific query initialization */ private function initializeForPostgres() { $this->customVarsJoinTemplate = '%1$s = %2$s.object_id AND LOWER(%2$s.varname) = %3$s'; - foreach ($this->columnMap as $table => & $columns) { - foreach ($columns as $key => & $value) { - $value = preg_replace('/ COLLATE .+$/', '', $value, -1, $count); - if ($count > 0) { - $this->columnsWithoutCollation[] = $this->getMappedField($key); + foreach ($this->columnMap as $table => &$columns) { + foreach ($columns as $alias => &$column) { + if (false !== $pos = strpos($column, ' COLLATE')) { + $column = 'LOWER(' . substr($column, 0, $pos) . ')'; + $this->columnsWithoutCollation[$alias] = true; } - $value = preg_replace( + $column = preg_replace( '/inet_aton\(([[:word:].]+)\)/i', '(CASE WHEN $1 ~ \'(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}\' THEN $1::inet - \'0.0.0.0\' ELSE NULL END)', - $value + $column ); - $value = preg_replace( + $column = preg_replace( '/UNIX_TIMESTAMP(\((?>[^()]|(?-1))*\))/i', 'CASE WHEN ($1 < \'1970-01-03 00:00:00+00\'::timestamp with time zone) THEN 0 ELSE UNIX_TIMESTAMP($1) END', - $value + $column ); } } From 18f720d31fc4fdce96a58d8726e8aadafc8eced9 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 18 Aug 2015 16:37:14 +0200 Subject: [PATCH 034/280] monitoring: Eliminate unncessary GROUP BY clauses in the ServicestatusQuery refs #9956 --- .../Backend/Ido/Query/ServicestatusQuery.php | 112 ++++++++---------- 1 file changed, 52 insertions(+), 60 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php index ce988e944..7e716ee1b 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php @@ -366,68 +366,60 @@ class ServicestatusQuery extends IdoQuery if (! is_array($group)) { $group = array($group); } - - if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) { - $group[] = 's.service_id'; - $group[] = 'so.object_id'; - - if ($this->hasJoinedVirtualTable('hosts')) { - $group[] = 'h.host_id'; - } - - if ($this->hasJoinedVirtualTable('hoststatus')) { - $group[] = 'hs.hoststatus_id'; - } - - if ($this->hasJoinedVirtualTable('servicestatus')) { - $group[] = 'ss.servicestatus_id'; - } - - if ($this->hasJoinedVirtualTable('hostgroups')) { - $selected = false; - foreach ($this->columns as $alias => $column) { - if ($column instanceof Zend_Db_Expr) { - continue; - } - - $table = $this->aliasToTableName( - $this->hasAliasName($alias) ? $alias : $this->customAliasToAlias($alias) - ); - if ($table === 'hostgroups') { - $selected = true; - break; - } - } - - if ($selected) { - $group[] = 'hg.hostgroup_id'; - $group[] = 'hgo.object_id'; - } - } - - if ($this->hasJoinedVirtualTable('servicegroups')) { - $selected = false; - foreach ($this->columns as $alias => $column) { - if ($column instanceof Zend_Db_Expr) { - continue; - } - - $table = $this->aliasToTableName( - $this->hasAliasName($alias) ? $alias : $this->customAliasToAlias($alias) - ); - if ($table === 'servicegroups') { - $selected = true; - break; - } - } - - if ($selected) { - $group[] = 'sg.servicegroup_id'; - $group[] = 'sgo.object_id'; - } + $groupedTables = array(); + if ($this->hasJoinedVirtualTable('servicegroups')) { + $serviceGroupColumns = array_keys($this->columnMap['servicegroups']); + $selectedServiceGroupColumns = array_intersect($serviceGroupColumns, array_keys($this->columns)); + if (! empty($selectedServiceGroupColumns)) { + $group[] = 'so.object_id'; + $group[] = 's.service_id'; + $group[] = 'sgo.object_id'; + $groupedTables['services'] = true; + $groupedTables['servicegroups'] = true; + } + } + if ($this->hasJoinedVirtualTable('hostgroups')) { + $hostGroupColumns = array_keys($this->columnMap['hostgroups']); + $selectedHostGroupColumns = array_intersect($hostGroupColumns, array_keys($this->columns)); + if (! empty($selectedHostGroupColumns)) { + if (! isset($groupedTables['services'])) { + $group[] = 'so.object_id'; + $group[] = 's.service_id'; + $groupedTables['services'] = true; + } + $group[] = 'hgo.object_id'; + $groupedTables['hostgroups'] = true; + } + } + if (! empty($groupedTables)) { + foreach ($this->columns as $alias => $column) { + if ($column instanceof Zend_Db_Expr || $column === '(NULL)') { + continue; + } + $tableName = $this->aliasToTableName( + $this->hasAliasName($alias) ? $alias : $this->customAliasToAlias($alias) + ); + if (isset($groupedTables[$tableName])) { + continue; + } + switch ($tableName) { + case 'hosts': + $groupColumn = 'h.host_id'; + break; + case 'hoststatus': + $groupColumn = 'hs.hoststatus_id'; + break; + case 'servicestatus': + $groupColumn = 'ss.servicestatus_id'; + break; + default: + continue 2; + } + /** @var string $groupColumn */ + $group[] = $groupColumn; + $groupedTables[$tableName] = true; } } - return $group; } } From 6e12dd4d782d578ae3007767a83a2ee868454d6a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 19 Aug 2015 11:39:51 +0200 Subject: [PATCH 035/280] monitoring: Fix service status grouping when selecting group alias columns refs #9956 --- .../Backend/Ido/Query/ServicestatusQuery.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php index 7e716ee1b..a135d8b41 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php @@ -374,6 +374,7 @@ class ServicestatusQuery extends IdoQuery $group[] = 'so.object_id'; $group[] = 's.service_id'; $group[] = 'sgo.object_id'; + $group[] = 'sg.servicegroup_id'; $groupedTables['services'] = true; $groupedTables['servicegroups'] = true; } @@ -388,6 +389,7 @@ class ServicestatusQuery extends IdoQuery $groupedTables['services'] = true; } $group[] = 'hgo.object_id'; + $group[] = 'hg.hostgroup_id'; $groupedTables['hostgroups'] = true; } } @@ -404,19 +406,17 @@ class ServicestatusQuery extends IdoQuery } switch ($tableName) { case 'hosts': - $groupColumn = 'h.host_id'; + $group[] = 'h.host_id'; break; case 'hoststatus': - $groupColumn = 'hs.hoststatus_id'; + $group[] = 'hs.hoststatus_id'; break; case 'servicestatus': - $groupColumn = 'ss.servicestatus_id'; + $group[] = 'ss.servicestatus_id'; break; default: continue 2; } - /** @var string $groupColumn */ - $group[] = $groupColumn; $groupedTables[$tableName] = true; } } From 4ab20b91427ccc19a102819bc515ee2536d83e55 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 19 Aug 2015 11:40:37 +0200 Subject: [PATCH 036/280] monitoring: Eliminate unncessary GROUP BY clauses in the HoststatusQuery refs #9956 --- .../Backend/Ido/Query/HoststatusQuery.php | 111 +++++++++--------- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php index 968d5607e..4169bc1b1 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php @@ -242,62 +242,65 @@ class HoststatusQuery extends IdoQuery */ public function getGroup() { - $group = array(); - if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('services')) { - $group = array('h.host_id', 'ho.object_id'); - if ($this->hasJoinedVirtualTable('hoststatus')) { - $group[] = 'hs.hoststatus_id'; - } - - if ($this->hasJoinedVirtualTable('serviceproblemsummary')) { - $group[] = 'sps.unhandled_services_count'; - } - - if ($this->hasJoinedVirtualTable('hostgroups')) { - $selected = false; - foreach ($this->columns as $alias => $column) { - if ($column instanceof Zend_Db_Expr) { - continue; - } - - $table = $this->aliasToTableName( - $this->hasAliasName($alias) ? $alias : $this->customAliasToAlias($alias) - ); - if ($table === 'hostgroups') { - $selected = true; - break; - } - } - - if ($selected) { - $group[] = 'hg.hostgroup_id'; - $group[] = 'hgo.object_id'; - } - } - - if ($this->hasJoinedVirtualTable('servicegroups')) { - $selected = false; - foreach ($this->columns as $alias => $column) { - if ($column instanceof Zend_Db_Expr) { - continue; - } - - $table = $this->aliasToTableName( - $this->hasAliasName($alias) ? $alias : $this->customAliasToAlias($alias) - ); - if ($table === 'servicegroups') { - $selected = true; - break; - } - } - - if ($selected) { - $group[] = 'sg.servicegroup_id'; - $group[] = 'sgo.object_id'; - } + $group = parent::getGroup() ?: array(); + if (! is_array($group)) { + $group = array($group); + } + $groupedTables = array(); + if ($this->hasJoinedVirtualTable('servicegroups')) { + $serviceGroupColumns = array_keys($this->columnMap['servicegroups']); + $selectedServiceGroupColumns = array_intersect($serviceGroupColumns, array_keys($this->columns)); + if (! empty($selectedServiceGroupColumns)) { + $group[] = 'ho.object_id'; + $group[] = 'h.host_id'; + $group[] = 'sgo.object_id'; + $group[] = 'sg.servicegroup_id'; + $groupedTables['hosts'] = true; + $groupedTables['servicegroups'] = true; + } + } + if ($this->hasJoinedVirtualTable('hostgroups')) { + $hostGroupColumns = array_keys($this->columnMap['hostgroups']); + $selectedHostGroupColumns = array_intersect($hostGroupColumns, array_keys($this->columns)); + if (! empty($selectedHostGroupColumns)) { + if (! isset($groupedTables['hosts'])) { + $group[] = 'ho.object_id'; + $group[] = 'h.host_id'; + $groupedTables['hosts'] = true; + } + $group[] = 'hgo.object_id'; + $group[] = 'hg.hostgroup_id'; + $groupedTables['hostgroups'] = true; + } + } + if (! empty($groupedTables)) { + foreach ($this->columns as $alias => $column) { + if ($column instanceof Zend_Db_Expr || $column === '(NULL)') { + continue; + } + $tableName = $this->aliasToTableName( + $this->hasAliasName($alias) ? $alias : $this->customAliasToAlias($alias) + ); + if (isset($groupedTables[$tableName])) { + continue; + } + switch ($tableName) { + case 'hoststatus': + $group[] = 'hs.hoststatus_id'; + break; + case 'serviceproblemsummary': + $group[] = 'sps.unhandled_services_count'; + break; + case 'services': + $group[] = 'so.object_id'; + $group[] = 's.service_id'; + break; + default: + continue 2; + } + $groupedTables[$tableName] = true; } } - return $group; } From 0c43e4a36b9ebbebee883e74aab4aaef42a4a384 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 19 Aug 2015 12:41:58 +0200 Subject: [PATCH 037/280] monitoring: Sort by display_names in the service grid refs #9538 --- .../application/controllers/ListController.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index d26cc0c52..113efdcf4 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -581,29 +581,31 @@ class Monitoring_ListController extends Controller { $this->addTitleTab('servicegrid', $this->translate('Service Grid'), $this->translate('Show the Service Grid')); $this->setAutorefreshInterval(15); - $problems = (bool) $this->params->shift('problems', 0); $query = $this->backend->select()->from('servicestatus', array( + 'host_display_name', 'host_name', 'service_description', - 'service_state', + 'service_display_name', + 'service_handled', 'service_output', - 'service_handled' + 'service_state' )); $this->filterQuery($query); $this->applyRestriction('monitoring/filter/objects', $query); $this->setupSortControl(array( - 'host_name' => $this->translate('Hostname'), - 'service_description' => $this->translate('Service description') + 'host_display_name' => $this->translate('Hostname'), + 'service_display_name' => $this->translate('Service Name') ), $query); + $filter = (bool) $this->params->shift('problems', false) ? Filter::where('service_problem', 1) : null; $pivot = $query->pivot( 'service_description', 'host_name', - $problems ? Filter::where('service_problem', 1) : null, - $problems ? Filter::where('service_problem', 1) : null + $filter, + $filter ? clone $filter : null ); $this->view->pivot = $pivot; $this->view->horizontalPaginator = $pivot->paginateXAxis(); - $this->view->verticalPaginator = $pivot->paginateYAxis(); + $this->view->verticalPaginator = $pivot->paginateYAxis(); } /** From 1741a4f10b854f5dc81fdefc23bb98edea026287 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 19 Aug 2015 12:48:28 +0200 Subject: [PATCH 038/280] monitoring: Use display names for the aria-label in the service grid refs #9538 --- .../application/views/scripts/list/servicegrid.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index 73fbfe3b5..c2f52db8b 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -91,8 +91,8 @@ foreach ($serviceDescriptions as $service_description): ?> 'title' => $this->escape($service->service_output), 'aria-label' => sprintf( $this->translate('Show detailed information for service %s on host %s'), - $service->service_description, - $service->host_name + $service->service_display_name, + $service->host_display_name ) ) ); ?> From f24449b2251ee5a224863f5fe1d41b01f2f52e27 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 20 Aug 2015 16:24:12 +0200 Subject: [PATCH 039/280] modules: Register controller namesoace in Module::registerWebIntegration() Else we get an exception when loading modules on the CLI because Zend classes are not autoloaded. refs #5786 --- library/Icinga/Application/Modules/Module.php | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 41fdb762d..8da58005a 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -958,14 +958,6 @@ class Module $loader->registerNamespace('Icinga\\Module\\' . $moduleName. '\\Forms', $moduleFormDir); } - $moduleControllerDir = $this->getControllerDir(); - if (is_dir($moduleControllerDir)) { - $loader->registerNamespace( - 'Icinga\\Module\\' . $moduleName . '\\' . Dispatcher::CONTROLLER_NAMESPACE, - $moduleControllerDir - ); - } - $this->registeredAutoloader = true; return $this; @@ -1025,19 +1017,23 @@ class Module */ protected function registerWebIntegration() { - if (!$this->app->isWeb()) { + if (! $this->app->isWeb()) { return $this; } - - if (file_exists($this->controllerdir) && is_dir($this->controllerdir)) { + $moduleControllerDir = $this->getControllerDir(); + if (is_dir($moduleControllerDir)) { $this->app->getfrontController()->addControllerDirectory( - $this->controllerdir, - $this->name + $moduleControllerDir, + $this->getName() + ); + $this->app->getLoader()->registerNamespace( + 'Icinga\\Module\\' . ucfirst($this->getName()) . '\\' . Dispatcher::CONTROLLER_NAMESPACE, + $moduleControllerDir ); } - - $this->registerLocales() - ->registerRoutes(); + $this + ->registerLocales() + ->registerRoutes(); return $this; } From 5d8f09120906f291c9abe9b2504af4ebd8a33870 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 20 Aug 2015 16:46:31 +0200 Subject: [PATCH 040/280] lib: Don't alias Zend classes in Module --- library/Icinga/Application/Modules/Module.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 9ec35b565..11994c694 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -4,23 +4,23 @@ namespace Icinga\Application\Modules; use Exception; +use Zend_Controller_Router_Route; use Zend_Controller_Router_Route_Abstract; -use Zend_Controller_Router_Route as Route; -use Zend_Controller_Router_Route_Regex as RegexRoute; +use Zend_Controller_Router_Route_Regex; use Icinga\Application\ApplicationBootstrap; use Icinga\Application\Config; use Icinga\Application\Icinga; use Icinga\Application\Logger; use Icinga\Data\ConfigObject; +use Icinga\Exception\IcingaException; +use Icinga\Exception\ProgrammingError; +use Icinga\Module\Setup\SetupWizard; +use Icinga\Util\File; use Icinga\Util\Translator; use Icinga\Web\Hook; use Icinga\Web\Menu; use Icinga\Web\Widget; use Icinga\Web\Widget\Dashboard\Pane; -use Icinga\Module\Setup\SetupWizard; -use Icinga\Util\File; -use Icinga\Exception\ProgrammingError; -use Icinga\Exception\IcingaException; /** * Module handling @@ -1044,7 +1044,7 @@ class Module } $router->addRoute( $this->name . '_jsprovider', - new Route( + new Zend_Controller_Router_Route( 'js/' . $this->name . '/:file', array( 'controller' => 'static', @@ -1055,7 +1055,7 @@ class Module ); $router->addRoute( $this->name . '_img', - new RegexRoute( + new Zend_Controller_Router_Route_Regex( 'img/' . $this->name . '/(.+)', array( 'controller' => 'static', From 800173b19f54ea5a173c428ad81776ec84d40949 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 20 Aug 2015 16:47:17 +0200 Subject: [PATCH 041/280] lib: Fix type hint for $router in Module --- library/Icinga/Application/Modules/Module.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 11994c694..ff88a00ba 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -1039,6 +1039,7 @@ class Module protected function registerRoutes() { $router = $this->app->getFrontController()->getRouter(); + /** @var \Zend_Controller_Router_Rewrite $router */ foreach ($this->routes as $name => $route) { $router->addRoute($name, $route); } From 9aa62c9898acfed014131c3f38477721ea24b3f3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 20 Aug 2015 16:58:24 +0200 Subject: [PATCH 042/280] lib: Fix type hint for $tabs in Module --- library/Icinga/Application/Modules/Module.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index ff88a00ba..270a552bb 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -770,6 +770,7 @@ class Module { $this->launchConfigScript(); $tabs = Widget::create('tabs'); + /** @var \Icinga\Web\Widget\Tabs $tabs */ $tabs->add('info', array( 'url' => 'config/module', 'urlParams' => array('name' => $this->getName()), From 5da139943c4b315d049c073ee1517338433a2b8c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 20 Aug 2015 16:59:02 +0200 Subject: [PATCH 043/280] lib: Fix type hint for $menuItems in Module --- library/Icinga/Application/Modules/Module.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 270a552bb..7c415e05c 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -188,7 +188,7 @@ class Module /** * A set of menu elements * - * @var array + * @var Menu[] */ protected $menuItems = array(); From d461270bf8b9e1e4a474452f626fdb01ed7de39d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 11:29:29 +0200 Subject: [PATCH 044/280] monitoring: Rename $host_name to $hostName in the servicegrid view script refs #9538 --- .../application/views/scripts/list/servicegrid.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index c2f52db8b..8f2bc7c78 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -23,7 +23,7 @@ if (count($pivotData) === 0) { $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')'; ?> - $serviceStates): ?> + $serviceStates): ?> @@ -66,10 +66,10 @@ foreach ($serviceDescriptions as $service_description): ?> From 9d40013b21e1b87f672f56f1528bbc9239dff15f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 11:30:18 +0200 Subject: [PATCH 045/280] monitoring: Rename $service_description to $serviceDescription in the servicegrid view script refs #9538 --- .../application/views/scripts/list/servicegrid.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index 8f2bc7c78..fac48b012 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -41,16 +41,16 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ' $serviceDescriptions = array_keys($serviceStates); $serviceFilter = '(service_description=' . implode('|service_description=', $serviceDescriptions) . ')'; -foreach ($serviceDescriptions as $service_description): ?> +foreach ($serviceDescriptions as $serviceDescription): ?> qlink( - '' . (strlen($service_description) > 18 ? substr($service_description, 0, 18) . '...' : $service_description) . '', + '' . (strlen($serviceDescription) > 18 ? substr($serviceDescription, 0, 18) . '...' : $serviceDescription) . '', 'monitoring/list/services?' . $hostFilter, array( - 'service_description' => $service_description + 'service_description' => $serviceDescription ), array( - 'title' => sprintf($this->translate('List all services with the name "%s" on all reported hosts'), $service_description) + 'title' => sprintf($this->translate('List all services with the name "%s" on all reported hosts'), $serviceDescription) ), false ); ?> From 1ab8fc0012555826a4bc014f6974e00db22825ca Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 11:32:33 +0200 Subject: [PATCH 046/280] monitoring: Use View::ellipsis() in the servicegrid view script refs #9538 --- .../monitoring/application/views/scripts/list/servicegrid.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index fac48b012..c94c14278 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -44,7 +44,7 @@ $serviceFilter = '(service_description=' . implode('|service_description=', $ser foreach ($serviceDescriptions as $serviceDescription): ?> qlink( - '' . (strlen($serviceDescription) > 18 ? substr($serviceDescription, 0, 18) . '...' : $serviceDescription) . '', + '' . $this->ellipsis($serviceDescription, 18) . '', 'monitoring/list/services?' . $hostFilter, array( 'service_description' => $serviceDescription From 71b89ea51a7d07c0c3fd6b3929c87919eb0c668b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 11:35:03 +0200 Subject: [PATCH 047/280] monitoring: Rename $serviceStates to $services in the servicegrid view script refs #9538 --- .../application/views/scripts/list/servicegrid.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index c94c14278..af63210a8 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -23,7 +23,7 @@ if (count($pivotData) === 0) { $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')'; ?>
qlink( - $host_name, + $hostName, 'monitoring/list/services?' . $serviceFilter, - array('host' => $host_name), - array('title' => sprintf($this->translate('List all reported services on host %s'), $host_name)) + array('host' => $hostName), + array('title' => sprintf($this->translate('List all reported services on host %s'), $hostName)) ); ?>
- $serviceStates): ?> + $services): ?> @@ -35,10 +35,10 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ' 'yAxisPaginator' => $verticalPaginator ) ); ?> - - +
+
@@ -72,7 +72,7 @@ foreach ($serviceDescriptions as $serviceDescription): ?> array('title' => sprintf($this->translate('List all reported services on host %s'), $hostName)) ); ?>
From 5ae541db253b79f7b7ef17af4167b75595020d0b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 11:35:30 +0200 Subject: [PATCH 048/280] monitoring: Drop unnecessary call to array_values in the servicegrid view script refs #9538 --- .../monitoring/application/views/scripts/list/servicegrid.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index af63210a8..6e66ae6ae 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -72,7 +72,7 @@ foreach ($serviceDescriptions as $serviceDescription): ?> array('title' => sprintf($this->translate('List all reported services on host %s'), $hostName)) ); ?> - + From b629115ba716e9dff0553b4a8397b9215decf1fa Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 11:37:46 +0200 Subject: [PATCH 049/280] monitoring: Use empty() for is empty check in the servicegrid view script refs #9538 --- .../monitoring/application/views/scripts/list/servicegrid.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index 6e66ae6ae..7136aaa43 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -15,7 +15,7 @@ if (! $this->compact): ?> $hasHeader = false; $pivotData = $this->pivot->toArray(); -if (count($pivotData) === 0) { +if (empty($pivotData)) { echo $this->translate('No services found matching the filter') . ''; return; } From 2760c5816269e9372cc515cc76946de6ac69899c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 16:40:30 +0200 Subject: [PATCH 050/280] css: Add mixins.less --- public/css/icinga/mixins.less | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 public/css/icinga/mixins.less diff --git a/public/css/icinga/mixins.less b/public/css/icinga/mixins.less new file mode 100644 index 000000000..d1f9929a0 --- /dev/null +++ b/public/css/icinga/mixins.less @@ -0,0 +1,9 @@ +/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ + +.transform(@transform) { + -webkit-transform: @transform; + -moz-transform: @transform; + -ms-transform: @transform; + -o-transform: @transform; + transform: @transform; +} From 4c91d4285350af35abe9ca1c0cb0d4606fde177f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 16:44:30 +0200 Subject: [PATCH 051/280] css: add rounded-corners mixin --- public/css/icinga/mixins.less | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/css/icinga/mixins.less b/public/css/icinga/mixins.less index d1f9929a0..e22b4cd51 100644 --- a/public/css/icinga/mixins.less +++ b/public/css/icinga/mixins.less @@ -7,3 +7,13 @@ -o-transform: @transform; transform: @transform; } + +.rounded-corners(@border-radius: 0.4em) { + -webkit-border-radius: @border-radius; + -moz-border-radius: @border-radius; + border-radius: @border-radius; + + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} From ceaba908723058024cf739593978ce94f7e97ab3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 21 Aug 2015 16:45:05 +0200 Subject: [PATCH 052/280] css: Load mixins.less --- library/Icinga/Web/StyleSheet.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/Icinga/Web/StyleSheet.php b/library/Icinga/Web/StyleSheet.php index af807c6e4..f22e66d33 100644 --- a/library/Icinga/Web/StyleSheet.php +++ b/library/Icinga/Web/StyleSheet.php @@ -12,6 +12,7 @@ class StyleSheet protected static $lessFiles = array( '../application/fonts/fontello-ifont/css/ifont-embedded.css', 'css/vendor/tipsy.css', + 'css/icinga/mixins.less', 'css/icinga/defaults.less', 'css/icinga/animation.less', 'css/icinga/layout-colors.less', From cfad85cce124ad11deff568cf7f61a44807e3ebb Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 24 Aug 2015 09:23:46 +0200 Subject: [PATCH 053/280] monitoring: Collect display names as table headers for the service grid refs #9538 --- .../controllers/ListController.php | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 113efdcf4..c4c02ce3a 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -603,7 +603,27 @@ class Monitoring_ListController extends Controller $filter, $filter ? clone $filter : null ); - $this->view->pivot = $pivot; + $pivotData = $pivot->toArray(); + // TODO(el): list($pivotData, $pivotHeader) = $pivot->toArray(); + $pivotHeader = array( + 'cols' => array(), + 'rows' => array() + ); + foreach ($pivotData as $hostName => $services) { + foreach ($services as $serviceDescription => $service) { + if ($service === null) { + continue; + } + if (! isset($pivotHeader['rows'][$hostName])) { + $pivotHeader['rows'][$hostName] = $service->host_display_name; + } + if (! isset($pivotHeader['cols'][$serviceDescription])) { + $pivotHeader['cols'][$serviceDescription] = $service->service_display_name; + } + } + } + $this->view->pivotData = $pivotData; + $this->view->pivotHeader = $pivotHeader; $this->view->horizontalPaginator = $pivot->paginateXAxis(); $this->view->verticalPaginator = $pivot->paginateYAxis(); } From cc7eab674662cf728f9c66ba685b0bc30b06b76c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 14:44:27 +0200 Subject: [PATCH 054/280] monitoring: Remove CSS for the service grid Will be rewritten. refs #9538 --- modules/monitoring/public/css/module.less | 106 ---------------------- 1 file changed, 106 deletions(-) diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 3aabe1f51..46c7bc4f6 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -846,112 +846,6 @@ table.joystick-pagination { } } -table.pivot { - a { - text-decoration: none; - color: black; - - &:hover { - color: @colorTextDefault; - } - } - - & > thead { - th { - height: 6em; - - div { - margin-right: -1.5em; - padding-left: 1.3em; - - span { - width: 1.5em; - margin-right: 0.25em; - margin-top: 4em; - line-height: 2em; - white-space: nowrap; - display: block; - float: left; - - transform: rotate(-45deg); - transform-origin: bottom left; - -o-transform: rotate(-45deg); - -o-transform-origin: bottom left; - -ms-transform: rotate(-45deg); - -ms-transform-origin: bottom left; - -moz-transform: rotate(-45deg); - -moz-transform-origin: bottom left; - -webkit-transform: rotate(-45deg); - -webkit-transform-origin: bottom left; - //filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); - - abbr { - border: 0; // Remove highlighting in firefox - font-size: 0.8em; - } - } - } - } - } - - & > tbody { - th { - padding: 0 14px 0 0; - white-space: nowrap; - - a { - font-size: 0.8em; - } - } - - td { - padding: 2px; - min-width: 1.5em; - line-height: 1.5em; - text-align: center; - - a { - width: 1.5em; - height: 1.5em; - display: block; - border-radius: 0.5em; - - &.state_ok { - background-color: @colorOk; - } - - &.state_pending { - background-color: @colorPending; - } - - &.state_warning { - background-color: @colorWarning; - - &.handled { - background-color: @colorWarningHandled; - } - } - - &.state_critical { - background-color: @colorCritical; - - &.handled { - background-color: @colorCriticalHandled; - } - } - - &.state_unknown { - background-color: @colorUnknown; - - &.handled { - background-color: @colorUnknownHandled; - } - } - } - } - } -} - /* End of monitoring pivot table styles */ /* Monitoring timeline styles */ From 403f7016ca633688ec8e190f79799efc16db7f5f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 14:46:23 +0200 Subject: [PATCH 055/280] lib: Allow to set axis header columns in the pivot table PivotTable::toArray() now returns the pivot data and the pivot header. refs #9538 --- library/Icinga/Data/PivotTable.php | 107 ++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 19 deletions(-) diff --git a/library/Icinga/Data/PivotTable.php b/library/Icinga/Data/PivotTable.php index cf703ae9c..a197bf803 100644 --- a/library/Icinga/Data/PivotTable.php +++ b/library/Icinga/Data/PivotTable.php @@ -60,6 +60,20 @@ class PivotTable */ protected $yAxisFilter; + /** + * X-axis header + * + * @var string|null + */ + protected $xAxisHeader; + + /** + * Y-axis header + * + * @var string|null + */ + protected $yAxisHeader; + /** * Create a new pivot table * @@ -100,6 +114,56 @@ class PivotTable return $this; } + /** + * Get the x-axis header + * + * Defaults to {@link $xAxisColumn} in case no x-axis header has been set using {@link setXAxisHeader()} + * + * @return string + */ + public function getXAxisHeader() + { + return $this->xAxisHeader !== null ? $this->xAxisHeader : $this->xAxisColumn; + } + + /** + * Set the x-axis header + * + * @param string $xAxisHeader + * + * @return $this + */ + public function setXAxisHeader($xAxisHeader) + { + $this->xAxisHeader = (string) $xAxisHeader; + return $this; + } + + /** + * Get the y-axis header + * + * Defaults to {@link $yAxisColumn} in case no x-axis header has been set using {@link setYAxisHeader()} + * + * @return string + */ + public function getYAxisHeader() + { + return $this->yAxisHeader !== null ? $this->yAxisHeader : $this->yAxisColumn; + } + + /** + * Set the y-axis header + * + * @param string $yAxisHeader + * + * @return $this + */ + public function setYAxisHeader($yAxisHeader) + { + $this->yAxisHeader = (string) $yAxisHeader; + return $this; + } + /** * Return the value for the given request parameter * @@ -132,7 +196,7 @@ class PivotTable if ($this->xAxisQuery === null) { $this->xAxisQuery = clone $this->baseQuery; $this->xAxisQuery->group($this->xAxisColumn); - $this->xAxisQuery->columns(array($this->xAxisColumn)); + $this->xAxisQuery->columns(array($this->xAxisColumn, $this->getXAxisHeader())); $this->xAxisQuery->setUseSubqueryCount(); if ($this->xAxisFilter !== null) { @@ -157,7 +221,7 @@ class PivotTable if ($this->yAxisQuery === null) { $this->yAxisQuery = clone $this->baseQuery; $this->yAxisQuery->group($this->yAxisColumn); - $this->yAxisQuery->columns(array($this->yAxisColumn)); + $this->yAxisQuery->columns(array($this->yAxisColumn, $this->getYAxisHeader())); $this->yAxisQuery->setUseSubqueryCount(); if ($this->yAxisFilter !== null) { @@ -168,7 +232,6 @@ class PivotTable $this->yAxisQuery->order($this->yAxisColumn, 'asc'); } } - return $this->yAxisQuery; } @@ -245,33 +308,39 @@ class PivotTable ($this->xAxisFilter === null && $this->yAxisFilter === null) || ($this->xAxisFilter !== null && $this->yAxisFilter !== null) ) { - $xAxis = $this->queryXAxis()->fetchColumn(); - $yAxis = $this->queryYAxis()->fetchColumn(); + $xAxis = $this->queryXAxis()->fetchPairs(); + $yAxis = $this->queryYAxis()->fetchPairs(); } else { if ($this->xAxisFilter !== null) { - $xAxis = $this->queryXAxis()->fetchColumn(); - $yAxis = $this->queryYAxis()->where($this->xAxisColumn, $xAxis)->fetchColumn(); + $xAxis = $this->queryXAxis()->fetchPairs(); + $yAxis = $this->queryYAxis()->where($this->xAxisColumn, $xAxis)->fetchPairs(); } else { // $this->yAxisFilter !== null - $yAxis = $this->queryYAxis()->fetchColumn(); - $xAxis = $this->queryXAxis()->where($this->yAxisColumn, $yAxis)->fetchColumn(); + $yAxis = $this->queryYAxis()->fetchPairs(); + $xAxis = $this->queryXAxis()->where($this->yAxisColumn, $yAxis)->fetchPairs(); } } + $pivotData = array(); + $pivotHeader = array( + 'cols' => $xAxis, + 'rows' => $yAxis + ); + if (! empty($xAxis) && ! empty($yAxis)) { + $xAxisKeys = array_keys($xAxis); + $yAxisKeys = array_keys($yAxis); + $this->baseQuery + ->where($this->xAxisColumn, $xAxisKeys) + ->where($this->yAxisColumn, $yAxisKeys); - $pivot = array(); - if (!empty($xAxis) && !empty($yAxis)) { - $this->baseQuery->where($this->xAxisColumn, $xAxis)->where($this->yAxisColumn, $yAxis); - - foreach ($yAxis as $yLabel) { - foreach ($xAxis as $xLabel) { - $pivot[$yLabel][$xLabel] = null; + foreach ($yAxisKeys as $yAxisKey) { + foreach ($xAxisKeys as $xAxisKey) { + $pivotData[$yAxisKey][$xAxisKey] = null; } } foreach ($this->baseQuery as $row) { - $pivot[$row->{$this->yAxisColumn}][$row->{$this->xAxisColumn}] = $row; + $pivotData[$row->{$this->yAxisColumn}][$row->{$this->xAxisColumn}] = $row; } } - - return $pivot; + return array($pivotData, $pivotHeader); } } From d8c7c216f1c3035f32af97a659cd6f485bb7b69d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 14:47:16 +0200 Subject: [PATCH 056/280] monitoring: Add colors.less Colors.less includes atomic definitions for background-colors related to different states at the moment. These definitions should be used when coloring backgrounds according to host and service states. refs #9538 --- modules/monitoring/public/css/colors.less | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 modules/monitoring/public/css/colors.less diff --git a/modules/monitoring/public/css/colors.less b/modules/monitoring/public/css/colors.less new file mode 100644 index 000000000..c7e5ef5c6 --- /dev/null +++ b/modules/monitoring/public/css/colors.less @@ -0,0 +1,43 @@ +/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ + +.bg-state-ok, +.bg-state-up { + background-color: @colorOk; +} + +.bg-state-warning { + background-color: @colorWarning; + + &.handled { + background-color: @colorWarningHandled; + } +} + +.bg-state-critical, +.bg-state-down { + background-color: @colorCritical; + + &.handled { + background-color: @colorCriticalHandled; + } +} + +.bg-state-unreachable { + background-color: @colorUnreachable; + + &.handled { + background-color: @colorUnreachableHandled; + } +} + +.bg-state-unknown { + background-color: @colorUnknown; + + &.handled { + background-color: @colorUnknownHandled; + } +} + +.bg-state-pending { + background-color: @colorPending; +} From 83a0e53a46e50e7da8c92f2c514026434f0673c6 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 14:48:32 +0200 Subject: [PATCH 057/280] monitoring: Add service-grid.less Rewritten CSS for the service grid. refs #9538 --- .../monitoring/public/css/service-grid.less | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 modules/monitoring/public/css/service-grid.less diff --git a/modules/monitoring/public/css/service-grid.less b/modules/monitoring/public/css/service-grid.less new file mode 100644 index 000000000..d89e3d5b4 --- /dev/null +++ b/modules/monitoring/public/css/service-grid.less @@ -0,0 +1,38 @@ +/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ + +table.service-grid-table { + white-space: nowrap; + + th { + a { + color: @colorMainLink; + font-weight: normal; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + } + + td { + text-align: center; + width: 1.5em; + + a { + .rounded-corners(0.4em); + display: block; + height: 1.5em; + width: 1.5em; + } + } + + th.rotate-45 { + height: 6em; + + div { + .transform(translate(0.4em, 2.1em) rotate(315deg)); + width: 1.5em; + } + } +} From 1f7c8c712fcfdd97e49d606eb43c7326a1164c8e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 14:53:46 +0200 Subject: [PATCH 058/280] monitoring: Load colors.less and service-grid.less refs #9538 --- modules/monitoring/configuration.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 8844c3247..2da1dc078 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -223,3 +223,9 @@ $dashboard->add( $this->translate('Host Problems'), 'monitoring/list/hosts?host_problem=1&sort=host_severity' ); + +/* + * CSS + */ +$this->provideCssFile('colors.less'); +$this->provideCssFile('service-grid.less'); From bf7d1ba87864ca14c3f49c5a67413f7cd84b020c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 14:54:15 +0200 Subject: [PATCH 059/280] monitoring: Set display names as axis headers for the service grid refs #9538 --- .../controllers/ListController.php | 39 ++++++------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index c4c02ce3a..a1c9af099 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -597,35 +597,20 @@ class Monitoring_ListController extends Controller 'service_display_name' => $this->translate('Service Name') ), $query); $filter = (bool) $this->params->shift('problems', false) ? Filter::where('service_problem', 1) : null; - $pivot = $query->pivot( - 'service_description', - 'host_name', - $filter, - $filter ? clone $filter : null - ); - $pivotData = $pivot->toArray(); - // TODO(el): list($pivotData, $pivotHeader) = $pivot->toArray(); - $pivotHeader = array( - 'cols' => array(), - 'rows' => array() - ); - foreach ($pivotData as $hostName => $services) { - foreach ($services as $serviceDescription => $service) { - if ($service === null) { - continue; - } - if (! isset($pivotHeader['rows'][$hostName])) { - $pivotHeader['rows'][$hostName] = $service->host_display_name; - } - if (! isset($pivotHeader['cols'][$serviceDescription])) { - $pivotHeader['cols'][$serviceDescription] = $service->service_display_name; - } - } - } - $this->view->pivotData = $pivotData; - $this->view->pivotHeader = $pivotHeader; + $pivot = $query + ->pivot( + 'service_description', + 'host_name', + $filter, + $filter ? clone $filter : null + ) + ->setXAxisHeader('service_display_name') + ->setYAxisHeader('host_display_name'); $this->view->horizontalPaginator = $pivot->paginateXAxis(); $this->view->verticalPaginator = $pivot->paginateYAxis(); + list($pivotData, $pivotHeader) = $pivot->toArray(); + $this->view->pivotData = $pivotData; + $this->view->pivotHeader = $pivotHeader; } /** From c5fe641c439ed8f9dde18588a1b594cd25719930 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 14:55:02 +0200 Subject: [PATCH 060/280] monitoring: Rewrite service-grid view script refs #9538 --- .../views/scripts/list/servicegrid.phtml | 149 ++++++++---------- 1 file changed, 68 insertions(+), 81 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index 7136aaa43..22d730515 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -12,97 +12,84 @@ if (! $this->compact): ?>
pivot->toArray(); if (empty($pivotData)) { echo $this->translate('No services found matching the filter') . '
'; return; } - $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ')'; ?> - - $services): ?> - - - - -
partial( - 'joystickPagination.phtml', - 'default', - array( - 'xAxisPaginator' => $horizontalPaginator, - 'yAxisPaginator' => $verticalPaginator - ) - ); ?> -
- - - qlink( - '' . $this->ellipsis($serviceDescription, 18) . '', + + + + + $serviceDisplayName): ?> + - + ) ?> + + - - - - - - - - - - - - - + $hostDisplayName): ?> + + + + + + + -
partial( + 'joystickPagination.phtml', + 'default', + array( + 'xAxisPaginator' => $horizontalPaginator, + 'yAxisPaginator' => $verticalPaginator + ) + ); ?>
qlink( + $this->ellipsis($serviceDisplayName, 18), 'monitoring/list/services?' . $hostFilter, - array( - 'service_description' => $serviceDescription - ), - array( - 'title' => sprintf($this->translate('List all services with the name "%s" on all reported hosts'), $serviceDescription) - ), + array('service_description' => $serviceDescription), + array('title' => sprintf( + $this->translate('List all services with the name "%s" on all reported hosts'), + $serviceDisplayName + )), false - ); ?> - - -
-
- qlink( - $hostName, - 'monitoring/list/services?' . $serviceFilter, - array('host' => $hostName), - array('title' => sprintf($this->translate('List all reported services on host %s'), $hostName)) - ); ?> - - - escape($service->service_output); ?> - - qlink( - '', - 'monitoring/show/service', - array( - 'host' => $service->host_name, - 'service' => $service->service_description - ), - array( - 'aria-describedby' => $service->host_name . '_' . $service->service_description . '_desc', - 'class' => 'state_' . Service::getStateText($service->service_state). ($service->service_handled ? ' handled' : ''), - 'title' => $this->escape($service->service_output), - 'aria-label' => sprintf( - $this->translate('Show detailed information for service %s on host %s'), - $service->service_display_name, - $service->host_display_name - ) - ) - ); ?> -
qlink( + $hostDisplayName, + 'monitoring/list/services?' . $serviceFilter, + array('host_name' => $hostName), + array('title' => sprintf($this->translate('List all reported services on host %s'), $hostDisplayName)) + ); + ?> + + + + protectId($service->host_name . '_' . $service->service_description . '_desc') ?> + + escape($service->service_output) ?> + + qlink( + '', + 'monitoring/show/service', + array( + 'host' => $hostName, + 'service' => $serviceDescription + ), + array( + 'aria-describedby' => $ariaDescribedById, + 'class' => 'bg-state-' . Service::getStateText($service->service_state) . ($service->service_handled ? ' handled' : ''), + 'title' => $this->escape($service->service_output), + 'aria-label' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $service->service_display_name, + $service->host_display_name + ) + ) + ); ?> +
+
From e27d2e998be6fb0be004f3bc62590508eaa5041d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 16:13:34 +0200 Subject: [PATCH 061/280] monitoring: Fix grouping and ordering of the service when using display names refs #9538 refs #9333 --- library/Icinga/Data/PivotTable.php | 50 ++++++++++++++++-------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/library/Icinga/Data/PivotTable.php b/library/Icinga/Data/PivotTable.php index 93e9d4081..8463b483e 100644 --- a/library/Icinga/Data/PivotTable.php +++ b/library/Icinga/Data/PivotTable.php @@ -18,14 +18,14 @@ class PivotTable implements Sortable protected $baseQuery; /** - * The column that contains the labels for the x axis + * X-axis pivot column * * @var string */ protected $xAxisColumn; /** - * The column that contains the labels for the y axis + * Y-axis pivot column * * @var string */ @@ -39,42 +39,42 @@ class PivotTable implements Sortable protected $order = array(); /** - * The filter being applied on the query for the x axis + * The filter being applied on the query for the x-axis * * @var Filter */ protected $xAxisFilter; /** - * The filter being applied on the query for the y axis + * The filter being applied on the query for the y-axis * * @var Filter */ protected $yAxisFilter; /** - * The query to fetch the x axis labels + * The query to fetch the leading x-axis rows and their headers * * @var SimpleQuery */ protected $xAxisQuery; /** - * The query to fetch the y axis labels + * The query to fetch the leading y-axis rows and their headers * * @var SimpleQuery */ protected $yAxisQuery; /** - * X-axis header + * X-axis header column * * @var string|null */ protected $xAxisHeader; /** - * Y-axis header + * Y-axis header column * * @var string|null */ @@ -84,8 +84,8 @@ class PivotTable implements Sortable * Create a new pivot table * * @param SimpleQuery $query The query to fetch as pivot table - * @param string $xAxisColumn The column that contains the labels for the x axis - * @param string $yAxisColumn The column that contains the labels for the y axis + * @param string $xAxisColumn X-axis pivot column + * @param string $yAxisColumn Y-axis pivot column */ public function __construct(SimpleQuery $query, $xAxisColumn, $yAxisColumn) { @@ -120,7 +120,7 @@ class PivotTable implements Sortable } /** - * Set the filter to apply on the query for the x axis + * Set the filter to apply on the query for the x-axis * * @param Filter $filter * @@ -133,7 +133,7 @@ class PivotTable implements Sortable } /** - * Set the filter to apply on the query for the y axis + * Set the filter to apply on the query for the y-axis * * @param Filter $filter * @@ -226,16 +226,18 @@ class PivotTable implements Sortable { if ($this->xAxisQuery === null) { $this->xAxisQuery = clone $this->baseQuery; - $this->xAxisQuery->group($this->xAxisColumn); - $this->xAxisQuery->columns(array($this->xAxisColumn, $this->getXAxisHeader())); + $xAxisHeader = $this->getXAxisHeader(); + $columns = array($this->xAxisColumn, $xAxisHeader); + $this->xAxisQuery->group(array_unique($columns)); // xAxisColumn and header may be the same column + $this->xAxisQuery->columns($columns); if ($this->xAxisFilter !== null) { $this->xAxisQuery->addFilter($this->xAxisFilter); } $this->xAxisQuery->order( - $this->xAxisColumn, - isset($this->order[$this->xAxisColumn]) ? $this->order[$this->xAxisColumn] : self::SORT_ASC + $xAxisHeader, + isset($this->order[$xAxisHeader]) ? $this->order[$xAxisHeader] : self::SORT_ASC ); } @@ -251,23 +253,25 @@ class PivotTable implements Sortable { if ($this->yAxisQuery === null) { $this->yAxisQuery = clone $this->baseQuery; - $this->yAxisQuery->group($this->yAxisColumn); - $this->yAxisQuery->columns(array($this->yAxisColumn, $this->getYAxisHeader())); + $yAxisHeader = $this->getYAxisHeader(); + $columns = array($this->yAxisColumn, $yAxisHeader); + $this->yAxisQuery->group(array_unique($columns)); // yAxisColumn and header may be the same column + $this->yAxisQuery->columns($columns); if ($this->yAxisFilter !== null) { $this->yAxisQuery->addFilter($this->yAxisFilter); } $this->yAxisQuery->order( - $this->yAxisColumn, - isset($this->order[$this->yAxisColumn]) ? $this->order[$this->yAxisColumn] : self::SORT_ASC + $yAxisHeader, + isset($this->order[$yAxisHeader]) ? $this->order[$yAxisHeader] : self::SORT_ASC ); } return $this->yAxisQuery; } /** - * Return a pagination adapter for the x axis query + * Return a pagination adapter for the x-axis query * * $limit and $page are taken from the current request if not given. * @@ -298,7 +302,7 @@ class PivotTable implements Sortable } /** - * Return a pagination adapter for the y axis query + * Return a pagination adapter for the y-axis query * * $limit and $page are taken from the current request if not given. * @@ -329,7 +333,7 @@ class PivotTable implements Sortable } /** - * Return the pivot table as array + * Return the pivot table as an array of pivot data and pivot header * * @return array */ From ae3910390bd106a51166ba182fe22c1be0d44496 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 26 Aug 2015 13:32:22 +0200 Subject: [PATCH 062/280] monitoring: Rename instances.md to commandtransports.md refs #9651 --- modules/monitoring/doc/{instances.md => commandtransports.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename modules/monitoring/doc/{instances.md => commandtransports.md} (100%) diff --git a/modules/monitoring/doc/instances.md b/modules/monitoring/doc/commandtransports.md similarity index 100% rename from modules/monitoring/doc/instances.md rename to modules/monitoring/doc/commandtransports.md From 5f666678285677806ffac4f22d34adf6f28dd013 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 26 Aug 2015 13:35:11 +0200 Subject: [PATCH 063/280] monitoring: Update the command transport documentation refs #9765 refs #9651 --- modules/monitoring/doc/commandtransports.md | 88 +++++++++++++-------- 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/modules/monitoring/doc/commandtransports.md b/modules/monitoring/doc/commandtransports.md index ea8b3f5b8..de263c7d0 100644 --- a/modules/monitoring/doc/commandtransports.md +++ b/modules/monitoring/doc/commandtransports.md @@ -1,55 +1,73 @@ -# The instance.ini configuration file +# The commandtransports.ini configuration file ## Abstract -The instance.ini defines how icingaweb accesses the command pipe of your icinga process in order to submit external -commands. Depending on the config path (default: /etc/icingaweb2) of your icingaweb installation you can find it -under ./modules/monitoring/instances.ini. +The commandtransports.ini defines how Icinga Web 2 accesses the command pipe of +your Icinga instance in order to submit external commands. Depending on the +config path (default: /etc/icingaweb2) of your Icinga Web 2 installation you can +find it under ./modules/monitoring/commandtransports.ini. ## Syntax -You can define multiple instances in the instances.ini, icingaweb will use the first one as the default instance. +You can define multiple command transports in the commandtransports.ini. Icinga +Web 2 will utilize the first transport as the default for a specific Icinga +instance. -Every instance starts with a section header containing the name of the instance, followed by the config directives for -this instance in the standard ini format used by icingaweb. +Every transport starts with a section header containing its name, followed by +the config directives for this transport in the standard INI-format. -## Using a local icinga pipe +## Using a local command pipe -A local icinga instance can be easily setup and only requires the 'path' parameter: +A local Icinga instance requires the following directives: - [icinga] - path=/usr/local/icinga/var/rw/icinga.cmd +```` +[icinga2] +transport = local +path = /var/run/icinga2/cmd/icinga2.cmd +```` -When sending commands to the icinga instance, icingaweb just opens the file found underneath 'path' and writes the external -command to it. +When sending commands to the Icinga instance, Icinga Web 2 opens the file found +on the local filesystem underneath 'path' and writes the external command to it. -## Using ssh for accessing an icinga pipe +## Using SSH for accessing a remote command pipe -When providing at least a host directive to the instances.ini, SSH will be used for accessing the pipe. You must have -setup key authentication at the endpoint and allow your icingweb's user to access the machine without a password at this time: +A command pipe on a remote host's filesystem can be accessed by configuring a +SSH based command transport and requires the following directives: - [icinga] - path=/usr/local/icinga/var/rw/icinga.cmd ; the path on the remote machine where the icinga.cmd can be found - host=my.remote.machine.com ; the hostname or address of the remote machine - port=22 ; the port to use (22 if none is given) - user=jdoe ; the user to authenticate with +```` +[icinga2] +transport = remote +path = /var/run/icinga2/cmd/icinga2.cmd +host = example.tld +;port = 22 ; Optional. The default is 22 +user = icinga +```` -You can also make use of the ssh resource for accessing an icinga pipe with key-based authentication, which will give -you the possibility to define the location of the private key for a specific user, let's have a look: +To make this example work, you'll need to permit your web-server's user +public-key based access to the defined remote host so that Icinga Web 2 can +connect to it and login as the defined user. - [icinga] - path=/usr/local/icinga/var/rw/icinga.cmd ; the path on the remote machine where the icinga.cmd can be found - host=my.remote.machine.com ; the hostname or address of the remote machine - port=22 ; the port to use (22 if none is given) - resource=ssh ; the ssh resource which contains the username and the location of the private key - -And the associated ssh resource: - - [ssh] - type = "ssh" - user = "ssh-user" - private_key = "/etc/icingaweb2/ssh/ssh-user" +You can also make use of a dedicated SSH resource to permit access for a +different user than the web-server's one. This way, you can provide a private +key file on the local filesystem that is used to access the remote host. +To accomplish this, a new resource is required that is defined in your +transport's configuration instead of a user: +```` +[icinga2] +transport = remote +path = /var/run/icinga2/cmd/icinga2.cmd +host = example.tld +;port = 22 ; Optional. The default is 22 +resource = example.tld-icinga2 +```` +The resource's configuration needs to be put into the resources.ini file: +```` +[example.tld-icinga2] +type = ssh +user = icinga +private_key = /etc/icingaweb2/ssh/icinga +```` From b7feed86ea9d59a2f8257d4a621645aca58c63be Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 26 Aug 2015 14:05:13 +0200 Subject: [PATCH 064/280] monitoring: Document how to assign instances to command transports refs #9651 --- modules/monitoring/doc/commandtransports.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/monitoring/doc/commandtransports.md b/modules/monitoring/doc/commandtransports.md index de263c7d0..7e4ee058d 100644 --- a/modules/monitoring/doc/commandtransports.md +++ b/modules/monitoring/doc/commandtransports.md @@ -71,3 +71,20 @@ type = ssh user = icinga private_key = /etc/icingaweb2/ssh/icinga ```` + +## Configuring transports for different Icinga instances + +If there are multiple but different Icinga instances writing to your IDO you can +define which transport belongs to which Icinga instance by providing the +directive 'instance'. This directive should contain the name of the Icinga +instance you want to assign to the transport: + +```` +[icinga1] +... +instance = icinga1 ; Optional. The default is "default" + +[icinga2] +... +instance = icinga2 ; Optional. The default is "default" +```` From 1f83b30cca26699fcbac6f9ecc5a26a4d511fba7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 26 Aug 2015 14:06:09 +0200 Subject: [PATCH 065/280] rpm: Fix path to the commandpipe config in the documentation refs #9651 --- packages/RPM.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/RPM.md b/packages/RPM.md index 6daf41a63..9c8e4a548 100644 --- a/packages/RPM.md +++ b/packages/RPM.md @@ -89,7 +89,7 @@ By default the Icinga 2 DB IDO is used by the monitoring module in The external command pipe is required for sending commands and configured for Icinga 2 in -`/etc/icingaweb2/modules/monitoring/instances.ini` +`/etc/icingaweb2/modules/monitoring/commandtransports.ini` #### Authentication configuration From a1bd648d51b47bafc3f6d90bb3d80546fec874a2 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 26 Aug 2015 14:15:35 +0200 Subject: [PATCH 066/280] monitoring: Fix commandtransports.ini link in the config overview refs #9651 --- modules/monitoring/doc/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/doc/configuration.md b/modules/monitoring/doc/configuration.md index 7636b1a52..5c3a23aa4 100644 --- a/modules/monitoring/doc/configuration.md +++ b/modules/monitoring/doc/configuration.md @@ -10,7 +10,7 @@ stored in `/etc/icingaweb2` by default (depending on your config setup). modules/monitoring | Directory | `monitoring` module specific configuration modules/monitoring | config.ini | Security settings (e.g. protected custom vars) for the `monitoring` module modules/monitoring | backends.ini | Backend type and resources (e.g. Icinga IDO DB) - modules/monitoring | [instances.ini](instances.md#instances) | Instances and their transport (e.g. local external command pipe) + modules/monitoring | [commandtransports.ini](commandtransports.md#commandtransports) | Command transports for specific Icinga instances From 6651d314819004f9bdc58f6d1f4edc44c75aa167 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 26 Aug 2015 14:17:23 +0200 Subject: [PATCH 067/280] CommandTransport: Use commandtransports as config file name refs #9651 --- .../library/Monitoring/Command/Transport/CommandTransport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php b/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php index f39b0b4c3..73f66da02 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php @@ -30,10 +30,10 @@ abstract class CommandTransport public static function getConfig() { if (! isset(self::$config)) { - self::$config = Config::module('monitoring', 'instances'); + self::$config = Config::module('monitoring', 'commandtransports'); if (self::$config->isEmpty()) { throw new ConfigurationError( - 'No instances have been configured in \'%s\'.', + 'No command transports have been configured in \'%s\'.', self::$config->getConfigFile() ); } From ec8567cbbf08deb9bb1c413366b6857355f56afa Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 26 Aug 2015 15:43:30 +0200 Subject: [PATCH 068/280] monitoring: It's now a command transport, not an instance anymore refs #9651 --- .../controllers/ConfigController.php | 65 ++++++------- .../application/forms/Command/CommandForm.php | 6 +- .../Config/Instance/LocalInstanceForm.php | 2 +- .../Config/Instance/RemoteInstanceForm.php | 6 +- .../forms/Config/InstanceConfigForm.php | 93 +++++++++---------- .../application/forms/Setup/InstancePage.php | 16 ++-- .../views/scripts/config/index.phtml | 24 ++--- .../library/Monitoring/InstanceStep.php | 32 +++---- .../library/Monitoring/MonitoringWizard.php | 2 +- 9 files changed, 124 insertions(+), 122 deletions(-) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index 2622b9c54..05da1eebc 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -16,12 +16,12 @@ use Icinga\Module\Monitoring\Forms\Config\SecurityConfigForm; class Monitoring_ConfigController extends Controller { /** - * Display a list of available backends and instances + * Display a list of available backends and command transports */ public function indexAction() { $this->view->backendsConfig = $this->Config('backends'); - $this->view->instancesConfig = $this->Config('instances'); + $this->view->transportConfig = $this->Config('commandtransports'); $this->view->tabs = $this->Module()->getConfigTabs()->activate('backends'); } @@ -145,31 +145,34 @@ class Monitoring_ConfigController extends Controller } /** - * Remove a monitoring instance + * Remove a command transport */ - public function removeinstanceAction() + public function removetransportAction() { - $instanceName = $this->params->getRequired('instance'); + $transportName = $this->params->getRequired('transport'); - $instanceForm = new InstanceConfigForm(); - $instanceForm->setIniConfig($this->Config('instances')); + $transportForm = new InstanceConfigForm(); + $transportForm->setIniConfig($this->Config('commandtransports')); $form = new ConfirmRemovalForm(); $form->setRedirectUrl('monitoring/config'); - $form->setTitle(sprintf($this->translate('Remove Monitoring Instance %s'), $instanceName)); - $form->addDescription($this->translate( - 'If you have still any environments or views referring to this instance, ' - . 'you won\'t be able to send commands anymore after deletion.' - )); - $form->setOnSuccess(function (ConfirmRemovalForm $form) use ($instanceName, $instanceForm) { + $form->setTitle(sprintf($this->translate('Remove Command Transport %s'), $transportName)); + $form->info( + $this->translate( + 'If you have still any environments or views referring to this transport, ' + . 'you won\'t be able to send commands anymore after deletion.' + ), + false + ); + $form->setOnSuccess(function (ConfirmRemovalForm $form) use ($transportName, $transportForm) { try { - $instanceForm->delete($instanceName); + $transportForm->delete($transportName); } catch (Exception $e) { $form->error($e->getMessage()); return false; } - if ($instanceForm->save()) { - Notification::success(sprintf(t('Monitoring instance "%s" successfully removed'), $instanceName)); + if ($transportForm->save()) { + Notification::success(sprintf(t('Command transport "%s" successfully removed'), $transportName)); return true; } @@ -182,19 +185,19 @@ class Monitoring_ConfigController extends Controller } /** - * Edit a monitoring instance + * Edit a command transport */ - public function editinstanceAction() + public function edittransportAction() { - $instanceName = $this->params->getRequired('instance'); + $transportName = $this->params->getRequired('transport'); $form = new InstanceConfigForm(); $form->setRedirectUrl('monitoring/config'); - $form->setTitle(sprintf($this->translate('Edit Monitoring Instance %s'), $instanceName)); - $form->setIniConfig($this->Config('instances')); - $form->setOnSuccess(function (InstanceConfigForm $form) use ($instanceName) { + $form->setTitle(sprintf($this->translate('Edit Command Transport %s'), $transportName)); + $form->setIniConfig($this->Config('commandtransports')); + $form->setOnSuccess(function (InstanceConfigForm $form) use ($transportName) { try { - $form->edit($instanceName, array_map( + $form->edit($transportName, array_map( function ($v) { return $v !== '' ? $v : null; }, @@ -206,7 +209,7 @@ class Monitoring_ConfigController extends Controller } if ($form->save()) { - Notification::success(sprintf(t('Monitoring instance "%s" successfully updated'), $instanceName)); + Notification::success(sprintf(t('Command transport "%s" successfully updated'), $transportName)); return true; } @@ -214,10 +217,10 @@ class Monitoring_ConfigController extends Controller }); try { - $form->load($instanceName); + $form->load($transportName); $form->handleRequest(); } catch (NotFoundError $_) { - $this->httpNotFound(sprintf($this->translate('Monitoring instance "%s" not found'), $instanceName)); + $this->httpNotFound(sprintf($this->translate('Command transport "%s" not found'), $transportName)); } $this->view->form = $form; @@ -225,14 +228,14 @@ class Monitoring_ConfigController extends Controller } /** - * Create a new monitoring instance + * Create a new command transport */ - public function createinstanceAction() + public function createtransportAction() { $form = new InstanceConfigForm(); $form->setRedirectUrl('monitoring/config'); - $form->setTitle($this->translate('Create New Monitoring Instance')); - $form->setIniConfig($this->Config('instances')); + $form->setTitle($this->translate('Create New Command Transport')); + $form->setIniConfig($this->Config('commandtransports')); $form->setOnSuccess(function (InstanceConfigForm $form) { try { $form->add(array_filter($form->getValues())); @@ -242,7 +245,7 @@ class Monitoring_ConfigController extends Controller } if ($form->save()) { - Notification::success(t('Monitoring instance successfully created')); + Notification::success(t('Command transport successfully created')); return true; } diff --git a/modules/monitoring/application/forms/Command/CommandForm.php b/modules/monitoring/application/forms/Command/CommandForm.php index ca30dba74..162e4370c 100644 --- a/modules/monitoring/application/forms/Command/CommandForm.php +++ b/modules/monitoring/application/forms/Command/CommandForm.php @@ -52,9 +52,9 @@ abstract class CommandForm extends Form */ public function getTransport(Request $request) { - $instance = $request->getParam('instance'); - if ($instance !== null) { - $transport = CommandTransport::create($instance); + $transportName = $request->getParam('transport'); + if ($transportName !== null) { + $transport = CommandTransport::create($transportName); } else { $transport = CommandTransport::first(); } diff --git a/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php b/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php index 15e1ed055..515d6fab6 100644 --- a/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php +++ b/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php @@ -13,7 +13,7 @@ class LocalInstanceForm extends Form */ public function init() { - $this->setName('form_config_monitoring_instance_local'); + $this->setName('form_config_command_transport_local'); } /** diff --git a/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php b/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php index e290866cc..4f4ecaefd 100644 --- a/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php +++ b/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php @@ -10,7 +10,7 @@ use Icinga\Web\Form; class RemoteInstanceForm extends Form { /** - * The available monitoring instance resources split by type + * The available resources split by type * * @var array */ @@ -22,7 +22,7 @@ class RemoteInstanceForm extends Form */ public function init() { - $this->setName('form_config_monitoring_instance_remote'); + $this->setName('form_config_command_transport_remote'); } /** @@ -44,7 +44,7 @@ class RemoteInstanceForm extends Form } if (empty($resources)) { - throw new ConfigurationError($this->translate('Could not find any valid monitoring instance resources')); + throw new ConfigurationError($this->translate('Could not find any valid SSH resources')); } $this->resources = $resources; diff --git a/modules/monitoring/application/forms/Config/InstanceConfigForm.php b/modules/monitoring/application/forms/Config/InstanceConfigForm.php index 27e1e410d..c59ce2e04 100644 --- a/modules/monitoring/application/forms/Config/InstanceConfigForm.php +++ b/modules/monitoring/application/forms/Config/InstanceConfigForm.php @@ -13,36 +13,36 @@ use Icinga\Module\Monitoring\Forms\Config\Instance\LocalInstanceForm; use Icinga\Module\Monitoring\Forms\Config\Instance\RemoteInstanceForm; /** - * Form for managing monitoring instances + * Form for managing command transports */ class InstanceConfigForm extends ConfigForm { /** - * The instance to load when displaying the form for the first time + * The transport to load when displaying the form for the first time * * @var string */ - protected $instanceToLoad; + protected $transportToLoad; /** * Initialize this form */ public function init() { - $this->setName('form_config_monitoring_instance'); + $this->setName('form_config_command_transports'); $this->setSubmitLabel($this->translate('Save Changes')); } /** - * Return a form object for the given instance type + * Return a form object for the given transport type * - * @param string $type The instance type for which to return a form + * @param string $type The transport type for which to return a form * * @return Form * - * @throws InvalidArgumentException In case the given instance type is invalid + * @throws InvalidArgumentException In case the given transport type is invalid */ - public function getInstanceForm($type) + public function getTransportForm($type) { switch (strtolower($type)) { case LocalCommandFile::TRANSPORT: @@ -51,41 +51,41 @@ class InstanceConfigForm extends ConfigForm return new RemoteInstanceForm(); default: throw new InvalidArgumentException( - sprintf($this->translate('Invalid monitoring instance type "%s" given'), $type) + sprintf($this->translate('Invalid command transport type "%s" given'), $type) ); } } /** - * Populate the form with the given instance's config + * Populate the form with the given transport's config * * @param string $name * * @return $this * - * @throws NotFoundError In case no instance with the given name is found + * @throws NotFoundError In case no transport with the given name is found */ public function load($name) { if (! $this->config->hasSection($name)) { - throw new NotFoundError('No monitoring instance called "%s" found', $name); + throw new NotFoundError('No command transport called "%s" found', $name); } - $this->instanceToLoad = $name; + $this->transportToLoad = $name; return $this; } /** - * Add a new instance + * Add a new command transport * - * The instance to add is identified by the array-key `name'. + * The transport to add is identified by the array-key `name'. * * @param array $data * * @return $this * - * @throws InvalidArgumentException In case $data does not contain a instance name - * @throws IcingaException In case a instance with the same name already exists + * @throws InvalidArgumentException In case $data does not contain a transport name + * @throws IcingaException In case a transport with the same name already exists */ public function add(array $data) { @@ -93,36 +93,36 @@ class InstanceConfigForm extends ConfigForm throw new InvalidArgumentException('Key \'name\' missing'); } - $instanceName = $data['name']; - if ($this->config->hasSection($instanceName)) { + $transportName = $data['name']; + if ($this->config->hasSection($transportName)) { throw new IcingaException( - $this->translate('A monitoring instance with the name "%s" does already exist'), - $instanceName + $this->translate('A command transport with the name "%s" does already exist'), + $transportName ); } unset($data['name']); - $this->config->setSection($instanceName, $data); + $this->config->setSection($transportName, $data); return $this; } /** - * Edit an existing instance + * Edit an existing command transport * * @param string $name * @param array $data * * @return $this * - * @throws NotFoundError In case no instance with the given name is found + * @throws NotFoundError In case no transport with the given name is found */ public function edit($name, array $data) { if (! $this->config->hasSection($name)) { - throw new NotFoundError('No monitoring instance called "%s" found', $name); + throw new NotFoundError('No command transport called "%s" found', $name); } - $instanceConfig = $this->config->getSection($name); + $transportConfig = $this->config->getSection($name); if (isset($data['name'])) { if ($data['name'] !== $name) { $this->config->removeSection($name); @@ -132,19 +132,19 @@ class InstanceConfigForm extends ConfigForm unset($data['name']); } - $instanceConfig->merge($data); - foreach ($instanceConfig->toArray() as $k => $v) { + $transportConfig->merge($data); + foreach ($transportConfig->toArray() as $k => $v) { if ($v === null) { - unset($instanceConfig->$k); + unset($transportConfig->$k); } } - $this->config->setSection($name, $instanceConfig); + $this->config->setSection($name, $transportConfig); return $this; } /** - * Remove a instance + * Remove a command transport * * @param string $name * @@ -168,9 +168,9 @@ class InstanceConfigForm extends ConfigForm 'name', array( 'required' => true, - 'label' => $this->translate('Instance Name'), + 'label' => $this->translate('Transport Name'), 'description' => $this->translate( - 'The name of this monitoring instance that is used to differentiate it from others' + 'The name of this command transport that is used to differentiate it from others' ), 'validators' => array( array( @@ -189,14 +189,14 @@ class InstanceConfigForm extends ConfigForm ) ); - $instanceTypes = array( + $transportTypes = array( LocalCommandFile::TRANSPORT => $this->translate('Local Command File'), RemoteCommandFile::TRANSPORT => $this->translate('Remote Command File') ); - $instanceType = isset($formData['transport']) ? $formData['transport'] : null; - if ($instanceType === null) { - $instanceType = key($instanceTypes); + $transportType = isset($formData['transport']) ? $formData['transport'] : null; + if ($transportType === null) { + $transportType = key($transportTypes); } $this->addElements(array( @@ -206,24 +206,23 @@ class InstanceConfigForm extends ConfigForm array( 'required' => true, 'autosubmit' => true, - 'label' => $this->translate('Instance Type'), - 'description' => $this->translate('The type of transport to use for this monitoring instance'), - 'multiOptions' => $instanceTypes + 'label' => $this->translate('Transport Type'), + 'multiOptions' => $transportTypes ) ) )); - $this->addSubForm($this->getInstanceForm($instanceType)->create($formData), 'instance_form'); + $this->addSubForm($this->getTransportForm($transportType)->create($formData), 'transport_form'); } /** - * Populate the configuration of the instance to load + * Populate the configuration of the transport to load */ public function onRequest() { - if ($this->instanceToLoad) { - $data = $this->config->getSection($this->instanceToLoad)->toArray(); - $data['name'] = $this->instanceToLoad; + if ($this->transportToLoad) { + $data = $this->config->getSection($this->transportToLoad)->toArray(); + $data['name'] = $this->transportToLoad; $this->populate($data); } } @@ -238,8 +237,8 @@ class InstanceConfigForm extends ConfigForm public function getValues($suppressArrayNotation = false) { $values = parent::getValues(); - $values = array_merge($values, $values['instance_form']); - unset($values['instance_form']); + $values = array_merge($values, $values['transport_form']); + unset($values['transport_form']); return $values; } } diff --git a/modules/monitoring/application/forms/Setup/InstancePage.php b/modules/monitoring/application/forms/Setup/InstancePage.php index d16646e3e..d8608296f 100644 --- a/modules/monitoring/application/forms/Setup/InstancePage.php +++ b/modules/monitoring/application/forms/Setup/InstancePage.php @@ -10,23 +10,23 @@ class InstancePage extends Form { public function init() { - $this->setName('setup_monitoring_instance'); - $this->setTitle($this->translate('Monitoring Instance', 'setup.page.title')); + $this->setName('setup_command_transport'); + $this->setTitle($this->translate('Command Transport', 'setup.page.title')); $this->addDescription($this->translate( - 'Please define the settings specific to your monitoring instance below.' + 'Please define below how you want to send commands to your monitoring instance.' )); } public function createElements(array $formData) { - $instanceConfigForm = new InstanceConfigForm(); - $this->addSubForm($instanceConfigForm, 'instance_form'); - $instanceConfigForm->create($formData); - $instanceConfigForm->getElement('name')->setValue('icinga'); + $transportConfigForm = new InstanceConfigForm(); + $this->addSubForm($transportConfigForm, 'transport_form'); + $transportConfigForm->create($formData); + $transportConfigForm->getElement('name')->setValue('icinga2'); } public function getValues($suppressArrayNotation = false) { - return $this->getSubForm('instance_form')->getValues($suppressArrayNotation); + return $this->getSubForm('transport_form')->getValues($suppressArrayNotation); } } diff --git a/modules/monitoring/application/views/scripts/config/index.phtml b/modules/monitoring/application/views/scripts/config/index.phtml index c985805eb..d0e75c0ff 100644 --- a/modules/monitoring/application/views/scripts/config/index.phtml +++ b/modules/monitoring/application/views/scripts/config/index.phtml @@ -47,28 +47,28 @@
-

translate('Monitoring Instances') ?>

+

translate('Command Transports') ?>

- - icon('plus'); ?> translate('Create New Instance'); ?> + + icon('plus'); ?> translate('Create New Transport'); ?>

- + - instancesConfig as $instanceName => $config): ?> + transportConfig as $transportName => $config): ?> diff --git a/modules/monitoring/library/Monitoring/InstanceStep.php b/modules/monitoring/library/Monitoring/InstanceStep.php index 7aa1ef760..a683018a9 100644 --- a/modules/monitoring/library/Monitoring/InstanceStep.php +++ b/modules/monitoring/library/Monitoring/InstanceStep.php @@ -21,13 +21,13 @@ class InstanceStep extends Step public function apply() { - $instanceConfig = $this->data['instanceConfig']; - $instanceName = $instanceConfig['name']; - unset($instanceConfig['name']); + $transportConfig = $this->data['transportConfig']; + $transportName = $transportConfig['name']; + unset($transportConfig['name']); try { - Config::fromArray(array($instanceName => $instanceConfig)) - ->setConfigFile(Config::resolvePath('modules/monitoring/instances.ini')) + Config::fromArray(array($transportName => $transportConfig)) + ->setConfigFile(Config::resolvePath('modules/monitoring/commandtransports.ini')) ->saveIni(); } catch (Exception $e) { $this->error = $e; @@ -40,16 +40,16 @@ class InstanceStep extends Step public function getSummary() { - $pageTitle = '

' . mt('monitoring', 'Monitoring Instance', 'setup.page.title') . '

'; + $pageTitle = '

' . mt('monitoring', 'Command Transport', 'setup.page.title') . '

'; - if (isset($this->data['instanceConfig']['host'])) { + if (isset($this->data['transportConfig']['host'])) { $pipeHtml = '

' . sprintf( mt( 'monitoring', 'Icinga Web 2 will use the named pipe located on a remote machine at "%s" to send commands' . ' to your monitoring instance by using the connection details listed below:' ), - $this->data['instanceConfig']['path'] + $this->data['transportConfig']['path'] ) . '

'; $pipeHtml .= '' @@ -57,15 +57,15 @@ class InstanceStep extends Step . '' . '' . '' - . '' + . '' . '' . '' . '' - . '' + . '' . '' . '' . '' - . '' + . '' . '' . '' . '
translate('Instance'); ?>translate('Transport'); ?> translate('Remove'); ?>
qlink( - $instanceName, - '/monitoring/config/editinstance', - array('instance' => $instanceName), + $transportName, + '/monitoring/config/edittransport', + array('transport' => $transportName), array( 'icon' => 'edit', - 'title' => sprintf($this->translate('Edit monitoring instance %s'), $instanceName) + 'title' => sprintf($this->translate('Edit command transport %s'), $transportName) ) ); ?> ( qlink( '', - '/monitoring/config/removeinstance', - array('instance' => $instanceName), + '/monitoring/config/removetransport', + array('transport' => $transportName), array( 'icon' => 'trash', - 'title' => sprintf($this->translate('Remove monitoring instance %s'), $instanceName) + 'title' => sprintf($this->translate('Remove command transport %s'), $transportName) ) ); ?>
' . mt('monitoring', 'Remote Host') . '' . $this->data['instanceConfig']['host'] . '' . $this->data['transportConfig']['host'] . '
' . mt('monitoring', 'Remote SSH Port') . '' . $this->data['instanceConfig']['port'] . '' . $this->data['transportConfig']['port'] . '
' . mt('monitoring', 'Remote SSH User') . '' . $this->data['instanceConfig']['user'] . '' . $this->data['transportConfig']['user'] . '
'; @@ -76,7 +76,7 @@ class InstanceStep extends Step 'Icinga Web 2 will use the named pipe located at "%s"' . ' to send commands to your monitoring instance.' ), - $this->data['instanceConfig']['path'] + $this->data['transportConfig']['path'] ) . '

'; } @@ -87,17 +87,17 @@ class InstanceStep extends Step { if ($this->error === false) { return array(sprintf( - mt('monitoring', 'Monitoring instance configuration has been successfully created: %s'), - Config::resolvePath('modules/monitoring/instances.ini') + mt('monitoring', 'Command transport configuration has been successfully created: %s'), + Config::resolvePath('modules/monitoring/commandtransports.ini') )); } elseif ($this->error !== null) { return array( sprintf( mt( 'monitoring', - 'Monitoring instance configuration could not be written to: %s. An error occured:' + 'Command transport configuration could not be written to: %s. An error occured:' ), - Config::resolvePath('modules/monitoring/instances.ini') + Config::resolvePath('modules/monitoring/commandtransports.ini') ), sprintf(mt('setup', 'ERROR: %s'), IcingaException::describe($this->error)) ); diff --git a/modules/monitoring/library/Monitoring/MonitoringWizard.php b/modules/monitoring/library/Monitoring/MonitoringWizard.php index 4b495c36e..7147d61a9 100644 --- a/modules/monitoring/library/Monitoring/MonitoringWizard.php +++ b/modules/monitoring/library/Monitoring/MonitoringWizard.php @@ -151,7 +151,7 @@ class MonitoringWizard extends Wizard implements SetupWizard $setup->addStep( new InstanceStep(array( - 'instanceConfig' => $pageData['setup_monitoring_instance'] + 'transportConfig' => $pageData['setup_command_transport'] )) ); From 8c887ee45045d5243e35e05382f455b403311e6f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 26 Aug 2015 15:52:36 +0200 Subject: [PATCH 069/280] monitoring: Rename all command transport related classes refs #9651 --- .../application/controllers/ConfigController.php | 12 ++++++------ .../LocalTransportForm.php} | 4 ++-- .../RemoteTransportForm.php} | 4 ++-- ...nstanceConfigForm.php => TransportConfigForm.php} | 10 +++++----- .../Setup/{InstancePage.php => TransportPage.php} | 6 +++--- .../library/Monitoring/MonitoringWizard.php | 6 +++--- .../{InstanceStep.php => TransportStep.php} | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) rename modules/monitoring/application/forms/Config/{Instance/LocalInstanceForm.php => Transport/LocalTransportForm.php} (90%) rename modules/monitoring/application/forms/Config/{Instance/RemoteInstanceForm.php => Transport/RemoteTransportForm.php} (98%) rename modules/monitoring/application/forms/Config/{InstanceConfigForm.php => TransportConfigForm.php} (95%) rename modules/monitoring/application/forms/Setup/{InstancePage.php => TransportPage.php} (85%) rename modules/monitoring/library/Monitoring/{InstanceStep.php => TransportStep.php} (99%) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index 05da1eebc..0b1b2fd86 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -7,8 +7,8 @@ use Icinga\Forms\ConfirmRemovalForm; use Icinga\Web\Controller; use Icinga\Web\Notification; use Icinga\Module\Monitoring\Forms\Config\BackendConfigForm; -use Icinga\Module\Monitoring\Forms\Config\InstanceConfigForm; use Icinga\Module\Monitoring\Forms\Config\SecurityConfigForm; +use Icinga\Module\Monitoring\Forms\Config\TransportConfigForm; /** * Configuration controller for editing monitoring resources @@ -151,7 +151,7 @@ class Monitoring_ConfigController extends Controller { $transportName = $this->params->getRequired('transport'); - $transportForm = new InstanceConfigForm(); + $transportForm = new TransportConfigForm(); $transportForm->setIniConfig($this->Config('commandtransports')); $form = new ConfirmRemovalForm(); $form->setRedirectUrl('monitoring/config'); @@ -191,11 +191,11 @@ class Monitoring_ConfigController extends Controller { $transportName = $this->params->getRequired('transport'); - $form = new InstanceConfigForm(); + $form = new TransportConfigForm(); $form->setRedirectUrl('monitoring/config'); $form->setTitle(sprintf($this->translate('Edit Command Transport %s'), $transportName)); $form->setIniConfig($this->Config('commandtransports')); - $form->setOnSuccess(function (InstanceConfigForm $form) use ($transportName) { + $form->setOnSuccess(function (TransportConfigForm $form) use ($transportName) { try { $form->edit($transportName, array_map( function ($v) { @@ -232,11 +232,11 @@ class Monitoring_ConfigController extends Controller */ public function createtransportAction() { - $form = new InstanceConfigForm(); + $form = new TransportConfigForm(); $form->setRedirectUrl('monitoring/config'); $form->setTitle($this->translate('Create New Command Transport')); $form->setIniConfig($this->Config('commandtransports')); - $form->setOnSuccess(function (InstanceConfigForm $form) { + $form->setOnSuccess(function (TransportConfigForm $form) { try { $form->add(array_filter($form->getValues())); } catch (Exception $e) { diff --git a/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php b/modules/monitoring/application/forms/Config/Transport/LocalTransportForm.php similarity index 90% rename from modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php rename to modules/monitoring/application/forms/Config/Transport/LocalTransportForm.php index 515d6fab6..3c5f0655f 100644 --- a/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php +++ b/modules/monitoring/application/forms/Config/Transport/LocalTransportForm.php @@ -1,11 +1,11 @@ translate('Invalid command transport type "%s" given'), $type) diff --git a/modules/monitoring/application/forms/Setup/InstancePage.php b/modules/monitoring/application/forms/Setup/TransportPage.php similarity index 85% rename from modules/monitoring/application/forms/Setup/InstancePage.php rename to modules/monitoring/application/forms/Setup/TransportPage.php index d8608296f..16a478b5a 100644 --- a/modules/monitoring/application/forms/Setup/InstancePage.php +++ b/modules/monitoring/application/forms/Setup/TransportPage.php @@ -4,9 +4,9 @@ namespace Icinga\Module\Monitoring\Forms\Setup; use Icinga\Web\Form; -use Icinga\Module\Monitoring\Forms\Config\InstanceConfigForm; +use Icinga\Module\Monitoring\Forms\Config\TransportConfigForm; -class InstancePage extends Form +class TransportPage extends Form { public function init() { @@ -19,7 +19,7 @@ class InstancePage extends Form public function createElements(array $formData) { - $transportConfigForm = new InstanceConfigForm(); + $transportConfigForm = new TransportConfigForm(); $this->addSubForm($transportConfigForm, 'transport_form'); $transportConfigForm->create($formData); $transportConfigForm->getElement('name')->setValue('icinga2'); diff --git a/modules/monitoring/library/Monitoring/MonitoringWizard.php b/modules/monitoring/library/Monitoring/MonitoringWizard.php index 7147d61a9..c35705f62 100644 --- a/modules/monitoring/library/Monitoring/MonitoringWizard.php +++ b/modules/monitoring/library/Monitoring/MonitoringWizard.php @@ -12,8 +12,8 @@ use Icinga\Module\Setup\RequirementSet; use Icinga\Module\Setup\Forms\SummaryPage; use Icinga\Module\Monitoring\Forms\Setup\WelcomePage; use Icinga\Module\Monitoring\Forms\Setup\BackendPage; -use Icinga\Module\Monitoring\Forms\Setup\InstancePage; use Icinga\Module\Monitoring\Forms\Setup\SecurityPage; +use Icinga\Module\Monitoring\Forms\Setup\TransportPage; use Icinga\Module\Monitoring\Forms\Setup\IdoResourcePage; use Icinga\Module\Monitoring\Forms\Setup\LivestatusResourcePage; use Icinga\Module\Setup\Requirement\ClassRequirement; @@ -33,7 +33,7 @@ class MonitoringWizard extends Wizard implements SetupWizard $this->addPage(new BackendPage()); $this->addPage(new IdoResourcePage()); $this->addPage(new LivestatusResourcePage()); - $this->addPage(new InstancePage()); + $this->addPage(new TransportPage()); $this->addPage(new SecurityPage()); $this->addPage(new SummaryPage(array('name' => 'setup_monitoring_summary'))); } @@ -150,7 +150,7 @@ class MonitoringWizard extends Wizard implements SetupWizard ); $setup->addStep( - new InstanceStep(array( + new TransportStep(array( 'transportConfig' => $pageData['setup_command_transport'] )) ); diff --git a/modules/monitoring/library/Monitoring/InstanceStep.php b/modules/monitoring/library/Monitoring/TransportStep.php similarity index 99% rename from modules/monitoring/library/Monitoring/InstanceStep.php rename to modules/monitoring/library/Monitoring/TransportStep.php index a683018a9..936c9a6de 100644 --- a/modules/monitoring/library/Monitoring/InstanceStep.php +++ b/modules/monitoring/library/Monitoring/TransportStep.php @@ -8,7 +8,7 @@ use Icinga\Module\Setup\Step; use Icinga\Application\Config; use Icinga\Exception\IcingaException; -class InstanceStep extends Step +class TransportStep extends Step { protected $data; From 66570c95e0a8a826f7c487460fb99eeeb3d29d95 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 27 Aug 2015 08:53:46 +0200 Subject: [PATCH 070/280] monitoring: Ensure to ask subqueries whether to allow custom vars fixes #9998 --- .../Monitoring/Backend/Ido/Query/CommentQuery.php | 14 ++++++++++++++ .../Ido/Query/CommentdeletionhistoryQuery.php | 14 ++++++++++++++ .../Backend/Ido/Query/CommenthistoryQuery.php | 14 ++++++++++++++ .../Monitoring/Backend/Ido/Query/DowntimeQuery.php | 14 ++++++++++++++ .../Backend/Ido/Query/DowntimeendhistoryQuery.php | 14 ++++++++++++++ .../Ido/Query/DowntimestarthistoryQuery.php | 14 ++++++++++++++ .../Backend/Ido/Query/EventhistoryQuery.php | 14 ++++++++++++++ .../Backend/Ido/Query/HostgroupsummaryQuery.php | 14 ++++++++++++++ .../Backend/Ido/Query/HoststatussummaryQuery.php | 8 ++++++++ .../Backend/Ido/Query/NotificationQuery.php | 14 ++++++++++++++ .../Backend/Ido/Query/ServicegroupsummaryQuery.php | 14 ++++++++++++++ .../Ido/Query/ServicestatussummaryQuery.php | 8 ++++++++ .../Backend/Ido/Query/StatehistoryQuery.php | 14 ++++++++++++++ .../Backend/Ido/Query/StatussummaryQuery.php | 14 ++++++++++++++ 14 files changed, 184 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentQuery.php index e826f16a6..ea2a656fa 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentQuery.php @@ -55,6 +55,20 @@ class CommentQuery extends IdoQuery */ protected $subQueries = array(); + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentdeletionhistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentdeletionhistoryQuery.php index 30be5c400..6658d92cc 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentdeletionhistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentdeletionhistoryQuery.php @@ -58,6 +58,20 @@ class CommentdeletionhistoryQuery extends IdoQuery */ protected $fetchHistoryColumns = false; + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommenthistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommenthistoryQuery.php index b8fdd72a4..687cd9a00 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommenthistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommenthistoryQuery.php @@ -58,6 +58,20 @@ class CommenthistoryQuery extends IdoQuery */ protected $fetchHistoryColumns = false; + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimeQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimeQuery.php index 420559ba8..2c97698e6 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimeQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimeQuery.php @@ -60,6 +60,20 @@ class DowntimeQuery extends IdoQuery */ protected $subQueries = array(); + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimeendhistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimeendhistoryQuery.php index 08b6cec01..110e7bfae 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimeendhistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimeendhistoryQuery.php @@ -58,6 +58,20 @@ class DowntimeendhistoryQuery extends IdoQuery */ protected $fetchHistoryColumns = false; + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimestarthistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimestarthistoryQuery.php index e312480e7..0799df17c 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimestarthistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/DowntimestarthistoryQuery.php @@ -58,6 +58,20 @@ class DowntimestarthistoryQuery extends IdoQuery */ protected $fetchHistoryColumns = false; + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/EventhistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/EventhistoryQuery.php index c9acd16fc..076be4384 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/EventhistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/EventhistoryQuery.php @@ -75,6 +75,20 @@ class EventhistoryQuery extends IdoQuery $this->joinedVirtualTables['eventhistory'] = true; } + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php index ce5e0f85b..32f91e324 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php @@ -66,6 +66,20 @@ class HostgroupsummaryQuery extends IdoQuery */ protected $subQueries = array(); + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatussummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatussummaryQuery.php index da065d184..9796ae8e7 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatussummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatussummaryQuery.php @@ -34,6 +34,14 @@ class HoststatussummaryQuery extends IdoQuery */ protected $subSelect; + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + return $this->subSelect->allowsCustomVars(); + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php index a459a4187..1afd06340 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php @@ -129,6 +129,20 @@ class NotificationQuery extends IdoQuery $this->notificationQuery->union(array($services), Zend_Db_Select::SQL_UNION_ALL); } + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php index a4c763562..04688fbd4 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php @@ -58,6 +58,20 @@ class ServicegroupsummaryQuery extends IdoQuery */ protected $subQueries = array(); + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatussummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatussummaryQuery.php index 325203717..81e3b50e9 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatussummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatussummaryQuery.php @@ -46,6 +46,14 @@ class ServicestatussummaryQuery extends IdoQuery */ protected $subSelect; + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + return $this->subSelect->allowsCustomVars(); + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatehistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatehistoryQuery.php index 41f18572b..a29d61acc 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatehistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatehistoryQuery.php @@ -58,6 +58,20 @@ class StatehistoryQuery extends IdoQuery */ protected $fetchHistoryColumns = false; + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatussummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatussummaryQuery.php index e138a3f5e..80dd5f709 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatussummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatussummaryQuery.php @@ -130,6 +130,20 @@ We have to find a better solution here. */ protected $subQueries = array(); + /** + * {@inheritdoc} + */ + public function allowsCustomVars() + { + foreach ($this->subQueries as $query) { + if (! $query->allowsCustomVars()) { + return false; + } + } + + return true; + } + /** * {@inheritdoc} */ From f35aec1c5cc25d2cda0056e0d8f48ef0b14d7fae Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 11:54:20 +0200 Subject: [PATCH 071/280] monitoring: Fix default select columns of the instance query --- .../library/Monitoring/Backend/Ido/Query/InstanceQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/InstanceQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/InstanceQuery.php index 8e75171e0..7a5d5637f 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/InstanceQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/InstanceQuery.php @@ -20,7 +20,7 @@ class InstanceQuery extends IdoQuery */ protected function joinBaseTables() { - $this->select()->from(array('i' => $this->prefix . 'instances')); + $this->select()->from(array('i' => $this->prefix . 'instances'), array()); $this->joinedVirtualTables['instances'] = true; } } From 176177d874b6adad2368d02b2bdd7f4d185f925e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 16:56:26 +0200 Subject: [PATCH 072/280] Fix failing search dashboard test --- library/Icinga/Test/BaseTestCase.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Test/BaseTestCase.php b/library/Icinga/Test/BaseTestCase.php index 9f7404ae9..ac574a28e 100644 --- a/library/Icinga/Test/BaseTestCase.php +++ b/library/Icinga/Test/BaseTestCase.php @@ -22,12 +22,14 @@ namespace Icinga\Test { use Exception; use RuntimeException; + use stdClass; use Mockery; use PHPUnit_Framework_TestCase; use Icinga\Application\Icinga; use Icinga\Data\ConfigObject; - use Icinga\Data\ResourceFactory; use Icinga\Data\Db\DbConnection; + use Icinga\Data\ResourceFactory; + use Icinga\Web\View; /** * Class BaseTestCase @@ -167,7 +169,12 @@ namespace Icinga\Test { return $libDir; }) ->shouldReceive('getRequest')->andReturn($requestMock) - ->shouldReceive('getResponse')->andReturn($responseMock); + ->shouldReceive('getResponse')->andReturn($responseMock) + ->shouldReceive('getViewRenderer')->andReturnUsing(function () { + $viewRenderer = new stdClass(); + $viewRenderer->view = new View(); + return $viewRenderer; + }); Icinga::setApp($bootstrapMock, true); return $bootstrapMock; From eb30ecd776d5c28dbac49fa12032638ccb2cb88b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 25 Aug 2015 16:59:05 +0200 Subject: [PATCH 073/280] Revert "Fix failing search dashboard test" This reverts commit 7c0dbe0077f56aef5f2a744761b47a0715dd591a. Fixed by using t() in the SearchDashboard already. --- library/Icinga/Test/BaseTestCase.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/library/Icinga/Test/BaseTestCase.php b/library/Icinga/Test/BaseTestCase.php index ac574a28e..9f7404ae9 100644 --- a/library/Icinga/Test/BaseTestCase.php +++ b/library/Icinga/Test/BaseTestCase.php @@ -22,14 +22,12 @@ namespace Icinga\Test { use Exception; use RuntimeException; - use stdClass; use Mockery; use PHPUnit_Framework_TestCase; use Icinga\Application\Icinga; use Icinga\Data\ConfigObject; - use Icinga\Data\Db\DbConnection; use Icinga\Data\ResourceFactory; - use Icinga\Web\View; + use Icinga\Data\Db\DbConnection; /** * Class BaseTestCase @@ -169,12 +167,7 @@ namespace Icinga\Test { return $libDir; }) ->shouldReceive('getRequest')->andReturn($requestMock) - ->shouldReceive('getResponse')->andReturn($responseMock) - ->shouldReceive('getViewRenderer')->andReturnUsing(function () { - $viewRenderer = new stdClass(); - $viewRenderer->view = new View(); - return $viewRenderer; - }); + ->shouldReceive('getResponse')->andReturn($responseMock); Icinga::setApp($bootstrapMock, true); return $bootstrapMock; From 28009eb563c290ee4bc5f873a2a3fa0b61677bb5 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:03:45 +0200 Subject: [PATCH 074/280] Rename controller namespace to Controllers refs #5786 --- application/controllers/DashboardController.php | 2 +- library/Icinga/Web/Controller/Dispatcher.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index b67912384..6c8eaa480 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -1,7 +1,7 @@ Date: Thu, 27 Aug 2015 13:05:20 +0200 Subject: [PATCH 075/280] Namespace the AboutController refs #5786 --- application/controllers/AboutController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/AboutController.php b/application/controllers/AboutController.php index a4247f234..4bd440d98 100644 --- a/application/controllers/AboutController.php +++ b/application/controllers/AboutController.php @@ -1,7 +1,7 @@ Date: Thu, 27 Aug 2015 13:06:31 +0200 Subject: [PATCH 076/280] lib: Add PHPDoc to Version --- library/Icinga/Application/Version.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/Icinga/Application/Version.php b/library/Icinga/Application/Version.php index 65b6138d9..3b7b51e50 100644 --- a/library/Icinga/Application/Version.php +++ b/library/Icinga/Application/Version.php @@ -3,6 +3,9 @@ namespace Icinga\Application; +/** + * Retrieve the version of Icinga Web 2 + */ class Version { /** From ba09b02f5c1c8ba007a4a5af16244a2cc4cc7471 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:06:49 +0200 Subject: [PATCH 077/280] lib: Fix PHPDoc of Version::get() --- library/Icinga/Application/Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Application/Version.php b/library/Icinga/Application/Version.php index 3b7b51e50..c06eca2c2 100644 --- a/library/Icinga/Application/Version.php +++ b/library/Icinga/Application/Version.php @@ -11,7 +11,7 @@ class Version /** * Get the version of this instance of Icinga Web 2 * - * @return array|bool array on success, false otherwise + * @return array|false array on success, false otherwise */ public static function get() { From 358735a0a352a0b2939c5f0b83a5bed39943619c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:07:10 +0200 Subject: [PATCH 078/280] Optimize imports in the AboutController --- application/controllers/AboutController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/AboutController.php b/application/controllers/AboutController.php index 4bd440d98..fc1c78931 100644 --- a/application/controllers/AboutController.php +++ b/application/controllers/AboutController.php @@ -3,8 +3,8 @@ namespace Icinga\Controllers; -use Icinga\Web\Controller\ActionController; use Icinga\Application\Version; +use Icinga\Web\Controller\ActionController; class AboutController extends ActionController { From 5518f61614ba6e1415fc6ade74bcc9f080a469e0 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:09:58 +0200 Subject: [PATCH 079/280] Namespace the AuthenticationController refs #5786 --- application/controllers/AuthenticationController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/AuthenticationController.php b/application/controllers/AuthenticationController.php index 7ed492b63..1a16408b0 100644 --- a/application/controllers/AuthenticationController.php +++ b/application/controllers/AuthenticationController.php @@ -1,7 +1,7 @@ Date: Thu, 27 Aug 2015 13:10:21 +0200 Subject: [PATCH 080/280] Remove unused alias in the AuthenticationController --- application/controllers/AuthenticationController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/controllers/AuthenticationController.php b/application/controllers/AuthenticationController.php index 1a16408b0..e0dc06505 100644 --- a/application/controllers/AuthenticationController.php +++ b/application/controllers/AuthenticationController.php @@ -6,7 +6,6 @@ namespace Icinga\Controllers; use Icinga\Application\Icinga; use Icinga\Forms\Authentication\LoginForm; use Icinga\Web\Controller; -use Icinga\Web\Cookie; use Icinga\Web\Url; /** From e92414ea6d8dd545f696f89ce5742afb2b9a89b8 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:21:43 +0200 Subject: [PATCH 081/280] Use Request::setBody() for cookies disabled message --- application/controllers/AuthenticationController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/controllers/AuthenticationController.php b/application/controllers/AuthenticationController.php index e0dc06505..4ea5043d0 100644 --- a/application/controllers/AuthenticationController.php +++ b/application/controllers/AuthenticationController.php @@ -38,8 +38,11 @@ class AuthenticationController extends Controller } if (! $requiresSetup) { if (! $this->getRequest()->hasCookieSupport()) { - echo $this->translate("Cookies must be enabled to run this application.\n"); - $this->getResponse()->setHttpResponseCode(403)->sendHeaders(); + $this + ->getResponse() + ->setBody("Cookies must be enabled to run this application.\n") + ->setHttpResponseCode(403) + ->sendResponse(); exit(); } $form->handleRequest(); From e9c73c18106857476aed320d2fd48bc11c82602f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:22:49 +0200 Subject: [PATCH 082/280] Namespace the ConfigController refs #5786 --- application/controllers/ConfigController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index 30f46db50..9cef5f95c 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 13:23:12 +0200 Subject: [PATCH 083/280] Add missing aliases in the ConfigController after namespacing refs #5786 --- application/controllers/ConfigController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index 9cef5f95c..9b2ca2a7a 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -3,6 +3,8 @@ namespace Icinga\Controllers; +use Exception; +use InvalidArgumentException; use Icinga\Application\Config; use Icinga\Application\Icinga; use Icinga\Application\Modules\Module; From 204e6fe94060b4645a4b0d261db9de6d7fcea780 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:23:48 +0200 Subject: [PATCH 084/280] Remove unused alias in the ConfigController --- application/controllers/ConfigController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index 9b2ca2a7a..f099b95db 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -19,7 +19,6 @@ use Icinga\Forms\ConfirmRemovalForm; use Icinga\Security\SecurityException; use Icinga\Web\Controller; use Icinga\Web\Notification; -use Icinga\Web\Url; use Icinga\Web\Widget; /** From 3809ca1b4319eaefe3b402bb89b230748cd380bf Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:25:23 +0200 Subject: [PATCH 085/280] Namespace the ErrorController refs #5786 --- application/controllers/ErrorController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index 1c01b1672..71085c32d 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 13:25:46 +0200 Subject: [PATCH 086/280] Add missing alias in the ErrorController after namespacing refs #5786 --- application/controllers/ErrorController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index 71085c32d..b68f9e220 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -3,6 +3,7 @@ namespace Icinga\Controllers; +use Zend_Controller_Plugin_ErrorHandler; use Icinga\Application\Icinga; use Icinga\Application\Logger; use Icinga\Exception\Http\HttpMethodNotAllowedException; From def92088b29633df5e21f4411fdb034d095e071d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:27:22 +0200 Subject: [PATCH 087/280] Remove the FilterController --- application/controllers/FilterController.php | 92 -------------------- 1 file changed, 92 deletions(-) delete mode 100644 application/controllers/FilterController.php diff --git a/application/controllers/FilterController.php b/application/controllers/FilterController.php deleted file mode 100644 index 461977c7a..000000000 --- a/application/controllers/FilterController.php +++ /dev/null @@ -1,92 +0,0 @@ -registry = new Filter(); - $query = $this->getRequest()->getParam('query', ''); - $target = $this->getRequest()->getParam('filter_domain', ''); - - if ($this->getRequest()->getHeader('accept') == 'application/json') { - $this->getResponse()->setHeader('Content-Type', 'application/json'); - $this->setupQueries( - $target, - $this->getParam('filter_module', '') - ); - $this->_helper->json($this->parse($query, $target)); - } else { - $this->setupQueries( - $target, - $this->getParam('filter_module') - ); - $urlTarget = $this->parse($query, $target); - $this->redirect($urlTarget['urlParam']); - } - - - } - - /** - * Set up the query handler for the given domain and module - * - * @param string $domain The domain to use - * @param string $module The module to use - */ - private function setupQueries($domain, $module = 'default') - { - $class = '\\Icinga\\Module\\' . ucfirst($module) . '\\Filter\\Registry'; - $factory = strtolower($domain) . 'Filter'; - $this->moduleRegistry = $class; - $this->registry->addDomain($class::$factory()); - } - - /** - * Parse the given query text and returns the json as expected by the semantic search box - * - * @param String $text The query to parse - * @return array The result structure to be returned in json format - */ - private function parse($text, $target) - { - try { - - $queryTree = $this->registry->createQueryTreeForFilter($text); - $registry = $this->moduleRegistry; - return array( - 'state' => 'success', - 'proposals' => $this->registry->getProposalsForQuery($text), - 'urlParam' => $registry::getUrlForTarget($target, $queryTree), - 'valid' => count($this->registry->getIgnoredQueryParts()) === 0 - ); - } catch (\Exception $exc) { - Logger::error($exc); - $this->getResponse()->setHttpResponseCode(500); - return array( - 'state' => 'error', - 'message' => 'Search service is currently not available' - ); - } - } -} From cd9c445b8287eb962fa8cf15375bc8bfa4b9b686 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:28:00 +0200 Subject: [PATCH 088/280] Namespace the GroupController refs #5786 --- application/controllers/GroupController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/GroupController.php b/application/controllers/GroupController.php index ed30aac86..f852c11b9 100644 --- a/application/controllers/GroupController.php +++ b/application/controllers/GroupController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 13:29:06 +0200 Subject: [PATCH 089/280] Optimize import in the GroupController --- application/controllers/GroupController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/GroupController.php b/application/controllers/GroupController.php index f852c11b9..5534dc027 100644 --- a/application/controllers/GroupController.php +++ b/application/controllers/GroupController.php @@ -5,8 +5,8 @@ namespace Icinga\Controllers; use Icinga\Application\Logger; use Icinga\Data\DataArray\ArrayDatasource; -use Icinga\Data\Reducible; use Icinga\Data\Filter\Filter; +use Icinga\Data\Reducible; use Icinga\Exception\NotFoundError; use Icinga\Forms\Config\UserGroup\AddMemberForm; use Icinga\Forms\Config\UserGroup\UserGroupForm; From 896a01fdf698d444baffa43dd222adcb0c1b4b11 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:29:36 +0200 Subject: [PATCH 090/280] Add missing alias in the GroupController after namespacing refs #5786 --- application/controllers/GroupController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/GroupController.php b/application/controllers/GroupController.php index 5534dc027..4900ecf82 100644 --- a/application/controllers/GroupController.php +++ b/application/controllers/GroupController.php @@ -3,6 +3,7 @@ namespace Icinga\Controllers; +use Exception; use Icinga\Application\Logger; use Icinga\Data\DataArray\ArrayDatasource; use Icinga\Data\Filter\Filter; From 43e7bf97ce7d2f7db45126a3f2ea920c7ff22f57 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:30:43 +0200 Subject: [PATCH 091/280] Optimize imports in the ConfigController --- application/controllers/ConfigController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index f099b95db..c3fe3921d 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -11,10 +11,10 @@ use Icinga\Application\Modules\Module; use Icinga\Data\ResourceFactory; use Icinga\Exception\ConfigurationError; use Icinga\Exception\NotFoundError; -use Icinga\Forms\Config\UserBackendConfigForm; -use Icinga\Forms\Config\UserBackendReorderForm; use Icinga\Forms\Config\GeneralConfigForm; use Icinga\Forms\Config\ResourceConfigForm; +use Icinga\Forms\Config\UserBackendConfigForm; +use Icinga\Forms\Config\UserBackendReorderForm; use Icinga\Forms\ConfirmRemovalForm; use Icinga\Security\SecurityException; use Icinga\Web\Controller; From 72315100804ddfb60716206a2a2acfc601f3c34b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:31:36 +0200 Subject: [PATCH 092/280] Namespace the IndexController --- application/controllers/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 5ffd1970a..fd84402fa 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -1,7 +1,7 @@ Date: Thu, 27 Aug 2015 13:31:50 +0200 Subject: [PATCH 093/280] Remove unused alias in the IndexController --- application/controllers/IndexController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index fd84402fa..14f8d071e 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -4,7 +4,6 @@ namespace Icinga\Controllers; use Icinga\Web\Controller\ActionController; -use Icinga\Application\Benchmark; use Icinga\Web\Url; /** From af8949dde277c337e99d971b6a58744bed4a9e3c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:32:35 +0200 Subject: [PATCH 094/280] Add TODO in the IndexController: Avoid landing page redirects refs #9656 --- application/controllers/IndexController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php index 14f8d071e..048ea1b4d 100644 --- a/application/controllers/IndexController.php +++ b/application/controllers/IndexController.php @@ -17,6 +17,7 @@ class IndexController extends ActionController public function preDispatch() { if ($this->getRequest()->getActionName() !== 'welcome') { + // @TODO(el): Avoid landing page redirects: https://dev.icinga.org/issues/9656 $this->redirectNow(Url::fromRequest()->setPath('dashboard')); } } From 0e7b6d7f44ec60013993132e4b8ef47e3ab166bb Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:33:17 +0200 Subject: [PATCH 095/280] Optimize imports in the LayoutController --- application/controllers/LayoutController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/LayoutController.php b/application/controllers/LayoutController.php index 8e391da35..a7c23b41d 100644 --- a/application/controllers/LayoutController.php +++ b/application/controllers/LayoutController.php @@ -1,10 +1,10 @@ Date: Thu, 27 Aug 2015 13:33:36 +0200 Subject: [PATCH 096/280] Namespace the LayoutController --- application/controllers/LayoutController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/LayoutController.php b/application/controllers/LayoutController.php index a7c23b41d..335bee8e0 100644 --- a/application/controllers/LayoutController.php +++ b/application/controllers/LayoutController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 13:34:37 +0200 Subject: [PATCH 097/280] Namespace the ListController refs #5786 --- application/controllers/ListController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/ListController.php b/application/controllers/ListController.php index 9a20755c9..b78502b25 100644 --- a/application/controllers/ListController.php +++ b/application/controllers/ListController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 13:35:06 +0200 Subject: [PATCH 098/280] Fix PHPDoc of ListController --- application/controllers/ListController.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/application/controllers/ListController.php b/application/controllers/ListController.php index b78502b25..b39811c0c 100644 --- a/application/controllers/ListController.php +++ b/application/controllers/ListController.php @@ -13,8 +13,6 @@ use Icinga\Web\Widget\Tabextension\DashboardAction; use Icinga\Web\Widget\Tabextension\OutputFormat; /** - * Class ListController - * * Application wide controller for various listing actions */ class ListController extends Controller From 28815a936a03022e663a1c9894bd1b91f36934d5 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:35:32 +0200 Subject: [PATCH 099/280] Optimize imports in the PreferenceController --- application/controllers/PreferenceController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/controllers/PreferenceController.php b/application/controllers/PreferenceController.php index a466ed48f..5f7231a9e 100644 --- a/application/controllers/PreferenceController.php +++ b/application/controllers/PreferenceController.php @@ -1,13 +1,13 @@ Date: Thu, 27 Aug 2015 13:36:33 +0200 Subject: [PATCH 100/280] Namespace the PreferenceController --- application/controllers/PreferenceController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/PreferenceController.php b/application/controllers/PreferenceController.php index 5f7231a9e..311b26d20 100644 --- a/application/controllers/PreferenceController.php +++ b/application/controllers/PreferenceController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 13:38:19 +0200 Subject: [PATCH 101/280] Add PreferenceController renaming TODO refs #10014 --- application/controllers/PreferenceController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/PreferenceController.php b/application/controllers/PreferenceController.php index 311b26d20..6437a7c97 100644 --- a/application/controllers/PreferenceController.php +++ b/application/controllers/PreferenceController.php @@ -13,6 +13,8 @@ use Icinga\Web\Widget\Tab; /** * Application wide preference controller for user preferences + * + * @TODO(el): Rename to PreferencesController: https://dev.icinga.org/issues/10014 */ class PreferenceController extends BasePreferenceController { From 652bdb6e3e069c6d574628238517fe77ea597e08 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:40:06 +0200 Subject: [PATCH 102/280] Add RoleController renaming TODO refs #10015 --- application/controllers/RoleController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index 971a7efc9..c94cbf40f 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -7,6 +7,11 @@ use Icinga\Forms\Security\RoleForm; use Icinga\Web\Controller\AuthBackendController; use Icinga\Web\Notification; +/** + * Manage user permissions and restrictions based on roles + * + * @TODO(el): Rename to RolesController: https://dev.icinga.org/issues/10015 + */ class RoleController extends AuthBackendController { /** From f09c27aa516f9cb44448c6eba780e7093fd87c24 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:40:44 +0200 Subject: [PATCH 103/280] Namespace the RoleController refs #5786 --- application/controllers/RoleController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index c94cbf40f..9485af95e 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 13:44:00 +0200 Subject: [PATCH 104/280] Add missing aliases to the RoleController after namespacing refs #5786 --- application/controllers/RoleController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index 9485af95e..795630280 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -3,6 +3,8 @@ namespace Icinga\Controllers; +use InvalidArgumentException; +use Zend_Controller_Action_Exception; use Icinga\Application\Config; use Icinga\Forms\ConfirmRemovalForm; use Icinga\Forms\Security\RoleForm; From 853d4fd5340e3b47b76539bf9d11314bfc1aca58 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:44:49 +0200 Subject: [PATCH 105/280] Use UrlParams::getRequired() in RoleController::editAction() --- application/controllers/RoleController.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index 795630280..809bc59a3 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -69,13 +69,7 @@ class RoleController extends AuthBackendController public function editAction() { $this->assertPermission('config/authentication/roles/edit'); - $name = $this->_request->getParam('role'); - if (empty($name)) { - throw new Zend_Controller_Action_Exception( - sprintf($this->translate('Required parameter \'%s\' missing'), 'role'), - 400 - ); - } + $name = $this->params->getRequired('role'); $role = new RoleForm(); $role->setTitle(sprintf($this->translate('Update Role %s'), $name)); $role->setSubmitLabel($this->translate('Update Role')); From fd8b5ec510b5832be5d673b202e61af45d532ff5 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:46:28 +0200 Subject: [PATCH 106/280] Use UrlParams::getRequired() in RoleController::removeAction() --- application/controllers/RoleController.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index 809bc59a3..a4c83b113 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -114,13 +114,7 @@ class RoleController extends AuthBackendController public function removeAction() { $this->assertPermission('config/authentication/roles/remove'); - $name = $this->_request->getParam('role'); - if (empty($name)) { - throw new Zend_Controller_Action_Exception( - sprintf($this->translate('Required parameter \'%s\' missing'), 'role'), - 400 - ); - } + $name = $this->params->getRequired('role'); $role = new RoleForm(); try { $role From c5d0094e8effcd3abf8fd3db7d118099108bb93d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:56:24 +0200 Subject: [PATCH 107/280] lib: Add AlreadyExistsException --- library/Icinga/Exception/AlreadyExistsException.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 library/Icinga/Exception/AlreadyExistsException.php diff --git a/library/Icinga/Exception/AlreadyExistsException.php b/library/Icinga/Exception/AlreadyExistsException.php new file mode 100644 index 000000000..ea1a1399a --- /dev/null +++ b/library/Icinga/Exception/AlreadyExistsException.php @@ -0,0 +1,11 @@ + Date: Thu, 27 Aug 2015 13:57:10 +0200 Subject: [PATCH 108/280] Throw NotFoundError instead of InvalidArgumentException in RoleForm::load() --- application/forms/Security/RoleForm.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index dba7ebe9f..8a9ee4187 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -3,6 +3,7 @@ namespace Icinga\Forms\Security; +use Icinga\Exception\NotFoundError; use InvalidArgumentException; use LogicException; use Zend_Form_Element; @@ -170,10 +171,10 @@ class RoleForm extends ConfigForm throw new LogicException(sprintf('Can\'t load role \'%s\'. Config is not set', $name)); } if (! $this->config->hasSection($name)) { - throw new InvalidArgumentException(sprintf( + throw new NotFoundError( $this->translate('Can\'t load role \'%s\'. Role does not exist'), $name - )); + ); } $role = $this->config->getSection($name)->toArray(); $role['permissions'] = ! empty($role['permissions']) From 2e970b2965b776663e35a56f8f5bb940e81f9c7b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:58:07 +0200 Subject: [PATCH 109/280] Fix PHPDoc of RoleForm::load() --- application/forms/Security/RoleForm.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index 8a9ee4187..a77746e68 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -163,6 +163,7 @@ class RoleForm extends ConfigForm * @return $this * * @throws LogicException If the config is not set + * @throws NotFoundError If the given role does not exist * @see ConfigForm::setConfig() For setting the config. */ public function load($name) From 1135643fe10d63a99bcd1e4258b3640653a09d35 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:58:51 +0200 Subject: [PATCH 110/280] Throw AlreadyExistsException instead of InvalidArgumentException in RoleForm::add() --- application/forms/Security/RoleForm.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index a77746e68..e1dbe5480 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -3,6 +3,7 @@ namespace Icinga\Forms\Security; +use Icinga\Exception\AlreadyExistsException; use Icinga\Exception\NotFoundError; use InvalidArgumentException; use LogicException; @@ -203,9 +204,9 @@ class RoleForm extends ConfigForm * * @return $this * - * @throws LogicException If the config is not set - * @throws InvalidArgumentException If the role to add already exists - * @see ConfigForm::setConfig() For setting the config. + * @throws LogicException If the config is not set + * @throws AlreadyExistsException If the role to add already exists + * @see ConfigForm::setConfig() For setting the config. */ public function add($name, array $values) { @@ -213,10 +214,10 @@ class RoleForm extends ConfigForm throw new LogicException(sprintf('Can\'t add role \'%s\'. Config is not set', $name)); } if ($this->config->hasSection($name)) { - throw new InvalidArgumentException(sprintf( + throw new AlreadyExistsException( $this->translate('Can\'t add role \'%s\'. Role already exists'), $name - )); + ); } $this->config->setSection($name, $values); return $this; From 0681cd27828a9afac4550910735e04bd7b1c42c2 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 13:59:34 +0200 Subject: [PATCH 111/280] Throw NotFoundError instead of InvalidArgumentException in RoleForm::remove() --- application/forms/Security/RoleForm.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index e1dbe5480..90570fff3 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -230,9 +230,9 @@ class RoleForm extends ConfigForm * * @return $this * - * @throws LogicException If the config is not set - * @throws InvalidArgumentException If the role does not exist - * @see ConfigForm::setConfig() For setting the config. + * @throws LogicException If the config is not set + * @throws NotFoundError If the role does not exist + * @see ConfigForm::setConfig() For setting the config. */ public function remove($name) { @@ -240,10 +240,10 @@ class RoleForm extends ConfigForm throw new LogicException(sprintf('Can\'t remove role \'%s\'. Config is not set', $name)); } if (! $this->config->hasSection($name)) { - throw new InvalidArgumentException(sprintf( + throw new NotFoundError( $this->translate('Can\'t remove role \'%s\'. Role does not exist'), $name - )); + ); } $this->config->removeSection($name); return $this; From dad9f5ba7cf89602a63a62e8aac1d7118399034f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:00:24 +0200 Subject: [PATCH 112/280] Throw NotFoundError instead of InvalidArgumentException in RoleForm::update() --- application/forms/Security/RoleForm.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index 90570fff3..d558ee0c7 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -258,9 +258,9 @@ class RoleForm extends ConfigForm * * @return $this * - * @throws LogicException If the config is not set - * @throws InvalidArgumentException If the role to update does not exist - * @see ConfigForm::setConfig() For setting the config. + * @throws LogicException If the config is not set + * @throws NotFoundError If the role to update does not exist + * @see ConfigForm::setConfig() For setting the config. */ public function update($name, array $values, $oldName) { @@ -273,10 +273,10 @@ class RoleForm extends ConfigForm $this->add($name, $values); } else { if (! $this->config->hasSection($name)) { - throw new InvalidArgumentException(sprintf( + throw new NotFoundError( $this->translate('Can\'t update role \'%s\'. Role does not exist'), $name - )); + ); } $this->config->setSection($name, $values); } From a134522e9e2a8981a86c5c2d9c4dcd313078bbf5 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:00:56 +0200 Subject: [PATCH 113/280] Fix PHPDoc indents in the RoleForm --- application/forms/Security/RoleForm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index d558ee0c7..70fc04dac 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -199,7 +199,7 @@ class RoleForm extends ConfigForm /** * Add a role * - * @param string $name The name of the role + * @param string $name The name of the role * @param array $values * * @return $this @@ -226,7 +226,7 @@ class RoleForm extends ConfigForm /** * Remove a role * - * @param string $name The name of the role + * @param string $name The name of the role * * @return $this * @@ -252,9 +252,9 @@ class RoleForm extends ConfigForm /** * Update a role * - * @param string $name The possibly new name of the role + * @param string $name The possibly new name of the role * @param array $values - * @param string $oldName The name of the role to update + * @param string $oldName The name of the role to update * * @return $this * From 898883f613de67e84263007279dc33f33ba1b5a3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:01:07 +0200 Subject: [PATCH 114/280] Remove unused alias in the RoleForm --- application/forms/Security/RoleForm.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index 70fc04dac..ee1b04759 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -5,7 +5,6 @@ namespace Icinga\Forms\Security; use Icinga\Exception\AlreadyExistsException; use Icinga\Exception\NotFoundError; -use InvalidArgumentException; use LogicException; use Zend_Form_Element; use Icinga\Application\Icinga; From 8af77e49e969ff3479372af81f63a9b63f00a1ff Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:01:29 +0200 Subject: [PATCH 115/280] Optimize imports in the RoleForm --- application/forms/Security/RoleForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/forms/Security/RoleForm.php b/application/forms/Security/RoleForm.php index ee1b04759..4632dfcb1 100644 --- a/application/forms/Security/RoleForm.php +++ b/application/forms/Security/RoleForm.php @@ -3,11 +3,11 @@ namespace Icinga\Forms\Security; -use Icinga\Exception\AlreadyExistsException; -use Icinga\Exception\NotFoundError; use LogicException; use Zend_Form_Element; use Icinga\Application\Icinga; +use Icinga\Exception\AlreadyExistsException; +use Icinga\Exception\NotFoundError; use Icinga\Forms\ConfigForm; use Icinga\Util\String; From 5c883d902e480d9103ac3b9cd8322d7dcc04efa5 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:03:49 +0200 Subject: [PATCH 116/280] Don't throw exceptions manually in the RoleController --- application/controllers/RoleController.php | 28 +++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index a4c83b113..f7d1383b1 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -3,9 +3,9 @@ namespace Icinga\Controllers; -use InvalidArgumentException; -use Zend_Controller_Action_Exception; use Icinga\Application\Config; +use Icinga\Exception\AlreadyExistsException; +use Icinga\Exception\NotFoundError; use Icinga\Forms\ConfirmRemovalForm; use Icinga\Forms\Security\RoleForm; use Icinga\Web\Controller\AuthBackendController; @@ -40,7 +40,7 @@ class RoleController extends AuthBackendController $values = $role->getValues(); try { $role->add($name, $values); - } catch (InvalidArgumentException $e) { + } catch (AlreadyExistsException $e) { $role->addError($e->getMessage()); return false; } @@ -63,8 +63,6 @@ class RoleController extends AuthBackendController /** * Update a role - * - * @throws Zend_Controller_Action_Exception If the required parameter 'role' is missing or the role does not exist */ public function editAction() { @@ -77,11 +75,8 @@ class RoleController extends AuthBackendController $role ->setIniConfig(Config::app('roles', true)) ->load($name); - } catch (InvalidArgumentException $e) { - throw new Zend_Controller_Action_Exception( - $e->getMessage(), - 400 - ); + } catch (NotFoundError $e) { + $this->httpNotFound($e->getMessage()); } $role ->setOnSuccess(function (RoleForm $role) use ($name) { @@ -90,7 +85,7 @@ class RoleController extends AuthBackendController $values = $role->getValues(); try { $role->update($name, $values, $oldName); - } catch (InvalidArgumentException $e) { + } catch (NotFoundError $e) { $role->addError($e->getMessage()); return false; } @@ -108,8 +103,6 @@ class RoleController extends AuthBackendController /** * Remove a role - * - * @throws Zend_Controller_Action_Exception If the required parameter 'role' is missing or the role does not exist */ public function removeAction() { @@ -120,17 +113,14 @@ class RoleController extends AuthBackendController $role ->setIniConfig(Config::app('roles', true)) ->load($name); - } catch (InvalidArgumentException $e) { - throw new Zend_Controller_Action_Exception( - $e->getMessage(), - 400 - ); + } catch (NotFoundError $e) { + $this->httpNotFound($e->getMessage()); } $confirmation = new ConfirmRemovalForm(array( 'onSuccess' => function (ConfirmRemovalForm $confirmation) use ($name, $role) { try { $role->remove($name); - } catch (InvalidArgumentException $e) { + } catch (NotFoundError $e) { Notification::error($e->getMessage()); return false; } From 3e6a55bc07948c2c2b22a75b7625d8b5bbc88f5f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:05:05 +0200 Subject: [PATCH 117/280] Fix array indent in RoleController::createListTabs() --- application/controllers/RoleController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index f7d1383b1..9bfd2d175 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -149,15 +149,15 @@ class RoleController extends AuthBackendController $tabs->add( 'role/list', array( - 'title' => $this->translate( + 'baseTarget' => '_main', + 'label' => $this->translate('Roles'), + 'title' => $this->translate( 'Configure roles to permit or restrict users and groups accessing Icinga Web 2' ), - 'label' => $this->translate('Roles'), - 'url' => 'role/list', - 'baseTarget' => '_main' + 'url' => 'role/list' + ) ); - return $tabs; } } From fe3c7ec52b1a4bf7ceeb9d6533fea9779e8f1acd Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:05:32 +0200 Subject: [PATCH 118/280] Namespace the SearchController refs #5786 --- application/controllers/SearchController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/SearchController.php b/application/controllers/SearchController.php index aa5cfaf9d..d14654cdb 100644 --- a/application/controllers/SearchController.php +++ b/application/controllers/SearchController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 14:07:00 +0200 Subject: [PATCH 119/280] Let StaticController extend Controller instead of ActionController --- application/controllers/StaticController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 9f461838c..764eaaa0d 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -1,7 +1,7 @@ Date: Thu, 27 Aug 2015 14:07:46 +0200 Subject: [PATCH 120/280] Don't throw exceptions manually in the StaticController --- application/controllers/StaticController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 764eaaa0d..efbf8b6fe 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -5,7 +5,6 @@ use Icinga\Web\Controller; use Icinga\Application\Icinga; use Icinga\Application\Logger; use Icinga\Web\FileCache; -use Zend_Controller_Action_Exception as ActionException; /** * Delivery static content to clients @@ -64,10 +63,7 @@ class StaticController extends Controller $filePath = realpath($basedir . '/public/img/' . $file); if (! $filePath || strpos($filePath, $basedir) !== 0) { - throw new ActionException(sprintf( - '%s does not exist', - $filePath - ), 404); + $this->httpNotFound('%s does not exist', $filePath); } if (preg_match('/\.([a-z]+)$/i', $file, $m)) { $extension = $m[1]; From d638868524e8463b467c98e0cc5fe12a45288a1c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:08:12 +0200 Subject: [PATCH 121/280] Namespace the StaticController refs #5786 --- application/controllers/StaticController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index efbf8b6fe..225ba6388 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 14:09:54 +0200 Subject: [PATCH 122/280] Add PHPDoc to StaticController::stylesheetAction() --- application/controllers/StaticController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 225ba6388..433448ffb 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -152,6 +152,9 @@ class StaticController extends Controller ); } + /** + * Send application's and modules' CSS + */ public function stylesheetAction() { $lessCompiler = new \Icinga\Web\LessCompiler(); From 3dd58a6ca79f79380f97e8a720df914e86a68698 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:10:30 +0200 Subject: [PATCH 123/280] Don't use absolute alias in the StaticController --- application/controllers/StaticController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 433448ffb..969b41e64 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -7,6 +7,7 @@ use Icinga\Web\Controller; use Icinga\Application\Icinga; use Icinga\Application\Logger; use Icinga\Web\FileCache; +use Icinga\Web\LessCompiler; /** * Delivery static content to clients @@ -157,7 +158,7 @@ class StaticController extends Controller */ public function stylesheetAction() { - $lessCompiler = new \Icinga\Web\LessCompiler(); + $lessCompiler = new LessCompiler(); $moduleManager = Icinga::app()->getModuleManager(); $publicDir = realpath(dirname($_SERVER['SCRIPT_FILENAME'])); From 22b628c0841092b5d178ad979f18bb4822e0bd0a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:13:03 +0200 Subject: [PATCH 124/280] Fix StaticController::setCacheHeader() not using $maxAge --- application/controllers/StaticController.php | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 969b41e64..10a1c4094 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -121,7 +121,7 @@ class StaticController extends Controller } $response = $this->getResponse(); $response->setHeader('Content-Type', 'text/javascript'); - $this->setCacheHeader(3600); + $this->setCacheHeader(); $response->setHeader( 'Last-Modified', @@ -135,22 +135,22 @@ class StaticController extends Controller } /** - * Set cache header for this response + * Set cache header for the response * - * @param integer $maxAge The maximum age to set + * @param int $maxAge The maximum age to set */ - private function setCacheHeader($maxAge) + private function setCacheHeader($maxAge = 3600) { - $this->_response->setHeader('Cache-Control', 'max-age=3600', true); - $this->_response->setHeader('Pragma', 'cache', true); - $this->_response->setHeader( - 'Expires', - gmdate( - 'D, d M Y H:i:s', - time()+3600 - ) . ' GMT', - true - ); + $maxAge = (int) $maxAge; + $this + ->getResponse() + ->setHeader('Cache-Control', sprintf('max-age=%d', $maxAge), true) + ->setHeader('Pragma', 'cache', true) + ->setHeader( + 'Expires', + gmdate('D, d M Y H:i:s', time() + $maxAge) . ' GMT', + true + ); } /** From a8e6daa678aef245b4d0e358cfac52fe059f9df6 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:15:32 +0200 Subject: [PATCH 125/280] Fix some coding standard violations in the StaticController --- application/controllers/StaticController.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 10a1c4094..3c4e301e2 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -79,10 +79,7 @@ class StaticController extends Controller header(sprintf('ETag: "%x-%x-%x"', $s['ino'], $s['size'], (float) str_pad($s['mtime'], 16, '0'))); header('Cache-Control: public, max-age=3600'); header('Pragma: cache'); - header('Last-Modified: ' . gmdate( - 'D, d M Y H:i:s', - $s['mtime'] - ) . ' GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $s['mtime']) . ' GMT'); readfile($filePath); } @@ -99,7 +96,7 @@ class StaticController extends Controller $basedir = Icinga::app()->getApplicationDir('../public/js/icinga/components/'); $filePath = $basedir . $file; } else { - if (!Icinga::app()->getModuleManager()->hasEnabled($module)) { + if (! Icinga::app()->getModuleManager()->hasEnabled($module)) { Logger::error( 'Non-existing frontend component "' . $module . '/' . $file . '" was requested. The module "' . $module . '" does not exist or is not active.' @@ -111,7 +108,7 @@ class StaticController extends Controller $filePath = $basedir . '/public/js/' . $file; } - if (!file_exists($filePath)) { + if (! file_exists($filePath)) { Logger::error( 'Non-existing frontend component "' . $module . '/' . $file . '" was requested, which would resolve to the the path: ' . $filePath @@ -125,10 +122,7 @@ class StaticController extends Controller $response->setHeader( 'Last-Modified', - gmdate( - 'D, d M Y H:i:s', - filemtime($filePath) - ) . ' GMT' + gmdate('D, d M Y H:i:s', filemtime($filePath)) . ' GMT' ); readfile($filePath); @@ -174,7 +168,7 @@ class StaticController extends Controller } } - $this->_response->setHeader('Content-Type', 'text/css'); + $this->getResponse()->setHeader('Content-Type', 'text/css'); $this->setCacheHeader(3600); $lessCompiler->printStack(); From 142264b7846a73111fec5cdff03b82f735f7c408 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:16:02 +0200 Subject: [PATCH 126/280] Optimize imports in the UserController --- application/controllers/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php index eaff798df..400de99ce 100644 --- a/application/controllers/UserController.php +++ b/application/controllers/UserController.php @@ -2,11 +2,11 @@ /* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ use Icinga\Application\Logger; +use Icinga\Data\DataArray\ArrayDatasource; use Icinga\Exception\ConfigurationError; use Icinga\Exception\NotFoundError; use Icinga\Forms\Config\User\CreateMembershipForm; use Icinga\Forms\Config\User\UserForm; -use Icinga\Data\DataArray\ArrayDatasource; use Icinga\User; use Icinga\Web\Controller\AuthBackendController; use Icinga\Web\Form; From 2ed3af8f11ae94847513b6c2f543277bd7cb1585 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:16:17 +0200 Subject: [PATCH 127/280] Namespace the UserController refs #5786 --- application/controllers/UserController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php index 400de99ce..eede09ed2 100644 --- a/application/controllers/UserController.php +++ b/application/controllers/UserController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 14:17:19 +0200 Subject: [PATCH 128/280] Add missing alias to the UserController after namespacing refs #5786 --- application/controllers/UserController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php index eede09ed2..aa00fdadb 100644 --- a/application/controllers/UserController.php +++ b/application/controllers/UserController.php @@ -3,6 +3,7 @@ namespace Icinga\Controllers; +use Exception; use Icinga\Application\Logger; use Icinga\Data\DataArray\ArrayDatasource; use Icinga\Exception\ConfigurationError; From f1a8cef5c0b1d448975daeffecca04879519396c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:17:50 +0200 Subject: [PATCH 129/280] Optimize imports in the UsergroupbackendController --- application/controllers/UsergroupbackendController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/controllers/UsergroupbackendController.php b/application/controllers/UsergroupbackendController.php index 4c641586c..eef6afd92 100644 --- a/application/controllers/UsergroupbackendController.php +++ b/application/controllers/UsergroupbackendController.php @@ -3,11 +3,10 @@ use Icinga\Application\Config; use Icinga\Exception\NotFoundError; -use Icinga\Forms\ConfirmRemovalForm; use Icinga\Forms\Config\UserGroup\UserGroupBackendForm; +use Icinga\Forms\ConfirmRemovalForm; use Icinga\Web\Controller; use Icinga\Web\Notification; -use Icinga\Web\Url; /** * Controller to configure user group backends From 7550f48a7154f8c2ed58ed0a7dc63224bba43e72 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:18:17 +0200 Subject: [PATCH 130/280] Namespace the UsergroupbackendController --- application/controllers/UsergroupbackendController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/controllers/UsergroupbackendController.php b/application/controllers/UsergroupbackendController.php index eef6afd92..82f8b4a4f 100644 --- a/application/controllers/UsergroupbackendController.php +++ b/application/controllers/UsergroupbackendController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 14:18:32 +0200 Subject: [PATCH 131/280] Add missing alias to the UsergroupbackendController after namespacing refs #5786 --- application/controllers/UsergroupbackendController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/UsergroupbackendController.php b/application/controllers/UsergroupbackendController.php index 82f8b4a4f..4c00335f7 100644 --- a/application/controllers/UsergroupbackendController.php +++ b/application/controllers/UsergroupbackendController.php @@ -3,6 +3,7 @@ namespace Icinga\Controllers; +use Exception; use Icinga\Application\Config; use Icinga\Exception\NotFoundError; use Icinga\Forms\Config\UserGroup\UserGroupBackendForm; From 1888f1a0a4fdad40dc3a3b10b01cf9cdabe828b3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:20:53 +0200 Subject: [PATCH 132/280] setup: Optimize imports in the IndexController --- modules/setup/application/controllers/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setup/application/controllers/IndexController.php b/modules/setup/application/controllers/IndexController.php index eec43a737..036d3f7d9 100644 --- a/modules/setup/application/controllers/IndexController.php +++ b/modules/setup/application/controllers/IndexController.php @@ -1,8 +1,8 @@ Date: Thu, 27 Aug 2015 14:21:29 +0200 Subject: [PATCH 133/280] setup: Namespace the IndexController refs #5786 --- modules/setup/application/controllers/IndexController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/setup/application/controllers/IndexController.php b/modules/setup/application/controllers/IndexController.php index 036d3f7d9..fabc64dd2 100644 --- a/modules/setup/application/controllers/IndexController.php +++ b/modules/setup/application/controllers/IndexController.php @@ -1,10 +1,12 @@ Date: Thu, 27 Aug 2015 14:22:35 +0200 Subject: [PATCH 134/280] doc: Namespace the StyleController refs #5786 --- modules/doc/application/controllers/StyleController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/doc/application/controllers/StyleController.php b/modules/doc/application/controllers/StyleController.php index 8661d024a..62d373ebd 100644 --- a/modules/doc/application/controllers/StyleController.php +++ b/modules/doc/application/controllers/StyleController.php @@ -1,11 +1,13 @@ Date: Thu, 27 Aug 2015 14:22:59 +0200 Subject: [PATCH 135/280] doc: Optimize imports in the SearchController --- modules/doc/application/controllers/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/doc/application/controllers/SearchController.php b/modules/doc/application/controllers/SearchController.php index 5d71681eb..c71bab799 100644 --- a/modules/doc/application/controllers/SearchController.php +++ b/modules/doc/application/controllers/SearchController.php @@ -5,9 +5,9 @@ use Icinga\Application\Icinga; use Icinga\Module\Doc\DocController; use Icinga\Module\Doc\DocParser; use Icinga\Module\Doc\Exception\DocException; +use Icinga\Module\Doc\Renderer\DocSearchRenderer; use Icinga\Module\Doc\Search\DocSearch; use Icinga\Module\Doc\Search\DocSearchIterator; -use Icinga\Module\Doc\Renderer\DocSearchRenderer; class Doc_SearchController extends DocController { From f0f24bee94b7b48c1091b2371e8289618c40b7ac Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:23:35 +0200 Subject: [PATCH 136/280] doc: Namespace the SearchController refs #5786 --- modules/doc/application/controllers/SearchController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/doc/application/controllers/SearchController.php b/modules/doc/application/controllers/SearchController.php index c71bab799..c36e0e4e8 100644 --- a/modules/doc/application/controllers/SearchController.php +++ b/modules/doc/application/controllers/SearchController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 14:24:04 +0200 Subject: [PATCH 137/280] User: Consider the shortest wildcard permission more important I hope we do not need a fourth attempt to get this right... fixes #10016 --- library/Icinga/User.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/library/Icinga/User.php b/library/Icinga/User.php index 31bb8812e..11d8177d1 100644 --- a/library/Icinga/User.php +++ b/library/Icinga/User.php @@ -452,16 +452,19 @@ class User if (isset($this->permissions['*']) || isset($this->permissions[$requiredPermission])) { return true; } - // If the permission to check contains a wildcard, grant the permission if any permit related to the permission - // matches - $any = strpos($requiredPermission, '*'); + + $requiredWildcard = strpos($requiredPermission, '*'); foreach ($this->permissions as $grantedPermission) { - if ($any !== false) { - $wildcard = $any; + if ($requiredWildcard !== false) { + if (($grantedWildcard = strpos($grantedPermission, '*')) !== false) { + $wildcard = min($requiredWildcard, $grantedWildcard); + } else { + $wildcard = $requiredWildcard; + } } else { - // If the permit contains a wildcard, grant the permission if it's related to the permit $wildcard = strpos($grantedPermission, '*'); } + if ($wildcard !== false) { if (substr($requiredPermission, 0, $wildcard) === substr($grantedPermission, 0, $wildcard)) { return true; @@ -470,6 +473,7 @@ class User return true; } } + return false; } } From ad389d1696a9d21639eb368342e3c16a8a32d797 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:24:25 +0200 Subject: [PATCH 138/280] doc: Fix PHPDoc of SearchController::getWebPath() --- modules/doc/application/controllers/SearchController.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/doc/application/controllers/SearchController.php b/modules/doc/application/controllers/SearchController.php index c36e0e4e8..19624e29b 100644 --- a/modules/doc/application/controllers/SearchController.php +++ b/modules/doc/application/controllers/SearchController.php @@ -79,9 +79,7 @@ class SearchController extends DocController /** * Get the path to Icinga Web 2's documentation * - * @return string - * - * @throws Zend_Controller_Action_Exception If Icinga Web 2's documentation is not available + * @return string */ protected function getWebPath() { From 66e50ad341b918b1c7b18f8924e7976422839794 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:35:26 +0200 Subject: [PATCH 139/280] doc: Remove unused alias in the ModuleController Thanks for not reviewing commits! --- modules/doc/application/controllers/ModuleController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/doc/application/controllers/ModuleController.php b/modules/doc/application/controllers/ModuleController.php index f9e9a2e2a..6faf7cc12 100644 --- a/modules/doc/application/controllers/ModuleController.php +++ b/modules/doc/application/controllers/ModuleController.php @@ -4,7 +4,6 @@ use Icinga\Application\Icinga; use Icinga\Module\Doc\DocController; use Icinga\Module\Doc\Exception\DocException; -use Icinga\File\Ini\Parser; class Doc_ModuleController extends DocController { From 26c403832e2606343d7ae585213c8c06aa71ef51 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:36:26 +0200 Subject: [PATCH 140/280] doc: Namespace the ModuleController refs #5786 --- modules/doc/application/controllers/ModuleController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/doc/application/controllers/ModuleController.php b/modules/doc/application/controllers/ModuleController.php index 6faf7cc12..a5184555c 100644 --- a/modules/doc/application/controllers/ModuleController.php +++ b/modules/doc/application/controllers/ModuleController.php @@ -1,11 +1,13 @@ Date: Thu, 27 Aug 2015 14:37:44 +0200 Subject: [PATCH 141/280] doc: Namespace IndexController refs #5786 --- modules/doc/application/controllers/IndexController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/doc/application/controllers/IndexController.php b/modules/doc/application/controllers/IndexController.php index 67d1aad64..2a23409a4 100644 --- a/modules/doc/application/controllers/IndexController.php +++ b/modules/doc/application/controllers/IndexController.php @@ -1,9 +1,11 @@ Date: Thu, 27 Aug 2015 14:38:36 +0200 Subject: [PATCH 142/280] doc: Add PHPDoc to IndexController --- modules/doc/application/controllers/IndexController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/doc/application/controllers/IndexController.php b/modules/doc/application/controllers/IndexController.php index 2a23409a4..8ec7ddc0a 100644 --- a/modules/doc/application/controllers/IndexController.php +++ b/modules/doc/application/controllers/IndexController.php @@ -5,8 +5,16 @@ namespace Icinga\Module\Doc\Controllers; use Icinga\Module\Doc\DocController; +/** + * Documentation module index + */ class IndexController extends DocController { + /** + * Documentation module landing page + * + * Lists documentation links + */ public function indexAction() { } From 7ea559e6be9936b1313a63a2423c8bce25d6c7c7 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 14:39:15 +0200 Subject: [PATCH 143/280] doc: Namespace the IcingawebController refs #5786 --- modules/doc/application/controllers/IcingawebController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/doc/application/controllers/IcingawebController.php b/modules/doc/application/controllers/IcingawebController.php index 9fccd32fa..7d8f8aad8 100644 --- a/modules/doc/application/controllers/IcingawebController.php +++ b/modules/doc/application/controllers/IcingawebController.php @@ -1,10 +1,12 @@ Date: Thu, 27 Aug 2015 14:40:49 +0200 Subject: [PATCH 144/280] doc: Fix PHPDoc of IcingawebController::getPath() --- modules/doc/application/controllers/IcingawebController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/doc/application/controllers/IcingawebController.php b/modules/doc/application/controllers/IcingawebController.php index 7d8f8aad8..252e0cfe6 100644 --- a/modules/doc/application/controllers/IcingawebController.php +++ b/modules/doc/application/controllers/IcingawebController.php @@ -13,7 +13,7 @@ class IcingawebController extends DocController * * @return string * - * @throws Zend_Controller_Action_Exception If Icinga Web 2's documentation is not available + * @throws \Icinga\Exception\Http\HttpNotFoundException If Icinga Web 2's documentation is not available */ protected function getPath() { From 1eed806edffc7480e730b899637b9930bc9c939f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:18:57 +0200 Subject: [PATCH 145/280] monitoring: Optimize imports in the AlertsummaryController --- .../application/controllers/AlertsummaryController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php index 23cc17442..d981941f0 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -6,8 +6,8 @@ use Icinga\Chart\Unit\LinearUnit; use Icinga\Chart\Unit\StaticAxis; use Icinga\Module\Monitoring\Controller; use Icinga\Module\Monitoring\Web\Widget\SelectBox; -use Icinga\Web\Widget\Tabextension\DashboardAction; use Icinga\Web\Url; +use Icinga\Web\Widget\Tabextension\DashboardAction; class Monitoring_AlertsummaryController extends Controller { From d60fed23f735b4d9ee50975b541f83b8d5a47258 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:19:43 +0200 Subject: [PATCH 146/280] monitoring: Namespace the Alertsummarycontroller refs #5786 --- .../application/controllers/AlertsummaryController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php index d981941f0..34d24ecc9 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 15:34:09 +0200 Subject: [PATCH 147/280] Document that the instances.ini has been renamed refs #9651 --- doc/installation.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/installation.md b/doc/installation.md index 83939b143..f47d9b0b7 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -275,9 +275,11 @@ The first release candidate of Icinga Web 2 introduces the following non-backwar `icingaweb_group_membership` were altered to ensure referential integrity. Please use the upgrade script located in **etc/schema/** to update your database schema + * Users who are using PostgreSQL < v9.1 are required to upgrade their environment to v9.1+ as this is the new minimum required version for utilizing PostgreSQL as database backend + * The restrictions `monitoring/hosts/filter` and `monitoring/services/filter` provided by the monitoring module were merged together. The new restriction is called `monitoring/filter/objects` and supports only a @@ -287,12 +289,16 @@ The first release candidate of Icinga Web 2 introduces the following non-backwar ## Upgrading to Icinga Web 2 2.0.0 * Icinga Web 2 installations from package on RHEL/CentOS 7 now depend on `php-ZendFramework` which is available through -the [EPEL repository](http://fedoraproject.org/wiki/EPEL). Before, Zend was installed as Icinga Web 2 vendor library -through the package `icingaweb2-vendor-zend`. After upgrading, please make sure to remove the package -`icingaweb2-vendor-zend`. + the [EPEL repository](http://fedoraproject.org/wiki/EPEL). Before, Zend was installed as Icinga Web 2 vendor library + through the package `icingaweb2-vendor-zend`. After upgrading, please make sure to remove the package + `icingaweb2-vendor-zend`. * Icinga Web 2 version 2.0.0 requires permissions for accessing modules. Those permissions are automatically generated -for each installed module in the format `module/`. Administrators have to grant the module permissions to -users and/or user groups in the roles configuration for permitting access to specific modules. -In addition, restrictions provided by modules are now configurable for each installed module too. Before, -a module had to be enabled before having the possibility to configure restrictions. + for each installed module in the format `module/`. Administrators have to grant the module permissions to + users and/or user groups in the roles configuration for permitting access to specific modules. + In addition, restrictions provided by modules are now configurable for each installed module too. Before, + a module had to be enabled before having the possibility to configure restrictions. + +* The **instances.ini** configuration file provided by the monitoring module + has been renamed to **commandtransports.ini**. The content and location of + the file remains unchanged. From 65a7365e1e10e466eb8ffa4df2ad6bc57881e058 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:35:27 +0200 Subject: [PATCH 148/280] monitoring: Add missing aliases in the AlertsummaryController after namespacing --- .../application/controllers/AlertsummaryController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php index 34d24ecc9..aa32f470b 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -3,6 +3,11 @@ namespace Icinga\Module\Monitoring\Controllers; +use stdClass; +use DateInterval; +use DatePeriod; +use DateTime; +use Zend_Controller_Action_Exception; use Icinga\Chart\GridChart; use Icinga\Chart\Unit\LinearUnit; use Icinga\Chart\Unit\StaticAxis; From 9d926fb4c688344064577970ab6edabc4ab5f8fd Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:37:01 +0200 Subject: [PATCH 149/280] monitoring: Don't use absolute alias in the AlertsummaryController --- .../controllers/AlertsummaryController.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php index aa32f470b..88100d01b 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -11,6 +11,7 @@ use Zend_Controller_Action_Exception; use Icinga\Chart\GridChart; use Icinga\Chart\Unit\LinearUnit; use Icinga\Chart\Unit\StaticAxis; +use Icinga\Data\Filter\FilterExpression; use Icinga\Module\Monitoring\Controller; use Icinga\Module\Monitoring\Web\Widget\SelectBox; use Icinga\Web\Url; @@ -102,7 +103,7 @@ class AlertsummaryController extends Controller $this->applyRestriction('monitoring/filter/objects', $query); $query->addFilter( - new Icinga\Data\Filter\FilterExpression( + new FilterExpression( 'notification_start_time', '>=', $this->getBeginDate($interval)->format('Y-m-d H:i:s') @@ -151,7 +152,7 @@ class AlertsummaryController extends Controller $this->applyRestriction('monitoring/filter/objects', $query); $query->addFilter( - new Icinga\Data\Filter\FilterExpression( + new FilterExpression( 'notification_start_time', '>=', $beginDate->format('Y-m-d H:i:s') @@ -219,7 +220,7 @@ class AlertsummaryController extends Controller $this->applyRestriction('monitoring/filter/objects', $query); $query->addFilter( - new Icinga\Data\Filter\FilterExpression( + new FilterExpression( 'notification_start_time', '>=', $this->getBeginDate($interval)->format('Y-m-d H:i:s') @@ -270,7 +271,7 @@ class AlertsummaryController extends Controller $this->applyRestriction('monitoring/filter/objects', $query); $query->addFilter( - new Icinga\Data\Filter\FilterExpression( + new FilterExpression( 'timestamp', '>=', $this->getBeginDate($interval)->getTimestamp() @@ -278,7 +279,7 @@ class AlertsummaryController extends Controller ); $query->addFilter( - new Icinga\Data\Filter\FilterExpression( + new FilterExpression( 'state', '>', 0 @@ -336,7 +337,7 @@ class AlertsummaryController extends Controller $this->applyRestriction('monitoring/filter/objects', $query); $query->addFilter( - new Icinga\Data\Filter\FilterExpression( + new FilterExpression( 'notification_start_time', '>=', $this->getBeginDate($interval)->format('Y-m-d H:i:s') From 3af82547ac31649716f692c4519d4f7ae8599855 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:37:42 +0200 Subject: [PATCH 150/280] monitoring: Optimize imports in the ChartController --- .../monitoring/application/controllers/ChartController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/application/controllers/ChartController.php b/modules/monitoring/application/controllers/ChartController.php index d2e9f990c..f871d8c9d 100644 --- a/modules/monitoring/application/controllers/ChartController.php +++ b/modules/monitoring/application/controllers/ChartController.php @@ -1,12 +1,11 @@ Date: Thu, 27 Aug 2015 15:40:01 +0200 Subject: [PATCH 151/280] monitoring: Namespace the ChartController refs #5786 --- .../monitoring/application/controllers/ChartController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/ChartController.php b/modules/monitoring/application/controllers/ChartController.php index f871d8c9d..fab0d0e05 100644 --- a/modules/monitoring/application/controllers/ChartController.php +++ b/modules/monitoring/application/controllers/ChartController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 15:41:15 +0200 Subject: [PATCH 152/280] monitoring: Add fixing TODO to the ChartController refs #10019 --- .../monitoring/application/controllers/ChartController.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/monitoring/application/controllers/ChartController.php b/modules/monitoring/application/controllers/ChartController.php index fab0d0e05..63e8eae29 100644 --- a/modules/monitoring/application/controllers/ChartController.php +++ b/modules/monitoring/application/controllers/ChartController.php @@ -10,9 +10,7 @@ use Icinga\Chart\Unit\StaticAxis; use Icinga\Module\Monitoring\Controller; /** - * Class Monitoring_CommandController - * - * Interface to send commands and display forms + * @TODO(el): Fix and reuse the controller or remove it: https://dev.icinga.org/issues/10019 */ class ChartController extends Controller { From 98851236e84ca4897daf32295ad94b46a7c98781 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:42:27 +0200 Subject: [PATCH 153/280] monitoring: Namespace the CommentController refs #5786 --- .../monitoring/application/controllers/CommentController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/CommentController.php b/modules/monitoring/application/controllers/CommentController.php index 59ad90fc7..3328ffb79 100644 --- a/modules/monitoring/application/controllers/CommentController.php +++ b/modules/monitoring/application/controllers/CommentController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 15:49:59 +0200 Subject: [PATCH 154/280] monitoring: Restore view script for the securityAction --- .../monitoring/application/controllers/ConfigController.php | 1 - .../application/views/scripts/config/security.phtml | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 modules/monitoring/application/views/scripts/config/security.phtml diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index 0b1b2fd86..9a8897028 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -268,6 +268,5 @@ class Monitoring_ConfigController extends Controller $this->view->form = $form; $this->view->tabs = $this->Module()->getConfigTabs()->activate('security'); - $this->render('form'); } } diff --git a/modules/monitoring/application/views/scripts/config/security.phtml b/modules/monitoring/application/views/scripts/config/security.phtml new file mode 100644 index 000000000..3801678b1 --- /dev/null +++ b/modules/monitoring/application/views/scripts/config/security.phtml @@ -0,0 +1,6 @@ +
+ +
+
+ +
\ No newline at end of file From 9cf56410e9369efc3eeafaebe43db15e7457ac61 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:52:13 +0200 Subject: [PATCH 155/280] lib: Fix PHPDoc of Form::populate() --- library/Icinga/Web/Form.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index 8dd3d1b7a..720654c07 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -1012,6 +1012,8 @@ class Form extends Zend_Form * Populate the elements with the given values * * @param array $defaults The values to populate the elements with + * + * @return $this */ public function populate(array $defaults) { From 6ff7882fc03f9e23b559dac209941b0d54cb84bb Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:52:27 +0200 Subject: [PATCH 156/280] monitoring: Reduce complexity of the CommentController --- .../controllers/CommentController.php | 49 ++++++------------- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/modules/monitoring/application/controllers/CommentController.php b/modules/monitoring/application/controllers/CommentController.php index 3328ffb79..1b86ff1c9 100644 --- a/modules/monitoring/application/controllers/CommentController.php +++ b/modules/monitoring/application/controllers/CommentController.php @@ -16,7 +16,7 @@ class CommentController extends Controller /** * The fetched comment * - * @var stdClass + * @var object */ protected $comment; @@ -43,19 +43,18 @@ class CommentController extends Controller ))->where('comment_internal_id', $commentId); $this->applyRestriction('monitoring/filter/objects', $query); - $this->comment = $query->getQuery()->fetchRow(); - if ($this->comment === false) { + if (false === $this->comment = $query->getQuery()->fetchRow()) { $this->httpNotFound($this->translate('Comment not found')); } $this->getTabs()->add( 'comment', array( + 'icon' => 'comment', + 'label' => $this->translate('Comment'), 'title' => $this->translate( 'Display detailed information about a comment.' ), - 'icon' => 'comment', - 'label' => $this->translate('Comment'), 'url' =>'monitoring/comments/show' ) )->activate('comment')->extend(new DashboardAction()); @@ -66,37 +65,19 @@ class CommentController extends Controller */ public function showAction() { - $listCommentsLink = Url::fromPath('monitoring/list/comments') - ->setQueryString('comment_type=(comment|ack)'); - $this->view->comment = $this->comment; + if ($this->hasPermission('monitoring/command/comment/delete')) { - $this->view->delCommentForm = $this->createDelCommentForm(); - $this->view->delCommentForm->populate( - array( - 'redirect' => $listCommentsLink, - 'comment_id' => $this->comment->id, - 'comment_is_service' => isset($this->comment->service_description) - ) - ); + $listUrl = Url::fromPath('monitoring/list/comments')->setQueryString('comment_type=(comment|ack)'); + $form = new DeleteCommentCommandForm(); + $form + ->populate(array( + 'redirect' => $listUrl, + 'comment_id' => $this->comment->id, + 'comment_is_service' => isset($this->comment->service_description) + )) + ->handleRequest(); + $this->view->delCommentForm = $form; } } - - /** - * Create a command form to delete a single comment - * - * @return DeleteCommentsCommandForm - */ - private function createDelCommentForm() - { - $this->assertPermission('monitoring/command/comment/delete'); - - $delCommentForm = new DeleteCommentCommandForm(); - $delCommentForm->setAction( - Url::fromPath('monitoring/comment/show') - ->setParam('comment_id', $this->comment->id) - ); - $delCommentForm->handleRequest(); - return $delCommentForm; - } } From d1f7943ffbff84f4651c04322efd15e58fef36d1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 15:54:12 +0200 Subject: [PATCH 157/280] monitoring: Optimize imports in CommentsController --- .../monitoring/application/controllers/CommentsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/CommentsController.php b/modules/monitoring/application/controllers/CommentsController.php index a86b30310..dda294a18 100644 --- a/modules/monitoring/application/controllers/CommentsController.php +++ b/modules/monitoring/application/controllers/CommentsController.php @@ -1,10 +1,10 @@ Date: Thu, 27 Aug 2015 15:54:44 +0200 Subject: [PATCH 158/280] monitoring: Namespace the CommentsController refs #5786 --- .../monitoring/application/controllers/CommentsController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/CommentsController.php b/modules/monitoring/application/controllers/CommentsController.php index dda294a18..011ccf8df 100644 --- a/modules/monitoring/application/controllers/CommentsController.php +++ b/modules/monitoring/application/controllers/CommentsController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 16:04:24 +0200 Subject: [PATCH 159/280] monitoring: Fix mess in CommentsController and the related view script --- .../controllers/CommentsController.php | 36 ++++++++++--------- .../views/scripts/comments/show.phtml | 19 +++++----- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/modules/monitoring/application/controllers/CommentsController.php b/modules/monitoring/application/controllers/CommentsController.php index 011ccf8df..c47f69b0b 100644 --- a/modules/monitoring/application/controllers/CommentsController.php +++ b/modules/monitoring/application/controllers/CommentsController.php @@ -9,28 +9,33 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentsCommandForm; use Icinga\Web\Url; /** - * Display detailed information about a comment + * Display detailed information about comments */ class CommentsController extends Controller { /** - * The fetched comments + * The comments view * - * @var array + * @var \Icinga\Module\Monitoring\DataView\Comment */ protected $comments; /** - * Fetch all comments matching the current filter and add tabs + * Filter from request * - * @throws Zend_Controller_Action_Exception + * @var Filter + */ + protected $filter; + + /** + * Fetch all comments matching the current filter and add tabs */ public function init() { $this->filter = Filter::fromQueryString(str_replace( 'comment_id', 'comment_internal_id', - (string)$this->params + (string) $this->params )); $query = $this->backend->select()->from('comment', array( 'id' => 'comment_internal_id', @@ -48,19 +53,16 @@ class CommentsController extends Controller ))->addFilter($this->filter); $this->applyRestriction('monitoring/filter/objects', $query); - $this->comments = $query->getQuery()->fetchAll(); - if (false === $this->comments) { - throw new Zend_Controller_Action_Exception($this->translate('Comment not found')); - } + $this->comments = $query; $this->getTabs()->add( 'comments', array( + 'icon' => 'comment', + 'label' => $this->translate('Comments') . sprintf(' (%d)', $query->count()), 'title' => $this->translate( 'Display detailed information about multiple comments.' ), - 'icon' => 'comment', - 'label' => $this->translate('Comments') . sprintf(' (%d)', count($this->comments)), 'url' =>'monitoring/comments/show' ) )->activate('comments'); @@ -73,9 +75,9 @@ class CommentsController extends Controller { $this->view->comments = $this->comments; $this->view->listAllLink = Url::fromPath('monitoring/list/comments') - ->setQueryString($this->filter->toQueryString()); + ->setQueryString($this->filter->toQueryString()); $this->view->removeAllLink = Url::fromPath('monitoring/comments/delete-all') - ->setParams($this->params); + ->setParams($this->params); } /** @@ -91,14 +93,14 @@ class CommentsController extends Controller $delCommentForm->setTitle($this->view->translate('Remove all Comments')); $delCommentForm->addDescription(sprintf( $this->translate('Confirm removal of %d comments.'), - count($this->comments) + $this->comments->count() )); - $delCommentForm->setComments($this->comments) + $delCommentForm->setComments($this->comments->fetchAll()) ->setRedirectUrl($listCommentsLink) ->handleRequest(); $this->view->delCommentForm = $delCommentForm; $this->view->comments = $this->comments; $this->view->listAllLink = Url::fromPath('monitoring/list/comments') - ->setQueryString($this->filter->toQueryString()); + ->setQueryString($this->filter->toQueryString()); } } diff --git a/modules/monitoring/application/views/scripts/comments/show.phtml b/modules/monitoring/application/views/scripts/comments/show.phtml index 4f9c64d47..0ae91f5bf 100644 --- a/modules/monitoring/application/views/scripts/comments/show.phtml +++ b/modules/monitoring/application/views/scripts/comments/show.phtml @@ -1,24 +1,23 @@
- compact): ?> - tabs; ?> - - -
- render('partials/comment/comments-header.phtml'); ?> -
+compact): ?> + tabs ?> + +
+ render('partials/comment/comments-header.phtml') ?> +
-

icon('reschedule') ?> translate('Commands') ?>

+

icon('reschedule') ?>translate('Commands') ?>

qlink( sprintf( $this->translate('Remove %d comments'), - count($comments) + $comments->count() ), $removeAllLink, null, array( - 'icon' => 'trash', + 'icon' => 'trash', 'title' => $this->translate('Remove all selected comments.') ) ) ?> From f1c7f856cda57546a53625a8515006df2f29a891 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 16:04:56 +0200 Subject: [PATCH 160/280] monitoring: Optimize imports in ConfigController --- .../monitoring/application/controllers/ConfigController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index 2622b9c54..b13214ef1 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -4,11 +4,11 @@ use Icinga\Data\ResourceFactory; use Icinga\Exception\ConfigurationError; use Icinga\Forms\ConfirmRemovalForm; -use Icinga\Web\Controller; -use Icinga\Web\Notification; use Icinga\Module\Monitoring\Forms\Config\BackendConfigForm; use Icinga\Module\Monitoring\Forms\Config\InstanceConfigForm; use Icinga\Module\Monitoring\Forms\Config\SecurityConfigForm; +use Icinga\Web\Controller; +use Icinga\Web\Notification; /** * Configuration controller for editing monitoring resources From 15be844d765437e8eb627330a01dbc43cb7901d1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 16:05:57 +0200 Subject: [PATCH 161/280] monitoring: Namespace the ConfigController refs #5786 --- .../monitoring/application/controllers/ConfigController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index b13214ef1..ca1a4b7f8 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 16:06:26 +0200 Subject: [PATCH 162/280] monitoring: Add missing alias in the ConfigController after namespacing --- modules/monitoring/application/controllers/ConfigController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index ca1a4b7f8..d00f271ea 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -3,6 +3,7 @@ namespace Icinga\Module\Monitoring\Controllers; +use Exception; use Icinga\Data\ResourceFactory; use Icinga\Exception\ConfigurationError; use Icinga\Forms\ConfirmRemovalForm; From c3e6e4756044a8a134036495bc57fc678e240d22 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 16:07:03 +0200 Subject: [PATCH 163/280] monitoring: Add missing alias in the ConfigController --- modules/monitoring/application/controllers/ConfigController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index d00f271ea..55094bbba 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -6,6 +6,7 @@ namespace Icinga\Module\Monitoring\Controllers; use Exception; use Icinga\Data\ResourceFactory; use Icinga\Exception\ConfigurationError; +use Icinga\Exception\NotFoundError; use Icinga\Forms\ConfirmRemovalForm; use Icinga\Module\Monitoring\Forms\Config\BackendConfigForm; use Icinga\Module\Monitoring\Forms\Config\InstanceConfigForm; From dce8afd5bd0fe0ce95aa78fe38203c928712eb80 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 16:07:30 +0200 Subject: [PATCH 164/280] monitoring: Optimize imports in the DowntimeController refs #5786 --- .../application/controllers/DowntimeController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/application/controllers/DowntimeController.php b/modules/monitoring/application/controllers/DowntimeController.php index 077f7e264..62e928392 100644 --- a/modules/monitoring/application/controllers/DowntimeController.php +++ b/modules/monitoring/application/controllers/DowntimeController.php @@ -2,10 +2,9 @@ /* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ use Icinga\Module\Monitoring\Controller; -use Icinga\Module\Monitoring\Object\Service; -use Icinga\Module\Monitoring\Object\Host; use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimeCommandForm; -use Icinga\Module\Monitoring\Command\Object\DeleteDowntimeCommand; +use Icinga\Module\Monitoring\Object\Host; +use Icinga\Module\Monitoring\Object\Service; use Icinga\Web\Url; use Icinga\Web\Widget\Tabextension\DashboardAction; From a50d2110be12fc5b9aaba1dc2084ae2e8abee706 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 16:08:09 +0200 Subject: [PATCH 165/280] monitoring: Namespace the DowntimeController refs #5786 --- .../monitoring/application/controllers/DowntimeController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/DowntimeController.php b/modules/monitoring/application/controllers/DowntimeController.php index 62e928392..48706d66f 100644 --- a/modules/monitoring/application/controllers/DowntimeController.php +++ b/modules/monitoring/application/controllers/DowntimeController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 16:19:18 +0200 Subject: [PATCH 166/280] monitoring: Reduce DowntimeController complexity --- .../controllers/DowntimeController.php | 93 ++++++------------- 1 file changed, 26 insertions(+), 67 deletions(-) diff --git a/modules/monitoring/application/controllers/DowntimeController.php b/modules/monitoring/application/controllers/DowntimeController.php index 48706d66f..946b69985 100644 --- a/modules/monitoring/application/controllers/DowntimeController.php +++ b/modules/monitoring/application/controllers/DowntimeController.php @@ -18,17 +18,10 @@ class DowntimeController extends Controller /** * The fetched downtime * - * @var stdClass + * @var object */ protected $downtime; - /** - * If the downtime is a service or not - * - * @var boolean - */ - protected $isService; - /** * Fetch the downtime matching the given id and add tabs */ @@ -59,29 +52,20 @@ class DowntimeController extends Controller ))->where('downtime_internal_id', $downtimeId); $this->applyRestriction('monitoring/filter/objects', $query); - $this->downtime = $query->getQuery()->fetchRow(); - if ($this->downtime === false) { + if (false === $this->downtime = $query->fetchRow()) { $this->httpNotFound($this->translate('Downtime not found')); } - if (isset($this->downtime->service_description)) { - $this->isService = true; - } else { - $this->isService = false; - } + $this->getTabs()->add( + 'downtime', + array( - $this->getTabs() - ->add( - 'downtime', - array( - 'title' => $this->translate( - 'Display detailed information about a downtime.' - ), - 'icon' => 'plug', - 'label' => $this->translate('Downtime'), - 'url' =>'monitoring/downtimes/show' - ) - )->activate('downtime')->extend(new DashboardAction()); + 'icon' => 'plug', + 'label' => $this->translate('Downtime'), + 'title' => $this->translate('Display detailed information about a downtime.'), + 'url' =>'monitoring/downtimes/show' + ) + )->activate('downtime')->extend(new DashboardAction()); } /** @@ -89,52 +73,27 @@ class DowntimeController extends Controller */ public function showAction() { + $isService = isset($this->downtime->service_description); $this->view->downtime = $this->downtime; - $this->view->isService = $this->isService; - $this->view->stateName = isset($this->downtime->service_description) ? - Service::getStateText($this->downtime->service_state) : - Host::getStateText($this->downtime->host_state); + $this->view->isService = $isService; $this->view->listAllLink = Url::fromPath('monitoring/list/downtimes'); - $this->view->showHostLink = Url::fromPath('monitoring/host/show') - ->setParam('host', $this->downtime->host_name); + $this->view->showHostLink = Url::fromPath('monitoring/host/show')->setParam('host', $this->downtime->host_name); $this->view->showServiceLink = Url::fromPath('monitoring/service/show') ->setParam('host', $this->downtime->host_name) ->setParam('service', $this->downtime->service_description); + $this->view->stateName = $isService ? Service::getStateText($this->downtime->service_state) + : Host::getStateText($this->downtime->host_state); + if ($this->hasPermission('monitoring/command/downtime/delete')) { - $this->view->delDowntimeForm = $this->createDelDowntimeForm(); - $this->view->delDowntimeForm->populate( - array( - 'redirect' => Url::fromPath('monitoring/list/downtimes'), - 'downtime_id' => $this->downtime->id, - 'downtime_is_service' => $this->isService - ) - ); + $form = new DeleteDowntimeCommandForm(); + $form + ->populate(array( + 'downtime_id' => $this->downtime->id, + 'downtime_is_service' => $isService, + 'redirect' => Url::fromPath('monitoring/list/downtimes'), + )) + ->handleRequest(); + $this->view->delDowntimeForm = $form; } } - - /** - * Receive DeleteDowntimeCommandForm post from other controller - */ - public function removeAction() - { - $this->assertHttpMethod('POST'); - $this->createDelDowntimeForm(); - } - - /** - * Create a command form to delete a single comment - * - * @return DeleteDowntimeCommandForm - */ - private function createDelDowntimeForm() - { - $this->assertPermission('monitoring/command/downtime/delete'); - $delDowntimeForm = new DeleteDowntimeCommandForm(); - $delDowntimeForm->setAction( - Url::fromPath('monitoring/downtime/show') - ->setParam('downtime_id', $this->downtime->id) - ); - $delDowntimeForm->handleRequest(); - return $delDowntimeForm; - } } From e2a4b51429b051f4f62e0abcf62b638c7bb055f2 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 16:20:28 +0200 Subject: [PATCH 167/280] monitoring: Don't call getQuery() on the comment data view in the CommentController --- .../application/controllers/CommentController.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/monitoring/application/controllers/CommentController.php b/modules/monitoring/application/controllers/CommentController.php index 1b86ff1c9..df170f1fa 100644 --- a/modules/monitoring/application/controllers/CommentController.php +++ b/modules/monitoring/application/controllers/CommentController.php @@ -43,7 +43,7 @@ class CommentController extends Controller ))->where('comment_internal_id', $commentId); $this->applyRestriction('monitoring/filter/objects', $query); - if (false === $this->comment = $query->getQuery()->fetchRow()) { + if (false === $this->comment = $query->fetchRow()) { $this->httpNotFound($this->translate('Comment not found')); } @@ -52,9 +52,7 @@ class CommentController extends Controller array( 'icon' => 'comment', 'label' => $this->translate('Comment'), - 'title' => $this->translate( - 'Display detailed information about a comment.' - ), + 'title' => $this->translate('Display detailed information about a comment.'), 'url' =>'monitoring/comments/show' ) )->activate('comment')->extend(new DashboardAction()); @@ -72,9 +70,9 @@ class CommentController extends Controller $form = new DeleteCommentCommandForm(); $form ->populate(array( - 'redirect' => $listUrl, 'comment_id' => $this->comment->id, - 'comment_is_service' => isset($this->comment->service_description) + 'comment_is_service' => isset($this->comment->service_description), + 'redirect' => $listUrl )) ->handleRequest(); $this->view->delCommentForm = $form; From e9380d2016d4586e3e16bfc68116a93cc269e9df Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 16:21:59 +0200 Subject: [PATCH 168/280] monitoring: Optimize imports in the DowntimesController refs #5786 --- .../application/controllers/DowntimesController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/DowntimesController.php b/modules/monitoring/application/controllers/DowntimesController.php index 35950acfe..dfb117ef8 100644 --- a/modules/monitoring/application/controllers/DowntimesController.php +++ b/modules/monitoring/application/controllers/DowntimesController.php @@ -3,9 +3,9 @@ use Icinga\Data\Filter\Filter; use Icinga\Module\Monitoring\Controller; -use Icinga\Module\Monitoring\Object\Service; -use Icinga\Module\Monitoring\Object\Host; use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimesCommandForm; +use Icinga\Module\Monitoring\Object\Host; +use Icinga\Module\Monitoring\Object\Service; use Icinga\Web\Url; /** From d68edc51490164e32b69a37860c7f57b1cf7112e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 16:23:16 +0200 Subject: [PATCH 169/280] Monitoring: Namespace the DowntimesController refs #5786 --- .../application/controllers/DowntimesController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/DowntimesController.php b/modules/monitoring/application/controllers/DowntimesController.php index dfb117ef8..7fd15fd00 100644 --- a/modules/monitoring/application/controllers/DowntimesController.php +++ b/modules/monitoring/application/controllers/DowntimesController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 16:33:10 +0200 Subject: [PATCH 170/280] TransportConfigForm: Add `instance' form field refs #9651 --- .../forms/Config/TransportConfigForm.php | 13 +++++++++++++ .../application/forms/Setup/TransportPage.php | 1 + 2 files changed, 14 insertions(+) diff --git a/modules/monitoring/application/forms/Config/TransportConfigForm.php b/modules/monitoring/application/forms/Config/TransportConfigForm.php index 6ed55ea2a..de1c23f56 100644 --- a/modules/monitoring/application/forms/Config/TransportConfigForm.php +++ b/modules/monitoring/application/forms/Config/TransportConfigForm.php @@ -163,6 +163,19 @@ class TransportConfigForm extends ConfigForm */ public function createElements(array $formData) { + $this->addElement( + 'text', + 'instance', + array( + 'placeholder' => 'default', + 'label' => $this->translate('Instance Name'), + 'description' => $this->translate( + 'The name of the Icinga instance this transport should transfer commands to. You do not ' + . 'need to adjust this if you\'re not using a different instance name than the default.' + ) + ) + ); + $this->addElement( 'text', 'name', diff --git a/modules/monitoring/application/forms/Setup/TransportPage.php b/modules/monitoring/application/forms/Setup/TransportPage.php index 16a478b5a..df8d7b3bf 100644 --- a/modules/monitoring/application/forms/Setup/TransportPage.php +++ b/modules/monitoring/application/forms/Setup/TransportPage.php @@ -22,6 +22,7 @@ class TransportPage extends Form $transportConfigForm = new TransportConfigForm(); $this->addSubForm($transportConfigForm, 'transport_form'); $transportConfigForm->create($formData); + $transportConfigForm->removeElement('instance'); $transportConfigForm->getElement('name')->setValue('icinga2'); } From 0f2a4ceac328abf506020450858b799ca529405c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:14:48 +0200 Subject: [PATCH 171/280] monitoring: Don't loop downtimes in the DowntimesController --- .../controllers/DowntimesController.php | 50 +++++-------------- 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/modules/monitoring/application/controllers/DowntimesController.php b/modules/monitoring/application/controllers/DowntimesController.php index 7fd15fd00..51c9b79ed 100644 --- a/modules/monitoring/application/controllers/DowntimesController.php +++ b/modules/monitoring/application/controllers/DowntimesController.php @@ -6,24 +6,22 @@ namespace Icinga\Module\Monitoring\Controllers; use Icinga\Data\Filter\Filter; use Icinga\Module\Monitoring\Controller; use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimesCommandForm; -use Icinga\Module\Monitoring\Object\Host; -use Icinga\Module\Monitoring\Object\Service; use Icinga\Web\Url; /** - * Display detailed information about a downtime + * Display detailed information about downtimes */ class DowntimesController extends Controller { /** - * The fetched downtimes + * The downtimes view * - * @var array + * @var \Icinga\Module\Monitoring\DataView\Downtime */ protected $downtimes; /** - * A filter matching all current downtimes + * Filter from request * * @var Filter */ @@ -31,15 +29,13 @@ class DowntimesController extends Controller /** * Fetch all downtimes matching the current filter and add tabs - * - * @throws Zend_Controller_Action_Exception */ public function init() { $this->filter = Filter::fromQueryString(str_replace( 'downtime_id', 'downtime_internal_id', - (string)$this->params + (string) $this->params )); $query = $this->backend->select()->from('downtime', array( 'id' => 'downtime_internal_id', @@ -64,38 +60,17 @@ class DowntimesController extends Controller ))->addFilter($this->filter); $this->applyRestriction('monitoring/filter/objects', $query); - $this->downtimes = $query->getQuery()->fetchAll(); - if (false === $this->downtimes) { - throw new Zend_Controller_Action_Exception( - $this->translate('Downtime not found') - ); - } + $this->downtimes = $query; $this->getTabs()->add( 'downtimes', array( - 'title' => $this->translate( - 'Display detailed information about multiple downtimes.' - ), 'icon' => 'plug', - 'label' => $this->translate('Downtimes') . sprintf(' (%d)', count($this->downtimes)), + 'label' => $this->translate('Downtimes') . sprintf(' (%d)', $query->count()), + 'title' => $this->translate('Display detailed information about multiple downtimes.'), 'url' =>'monitoring/downtimes/show' ) )->activate('downtimes'); - - foreach ($this->downtimes as $downtime) { - if (isset($downtime->service_description)) { - $downtime->isService = true; - } else { - $downtime->isService = false; - } - - if ($downtime->isService) { - $downtime->stateText = Service::getStateText($downtime->service_state); - } else { - $downtime->stateText = Host::getStateText($downtime->host_state); - } - } } /** @@ -105,9 +80,8 @@ class DowntimesController extends Controller { $this->view->downtimes = $this->downtimes; $this->view->listAllLink = Url::fromPath('monitoring/list/downtimes') - ->setQueryString($this->filter->toQueryString()); - $this->view->removeAllLink = Url::fromPath('monitoring/downtimes/delete-all') - ->setParams($this->params); + ->setQueryString($this->filter->toQueryString()); + $this->view->removeAllLink = Url::fromPath('monitoring/downtimes/delete-all')->setParams($this->params); } /** @@ -123,10 +97,10 @@ class DowntimesController extends Controller $delDowntimeForm->setTitle($this->view->translate('Remove all Downtimes')); $delDowntimeForm->addDescription(sprintf( $this->translate('Confirm removal of %d downtimes.'), - count($this->downtimes) + $this->downtimes->count() )); $delDowntimeForm->setRedirectUrl(Url::fromPath('monitoring/list/downtimes')); - $delDowntimeForm->setDowntimes($this->downtimes)->handleRequest(); + $delDowntimeForm->setDowntimes($this->downtimes->fetchAll())->handleRequest(); $this->view->delDowntimeForm = $delDowntimeForm; } } From aceae4cb6ed4ff90eedcd5c89cec2ea01745a478 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:15:28 +0200 Subject: [PATCH 172/280] monitoring: Fix coding style in the downtimes/show view script --- .../views/scripts/downtimes/show.phtml | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/modules/monitoring/application/views/scripts/downtimes/show.phtml b/modules/monitoring/application/views/scripts/downtimes/show.phtml index 5adc984fa..9b4449cb5 100644 --- a/modules/monitoring/application/views/scripts/downtimes/show.phtml +++ b/modules/monitoring/application/views/scripts/downtimes/show.phtml @@ -1,23 +1,19 @@
- - compact): ?> - tabs; ?> - - - render('partials/downtime/downtimes-header.phtml'); ?> -

+compact): ?> + tabs ?> + + render('partials/downtime/downtimes-header.phtml') ?>
+
-

translate('Commands') ?>

+

icon('reschedule') ?>translate('Commands') ?>

qlink( - sprintf( - $this->translate('Remove all %d scheduled downtimes'), - count($downtimes) - ), + sprintf($this->translate('Remove all %d scheduled downtimes'), $downtimes->count()), $removeAllLink, null, array( - 'icon' => 'trash' + 'icon' => 'trash', + 'title' => $this->translate('Remove all selected downtimes') ) ) ?>
From d92f2cca0e081c2d4e8a9dd061fe583f9452ff6a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:15:56 +0200 Subject: [PATCH 173/280] monitoring: Fix coding style in the comments/show view script --- .../application/views/scripts/comments/show.phtml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/views/scripts/comments/show.phtml b/modules/monitoring/application/views/scripts/comments/show.phtml index 0ae91f5bf..d1c8431ee 100644 --- a/modules/monitoring/application/views/scripts/comments/show.phtml +++ b/modules/monitoring/application/views/scripts/comments/show.phtml @@ -2,23 +2,18 @@ compact): ?> tabs ?> -
- render('partials/comment/comments-header.phtml') ?> -
+ render('partials/comment/comments-header.phtml') ?>

icon('reschedule') ?>translate('Commands') ?>

qlink( - sprintf( - $this->translate('Remove %d comments'), - $comments->count() - ), + sprintf($this->translate('Remove %d comments'), $comments->count()), $removeAllLink, null, array( 'icon' => 'trash', - 'title' => $this->translate('Remove all selected comments.') + 'title' => $this->translate('Remove all selected comments') ) ) ?>
From f72c8e30fe9f8e0eb3d15468ece7a47456cd27e8 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:16:25 +0200 Subject: [PATCH 174/280] monitoring: Don't loop more than 5 comments in the comments-header view script What the ... --- .../partials/comment/comments-header.phtml | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/monitoring/application/views/scripts/partials/comment/comments-header.phtml b/modules/monitoring/application/views/scripts/partials/comment/comments-header.phtml index 7e2a5d87c..6d5ba8f88 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comments-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comments-header.phtml @@ -1,32 +1,32 @@ - - 5) { - continue; +
+ + $comment): + if ($i > 5) { + break; } - $this->comment = $comment; ?> - - - + + - + +
- render('partials/comment/comment-description.phtml'); ?> - - render('partials/comment/comment-detail.phtml'); ?> - + partial('partials/comment/comment-description.phtml', array('comment' => $comment)) ?> + + partial('partials/comment/comment-detail.phtml', array('comment' => $comment)) ?> +
- +count() > 5): ?>

- 5): ?> qlink( - sprintf($this->translate('show all %d comments'), $i), + sprintf($this->translate('List all %d comments'), $comments->count()), $listAllLink, null, array( - 'icon' => $i > 5 ? 'down-open' : '', - 'data-base-target' => "_next" + 'data-base-target' => '_next', + 'icon' => 'down-open' ) ) ?> -

+ From 9ffe15162849527240f280db89fc70249f7f983d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:17:11 +0200 Subject: [PATCH 175/280] monitoring: Omit full stop for tooltips in the comment-description view script --- .../partials/comment/comment-description.phtml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml index 87a7308fc..da0ce7886 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-description.phtml @@ -1,27 +1,28 @@ type) { +switch ($comment->type) { case 'flapping': $icon = 'flapping'; $title = $this->translate('Flapping'); - $tooltip = $this->translate('Comment was caused by a flapping host or service.'); + $tooltip = $this->translate('Comment was caused by a flapping host or service'); break; case 'comment': $icon = 'user'; $title = $this->translate('User Comment'); - $tooltip = $this->translate('Comment was created by an user.'); + $tooltip = $this->translate('Comment was created by an user'); break; case 'downtime': $icon = 'plug'; $title = $this->translate('Downtime'); - $tooltip = $this->translate('Comment was caused by a downtime.'); + $tooltip = $this->translate('Comment was caused by a downtime'); break; case 'ack': $icon = 'ok'; $title = $this->translate('Acknowledgement'); - $tooltip = $this->translate('Comment was caused by an acknowledgement.'); + $tooltip = $this->translate('Comment was caused by an acknowledgement'); break; } ?> -escape($title); ?>
+escape($title) ?> +
icon($icon, $tooltip) ?> -timeAgo($comment->timestamp, $this->compact); ?> +timeAgo($comment->timestamp, $this->compact) ?> From 2f47791a70e153d91406fd8b85f0fcf8455bfc2c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:17:34 +0200 Subject: [PATCH 176/280] monitoring: Fix coding style in the comment-detail view script --- .../partials/comment/comment-detail.phtml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml index 8583bfc59..9d5da0648 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -1,17 +1,17 @@ objecttype === 'service'): ?> - icon('service', $this->translate('Service')); ?> + icon('service', $this->translate('Service')) ?> host_display_name, $comment->service_display_name ) ?> - icon('host', $this->translate('Host')); ?> - link()->host($comment->host_name, $comment->host_display_name); ?> + icon('host', $this->translate('Host')) ?> + link()->host($comment->host_name, $comment->host_display_name) ?> -
-icon('comment', $this->translate('Comment')); ?> author) - ? '[' . $this->escape($comment->author) . '] ' - : ''; -?>escape($comment->comment); ?> +icon('comment', $this->translate('Comment')) ?> +author)): ?> + [escape($comment->author) ?>] + +escape($comment->comment) ?> From 568c0f095515d22202cbd1ccc828b7234fa3430c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:17:57 +0200 Subject: [PATCH 177/280] monitoring: Fix mess in the downtimes-header view script --- .../partials/downtime/downtimes-header.phtml | 176 ++++++++++-------- 1 file changed, 96 insertions(+), 80 deletions(-) diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml index 16e0daee7..e80ec72e3 100644 --- a/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml @@ -1,95 +1,111 @@ - + +
- 5) { + downtimes as $i => $downtime): + if ($i > 5) { break; - } ?> - - - + + - +
- start <= time() && ! $downtime->is_in_effect): ?> - translate('Ends'); ?> -
- timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, $this->compact) ?> - - is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?> -
- timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?> - -
- isService): ?> - icon('service', $this->translate('Service')) ?> - link()->service( - $downtime->service_description, - $downtime->service_display_name, - $downtime->host_name, - $downtime->host_display_name - ); ?> - - icon('host', $this->translate('Host')) ?> - link()->host($downtime->host_name, $downtime->host_display_name); ?> - + } + if ($downtime->objecttype === 'service') { + $isService = true; + $stateText = Service::getStateText($downtime->service_state); + } else { + $isService = false; + $stateText = Host::getStateText($downtime->host_state); + } + ?> +
+ start <= time() && ! $downtime->is_in_effect): ?> + translate('Ends') ?> +
+ timeUntil( + $downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, $this->compact + ) ?> + + + is_in_effect ? $this->translate('Expires') : $this->translate('Starts') ?> + +
+ timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?> + +
+ + icon('service', $this->translate('Service')) ?> + link()->service( + $downtime->service_description, + $downtime->service_display_name, + $downtime->host_name, + $downtime->host_display_name + ) ?> + + icon('host', $this->translate('Host')) ?> + link()->host($downtime->host_name, $downtime->host_display_name) ?> +
- is_flexible): ?> - is_in_effect): ?> - isService - ? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.') - : $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'), - $this->formatDate($downtime->start), - $this->formatTime($downtime->start), - $this->formatDuration($downtime->duration), - $this->formatDate($downtime->end), - $this->formatTime($downtime->end) - ); ?> - - isService - ? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.') - : $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'), - $this->formatDateTime($downtime->scheduled_start), - $this->formatDateTime($downtime->scheduled_end), - $this->formatDuration($downtime->duration) - ); ?> - - - is_in_effect): ?> - isService - ? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.') - : $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'), - $this->formatDate($downtime->start), - $this->formatTime($downtime->start), - $this->formatDate($downtime->end), - $this->formatTime($downtime->end) - ); ?> - - isService - ? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.') - : $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'), - $this->formatDate($downtime->scheduled_start), - $this->formatTime($downtime->scheduled_start), - $this->formatDate($downtime->scheduled_end), - $this->formatTime($downtime->scheduled_end) - ); ?> - - + is_flexible): ?> + is_in_effect): ?> + translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.') + : $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'), + $this->formatDate($downtime->start), + $this->formatTime($downtime->start), + $this->formatDuration($downtime->duration), + $this->formatDate($downtime->end), + $this->formatTime($downtime->end) + ) ?> + + translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.') + : $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'), + $this->formatDateTime($downtime->scheduled_start), + $this->formatDateTime($downtime->scheduled_end), + $this->formatDuration($downtime->duration) + ) ?> + + + is_in_effect): ?> + translate('This fixed service downtime was started on %s at %s and expires on %s at %s.') + : $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'), + $this->formatDate($downtime->start), + $this->formatTime($downtime->start), + $this->formatDate($downtime->end), + $this->formatTime($downtime->end) + ) ?> + + translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.') + : $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'), + $this->formatDate($downtime->scheduled_start), + $this->formatTime($downtime->scheduled_start), + $this->formatDate($downtime->scheduled_end), + $this->formatTime($downtime->scheduled_end) + ) ?> + +
- - 5): ?> +count() > 5): ?>

qlink( - sprintf($this->translate('List all %d downtimes'), $i), + sprintf($this->translate('List all %d downtimes'), $downtimes->count()), $listAllLink, null, array( - 'icon' => 'down-open', - 'data-base-target' => "_next" + 'data-base-target' => '_next', + 'icon' => 'down-open' ) ) ?>

From 1f922a7da6fdd85c25904605ed185d41f9972da8 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:18:48 +0200 Subject: [PATCH 178/280] monitoring: Namespace the HostController refs #5786 --- modules/monitoring/application/controllers/HostController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/HostController.php b/modules/monitoring/application/controllers/HostController.php index 1016092cf..a0545ad2c 100644 --- a/modules/monitoring/application/controllers/HostController.php +++ b/modules/monitoring/application/controllers/HostController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 23:21:48 +0200 Subject: [PATCH 179/280] monitoring: Use @inheritdoc for HostController::$commandRedirectUrl --- .../monitoring/application/controllers/HostController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/controllers/HostController.php b/modules/monitoring/application/controllers/HostController.php index a0545ad2c..4a3f77a6a 100644 --- a/modules/monitoring/application/controllers/HostController.php +++ b/modules/monitoring/application/controllers/HostController.php @@ -15,9 +15,9 @@ use Icinga\Web\Hook; class HostController extends MonitoredObjectController { + /** - * (non-PHPDoc) - * @see MonitoredObjectController::$commandRedirectUrl For the property documentation. + * {@inheritdoc} */ protected $commandRedirectUrl = 'monitoring/host/show'; @@ -27,9 +27,7 @@ class HostController extends MonitoredObjectController public function init() { $host = new Host($this->backend, $this->params->getRequired('host')); - $this->applyRestriction('monitoring/filter/objects', $host); - if ($host->fetch() === false) { $this->httpNotFound($this->translate('Host not found')); } From 6931ad94115c5b00996fafcd14b69993edac2df8 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:22:23 +0200 Subject: [PATCH 180/280] monitoring: Optimize imports in the HostsController --- modules/monitoring/application/controllers/HostsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/HostsController.php b/modules/monitoring/application/controllers/HostsController.php index 9d5da9e50..9534b980a 100644 --- a/modules/monitoring/application/controllers/HostsController.php +++ b/modules/monitoring/application/controllers/HostsController.php @@ -5,13 +5,13 @@ use Icinga\Data\Filter\Filter; use Icinga\Data\Filter\FilterEqual; use Icinga\Module\Monitoring\Controller; use Icinga\Module\Monitoring\Forms\Command\Object\AcknowledgeProblemCommandForm; +use Icinga\Module\Monitoring\Forms\Command\Object\AddCommentCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ObjectsCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ProcessCheckResultCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\RemoveAcknowledgementCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ScheduleHostCheckCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ScheduleHostDowntimeCommandForm; -use Icinga\Module\Monitoring\Forms\Command\Object\AddCommentCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\SendCustomNotificationCommandForm; use Icinga\Module\Monitoring\Object\HostList; use Icinga\Web\Url; From 6e2afe5d574bf17f9a9378c6a17e2d25f95defee Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:22:55 +0200 Subject: [PATCH 181/280] monitoring: Namespace the HostsController refs #5786 --- .../monitoring/application/controllers/HostsController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/HostsController.php b/modules/monitoring/application/controllers/HostsController.php index 9534b980a..192923cfe 100644 --- a/modules/monitoring/application/controllers/HostsController.php +++ b/modules/monitoring/application/controllers/HostsController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 23:27:29 +0200 Subject: [PATCH 182/280] monitoring: Remove HostsController::deleteCommentAction() Not used. --- .../application/controllers/HostsController.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/modules/monitoring/application/controllers/HostsController.php b/modules/monitoring/application/controllers/HostsController.php index 192923cfe..036b78c32 100644 --- a/modules/monitoring/application/controllers/HostsController.php +++ b/modules/monitoring/application/controllers/HostsController.php @@ -168,18 +168,6 @@ class HostsController extends Controller $this->handleCommandForm($form); } - /** - * Delete a comment - */ - public function deleteCommentAction() - { - $this->assertPermission('monitoring/command/comment/delete'); - - $form = new DeleteCommentCommandForm(); - $form->setTitle($this->translate('Delete Host Comments')); - $this->handleCommandForm($form); - } - /** * Acknowledge host problems */ From 5ec338877c887880cfd9498618ac0543413985f6 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 27 Aug 2015 23:28:37 +0200 Subject: [PATCH 183/280] monitoring: Optimize impoerts in the ProcessController --- .../monitoring/application/controllers/ProcessController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ProcessController.php b/modules/monitoring/application/controllers/ProcessController.php index 2e52733bd..2746aea12 100644 --- a/modules/monitoring/application/controllers/ProcessController.php +++ b/modules/monitoring/application/controllers/ProcessController.php @@ -1,10 +1,10 @@ Date: Thu, 27 Aug 2015 23:30:32 +0200 Subject: [PATCH 184/280] monitoring: Namespace the ProcessController refs #5786 --- .../monitoring/application/controllers/ProcessController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ProcessController.php b/modules/monitoring/application/controllers/ProcessController.php index 2746aea12..25a52cf33 100644 --- a/modules/monitoring/application/controllers/ProcessController.php +++ b/modules/monitoring/application/controllers/ProcessController.php @@ -1,6 +1,8 @@ Date: Thu, 27 Aug 2015 23:31:12 +0200 Subject: [PATCH 185/280] monitoring: Remove ProcessController::performanceAction() Not used. --- .../controllers/ProcessController.php | 16 --- .../views/scripts/process/performance.phtml | 110 ------------------ 2 files changed, 126 deletions(-) delete mode 100644 modules/monitoring/application/views/scripts/process/performance.phtml diff --git a/modules/monitoring/application/controllers/ProcessController.php b/modules/monitoring/application/controllers/ProcessController.php index 25a52cf33..84a1a15f5 100644 --- a/modules/monitoring/application/controllers/ProcessController.php +++ b/modules/monitoring/application/controllers/ProcessController.php @@ -124,20 +124,4 @@ class ProcessController extends Controller $this->view->form = $form; } } - - /** - * @todo should be dropped later - */ - public function performanceAction() - { - $this->getTabs()->activate('performance'); - $this->setAutorefreshInterval(10); - $this->view->runtimevariables = (object) $this->backend->select() - ->from('runtimevariables', array('varname', 'varvalue')) - ->getQuery()->fetchPairs(); - - $this->view->checkperformance = $this->backend->select() - ->from('runtimesummary') - ->getQuery()->fetchAll(); - } } diff --git a/modules/monitoring/application/views/scripts/process/performance.phtml b/modules/monitoring/application/views/scripts/process/performance.phtml deleted file mode 100644 index 0bff8891f..000000000 --- a/modules/monitoring/application/views/scripts/process/performance.phtml +++ /dev/null @@ -1,110 +0,0 @@ -compact): ?> -
- tabs; ?> -
-runtimeVariables()->create($this->runtimevariables); -$cp = $this->checkPerformance()->create($this->checkperformance); - -?> - -
- -

Object summaries

- - - - - - - - - - - - - - - - - - - - - - - -
 # overall / scheduled
- Hosts - - total_hosts; ?> - / total_scheduled_hosts; ?> -
- Services - - total_services; ?> - / total_scheduled_services; ?> -
- Average services per host - - average_services_per_host); ?> - / average_scheduled_services_per_host); ?> -
- -

Active checks

- - - - - - - - - - - - - - - - - - - - - - - -
 #LatencyExecution time
- Host Checks - host_active_count; ?>host_active_latency_avg); ?>shost_active_execution_avg); ?>s
- Service Checks - service_active_count; ?>service_active_latency_avg); ?>sservice_active_execution_avg); ?>s
- -

Passive checks

- - - - - - - - - - - - - - - - - -
 #
- Host Checks - host_passive_count; ?>
- Service Checks - service_passive_count; ?>
- - -
From 67b22a56d231ab192e54521a37bfe6332b849a00 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:19:43 +0200 Subject: [PATCH 186/280] monitoring: Namespace the ServiceController refs #5786 --- .../monitoring/application/controllers/ServiceController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ServiceController.php b/modules/monitoring/application/controllers/ServiceController.php index cf7c4807c..45e9dde29 100644 --- a/modules/monitoring/application/controllers/ServiceController.php +++ b/modules/monitoring/application/controllers/ServiceController.php @@ -1,6 +1,8 @@ Date: Fri, 28 Aug 2015 09:20:33 +0200 Subject: [PATCH 187/280] monitoring: Use @inheritdoc for ServiceController::$commandRedirectUrl --- .../monitoring/application/controllers/ServiceController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/ServiceController.php b/modules/monitoring/application/controllers/ServiceController.php index 45e9dde29..2c8f1f3f0 100644 --- a/modules/monitoring/application/controllers/ServiceController.php +++ b/modules/monitoring/application/controllers/ServiceController.php @@ -16,8 +16,7 @@ use Icinga\Web\Hook; class ServiceController extends MonitoredObjectController { /** - * (non-PHPDoc) - * @see MonitoredObjectController::$commandRedirectUrl For the property documentation. + * {@inheritdoc} */ protected $commandRedirectUrl = 'monitoring/service/show'; From 48c625d54de885032271a6e986bfe8ef3f0a1eeb Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:21:23 +0200 Subject: [PATCH 188/280] monitoring: Optimize imports in the ServicesController --- .../monitoring/application/controllers/ServicesController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/ServicesController.php b/modules/monitoring/application/controllers/ServicesController.php index d67880565..9055a7dbc 100644 --- a/modules/monitoring/application/controllers/ServicesController.php +++ b/modules/monitoring/application/controllers/ServicesController.php @@ -4,14 +4,14 @@ use Icinga\Data\Filter\Filter; use Icinga\Module\Monitoring\Controller; use Icinga\Module\Monitoring\Forms\Command\Object\AcknowledgeProblemCommandForm; +use Icinga\Module\Monitoring\Forms\Command\Object\AddCommentCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm; +use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ObjectsCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ProcessCheckResultCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\RemoveAcknowledgementCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ScheduleServiceCheckCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ScheduleServiceDowntimeCommandForm; -use Icinga\Module\Monitoring\Forms\Command\Object\AddCommentCommandForm; -use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\SendCustomNotificationCommandForm; use Icinga\Module\Monitoring\Object\ServiceList; use Icinga\Web\Url; From dc5fddcbfe4ba22620d77cb4ce6f3292ebd59af7 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:22:13 +0200 Subject: [PATCH 189/280] monitoring: Namespace the ServicesController refs #5786 --- .../monitoring/application/controllers/ServicesController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ServicesController.php b/modules/monitoring/application/controllers/ServicesController.php index 9055a7dbc..722eabedd 100644 --- a/modules/monitoring/application/controllers/ServicesController.php +++ b/modules/monitoring/application/controllers/ServicesController.php @@ -1,6 +1,8 @@ Date: Fri, 28 Aug 2015 09:23:48 +0200 Subject: [PATCH 190/280] monitoring: Remove ServicesController::deleteCommentAction() Not in use. --- .../controllers/ServicesController.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/modules/monitoring/application/controllers/ServicesController.php b/modules/monitoring/application/controllers/ServicesController.php index 722eabedd..deee364fa 100644 --- a/modules/monitoring/application/controllers/ServicesController.php +++ b/modules/monitoring/application/controllers/ServicesController.php @@ -8,7 +8,6 @@ use Icinga\Module\Monitoring\Controller; use Icinga\Module\Monitoring\Forms\Command\Object\AcknowledgeProblemCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\AddCommentCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm; -use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ObjectsCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ProcessCheckResultCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\RemoveAcknowledgementCommandForm; @@ -182,20 +181,6 @@ class ServicesController extends Controller $this->handleCommandForm($form); } - - /** - * Delete a comment - */ - public function deleteCommentAction() - { - $this->assertPermission('monitoring/command/comment/delete'); - - $form = new DeleteCommentCommandForm(); - $form->setTitle($this->translate('Delete Service Comments')); - $this->handleCommandForm($form); - } - - /** * Acknowledge service problems */ From 54ad809bf1351db536b405246d93f3555d9469e5 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:25:16 +0200 Subject: [PATCH 191/280] monitoring: Optimize imports in the ShowController --- modules/monitoring/application/controllers/ShowController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index cfed8bd0d..f03aa4a39 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -1,9 +1,9 @@ Date: Fri, 28 Aug 2015 09:32:04 +0200 Subject: [PATCH 192/280] monitoring: Namespace the ShowController refs #5786 --- modules/monitoring/application/controllers/ShowController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index f03aa4a39..9afbaf835 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -1,6 +1,8 @@ Date: Fri, 28 Aug 2015 09:32:52 +0200 Subject: [PATCH 193/280] monitoring: Don't throw exception manually in ShowController::contactAction() --- .../application/controllers/ShowController.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index 9afbaf835..ad57b7f9b 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -49,14 +49,7 @@ class ShowController extends Controller public function contactAction() { - $contactName = $this->getParam('contact_name'); - - if (! $contactName) { - throw new Zend_Controller_Action_Exception( - $this->translate('The parameter `contact_name\' is required'), - 404 - ); - } + $contactName = $this->params->getRequired('contact_name'); $query = $this->backend->select()->from('contact', array( 'contact_name', From 411ad407b11598061daf168830a0251d3e1504d4 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:34:23 +0200 Subject: [PATCH 194/280] monitoring: Remove deprecated actions from the ShowController Removed: * show/service * show/host * show/history --- .../controllers/ShowController.php | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index ad57b7f9b..184bb7ee8 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -19,34 +19,6 @@ class ShowController extends Controller */ protected $backend; - /** - * @deprecated - */ - public function serviceAction() - { - $this->redirectNow(Url::fromRequest()->setPath('monitoring/service/show')); - } - - /** - * @deprecated - */ - public function hostAction() - { - $this->redirectNow(Url::fromRequest()->setPath('monitoring/host/show')); - } - - /** - * @deprecated - */ - public function historyAction() - { - if ($this->params->has('service')) { - $this->redirectNow(Url::fromRequest()->setPath('monitoring/service/history')); - } - - $this->redirectNow(Url::fromRequest()->setPath('monitoring/host/history')); - } - public function contactAction() { $contactName = $this->params->getRequired('contact_name'); From cfab9d99ff37798f79079bede824d7d5af6fdaf4 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:35:25 +0200 Subject: [PATCH 195/280] monitoring: Don't use Monitoring\Controller as MonitoringController in the TacticalController --- .../monitoring/application/controllers/TacticalController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/TacticalController.php b/modules/monitoring/application/controllers/TacticalController.php index fce4664f0..357fac3b7 100644 --- a/modules/monitoring/application/controllers/TacticalController.php +++ b/modules/monitoring/application/controllers/TacticalController.php @@ -1,11 +1,11 @@ Date: Fri, 28 Aug 2015 09:36:10 +0200 Subject: [PATCH 196/280] monitoring: Optimize imports in the TacticalController --- .../monitoring/application/controllers/TacticalController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/TacticalController.php b/modules/monitoring/application/controllers/TacticalController.php index 357fac3b7..e63b847e1 100644 --- a/modules/monitoring/application/controllers/TacticalController.php +++ b/modules/monitoring/application/controllers/TacticalController.php @@ -2,8 +2,8 @@ /* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ use Icinga\Module\Monitoring\Controller; -use Icinga\Web\Widget\Tabextension\DashboardAction; use Icinga\Web\Url; +use Icinga\Web\Widget\Tabextension\DashboardAction; class Monitoring_TacticalController extends Controller { From e9f9073d9065bc378697cadebaff2ea7943166b7 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:36:34 +0200 Subject: [PATCH 197/280] monitoring: Namespace the TacticalController refs #5786 --- .../monitoring/application/controllers/TacticalController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/TacticalController.php b/modules/monitoring/application/controllers/TacticalController.php index e63b847e1..40641128b 100644 --- a/modules/monitoring/application/controllers/TacticalController.php +++ b/modules/monitoring/application/controllers/TacticalController.php @@ -1,11 +1,13 @@ Date: Fri, 28 Aug 2015 09:37:18 +0200 Subject: [PATCH 198/280] monitoring: Optimize imports in the TimelineController --- .../monitoring/application/controllers/TimelineController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/TimelineController.php b/modules/monitoring/application/controllers/TimelineController.php index aa1e20b95..ae57b0bfd 100644 --- a/modules/monitoring/application/controllers/TimelineController.php +++ b/modules/monitoring/application/controllers/TimelineController.php @@ -1,12 +1,12 @@ Date: Fri, 28 Aug 2015 09:37:56 +0200 Subject: [PATCH 199/280] monitoring: Namespace the TimelineController refs #5786 --- .../monitoring/application/controllers/TimelineController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/TimelineController.php b/modules/monitoring/application/controllers/TimelineController.php index ae57b0bfd..7cb888568 100644 --- a/modules/monitoring/application/controllers/TimelineController.php +++ b/modules/monitoring/application/controllers/TimelineController.php @@ -1,6 +1,8 @@ Date: Fri, 28 Aug 2015 09:39:12 +0200 Subject: [PATCH 200/280] monitoring: Add missing aliases in the TimelineController after namespacing --- .../monitoring/application/controllers/TimelineController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/monitoring/application/controllers/TimelineController.php b/modules/monitoring/application/controllers/TimelineController.php index 7cb888568..440513e63 100644 --- a/modules/monitoring/application/controllers/TimelineController.php +++ b/modules/monitoring/application/controllers/TimelineController.php @@ -3,6 +3,8 @@ namespace Icinga\Module\Monitoring\Controllers; +use DateInterval; +use DateTime; use Icinga\Module\Monitoring\Controller; use Icinga\Module\Monitoring\Timeline\TimeLine; use Icinga\Module\Monitoring\Timeline\TimeRange; From 610675d3e9446fa9b97dc243635f0e204fc9d171 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:39:48 +0200 Subject: [PATCH 201/280] monitoring: Optimize imports in the ListController refs #5786 --- .../monitoring/application/controllers/ListController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 7fba86647..e8c0bead7 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -1,17 +1,17 @@ Date: Fri, 28 Aug 2015 09:40:28 +0200 Subject: [PATCH 202/280] monitoring: Namespace the ListController refs #5786 --- modules/monitoring/application/controllers/ListController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index e8c0bead7..c8ffe942b 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -1,6 +1,8 @@ Date: Fri, 28 Aug 2015 09:41:13 +0200 Subject: [PATCH 203/280] monitoring: Add missing alias in the ListController after namespacing --- modules/monitoring/application/controllers/ListController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index c8ffe942b..c6d51e7d7 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -3,6 +3,7 @@ namespace Icinga\Module\Monitoring\Controllers; +use Zend_Form; use Icinga\Data\Filter\Filter; use Icinga\Module\Monitoring\Backend; use Icinga\Module\Monitoring\Controller; From bcc02f50ec1f2157716df34a8697db8e827686a2 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 09:42:49 +0200 Subject: [PATCH 204/280] lib: Optimize imports in webrouter --- library/Icinga/Application/webrouter.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/library/Icinga/Application/webrouter.php b/library/Icinga/Application/webrouter.php index 5a7d1c95c..5c8cbb6ea 100644 --- a/library/Icinga/Application/webrouter.php +++ b/library/Icinga/Application/webrouter.php @@ -3,11 +3,9 @@ namespace Icinga\Application; -use Icinga\Application\EmbeddedWeb; -use Icinga\Application\Web; -use Icinga\Web\StyleSheet; -use Icinga\Web\JavaScript; use Icinga\Chart\Inline\PieChart; +use Icinga\Web\JavaScript; +use Icinga\Web\StyleSheet; error_reporting(E_ALL | E_STRICT); From 31903b8da901427b2574c8dc7e0ad511d49ac9e7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 28 Aug 2015 10:28:55 +0200 Subject: [PATCH 205/280] Revert "js: Use the last button instead of the first one for form submits" This reverts commit fedda16bd4cb2a5f6d4ea6de34c9679bcdfad384. fixes #10025 --- public/js/icinga/events.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index 6a2db8dcc..d92b10a37 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -228,11 +228,11 @@ icinga.logger.debug('events/submitForm: Button is event.currentTarget'); } - if ($el && ($el.is('input[type=submit]') || $el.is('button[type=submit]')) && $el.is(':focus')) { + if ($el && ($el.is('input[type=submit]') || $el.is('button[type=submit]'))) { $button = $el; } else { icinga.logger.debug( - 'events/submitForm: Can not determine submit button, using the last one in form' + 'events/submitForm: Can not determine submit button, using the first one in form' ); } } @@ -252,7 +252,7 @@ } if ($button.length === 0) { - $button = $('button[type=submit]', $form).add('input[type=submit]', $form).last(); + $button = $('input[type=submit]', $form).add('button[type=submit]', $form).first(); } if ($button.length) { From 6d77ade6ac71073fb41cc4d9333e7fa9e6af74aa Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 28 Aug 2015 10:49:26 +0200 Subject: [PATCH 206/280] setup: Ensure that the next-button double is always shown fixes #9245 --- .../views/scripts/form/setup-modules.phtml | 6 +----- .../views/scripts/form/setup-requirements.phtml | 14 ++++++++------ .../views/scripts/form/setup-summary.phtml | 8 +++----- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/modules/setup/application/views/scripts/form/setup-modules.phtml b/modules/setup/application/views/scripts/form/setup-modules.phtml index 859acfaa2..108218441 100644 --- a/modules/setup/application/views/scripts/form/setup-modules.phtml +++ b/modules/setup/application/views/scripts/form/setup-modules.phtml @@ -24,9 +24,5 @@ use Icinga\Web\Wizard; getElement($form->getTokenElementName()); ?> getElement($form->getUidElementName()); ?> -
- getElement(Wizard::BTN_PREV); ?> - getElement(Wizard::BTN_NEXT); ?> - getElement(Wizard::PROGRESS_ELEMENT); ?> -
+ getDisplayGroup('buttons'); ?> diff --git a/modules/setup/application/views/scripts/form/setup-requirements.phtml b/modules/setup/application/views/scripts/form/setup-requirements.phtml index 3ddd5b404..4ded84deb 100644 --- a/modules/setup/application/views/scripts/form/setup-requirements.phtml +++ b/modules/setup/application/views/scripts/form/setup-requirements.phtml @@ -2,6 +2,10 @@ use Icinga\Web\Wizard; +if (! $form->getWizard()->getRequirements()->fulfilled()) { + $form->getElement(Wizard::BTN_NEXT)->setAttrib('disabled', 1); +} + ?>

Icinga Web 2

getWizard()->getRequirements(true); ?> @@ -20,14 +24,12 @@ use Icinga\Web\Wizard; getElement($form->getTokenElementName()); ?> getElement($form->getUidElementName()); ?>
- getElement(Wizard::BTN_PREV); ?> getElement(Wizard::BTN_NEXT); - if (! $form->getWizard()->getRequirements()->fulfilled()) { - $btn->setAttrib('disabled', 1); - } - echo $btn; + $double = clone $form->getElement(Wizard::BTN_NEXT); + echo $double->setAttrib('class', 'double'); ?> + getElement(Wizard::BTN_PREV); ?> + getElement(Wizard::BTN_NEXT); ?> getElement(Wizard::PROGRESS_ELEMENT); ?>
translate('You may also need to restart the web-server for the changes to take effect!'); ?> diff --git a/modules/setup/application/views/scripts/form/setup-summary.phtml b/modules/setup/application/views/scripts/form/setup-summary.phtml index 7c91ecd05..cdffb8c15 100644 --- a/modules/setup/application/views/scripts/form/setup-summary.phtml +++ b/modules/setup/application/views/scripts/form/setup-summary.phtml @@ -2,6 +2,8 @@ use Icinga\Web\Wizard; +$form->getElement(Wizard::BTN_NEXT)->setAttrib('class', 'finish'); + ?>

translate( @@ -31,9 +33,5 @@ use Icinga\Web\Wizard; > getElement($form->getTokenElementName()); ?> getElement($form->getUidElementName()); ?> -

- getElement(Wizard::BTN_PREV); ?> - getElement(Wizard::BTN_NEXT)->setAttrib('class', 'finish'); ?> - getElement(Wizard::PROGRESS_ELEMENT); ?> -
+ getDisplayGroup('buttons'); ?> \ No newline at end of file From 68f5e1a3e332684038c138e1eb76227dd66e7b59 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 28 Aug 2015 11:00:03 +0200 Subject: [PATCH 207/280] ResourceConfigForm: Add missing activity indicator --- application/forms/Config/ResourceConfigForm.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/application/forms/Config/ResourceConfigForm.php b/application/forms/Config/ResourceConfigForm.php index db951e67a..4dccabceb 100644 --- a/application/forms/Config/ResourceConfigForm.php +++ b/application/forms/Config/ResourceConfigForm.php @@ -350,8 +350,21 @@ class ResourceConfigForm extends ConfigForm 'decorators' => array('ViewHelper') ) ); + + $this->setAttrib('data-progress-element', 'resource-progress'); + $this->addElement( + 'note', + 'resource-progress', + array( + 'decorators' => array( + 'ViewHelper', + array('Spinner', array('id' => 'resource-progress')) + ) + ) + ); + $this->addDisplayGroup( - array('btn_submit', 'resource_validation'), + array('btn_submit', 'resource_validation', 'resource-progress'), 'submit_validation', array( 'decorators' => array( From c0eb0cbe6ab3950c91000988e9cf3a7c40d757b2 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 13:13:07 +0200 Subject: [PATCH 208/280] modules: Tell the dispatcher that the static controller is to be found in the default module refs #5786 --- library/Icinga/Application/Modules/Module.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 16104c4c7..61256c7d5 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -1055,8 +1055,9 @@ class Module new Zend_Controller_Router_Route( 'js/' . $this->name . '/:file', array( + 'action' => 'javascript', 'controller' => 'static', - 'action' =>'javascript', + 'module' => 'default', 'module_name' => $this->name ) ) @@ -1066,8 +1067,9 @@ class Module new Zend_Controller_Router_Route_Regex( 'img/' . $this->name . '/(.+)', array( - 'controller' => 'static', 'action' => 'img', + 'controller' => 'static', + 'module' => 'default', 'module_name' => $this->name ), array( From e7e1b1a98e9e98dfd6c9f173406c3c3a79d30651 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 13:13:20 +0200 Subject: [PATCH 209/280] Dispatcher: Default to the default module if no module has been given in the request This is most likely the case when custom routes have been added to the router w/o the module parameter being set. refs #5786 --- library/Icinga/Web/Controller/Dispatcher.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Controller/Dispatcher.php b/library/Icinga/Web/Controller/Dispatcher.php index 5941eec77..ff3c98848 100644 --- a/library/Icinga/Web/Controller/Dispatcher.php +++ b/library/Icinga/Web/Controller/Dispatcher.php @@ -44,7 +44,8 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard return; } $controllerName = ucfirst($controllerName) . 'Controller'; - if ($this->_defaultModule === $moduleName = $request->getModuleName()) { + $moduleName = $request->getModuleName(); + if ($moduleName === null || $moduleName === $this->_defaultModule) { $controllerClass = 'Icinga\\' . self::CONTROLLER_NAMESPACE . '\\' . $controllerName; } else { $controllerClass = 'Icinga\\Module\\' . ucfirst($moduleName) . '\\' . self::CONTROLLER_NAMESPACE . '\\' From e5e64ab65419d492c405bc63e9057c1b55ceb8c4 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 28 Aug 2015 13:14:33 +0200 Subject: [PATCH 210/280] Static content: Fix check whether an image exists --- application/controllers/StaticController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index 3c4e301e2..7c2a36737 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -59,13 +59,14 @@ class StaticController extends Controller */ public function imgAction() { + // TODO(el): I think this action only retrieves images from modules $module = $this->_getParam('module_name'); $file = $this->_getParam('file'); $basedir = Icinga::app()->getModuleManager()->getModule($module)->getBaseDir(); $filePath = realpath($basedir . '/public/img/' . $file); - if (! $filePath || strpos($filePath, $basedir) !== 0) { + if ($filePath === false) { $this->httpNotFound('%s does not exist', $filePath); } if (preg_match('/\.([a-z]+)$/i', $file, $m)) { From ded6666897b4f6f33fe3d2ada0815d6de766ebaf Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 28 Aug 2015 15:25:21 +0200 Subject: [PATCH 211/280] wizard: Show a warning if the IDO is used for the internal database resolves #9653 --- .../application/forms/DbResourcePage.php | 65 ++++++++++++------- modules/setup/library/Setup/Utils/DbTool.php | 2 + 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/modules/setup/application/forms/DbResourcePage.php b/modules/setup/application/forms/DbResourcePage.php index 22b0576d6..7389e3d47 100644 --- a/modules/setup/application/forms/DbResourcePage.php +++ b/modules/setup/application/forms/DbResourcePage.php @@ -3,7 +3,7 @@ namespace Icinga\Module\Setup\Forms; -use PDOException; +use Exception; use Icinga\Web\Form; use Icinga\Forms\Config\Resource\DbResourceForm; use Icinga\Module\Setup\Utils\DbTool; @@ -112,7 +112,7 @@ class DbResourcePage extends Form try { $db = new DbTool($this->getValues()); $db->checkConnectivity(); - } catch (PDOException $e) { + } catch (Exception $e) { $this->error(sprintf( $this->translate('Failed to successfully validate the configuration: %s'), $e->getMessage() @@ -120,34 +120,49 @@ class DbResourcePage extends Form return false; } - if ($this->getValue('db') === 'pgsql') { - if (! $db->isConnected()) { - try { - $db->connectToDb(); - } catch (PDOException $e) { - $this->warning($this->translate(sprintf( - 'Unable to check the server\'s version. This is usually not a critical error as there is' - . ' probably only access to the database permitted which does not exist yet. If you are' - . ' absolutely sure you are running PostgreSQL in a version equal to or newer than 9.1,' - . ' you can skip the validation and safely proceed to the next step. The error was: %s', - $e->getMessage() - ))); - return false; - } - } + $state = true; + $connectionError = null; - $version = $db->getServerVersion(); - if (version_compare($version, '9.1', '<')) { - $this->error($this->translate(sprintf( - 'The server\'s version %s is too old. The minimum required version is %s.', - $version, - '9.1' + try { + $db->connectToDb(); + } catch (Exception $e) { + $connectionError = $e; + } + + if ($connectionError === null && array_search('icinga_instances', $db->listTables(), true) !== false) { + $this->warning($this->translate( + 'The database you\'ve configured to use for Icinga Web 2 seems to be the one of Icinga. Please be aware' + . ' that this database configuration is supposed to be used for Icinga Web 2\'s configuration and that' + . ' it is highly recommended to not mix different schemas in the same database. If this is intentional,' + . ' you can skip the validation and ignore this warning. If not, please provide a different database.' + )); + $state = false; + } + + if ($this->getValue('db') === 'pgsql') { + if ($connectionError !== null) { + $this->warning($this->translate(sprintf( + 'Unable to check the server\'s version. This is usually not a critical error as there is' + . ' probably only access to the database permitted which does not exist yet. If you are' + . ' absolutely sure you are running PostgreSQL in a version equal to or newer than 9.1,' + . ' you can skip the validation and safely proceed to the next step. The error was: %s', + $connectionError->getMessage() ))); - return false; + $state = false; + } else { + $version = $db->getServerVersion(); + if (version_compare($version, '9.1', '<')) { + $this->error($this->translate(sprintf( + 'The server\'s version %s is too old. The minimum required version is %s.', + $version, + '9.1' + ))); + $state = false; + } } } - return true; + return $state; } /** diff --git a/modules/setup/library/Setup/Utils/DbTool.php b/modules/setup/library/Setup/Utils/DbTool.php index 03f10ebf4..dd632f352 100644 --- a/modules/setup/library/Setup/Utils/DbTool.php +++ b/modules/setup/library/Setup/Utils/DbTool.php @@ -271,6 +271,8 @@ class DbTool $this->config['db'] ); } + + $this->zendConn->getConnection(); // Force connection attempt } /** From 4e2595c09b9ef550dda0f8c4c25bb031466490ee Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 28 Aug 2015 16:04:57 +0200 Subject: [PATCH 212/280] Fix history breaking on autorefresh --- public/js/icinga/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index fb324cc74..7d67acd95 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -590,7 +590,7 @@ } // Update history when necessary - if (req.addToHistory) { + if (! req.autorefresh && req.addToHistory) { if (req.$target.hasClass('container')) { // We only want to care about top-level containers if (req.$target.parent().closest('.container').length === 0) { From 38ef8c7f11a35b036de038bd43314b9a13d0bd3a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 31 Aug 2015 09:08:31 +0200 Subject: [PATCH 213/280] lib: Fix PHPDoc of Translator::splitLocaleCode() --- library/Icinga/Util/Translator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Util/Translator.php b/library/Icinga/Util/Translator.php index 03fd865cd..78fa675b8 100644 --- a/library/Icinga/Util/Translator.php +++ b/library/Icinga/Util/Translator.php @@ -195,7 +195,7 @@ class Translator * * @param string $locale The locale code to split, or null to split the current locale * - * @return stdClass An object with a 'language' and 'country' attribute + * @return object An object with a 'language' and 'country' attribute */ public static function splitLocaleCode($locale = null) { From fcbd24e28ece81a7dbb5728837ba7a1aec403cad Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 09:21:59 +0200 Subject: [PATCH 214/280] CommandTransport: Add fallback mechanism refs #8981 refs #9651 --- .../Command/Transport/CommandTransport.php | 89 +++++++++++-------- 1 file changed, 54 insertions(+), 35 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php b/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php index 73f66da02..822318e6f 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php @@ -4,15 +4,18 @@ namespace Icinga\Module\Monitoring\Command\Transport; use Icinga\Application\Config; +use Icinga\Application\Logger; use Icinga\Data\ConfigObject; use Icinga\Exception\ConfigurationError; +use Icinga\Module\Monitoring\Command\IcingaCommand; +use Icinga\Module\Monitoring\Exception\CommandTransportException; /** - * Command transport factory + * Command transport * * This class is subject to change as we do not have environments yet (#4471). */ -abstract class CommandTransport +class CommandTransport implements CommandTransportInterface { /** * Transport configuration @@ -24,21 +27,25 @@ abstract class CommandTransport /** * Get transport configuration * - * @return Config - * @throws ConfigurationError + * @return Config + * + * @throws ConfigurationError */ public static function getConfig() { - if (! isset(self::$config)) { - self::$config = Config::module('monitoring', 'commandtransports'); - if (self::$config->isEmpty()) { + if (static::$config === null) { + $config = Config::module('monitoring', 'commandtransports'); + if ($config->isEmpty()) { throw new ConfigurationError( - 'No command transports have been configured in \'%s\'.', - self::$config->getConfigFile() + mt('monitoring', 'No command transports have been configured in "%s".'), + $config->getConfigFile() ); } + + static::$config = $config; } - return self::$config; + + return static::$config; } /** @@ -47,9 +54,10 @@ abstract class CommandTransport * @param ConfigObject $config * * @return LocalCommandFile|RemoteCommandFile + * * @throws ConfigurationError */ - public static function fromConfig(ConfigObject $config) + public static function createTransport(ConfigObject $config) { $config = clone $config; switch (strtolower($config->transport)) { @@ -62,14 +70,18 @@ abstract class CommandTransport break; default: throw new ConfigurationError( - 'Can\'t create command transport \'%s\'. Invalid transport defined in \'%s\'.' - . ' Use one of \'%s\' or \'%s\'.', + mt( + 'monitoring', + 'Cannot create command transport "%s". Invalid transport' + . ' defined in "%s". Use one of "%s" or "%s".' + ), $config->transport, - self::$config->getConfigFile(), + static::getConfig()->getConfigFile(), LocalCommandFile::TRANSPORT, RemoteCommandFile::TRANSPORT ); } + unset($config->transport); foreach ($config as $key => $value) { $method = 'set' . ucfirst($key); @@ -79,37 +91,44 @@ abstract class CommandTransport // when being about to send a command continue; } + $transport->$method($value); } + return $transport; } /** - * Create a transport by name + * Send the given command over an appropriate Icinga command transport * - * @param string $name + * This will try one configured transport after another until the command has been successfully sent. * - * @return LocalCommandFile|RemoteCommandFile - * @throws ConfigurationError + * @param IcingaCommand $command The command to send + * @param int|null $now Timestamp of the command or null for now + * + * @throws CommandTransportException If sending the Icinga command failed */ - public static function create($name) + public function send(IcingaCommand $command, $now = null) { - $config = self::getConfig()->getSection($name); - if ($config->isEmpty()) { - throw new ConfigurationError(); - } - return self::fromConfig($config); - } + foreach (static::getConfig() as $transportConfig) { + $transport = static::createTransport($transportConfig); - /** - * Create a transport by the first section of the configuration - * - * @return LocalCommandFile|RemoteCommandFile - */ - public static function first() - { - $config = self::getConfig(); - $config->rewind(); - return self::fromConfig($config->current()); + try { + $transport->send($command, $now); + } catch (CommandTransportException $e) { + Logger::error($e); + continue; // Try the next transport + } + + return; // The command was successfully sent + } + + throw new CommandTransportException( + mt( + 'monitoring', + 'Failed to send external Icinga command. None of the configured transports' + . ' was able to transfer the command. Please see the log for more details.' + ) + ); } } From e04c19a819496223c3a21bb110fac9aacd19833c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 09:28:42 +0200 Subject: [PATCH 215/280] CommandForm: Use the CommandTransport class directly Provides a fallback mechanism now and will check the instance's name soon. refs #8981 refs #9651 --- .../application/forms/Command/CommandForm.php | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/forms/Command/CommandForm.php b/modules/monitoring/application/forms/Command/CommandForm.php index 162e4370c..19aead6ec 100644 --- a/modules/monitoring/application/forms/Command/CommandForm.php +++ b/modules/monitoring/application/forms/Command/CommandForm.php @@ -3,10 +3,12 @@ namespace Icinga\Module\Monitoring\Forms\Command; -use Icinga\Module\Monitoring\Backend\MonitoringBackend; -use Icinga\Module\Monitoring\Command\Transport\CommandTransport; +use Icinga\Exception\ConfigurationError; use Icinga\Web\Form; use Icinga\Web\Request; +use Icinga\Module\Monitoring\Backend\MonitoringBackend; +use Icinga\Module\Monitoring\Command\Transport\CommandTransport; +use Icinga\Module\Monitoring\Command\Transport\CommandTransportInterface; /** * Base class for command forms @@ -46,18 +48,28 @@ abstract class CommandForm extends Form /** * Get the transport used to send commands * - * @param Request $request + * @param Request $request * - * @return \Icinga\Module\Monitoring\Command\Transport\CommandTransportInterface + * @return CommandTransportInterface + * + * @throws ConfigurationError */ public function getTransport(Request $request) { - $transportName = $request->getParam('transport'); - if ($transportName !== null) { - $transport = CommandTransport::create($transportName); + if (($transportName = $request->getParam('transport')) !== null) { + $config = CommandTransport::getConfig(); + if ($config->hasSection($transportName)) { + $transport = CommandTransport::createTransport($config->getSection($transportName)); + } else { + throw new ConfigurationError(sprintf( + mt('monitoring', 'Command transport "%s" not found.'), + $transportName + )); + } } else { - $transport = CommandTransport::first(); + $transport = new CommandTransport(); } + return $transport; } } From 4fb6856cafbcdfb4bb27e765e5b0bcf829c3f20b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 31 Aug 2015 10:19:30 +0200 Subject: [PATCH 216/280] Fix exception when navigating to the preferences after namespacing all controllers --- .../Web/Controller/ControllerTabCollector.php | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/library/Icinga/Web/Controller/ControllerTabCollector.php b/library/Icinga/Web/Controller/ControllerTabCollector.php index 6bcef868a..85718f6b6 100644 --- a/library/Icinga/Web/Controller/ControllerTabCollector.php +++ b/library/Icinga/Web/Controller/ControllerTabCollector.php @@ -8,26 +8,24 @@ use Icinga\Application\Icinga; use Icinga\Web\Widget\Tabs; /** - * Static helper class that collects tabs provided by the 'createProvidedTabs' method - * of controllers. + * Static helper class that collects tabs provided by the 'createProvidedTabs' method of controllers */ class ControllerTabCollector { /** - * Scan all controllers with the provided name - * in the application and (loaded) module folders and collects their provided tabs + * Scan all controllers with given name in the application and (loaded) module folders and collects their provided + * tabs * - * @param string $controller The name of the controllers to use for tab collection + * @param string $controllerName The name of the controllers to use for tab collection * - * @return Tabs A @see Tabs instance containing the application tabs first - * followed by the tabs provided from the modules + * @return Tabs A {@link Tabs} instance containing the application tabs first followed by the + * tabs provided from the modules */ - public static function collectControllerTabs($controller) + public static function collectControllerTabs($controllerName) { - require_once(Icinga::app()->getApplicationDir('/controllers/'.$controller.'.php')); - + $controller = '\Icinga\\' . Dispatcher::CONTROLLER_NAMESPACE . '\\' . $controllerName; $applicationTabs = $controller::createProvidedTabs(); - $moduleTabs = self::collectModuleTabs($controller); + $moduleTabs = self::collectModuleTabs($controllerName); $tabs = new Tabs(); foreach ($applicationTabs as $name => $tab) { @@ -35,7 +33,7 @@ class ControllerTabCollector } foreach ($moduleTabs as $name => $tab) { - // don't overwrite application tabs if the module wants to + // Don't overwrite application tabs if the module wants to if ($tabs->has($name)) { continue; } @@ -66,29 +64,30 @@ class ControllerTabCollector /** * Collects the tabs from the createProvidedTabs() method in the configuration controller * - * If the module doesn't have the given controller or createProvidedTabs method in the controller - * an empty array will be returned + * If the module doesn't have the given controller or createProvidedTabs method in the controller an empty array + * will be returned * - * @param string $controller The name of the controller that provides tabs via createProvidedTabs - * @param Module $module The module instance that provides the controller + * @param string $controllerName The name of the controller that provides tabs via createProvidedTabs + * @param Module $module The module instance that provides the controller * - * @return array + * @return array */ - private static function createModuleConfigurationTabs($controller, Module $module) + private static function createModuleConfigurationTabs($controllerName, Module $module) { + // TODO(el): Only works for controllers w/o namepsace: https://dev.icinga.org/issues/4149 $controllerDir = $module->getControllerDir(); $name = $module->getName(); - $controllerDir = $controllerDir . '/' . $controller . '.php'; - $controllerName = ucfirst($name) . '_' . $controller; + $controllerDir = $controllerDir . '/' . $controllerName . '.php'; + $controllerName = ucfirst($name) . '_' . $controllerName; if (is_readable($controllerDir)) { require_once(realpath($controllerDir)); - if (!method_exists($controllerName, "createProvidedTabs")) { + if (! method_exists($controllerName, 'createProvidedTabs')) { return array(); } $tab = $controllerName::createProvidedTabs(); - if (!is_array($tab)) { + if (! is_array($tab)) { $tab = array($name => $tab); } return $tab; From 6f6e991fd01b02785defd3aca6fb318e6594d0ea Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 11:04:34 +0200 Subject: [PATCH 217/280] monitoring: Use the module's base controller in the ConfigController refs #9651 --- modules/monitoring/application/controllers/ConfigController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index 9a8897028..eebc6cfe0 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -4,8 +4,8 @@ use Icinga\Data\ResourceFactory; use Icinga\Exception\ConfigurationError; use Icinga\Forms\ConfirmRemovalForm; -use Icinga\Web\Controller; use Icinga\Web\Notification; +use Icinga\Module\Monitoring\Controller; use Icinga\Module\Monitoring\Forms\Config\BackendConfigForm; use Icinga\Module\Monitoring\Forms\Config\SecurityConfigForm; use Icinga\Module\Monitoring\Forms\Config\TransportConfigForm; From ff54284401f6d8162d5c0ddb67311dfc2b3990d6 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 12:17:57 +0200 Subject: [PATCH 218/280] TransportConfigForm: Use a select input for setting the instance refs #9651 --- .../controllers/ConfigController.php | 2 + .../forms/Config/TransportConfigForm.php | 55 +++++++++++++++---- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index eebc6cfe0..629fff640 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -195,6 +195,7 @@ class Monitoring_ConfigController extends Controller $form->setRedirectUrl('monitoring/config'); $form->setTitle(sprintf($this->translate('Edit Command Transport %s'), $transportName)); $form->setIniConfig($this->Config('commandtransports')); + $form->setInstanceNames($this->backend->select()->from('instance', array('instance_name'))->fetchColumn()); $form->setOnSuccess(function (TransportConfigForm $form) use ($transportName) { try { $form->edit($transportName, array_map( @@ -236,6 +237,7 @@ class Monitoring_ConfigController extends Controller $form->setRedirectUrl('monitoring/config'); $form->setTitle($this->translate('Create New Command Transport')); $form->setIniConfig($this->Config('commandtransports')); + $form->setInstanceNames($this->backend->select()->from('instance', array('instance_name'))->fetchColumn()); $form->setOnSuccess(function (TransportConfigForm $form) { try { $form->add(array_filter($form->getValues())); diff --git a/modules/monitoring/application/forms/Config/TransportConfigForm.php b/modules/monitoring/application/forms/Config/TransportConfigForm.php index de1c23f56..dc679c5da 100644 --- a/modules/monitoring/application/forms/Config/TransportConfigForm.php +++ b/modules/monitoring/application/forms/Config/TransportConfigForm.php @@ -24,6 +24,13 @@ class TransportConfigForm extends ConfigForm */ protected $transportToLoad; + /** + * The names of all available Icinga instances + * + * @var array + */ + protected $instanceNames; + /** * Initialize this form */ @@ -33,6 +40,29 @@ class TransportConfigForm extends ConfigForm $this->setSubmitLabel($this->translate('Save Changes')); } + /** + * Set the names of all available Icinga instances + * + * @param array $names + * + * @return $this + */ + public function setInstanceNames(array $names) + { + $this->instanceNames = $names; + return $this; + } + + /** + * Return the names of all available Icinga instances + * + * @return array + */ + public function getInstanceNames() + { + return $this->instanceNames ?: array(); + } + /** * Return a form object for the given transport type * @@ -163,18 +193,21 @@ class TransportConfigForm extends ConfigForm */ public function createElements(array $formData) { - $this->addElement( - 'text', - 'instance', - array( - 'placeholder' => 'default', - 'label' => $this->translate('Instance Name'), - 'description' => $this->translate( - 'The name of the Icinga instance this transport should transfer commands to. You do not ' - . 'need to adjust this if you\'re not using a different instance name than the default.' + $instanceNames = $this->getInstanceNames(); + if (count($instanceNames) > 1) { + $options = array('none' => $this->translate('None', 'command transport instance association')); + $this->addElement( + 'select', + 'instance', + array( + 'label' => $this->translate('Instance Link'), + 'description' => $this->translate( + 'The name of the Icinga instance this transport should exclusively transfer commands to.' + ), + 'multiOptions' => array_merge($options, array_combine($instanceNames, $instanceNames)) ) - ) - ); + ); + } $this->addElement( 'text', From 04ef3f1244a65c72fa99142a3d2b4757d43c817c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 12:18:25 +0200 Subject: [PATCH 219/280] LocalCommandFile: Accept option `instance' refs #9651 --- .../Command/Transport/LocalCommandFile.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php b/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php index 00756da9d..b2f21a05e 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php @@ -22,6 +22,13 @@ class LocalCommandFile implements CommandTransportInterface */ const TRANSPORT = 'local'; + /** + * The name of the Icinga instance this transport will transfer commands to + * + * @var string + */ + protected $instanceName; + /** * Path to the icinga command file * @@ -51,6 +58,29 @@ class LocalCommandFile implements CommandTransportInterface $this->renderer = new IcingaCommandFileCommandRenderer(); } + /** + * Set the name of the Icinga instance this transport will transfer commands to + * + * @param string $name + * + * @return $this + */ + public function setInstance($name) + { + $this->instanceName = $name; + return $this; + } + + /** + * Return the name of the Icinga instance this transport will transfer commands to + * + * @return string + */ + public function getInstance() + { + return $this->instanceName; + } + /** * Set the path to the local Icinga command file * From 1d6d4f0b10889b6cfc4f1bfc7e0011e2fce24688 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 12:19:00 +0200 Subject: [PATCH 220/280] RemoteCommandFile: Accept option `instance' refs #9651 --- .../Command/Transport/RemoteCommandFile.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php b/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php index 383970b76..a0f597072 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php @@ -22,6 +22,13 @@ class RemoteCommandFile implements CommandTransportInterface */ const TRANSPORT = 'remote'; + /** + * The name of the Icinga instance this transport will transfer commands to + * + * @var string + */ + protected $instanceName; + /** * Remote host * @@ -74,6 +81,29 @@ class RemoteCommandFile implements CommandTransportInterface $this->renderer = new IcingaCommandFileCommandRenderer(); } + /** + * Set the name of the Icinga instance this transport will transfer commands to + * + * @param string $name + * + * @return $this + */ + public function setInstance($name) + { + $this->instanceName = $name; + return $this; + } + + /** + * Return the name of the Icinga instance this transport will transfer commands to + * + * @return string + */ + public function getInstance() + { + return $this->instanceName; + } + /** * Set the remote host * From b7cdfcfae01f0b397ba1afc6587c436a07f3e90e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 12:19:42 +0200 Subject: [PATCH 221/280] CommandTransport: Respect instance association refs #9651 --- .../Command/Transport/CommandTransport.php | 55 ++++++++++++++++--- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php b/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php index 822318e6f..bb6709ea7 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php @@ -8,6 +8,7 @@ use Icinga\Application\Logger; use Icinga\Data\ConfigObject; use Icinga\Exception\ConfigurationError; use Icinga\Module\Monitoring\Command\IcingaCommand; +use Icinga\Module\Monitoring\Command\Object\ObjectCommand; use Icinga\Module\Monitoring\Exception\CommandTransportException; /** @@ -110,25 +111,61 @@ class CommandTransport implements CommandTransportInterface */ public function send(IcingaCommand $command, $now = null) { + $tries = 0; foreach (static::getConfig() as $transportConfig) { $transport = static::createTransport($transportConfig); - try { - $transport->send($command, $now); - } catch (CommandTransportException $e) { - Logger::error($e); - continue; // Try the next transport - } + if ($this->transferPossible($command, $transport)) { + try { + $transport->send($command, $now); + } catch (CommandTransportException $e) { + Logger::error($e); + $tries += 1; + continue; // Try the next transport + } - return; // The command was successfully sent + return; // The command was successfully sent + } + } + + if ($tries > 0) { + throw new CommandTransportException( + mt( + 'monitoring', + 'Failed to send external Icinga command. None of the configured transports' + . ' was able to transfer the command. Please see the log for more details.' + ) + ); } throw new CommandTransportException( mt( 'monitoring', - 'Failed to send external Icinga command. None of the configured transports' - . ' was able to transfer the command. Please see the log for more details.' + 'Failed to send external Icinga command. No transport has been configured' + . ' for this instance. Please contact your Icinga Web administrator.' ) ); } + + /** + * Return whether it is possible to send the given command using the given transport + * + * @param IcingaCommand $command + * @param CommandTransportInterface $transport + * + * @return bool + */ + protected function transferPossible($command, $transport) + { + if (! method_exists($transport, 'getInstance') || !$command instanceof ObjectCommand) { + return true; + } + + $transportInstance = $transport->getInstance(); + if (! $transportInstance || $transportInstance === 'none') { + return true; + } + + return strtolower($transportInstance) === strtolower($command->getObject()->instance_name); + } } From 5aee5836bb120d78bfd646521a2e900d4bca17ba Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 12:57:07 +0200 Subject: [PATCH 222/280] commandtransports.md: Document how instance linkage works refs #9651 --- modules/monitoring/doc/commandtransports.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/doc/commandtransports.md b/modules/monitoring/doc/commandtransports.md index 7e4ee058d..db594653c 100644 --- a/modules/monitoring/doc/commandtransports.md +++ b/modules/monitoring/doc/commandtransports.md @@ -82,9 +82,13 @@ instance you want to assign to the transport: ```` [icinga1] ... -instance = icinga1 ; Optional. The default is "default" +instance = icinga1 [icinga2] ... -instance = icinga2 ; Optional. The default is "default" +instance = icinga2 ```` + +Associating a transport to a specific Icinga instance causes this transport to +be used to send commands to the linked instance only. Transports without a +linked Icinga instance are utilized to send commands to all instances. \ No newline at end of file From d41b6d5112afe5b87b80836081fa0263a39e8d91 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 12:57:41 +0200 Subject: [PATCH 223/280] commandtransports.ini: Document how transports are utilized refs #9651 --- modules/monitoring/doc/commandtransports.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/monitoring/doc/commandtransports.md b/modules/monitoring/doc/commandtransports.md index db594653c..680f34ca0 100644 --- a/modules/monitoring/doc/commandtransports.md +++ b/modules/monitoring/doc/commandtransports.md @@ -9,12 +9,14 @@ find it under ./modules/monitoring/commandtransports.ini. ## Syntax -You can define multiple command transports in the commandtransports.ini. Icinga -Web 2 will utilize the first transport as the default for a specific Icinga -instance. +You can define multiple command transports in the commandtransports.ini. Every +transport starts with a section header containing its name, followed by the +config directives for this transport in the standard INI-format. -Every transport starts with a section header containing its name, followed by -the config directives for this transport in the standard INI-format. +Icinga Web 2 will try one transport after another to send a command, depending +on the respective Icinga instance, until the command is successfully sent. The +order in which Icinga Web 2 processes the configured transports is defined by +the order of sections in the commandtransports.ini. ## Using a local command pipe From 2e7f3b941ce2b2fe898ebd627a6d9cb426079ea2 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 31 Aug 2015 14:02:16 +0200 Subject: [PATCH 224/280] LdapUserGroupBackendForm: Add missing form field.. ..to configure the group_member_attribute option. fixes #9903 --- .../UserGroup/LdapUserGroupBackendForm.php | 16 ++++++++++++++-- .../setup/library/Setup/Steps/UserGroupStep.php | 4 ++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php b/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php index 0e7b63b5b..4f67b788b 100644 --- a/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php +++ b/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php @@ -177,13 +177,25 @@ class LdapUserGroupBackendForm extends Form 'preserveDefault' => true, 'ignore' => $disabled, 'disabled' => $disabled, - 'label' => $this->translate('LDAP Group Name Attribute'), + 'label' => $this->translate('LDAP Group Name Attribute'), 'description' => $this->translate( 'The attribute name used for storing a group\'s name on the LDAP server.' ), 'value' => $defaults->group_name_attribute ) ); + $this->addElement( + 'text', + 'group_member_attribute', + array( + 'preserveDefault' => true, + 'ignore' => $disabled, + 'disabled' => $disabled, + 'label' => $this->translate('LDAP Group Member Attribute'), + 'description' => $this->translate('The attribute name used for storing a group\'s members.'), + 'value' => $defaults->group_member_attribute + ) + ); $this->addElement( 'text', 'base_dn', @@ -258,7 +270,7 @@ class LdapUserGroupBackendForm extends Form 'preserveDefault' => true, 'ignore' => $disabled, 'disabled' => $disabled, - 'label' => $this->translate('LDAP User Name Attribute'), + 'label' => $this->translate('LDAP User Name Attribute'), 'description' => $this->translate( 'The attribute name used for storing a user\'s name on the LDAP server.' ), diff --git a/modules/setup/library/Setup/Steps/UserGroupStep.php b/modules/setup/library/Setup/Steps/UserGroupStep.php index ab58c1880..61948b3d2 100644 --- a/modules/setup/library/Setup/Steps/UserGroupStep.php +++ b/modules/setup/library/Setup/Steps/UserGroupStep.php @@ -153,6 +153,10 @@ class UserGroupStep extends Step . '' . mt('setup', 'Group Name Attribute') . '' . '' . $this->data['groupConfig']['group_name_attribute'] . '' . '' + . '' + . '' . mt('setup', 'Group Member Attribute') . '' + . '' . $this->data['groupConfig']['group_member_attribute'] . '' + . '' . '' . ''; From 4a5d2784fba8a28055aa5ad608e50f44a5ae9cee Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 31 Aug 2015 16:45:14 +0200 Subject: [PATCH 225/280] Normalize languages for negotiation to lowercase refs #7818 --- library/Icinga/Util/Translator.php | 54 ++++++++++++++++-------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/library/Icinga/Util/Translator.php b/library/Icinga/Util/Translator.php index 78fa675b8..eba2f8940 100644 --- a/library/Icinga/Util/Translator.php +++ b/library/Icinga/Util/Translator.php @@ -201,7 +201,7 @@ class Translator { $matches = array(); $locale = $locale !== null ? $locale : setlocale(LC_ALL, 0); - if (preg_match('@([a-z]{2})[_-]([A-Z]{2})@', $locale, $matches)) { + if (preg_match('@([a-z]{2})[_-]([a-z]{2})@i', $locale, $matches)) { list($languageCode, $countryCode) = array_slice($matches, 1); } elseif ($locale === 'C') { list($languageCode, $countryCode) = preg_split('@[_-]@', static::DEFAULT_LOCALE, 2); @@ -272,36 +272,40 @@ class Translator } $requestedLocales[] = str_replace('-', '_', $headerValue); } + $requestedLocales = array_combine( + array_map('strtolower', array_values($requestedLocales)), + array_values($requestedLocales) + ); + + $availableLocales = static::getAvailableLocaleCodes(); + $availableLocales = array_combine( + array_map('strtolower', array_values($availableLocales)), + array_values($availableLocales) + ); $similarMatch = null; - $availableLocales = static::getAvailableLocaleCodes(); - $perfectMatch = array_shift((array_intersect($requestedLocales, $availableLocales))); - foreach ($requestedLocales as $requestedLocale) { - if ($perfectMatch === $requestedLocale) { - // The perfect match must be preferred when reached before a similar match is found - return $perfectMatch; + + foreach ($requestedLocales as $requestedLocaleLowered => $requestedLocale) { + $localeObj = static::splitLocaleCode($requestedLocaleLowered); + + if (isset($availableLocales[$requestedLocaleLowered]) + && (! $similarMatch || static::splitLocaleCode($similarMatch)->language === $localeObj->language) + ) { + // Prefer perfect match only if no similar match has been found yet or the perfect match is more precise + // than the similar match + return $availableLocales[$requestedLocaleLowered]; } - $similarMatches = array(); - $localeObj = static::splitLocaleCode($requestedLocale); - foreach ($availableLocales as $availableLocale) { - if (static::splitLocaleCode($availableLocale)->language === $localeObj->language) { - $similarMatches[] = $availableLocale; + + if (! $similarMatch) { + foreach ($availableLocales as $availableLocaleLowered => $availableLocale) { + if (static::splitLocaleCode($availableLocaleLowered)->language === $localeObj->language) { + $similarMatch = $availableLocaleLowered; + break; + } } } - if (!empty($similarMatches)) { - $similarMatch = array_shift($similarMatches); // There is no "best" similar match, just use the first - break; - } } - if (!$perfectMatch && $similarMatch) { - return $similarMatch; - } elseif ($similarMatch && static::splitLocaleCode($similarMatch)->language === static::splitLocaleCode($perfectMatch)->language) { - return $perfectMatch; - } elseif ($similarMatch) { - return $similarMatch; - } - - return static::DEFAULT_LOCALE; + return $similarMatch ? $availableLocales[$similarMatch] : static::DEFAULT_LOCALE; } } From 9bd3fc90f791d68c93b2f1e7126962fb98fefcfd Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 1 Sep 2015 08:33:29 +0200 Subject: [PATCH 226/280] monitoring: Document the new restriction filter `instance_name' --- modules/monitoring/doc/security.md | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring/doc/security.md b/modules/monitoring/doc/security.md index cdfe7215c..cce3727a8 100644 --- a/modules/monitoring/doc/security.md +++ b/modules/monitoring/doc/security.md @@ -49,6 +49,7 @@ The following filter column names are available in filter expressions: | Column | |--------------------------------------------------------------| +| instance_name | | host_name | | hostgroup_name | | service_description | From 6007cc7f7bfdf16a852b768f31e88876802499d6 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 09:13:08 +0200 Subject: [PATCH 227/280] monitoring: Read "List all services" rather than "show all services" --- .../views/scripts/partials/service/objects-header.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml b/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml index ff39bcf22..907e7b349 100644 --- a/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml @@ -30,7 +30,7 @@ $i = 0;
5): ?> qlink( - sprintf($this->translate('show all %d services'), $i), + sprintf($this->translate('List all %d services'), $i), $listAllLink, null, array( From 5da88d076724a425ce51c1cd819c5489860c8e2d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 09:33:20 +0200 Subject: [PATCH 228/280] monitoring: Fix deprecated links fixes #10056 --- modules/monitoring/application/views/scripts/host/history.phtml | 2 +- .../monitoring/application/views/scripts/list/servicegrid.phtml | 2 +- .../monitoring/application/views/scripts/list/services.phtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/application/views/scripts/host/history.phtml b/modules/monitoring/application/views/scripts/host/history.phtml index 82b6f752d..1edba3d89 100644 --- a/modules/monitoring/application/views/scripts/host/history.phtml +++ b/modules/monitoring/application/views/scripts/host/history.phtml @@ -125,7 +125,7 @@ if (! $this->compact): ?> $this->translate('%s on %s', 'Service running on host'), $this->qlink( $event->service_display_name, - 'monitoring/show/service', + 'monitoring/service/show', array( 'host' => $event->host_name, 'service' => $event->service_description diff --git a/modules/monitoring/application/views/scripts/list/servicegrid.phtml b/modules/monitoring/application/views/scripts/list/servicegrid.phtml index 22d730515..3c9078683 100644 --- a/modules/monitoring/application/views/scripts/list/servicegrid.phtml +++ b/modules/monitoring/application/views/scripts/list/servicegrid.phtml @@ -70,7 +70,7 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . ' qlink( '', - 'monitoring/show/service', + 'monitoring/service/show', array( 'host' => $hostName, 'service' => $serviceDescription diff --git a/modules/monitoring/application/views/scripts/list/services.phtml b/modules/monitoring/application/views/scripts/list/services.phtml index b12e3176c..d2dfb250a 100644 --- a/modules/monitoring/application/views/scripts/list/services.phtml +++ b/modules/monitoring/application/views/scripts/list/services.phtml @@ -33,7 +33,7 @@ if (! $this->compact): ?> ) ); $hostLink = $this->href( - 'monitoring/show/host', + 'monitoring/host/show', array( 'host' => $service->host_name, ) From 6556059afdf2654a834322ecff032ea0e3034b04 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 12:55:34 +0200 Subject: [PATCH 229/280] vendor: Uprade php-font-lib to version 0.4 refs #10044 --- library/vendor/dompdf/SOURCE | 8 +++---- ..._Font_Metrics.php => AdobeFontMetrics.php} | 4 ++-- .../{Binary_Stream.php => BinaryStream.php} | 2 +- .../lib/php-font-lib/classes/EOT/File.php | 10 ++++++--- .../{Encoding_Map.php => EncodingMap.php} | 4 ++-- .../php-font-lib/classes/Glyph/Outline.php | 12 +++++----- ...ine_Component.php => OutlineComponent.php} | 2 +- ...ine_Composite.php => OutlineComposite.php} | 10 ++++----- .../{Outline_Simple.php => OutlineSimple.php} | 2 +- .../lib/php-font-lib/classes/Header.php | 2 +- ...tory_Entry.php => TableDirectoryEntry.php} | 2 +- ...Directory_Entry.php => DirectoryEntry.php} | 4 ++-- .../lib/php-font-lib/classes/Table/Table.php | 8 +++---- .../php-font-lib/classes/Table/Type/glyf.php | 4 ++-- .../php-font-lib/classes/Table/Type/name.php | 8 +++---- .../Type/{name_Record.php => nameRecord.php} | 4 ++-- .../classes/TrueType/Collection.php | 4 ++-- .../php-font-lib/classes/TrueType/File.php | 22 +++++++++---------- ...tory_Entry.php => TableDirectoryEntry.php} | 4 ++-- .../lib/php-font-lib/classes/WOFF/File.php | 6 ++--- ...tory_Entry.php => TableDirectoryEntry.php} | 4 ++-- 21 files changed, 64 insertions(+), 62 deletions(-) rename library/vendor/dompdf/lib/php-font-lib/classes/{Adobe_Font_Metrics.php => AdobeFontMetrics.php} (98%) rename library/vendor/dompdf/lib/php-font-lib/classes/{Binary_Stream.php => BinaryStream.php} (99%) rename library/vendor/dompdf/lib/php-font-lib/classes/{Encoding_Map.php => EncodingMap.php} (84%) rename library/vendor/dompdf/lib/php-font-lib/classes/Glyph/{Outline_Component.php => OutlineComponent.php} (96%) rename library/vendor/dompdf/lib/php-font-lib/classes/Glyph/{Outline_Composite.php => OutlineComposite.php} (96%) rename library/vendor/dompdf/lib/php-font-lib/classes/Glyph/{Outline_Simple.php => OutlineSimple.php} (99%) rename library/vendor/dompdf/lib/php-font-lib/classes/OpenType/{Table_Directory_Entry.php => TableDirectoryEntry.php} (82%) rename library/vendor/dompdf/lib/php-font-lib/classes/Table/{Directory_Entry.php => DirectoryEntry.php} (97%) rename library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/{name_Record.php => nameRecord.php} (94%) rename library/vendor/dompdf/lib/php-font-lib/classes/TrueType/{Table_Directory_Entry.php => TableDirectoryEntry.php} (87%) rename library/vendor/dompdf/lib/php-font-lib/classes/WOFF/{Table_Directory_Entry.php => TableDirectoryEntry.php} (88%) diff --git a/library/vendor/dompdf/SOURCE b/library/vendor/dompdf/SOURCE index c26253e30..b0a1a05ce 100644 --- a/library/vendor/dompdf/SOURCE +++ b/library/vendor/dompdf/SOURCE @@ -3,7 +3,7 @@ tar xzf dompdf-0.6.1.tar.gz --strip-components 1 dompdf-0.6.1/{include/*.php,lib rm dompdf-0.6.1.tar.gz mv LICENSE.LGPL LICENSE -curl https://codeload.github.com/PhenX/php-font-lib/tar.gz/0.3.1 -o php-font-lib-0.3.1.tar.gz -mkdir lib/php-font-lib/classes -tar xzf php-font-lib-0.3.1.tar.gz --strip-components 3 -C lib/php-font-lib/classes php-font-lib-0.3.1/src/FontLib -rm php-font-lib-0.3.1.tar.gz +curl https://codeload.github.com/PhenX/php-font-lib/tar.gz/0.4 -o php-font-lib-0.4.tar.gz +mkdir -p lib/php-font-lib/classes +tar xzf php-font-lib-0.4.tar.gz --strip-components 3 -C lib/php-font-lib/classes php-font-lib-0.4/src/FontLib +rm php-font-lib-0.4.tar.gz diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Adobe_Font_Metrics.php b/library/vendor/dompdf/lib/php-font-lib/classes/AdobeFontMetrics.php similarity index 98% rename from library/vendor/dompdf/lib/php-font-lib/classes/Adobe_Font_Metrics.php rename to library/vendor/dompdf/lib/php-font-lib/classes/AdobeFontMetrics.php index ccf109091..a62daaa99 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Adobe_Font_Metrics.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/AdobeFontMetrics.php @@ -16,7 +16,7 @@ use FontLib\TrueType\File; * * @package php-font-lib */ -class Adobe_Font_Metrics { +class AdobeFontMetrics { private $f; /** @@ -38,7 +38,7 @@ class Adobe_Font_Metrics { throw new \Exception("Unkown encoding ($encoding)"); } - $map = new Encoding_Map($map_file); + $map = new EncodingMap($map_file); $map_data = $map->parse(); } diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Binary_Stream.php b/library/vendor/dompdf/lib/php-font-lib/classes/BinaryStream.php similarity index 99% rename from library/vendor/dompdf/lib/php-font-lib/classes/Binary_Stream.php rename to library/vendor/dompdf/lib/php-font-lib/classes/BinaryStream.php index 859b1ad02..6c743f3d2 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Binary_Stream.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/BinaryStream.php @@ -13,7 +13,7 @@ namespace FontLib; * * @package php-font-lib */ -class Binary_Stream { +class BinaryStream { /** * @var resource The file pointer */ diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/EOT/File.php b/library/vendor/dompdf/lib/php-font-lib/classes/EOT/File.php index abf0be3ea..13d592572 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/EOT/File.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/EOT/File.php @@ -61,9 +61,13 @@ class File extends \FontLib\TrueType\File { // TODO Read font data ... } - /** - * Little endian version of the read method - */ + /** + * Little endian version of the read method + * + * @param int $n The number of bytes to read + * + * @return string + */ public function read($n) { if ($n < 1) { return ""; diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Encoding_Map.php b/library/vendor/dompdf/lib/php-font-lib/classes/EncodingMap.php similarity index 84% rename from library/vendor/dompdf/lib/php-font-lib/classes/Encoding_Map.php rename to library/vendor/dompdf/lib/php-font-lib/classes/EncodingMap.php index bf92a3df9..2acdebc50 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Encoding_Map.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/EncodingMap.php @@ -13,7 +13,7 @@ namespace FontLib; * * @package php-font-lib */ -class Encoding_Map { +class EncodingMap { private $f; function __construct($file) { @@ -24,7 +24,7 @@ class Encoding_Map { $map = array(); while ($line = fgets($this->f)) { - if (preg_match("/^[\!\=]([0-9A-F]{2,})\s+U\+([0-9A-F]{2})([0-9A-F]{2})\s+([^\s]+)/", $line, $matches)) { + if (preg_match('/^[\!\=]([0-9A-F]{2,})\s+U\+([0-9A-F]{2})([0-9A-F]{2})\s+([^\s]+)/', $line, $matches)) { $unicode = (hexdec($matches[2]) << 8) + hexdec($matches[3]); $map[hexdec($matches[1])] = array($unicode, $matches[4]); } diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline.php b/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline.php index 86c70f08d..12091a9f8 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline.php @@ -10,14 +10,14 @@ namespace FontLib\Glyph; use FontLib\Table\Type\glyf; use FontLib\TrueType\File; -use FontLib\Binary_Stream; +use FontLib\BinaryStream; /** * `glyf` font table. * * @package php-font-lib */ -class Outline extends Binary_Stream { +class Outline extends BinaryStream { /** * @var \FontLib\Table\Type\glyf */ @@ -47,12 +47,12 @@ class Outline extends Binary_Stream { $font->seek($offset); if ($font->readInt16() > -1) { - /** @var Outline_Simple $glyph */ - $glyph = new Outline_Simple($table, $offset, $size); + /** @var OutlineSimple $glyph */ + $glyph = new OutlineSimple($table, $offset, $size); } else { - /** @var Outline_Composite $glyph */ - $glyph = new Outline_Composite($table, $offset, $size); + /** @var OutlineComposite $glyph */ + $glyph = new OutlineComposite($table, $offset, $size); } $glyph->parse(); diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Component.php b/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineComponent.php similarity index 96% rename from library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Component.php rename to library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineComponent.php index 6811a5814..9cafaf4d1 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Component.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineComponent.php @@ -13,7 +13,7 @@ namespace FontLib\Glyph; * * @package php-font-lib */ -class Outline_Component { +class OutlineComponent { public $flags; public $glyphIndex; public $a, $b, $c, $d, $e, $f; diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Composite.php b/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineComposite.php similarity index 96% rename from library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Composite.php rename to library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineComposite.php index 6c77f5305..c77f0399b 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Composite.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineComposite.php @@ -9,14 +9,12 @@ namespace FontLib\Glyph; -use FontLib\Table\Type\glyf; - /** * Composite glyph outline * * @package php-font-lib */ -class Outline_Composite extends Outline { +class OutlineComposite extends Outline { const ARG_1_AND_2_ARE_WORDS = 0x0001; const ARGS_ARE_XY_VALUES = 0x0002; const ROUND_XY_TO_GRID = 0x0004; @@ -29,7 +27,7 @@ class Outline_Composite extends Outline { const OVERLAP_COMPOUND = 0x0400; /** - * @var Outline_Component[] + * @var OutlineComponent[] */ public $components = array(); @@ -113,7 +111,7 @@ class Outline_Composite extends Outline { // //} - $component = new Outline_Component(); + $component = new OutlineComponent(); $component->flags = $flags; $component->glyphIndex = $glyphIndex; $component->a = $a; @@ -219,7 +217,7 @@ class Outline_Composite extends Outline { public function getSVGContours() { $contours = array(); - /** @var \FontLib\Table\\FontLib\Table\Type\glyf $glyph_data */ + /** @var \FontLib\Table\Type\glyf $glyph_data */ $glyph_data = $this->getFont()->getTableObject("glyf"); /** @var Outline[] $glyphs */ diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Simple.php b/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineSimple.php similarity index 99% rename from library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Simple.php rename to library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineSimple.php index a4acc0f3b..3c023de9a 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/Outline_Simple.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Glyph/OutlineSimple.php @@ -14,7 +14,7 @@ namespace FontLib\Glyph; * * @package php-font-lib */ -class Outline_Simple extends Outline { +class OutlineSimple extends Outline { const ON_CURVE = 0x01; const X_SHORT_VECTOR = 0x02; const Y_SHORT_VECTOR = 0x04; diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Header.php b/library/vendor/dompdf/lib/php-font-lib/classes/Header.php index d5fdf4a20..cbf137ed3 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Header.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Header.php @@ -14,7 +14,7 @@ use FontLib\TrueType\File; * * @package php-font-lib */ -abstract class Header extends Binary_Stream { +abstract class Header extends BinaryStream { /** * @var File */ diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/OpenType/Table_Directory_Entry.php b/library/vendor/dompdf/lib/php-font-lib/classes/OpenType/TableDirectoryEntry.php similarity index 82% rename from library/vendor/dompdf/lib/php-font-lib/classes/OpenType/Table_Directory_Entry.php rename to library/vendor/dompdf/lib/php-font-lib/classes/OpenType/TableDirectoryEntry.php index 4643964f0..dd75a3e16 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/OpenType/Table_Directory_Entry.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/OpenType/TableDirectoryEntry.php @@ -13,6 +13,6 @@ namespace FontLib\OpenType; * * @package php-font-lib */ -class Table_Directory_Entry extends \FontLib\TrueType\Table_Directory_Entry { +class TableDirectoryEntry extends \FontLib\TrueType\TableDirectoryEntry { } diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Directory_Entry.php b/library/vendor/dompdf/lib/php-font-lib/classes/Table/DirectoryEntry.php similarity index 97% rename from library/vendor/dompdf/lib/php-font-lib/classes/Table/Directory_Entry.php rename to library/vendor/dompdf/lib/php-font-lib/classes/Table/DirectoryEntry.php index 3614aae08..2b5846d3d 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Directory_Entry.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Table/DirectoryEntry.php @@ -9,14 +9,14 @@ namespace FontLib\Table; use FontLib\TrueType\File; use FontLib\Font; -use FontLib\Binary_Stream; +use FontLib\BinaryStream; /** * Generic Font table directory entry. * * @package php-font-lib */ -class Directory_Entry extends Binary_Stream { +class DirectoryEntry extends BinaryStream { /** * @var File */ diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Table.php b/library/vendor/dompdf/lib/php-font-lib/classes/Table/Table.php index 016aa7f85..b12711230 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Table.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Table/Table.php @@ -9,23 +9,23 @@ namespace FontLib\Table; use FontLib\TrueType\File; use FontLib\Font; -use FontLib\Binary_Stream; +use FontLib\BinaryStream; /** * Generic font table. * * @package php-font-lib */ -class Table extends Binary_Stream { +class Table extends BinaryStream { /** - * @var Directory_Entry + * @var DirectoryEntry */ protected $entry; protected $def = array(); public $data; - final public function __construct(Directory_Entry $entry) { + final public function __construct(DirectoryEntry $entry) { $this->entry = $entry; $entry->setTable($this); } diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/glyf.php b/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/glyf.php index 6e2d0509e..cbc04d2c8 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/glyf.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/glyf.php @@ -10,7 +10,7 @@ namespace FontLib\Table\Type; use FontLib\Table\Table; use FontLib\Glyph\Outline; -use FontLib\Glyph\Outline_Simple; +use FontLib\Glyph\OutlineSimple; /** * `glyf` font table. @@ -106,7 +106,7 @@ class glyf extends Table { ); $shape_json = json_encode($shape); - $type = ($glyph instanceof Outline_Simple ? "simple" : "composite"); + $type = ($glyph instanceof OutlineSimple ? "simple" : "composite"); $char = isset($glyphIndexArray[$g]) ? $glyphIndexArray[$g] : 0; $name = isset($names[$g]) ? $names[$g] : sprintf("uni%04x", $char); $char = $char ? "&#{$glyphIndexArray[$g]};" : ""; diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/name.php b/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/name.php index c54d2db7e..05e4734cb 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/name.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/name.php @@ -143,8 +143,8 @@ class name extends Table { $records = array(); for ($i = 0; $i < $data["count"]; $i++) { - $record = new name_Record(); - $record_data = $font->unpack(name_Record::$format); + $record = new nameRecord(); + $record_data = $font->unpack(nameRecord::$format); $record->map($record_data); $records[] = $record; @@ -166,7 +166,7 @@ class name extends Table { protected function _encode() { $font = $this->getFont(); - /** @var name_Record[] $records */ + /** @var nameRecord[] $records */ $records = $this->data["records"]; $count_records = count($records); @@ -180,7 +180,7 @@ class name extends Table { $record->length = mb_strlen($record->getUTF16(), "8bit"); $record->offset = $offset; $offset += $record->length; - $length += $font->pack(name_Record::$format, (array)$record); + $length += $font->pack(nameRecord::$format, (array)$record); } foreach ($records as $record) { diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/name_Record.php b/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/nameRecord.php similarity index 94% rename from library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/name_Record.php rename to library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/nameRecord.php index b09b74360..2073c20da 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/name_Record.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/Table/Type/nameRecord.php @@ -8,14 +8,14 @@ namespace FontLib\Table\Type; use FontLib\Font; -use FontLib\Binary_Stream; +use FontLib\BinaryStream; /** * Font table name record. * * @package php-font-lib */ -class name_Record extends Binary_Stream { +class nameRecord extends BinaryStream { public $platformID; public $platformSpecificID; public $languageID; diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/Collection.php b/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/Collection.php index 8358c9c2e..460ef4dae 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/Collection.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/Collection.php @@ -9,7 +9,7 @@ namespace FontLib\TrueType; use Countable; -use FontLib\Binary_Stream; +use FontLib\BinaryStream; use Iterator; use OutOfBoundsException; @@ -18,7 +18,7 @@ use OutOfBoundsException; * * @package php-font-lib */ -class Collection extends Binary_Stream implements Iterator, Countable { +class Collection extends BinaryStream implements Iterator, Countable { /** * Current iterator position. * diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/File.php b/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/File.php index 95cc13d53..b8a580afd 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/File.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/File.php @@ -8,21 +8,21 @@ namespace FontLib\TrueType; -use FontLib\Adobe_Font_Metrics; +use FontLib\AdobeFontMetrics; use FontLib\Font; -use FontLib\Binary_Stream; +use FontLib\BinaryStream; use FontLib\Table\Table; -use FontLib\Table\Directory_Entry; +use FontLib\Table\DirectoryEntry; use FontLib\Table\Type\glyf; use FontLib\Table\Type\name; -use FontLib\Table\Type\name_Record; +use FontLib\Table\Type\nameRecord; /** * TrueType font file. * * @package php-font-lib */ -class File extends Binary_Stream { +class File extends BinaryStream { /** * @var Header */ @@ -228,7 +228,7 @@ class File extends Binary_Stream { Font::d("Tables : " . implode(", ", $tags)); - /** @var Directory_Entry[] $entries */ + /** @var DirectoryEntry[] $entries */ $entries = array(); foreach ($tags as $tag) { if (!isset($this->directory[$tag])) { @@ -282,10 +282,10 @@ class File extends Binary_Stream { $type = $this->getFontType(); - $class = "FontLib\\$type\\Table_Directory_Entry"; + $class = "FontLib\\$type\\TableDirectoryEntry"; for ($i = 0; $i < $this->header->data["numTables"]; $i++) { - /** @var Table_Directory_Entry $entry */ + /** @var TableDirectoryEntry $entry */ $entry = new $class($this); $entry->parse(); @@ -352,12 +352,12 @@ class File extends Binary_Stream { } } - function addDirectoryEntry(Directory_Entry $entry) { + function addDirectoryEntry(DirectoryEntry $entry) { $this->directory[$entry->tag] = $entry; } function saveAdobeFontMetrics($file, $encoding = null) { - $afm = new Adobe_Font_Metrics($this); + $afm = new AdobeFontMetrics($this); $afm->write($file, $encoding); } @@ -369,7 +369,7 @@ class File extends Binary_Stream { * @return string|null */ function getNameTableString($nameID) { - /** @var name_Record[] $records */ + /** @var nameRecord[] $records */ $records = $this->getData("name", "records"); if (!isset($records[$nameID])) { diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/Table_Directory_Entry.php b/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/TableDirectoryEntry.php similarity index 87% rename from library/vendor/dompdf/lib/php-font-lib/classes/TrueType/Table_Directory_Entry.php rename to library/vendor/dompdf/lib/php-font-lib/classes/TrueType/TableDirectoryEntry.php index 9c1b20708..fc4fe5559 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/Table_Directory_Entry.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/TrueType/TableDirectoryEntry.php @@ -8,14 +8,14 @@ namespace FontLib\TrueType; -use FontLib\Table\Directory_Entry; +use FontLib\Table\DirectoryEntry; /** * TrueType table directory entry. * * @package php-font-lib */ -class Table_Directory_Entry extends Directory_Entry { +class TableDirectoryEntry extends DirectoryEntry { function __construct(File $font) { parent::__construct($font); } diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/WOFF/File.php b/library/vendor/dompdf/lib/php-font-lib/classes/WOFF/File.php index 4d66d85b2..9e54b3fb0 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/WOFF/File.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/WOFF/File.php @@ -8,14 +8,14 @@ namespace FontLib\WOFF; -use FontLib\Table\Directory_Entry; +use FontLib\Table\DirectoryEntry; /** * WOFF font file. * * @package php-font-lib * - * @property Table_Directory_Entry[] $directory + * @property TableDirectoryEntry[] $directory */ class File extends \FontLib\TrueType\File { function parseHeader() { @@ -63,7 +63,7 @@ class File extends \FontLib\TrueType\File { $offset += $this->writeUInt32($dataOffset); // offset $offset += $this->writeUInt32($length); // length $offset += $this->writeUInt32($length); // origLength - $offset += $this->writeUInt32(Directory_Entry::computeChecksum($data)); // checksum + $offset += $this->writeUInt32(DirectoryEntry::computeChecksum($data)); // checksum // Data $this->seek($dataOffset); diff --git a/library/vendor/dompdf/lib/php-font-lib/classes/WOFF/Table_Directory_Entry.php b/library/vendor/dompdf/lib/php-font-lib/classes/WOFF/TableDirectoryEntry.php similarity index 88% rename from library/vendor/dompdf/lib/php-font-lib/classes/WOFF/Table_Directory_Entry.php rename to library/vendor/dompdf/lib/php-font-lib/classes/WOFF/TableDirectoryEntry.php index 83b604142..eb67c9c4a 100644 --- a/library/vendor/dompdf/lib/php-font-lib/classes/WOFF/Table_Directory_Entry.php +++ b/library/vendor/dompdf/lib/php-font-lib/classes/WOFF/TableDirectoryEntry.php @@ -8,14 +8,14 @@ namespace FontLib\WOFF; -use FontLib\Table\Directory_Entry; +use FontLib\Table\DirectoryEntry; /** * WOFF font file table directory entry. * * @package php-font-lib */ -class Table_Directory_Entry extends Directory_Entry { +class TableDirectoryEntry extends DirectoryEntry { public $origLength; function __construct(File $font) { From d4669c78324cc1172f392b562d5c217c0a243cf0 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 12:57:57 +0200 Subject: [PATCH 230/280] vendor: Upgrade HTMLPurifier to version 4.7.0 refs #10044 --- .../HTMLPurifier/AttrDef/CSS/Multiple.php | 2 +- .../vendor/HTMLPurifier/AttrDef/HTML/Bool.php | 3 --- library/vendor/HTMLPurifier/CSSDefinition.php | 4 ++-- library/vendor/HTMLPurifier/Config.php | 15 ++++++++++++--- .../HTMLPurifier/ConfigSchema/schema.ser | Bin 15000 -> 15305 bytes .../AutoFormat.RemoveEmpty.Predicate.txt | 14 ++++++++++++++ .../schema/HTML.CustomDoctype.txt | 2 +- .../DefinitionCache/Serializer.php | 10 ++++++++-- .../vendor/HTMLPurifier/Filter/YouTube.php | 8 ++++---- .../HTMLPurifier/HTMLPurifier.composer.php | 2 +- .../HTMLPurifier/HTMLPurifier.includes.php | 2 +- library/vendor/HTMLPurifier/HTMLPurifier.php | 6 +++--- .../HTMLPurifier/AttrDef/CSS/Multiple.php | 2 +- .../HTMLPurifier/AttrDef/HTML/Bool.php | 3 --- .../HTMLPurifier/CSSDefinition.php | 4 ++-- .../HTMLPurifier/HTMLPurifier/Config.php | 15 ++++++++++++--- .../DefinitionCache/Serializer.php | 10 ++++++++-- .../HTMLPurifier/Filter/YouTube.php | 8 ++++---- .../HTMLPurifier/Injector/RemoveEmpty.php | 15 ++++++++++----- .../HTMLPurifier/Lexer/DOMLex.php | 5 ++--- .../HTMLPurifier/HTMLPurifier/Lexer/PH5P.php | 3 +-- .../HTMLPurifier/Injector/RemoveEmpty.php | 15 ++++++++++----- library/vendor/HTMLPurifier/Lexer/DOMLex.php | 5 ++--- library/vendor/HTMLPurifier/Lexer/PH5P.php | 3 +-- library/vendor/HTMLPurifier/SOURCE | 10 +++++----- 25 files changed, 105 insertions(+), 61 deletions(-) create mode 100644 library/vendor/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt diff --git a/library/vendor/HTMLPurifier/AttrDef/CSS/Multiple.php b/library/vendor/HTMLPurifier/AttrDef/CSS/Multiple.php index 9f266cdd1..e707f871c 100644 --- a/library/vendor/HTMLPurifier/AttrDef/CSS/Multiple.php +++ b/library/vendor/HTMLPurifier/AttrDef/CSS/Multiple.php @@ -44,7 +44,7 @@ class HTMLPurifier_AttrDef_CSS_Multiple extends HTMLPurifier_AttrDef */ public function validate($string, $config, $context) { - $string = $this->parseCDATA($string); + $string = $this->mungeRgb($this->parseCDATA($string)); if ($string === '') { return false; } diff --git a/library/vendor/HTMLPurifier/AttrDef/HTML/Bool.php b/library/vendor/HTMLPurifier/AttrDef/HTML/Bool.php index 036a240e1..dea15d2cd 100644 --- a/library/vendor/HTMLPurifier/AttrDef/HTML/Bool.php +++ b/library/vendor/HTMLPurifier/AttrDef/HTML/Bool.php @@ -32,9 +32,6 @@ class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef */ public function validate($string, $config, $context) { - if (empty($string)) { - return false; - } return $this->name; } diff --git a/library/vendor/HTMLPurifier/CSSDefinition.php b/library/vendor/HTMLPurifier/CSSDefinition.php index 0acdee2d9..07cc94175 100644 --- a/library/vendor/HTMLPurifier/CSSDefinition.php +++ b/library/vendor/HTMLPurifier/CSSDefinition.php @@ -350,8 +350,7 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition $this->info['scrollbar-highlight-color'] = new HTMLPurifier_AttrDef_CSS_Color(); $this->info['scrollbar-shadow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - // technically not proprietary, but CSS3, and no one supports it - $this->info['opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); + // vendor specific prefixes of opacity $this->info['-moz-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); $this->info['-khtml-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); @@ -404,6 +403,7 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition array('visible', 'hidden', 'collapse') ); $this->info['overflow'] = new HTMLPurifier_AttrDef_Enum(array('visible', 'hidden', 'auto', 'scroll')); + $this->info['opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); } /** diff --git a/library/vendor/HTMLPurifier/Config.php b/library/vendor/HTMLPurifier/Config.php index 7ada59b94..2b2db0c26 100644 --- a/library/vendor/HTMLPurifier/Config.php +++ b/library/vendor/HTMLPurifier/Config.php @@ -21,7 +21,7 @@ class HTMLPurifier_Config * HTML Purifier's version * @type string */ - public $version = '4.6.0'; + public $version = '4.7.0'; /** * Whether or not to automatically finalize @@ -646,16 +646,25 @@ class HTMLPurifier_Config return $this->getDefinition($name, true, true); } + /** + * @return HTMLPurifier_HTMLDefinition + */ public function maybeGetRawHTMLDefinition() { return $this->getDefinition('HTML', true, true); } - + + /** + * @return HTMLPurifier_CSSDefinition + */ public function maybeGetRawCSSDefinition() { return $this->getDefinition('CSS', true, true); } - + + /** + * @return HTMLPurifier_URIDefinition + */ public function maybeGetRawURIDefinition() { return $this->getDefinition('URI', true, true); diff --git a/library/vendor/HTMLPurifier/ConfigSchema/schema.ser b/library/vendor/HTMLPurifier/ConfigSchema/schema.ser index 22ea32185db63b19d525f509ebe431f593e92271..1e6ccd22755dfa27722e17f457a00ea42bdc1d6f 100644 GIT binary patch delta 348 zcmbPHda`_iIiuy|dKKA?p*xtEjEyEg6cx^Q%`GUY)C(v|P0377EJ;K>a2rAUh|o))3fi#B9Ppm|XLQZ?dn7A*0dedX@Xk(7=(x2%JnSLy(`4{L!o- GDg*$kNpRZ$ delta 54 zcmX?EKBIJkIitnqmqJ&WHamz3@=snM array(), 'th' => array(), 'td' => array(), 'iframe' => array('src')) +--DESCRIPTION-- +

+ Given that an element has no contents, it will be removed by default, unless + this predicate dictates otherwise. The predicate can either be an associative + map from tag name to list of attributes that must be present for the element + to be considered preserved: thus, the default always preserves colgroup, + th and td, and also iframe if it + has a src. +

+--# vim: et sw=4 sts=4 diff --git a/library/vendor/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt b/library/vendor/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt index a64e3d7c3..6ed70b599 100644 --- a/library/vendor/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt +++ b/library/vendor/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt @@ -4,6 +4,6 @@ VERSION: 2.0.1 DEFAULT: NULL --DESCRIPTION-- -A custom doctype for power-users who defined there own document +A custom doctype for power-users who defined their own document type. This directive only applies when %HTML.Doctype is blank. --# vim: et sw=4 sts=4 diff --git a/library/vendor/HTMLPurifier/DefinitionCache/Serializer.php b/library/vendor/HTMLPurifier/DefinitionCache/Serializer.php index ecacb88fe..ce268d91b 100644 --- a/library/vendor/HTMLPurifier/DefinitionCache/Serializer.php +++ b/library/vendor/HTMLPurifier/DefinitionCache/Serializer.php @@ -219,9 +219,15 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac } elseif (!$this->_testPermissions($base, $chmod)) { return false; } - $old = umask(0000); mkdir($directory, $chmod); - umask($old); + if (!$this->_testPermissions($directory, $chmod)) { + trigger_error( + 'Base directory ' . $base . ' does not exist, + please create or change using %Cache.SerializerPath', + E_USER_WARNING + ); + return false; + } } elseif (!$this->_testPermissions($directory, $chmod)) { return false; } diff --git a/library/vendor/HTMLPurifier/Filter/YouTube.php b/library/vendor/HTMLPurifier/Filter/YouTube.php index 411519ad6..276d8362f 100644 --- a/library/vendor/HTMLPurifier/Filter/YouTube.php +++ b/library/vendor/HTMLPurifier/Filter/YouTube.php @@ -17,7 +17,7 @@ class HTMLPurifier_Filter_YouTube extends HTMLPurifier_Filter public function preFilter($html, $config, $context) { $pre_regex = '#]+>.+?' . - 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?#s'; + '(?:http:)?//www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?#s'; $pre_replace = '\1'; return preg_replace($pre_regex, $pre_replace, $html); } @@ -51,10 +51,10 @@ class HTMLPurifier_Filter_YouTube extends HTMLPurifier_Filter { $url = $this->armorUrl($matches[1]); return '' . - '' . + 'data="//www.youtube.com/' . $url . '">' . + '' . '' . diff --git a/library/vendor/HTMLPurifier/HTMLPurifier.composer.php b/library/vendor/HTMLPurifier/HTMLPurifier.composer.php index 6706f4e39..52acc56b0 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier.composer.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier.composer.php @@ -1,4 +1,4 @@ parseCDATA($string); + $string = $this->mungeRgb($this->parseCDATA($string)); if ($string === '') { return false; } diff --git a/library/vendor/HTMLPurifier/HTMLPurifier/AttrDef/HTML/Bool.php b/library/vendor/HTMLPurifier/HTMLPurifier/AttrDef/HTML/Bool.php index 036a240e1..dea15d2cd 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier/AttrDef/HTML/Bool.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier/AttrDef/HTML/Bool.php @@ -32,9 +32,6 @@ class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef */ public function validate($string, $config, $context) { - if (empty($string)) { - return false; - } return $this->name; } diff --git a/library/vendor/HTMLPurifier/HTMLPurifier/CSSDefinition.php b/library/vendor/HTMLPurifier/HTMLPurifier/CSSDefinition.php index 0acdee2d9..07cc94175 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier/CSSDefinition.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier/CSSDefinition.php @@ -350,8 +350,7 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition $this->info['scrollbar-highlight-color'] = new HTMLPurifier_AttrDef_CSS_Color(); $this->info['scrollbar-shadow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - // technically not proprietary, but CSS3, and no one supports it - $this->info['opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); + // vendor specific prefixes of opacity $this->info['-moz-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); $this->info['-khtml-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); @@ -404,6 +403,7 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition array('visible', 'hidden', 'collapse') ); $this->info['overflow'] = new HTMLPurifier_AttrDef_Enum(array('visible', 'hidden', 'auto', 'scroll')); + $this->info['opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); } /** diff --git a/library/vendor/HTMLPurifier/HTMLPurifier/Config.php b/library/vendor/HTMLPurifier/HTMLPurifier/Config.php index 7ada59b94..2b2db0c26 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier/Config.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier/Config.php @@ -21,7 +21,7 @@ class HTMLPurifier_Config * HTML Purifier's version * @type string */ - public $version = '4.6.0'; + public $version = '4.7.0'; /** * Whether or not to automatically finalize @@ -646,16 +646,25 @@ class HTMLPurifier_Config return $this->getDefinition($name, true, true); } + /** + * @return HTMLPurifier_HTMLDefinition + */ public function maybeGetRawHTMLDefinition() { return $this->getDefinition('HTML', true, true); } - + + /** + * @return HTMLPurifier_CSSDefinition + */ public function maybeGetRawCSSDefinition() { return $this->getDefinition('CSS', true, true); } - + + /** + * @return HTMLPurifier_URIDefinition + */ public function maybeGetRawURIDefinition() { return $this->getDefinition('URI', true, true); diff --git a/library/vendor/HTMLPurifier/HTMLPurifier/DefinitionCache/Serializer.php b/library/vendor/HTMLPurifier/HTMLPurifier/DefinitionCache/Serializer.php index ecacb88fe..ce268d91b 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier/DefinitionCache/Serializer.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier/DefinitionCache/Serializer.php @@ -219,9 +219,15 @@ class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCac } elseif (!$this->_testPermissions($base, $chmod)) { return false; } - $old = umask(0000); mkdir($directory, $chmod); - umask($old); + if (!$this->_testPermissions($directory, $chmod)) { + trigger_error( + 'Base directory ' . $base . ' does not exist, + please create or change using %Cache.SerializerPath', + E_USER_WARNING + ); + return false; + } } elseif (!$this->_testPermissions($directory, $chmod)) { return false; } diff --git a/library/vendor/HTMLPurifier/HTMLPurifier/Filter/YouTube.php b/library/vendor/HTMLPurifier/HTMLPurifier/Filter/YouTube.php index 411519ad6..276d8362f 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier/Filter/YouTube.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier/Filter/YouTube.php @@ -17,7 +17,7 @@ class HTMLPurifier_Filter_YouTube extends HTMLPurifier_Filter public function preFilter($html, $config, $context) { $pre_regex = '#]+>.+?' . - 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?#s'; + '(?:http:)?//www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?#s'; $pre_replace = '\1'; return preg_replace($pre_regex, $pre_replace, $html); } @@ -51,10 +51,10 @@ class HTMLPurifier_Filter_YouTube extends HTMLPurifier_Filter { $url = $this->armorUrl($matches[1]); return '' . - '' . + 'data="//www.youtube.com/' . $url . '">' . + '' . '' . diff --git a/library/vendor/HTMLPurifier/HTMLPurifier/Injector/RemoveEmpty.php b/library/vendor/HTMLPurifier/HTMLPurifier/Injector/RemoveEmpty.php index cd885722e..01353ff1d 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier/Injector/RemoveEmpty.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier/Injector/RemoveEmpty.php @@ -28,10 +28,10 @@ class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector private $removeNbspExceptions; /** + * Cached contents of %AutoFormat.RemoveEmpty.Predicate * @type array - * TODO: make me configurable */ - private $_exclude = array('colgroup' => 1, 'th' => 1, 'td' => 1, 'iframe' => 1); + private $exclude; /** * @param HTMLPurifier_Config $config @@ -45,6 +45,7 @@ class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector $this->context = $context; $this->removeNbsp = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp'); $this->removeNbspExceptions = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions'); + $this->exclude = $config->get('AutoFormat.RemoveEmpty.Predicate'); $this->attrValidator = new HTMLPurifier_AttrValidator(); } @@ -75,11 +76,15 @@ class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector break; } if (!$next || ($next instanceof HTMLPurifier_Token_End && $next->name == $token->name)) { - if (isset($this->_exclude[$token->name])) { - return; - } $this->attrValidator->validateToken($token, $this->config, $this->context); $token->armor['ValidateAttributes'] = true; + if (isset($this->exclude[$token->name])) { + $r = true; + foreach ($this->exclude[$token->name] as $elem) { + if (!isset($token->attr[$elem])) $r = false; + } + if ($r) return; + } if (isset($token->attr['id']) || isset($token->attr['name'])) { return; } diff --git a/library/vendor/HTMLPurifier/HTMLPurifier/Lexer/DOMLex.php b/library/vendor/HTMLPurifier/HTMLPurifier/Lexer/DOMLex.php index 720754454..b81819290 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier/Lexer/DOMLex.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier/Lexer/DOMLex.php @@ -75,8 +75,7 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer $tokens = array(); $this->tokenizeDOM( $doc->getElementsByTagName('html')->item(0)-> // - getElementsByTagName('body')->item(0)-> // - getElementsByTagName('div')->item(0), //
+ getElementsByTagName('body')->item(0), // $tokens ); return $tokens; @@ -272,7 +271,7 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer $ret .= ''; $ret .= ''; // No protection if $html contains a stray
! - $ret .= '
' . $html . '
'; + $ret .= '' . $html . ''; return $ret; } } diff --git a/library/vendor/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php b/library/vendor/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php index a4587e4cd..ff4fa218f 100644 --- a/library/vendor/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php +++ b/library/vendor/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php @@ -34,8 +34,7 @@ class HTMLPurifier_Lexer_PH5P extends HTMLPurifier_Lexer_DOMLex $tokens = array(); $this->tokenizeDOM( $doc->getElementsByTagName('html')->item(0)-> // - getElementsByTagName('body')->item(0)-> // - getElementsByTagName('div')->item(0) //
+ getElementsByTagName('body')->item(0) // , $tokens ); diff --git a/library/vendor/HTMLPurifier/Injector/RemoveEmpty.php b/library/vendor/HTMLPurifier/Injector/RemoveEmpty.php index cd885722e..01353ff1d 100644 --- a/library/vendor/HTMLPurifier/Injector/RemoveEmpty.php +++ b/library/vendor/HTMLPurifier/Injector/RemoveEmpty.php @@ -28,10 +28,10 @@ class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector private $removeNbspExceptions; /** + * Cached contents of %AutoFormat.RemoveEmpty.Predicate * @type array - * TODO: make me configurable */ - private $_exclude = array('colgroup' => 1, 'th' => 1, 'td' => 1, 'iframe' => 1); + private $exclude; /** * @param HTMLPurifier_Config $config @@ -45,6 +45,7 @@ class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector $this->context = $context; $this->removeNbsp = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp'); $this->removeNbspExceptions = $config->get('AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions'); + $this->exclude = $config->get('AutoFormat.RemoveEmpty.Predicate'); $this->attrValidator = new HTMLPurifier_AttrValidator(); } @@ -75,11 +76,15 @@ class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector break; } if (!$next || ($next instanceof HTMLPurifier_Token_End && $next->name == $token->name)) { - if (isset($this->_exclude[$token->name])) { - return; - } $this->attrValidator->validateToken($token, $this->config, $this->context); $token->armor['ValidateAttributes'] = true; + if (isset($this->exclude[$token->name])) { + $r = true; + foreach ($this->exclude[$token->name] as $elem) { + if (!isset($token->attr[$elem])) $r = false; + } + if ($r) return; + } if (isset($token->attr['id']) || isset($token->attr['name'])) { return; } diff --git a/library/vendor/HTMLPurifier/Lexer/DOMLex.php b/library/vendor/HTMLPurifier/Lexer/DOMLex.php index 720754454..b81819290 100644 --- a/library/vendor/HTMLPurifier/Lexer/DOMLex.php +++ b/library/vendor/HTMLPurifier/Lexer/DOMLex.php @@ -75,8 +75,7 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer $tokens = array(); $this->tokenizeDOM( $doc->getElementsByTagName('html')->item(0)-> // - getElementsByTagName('body')->item(0)-> // - getElementsByTagName('div')->item(0), //
+ getElementsByTagName('body')->item(0), // $tokens ); return $tokens; @@ -272,7 +271,7 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer $ret .= ''; $ret .= ''; // No protection if $html contains a stray
! - $ret .= '
' . $html . '
'; + $ret .= '' . $html . ''; return $ret; } } diff --git a/library/vendor/HTMLPurifier/Lexer/PH5P.php b/library/vendor/HTMLPurifier/Lexer/PH5P.php index a4587e4cd..ff4fa218f 100644 --- a/library/vendor/HTMLPurifier/Lexer/PH5P.php +++ b/library/vendor/HTMLPurifier/Lexer/PH5P.php @@ -34,8 +34,7 @@ class HTMLPurifier_Lexer_PH5P extends HTMLPurifier_Lexer_DOMLex $tokens = array(); $this->tokenizeDOM( $doc->getElementsByTagName('html')->item(0)-> // - getElementsByTagName('body')->item(0)-> // - getElementsByTagName('div')->item(0) //
+ getElementsByTagName('body')->item(0) // , $tokens ); diff --git a/library/vendor/HTMLPurifier/SOURCE b/library/vendor/HTMLPurifier/SOURCE index 034876b50..1d8335915 100644 --- a/library/vendor/HTMLPurifier/SOURCE +++ b/library/vendor/HTMLPurifier/SOURCE @@ -1,5 +1,5 @@ -curl https://codeload.github.com/ezyang/htmlpurifier/tar.gz/v4.6.0 -o htmlpurifier-4.6.0.tar.gz -tar xzf htmlpurifier-4.6.0.tar.gz --strip-components 1 htmlpurifier-4.6.0/LICENSE -tar xzf htmlpurifier-4.6.0.tar.gz --strip-components 2 htmlpurifier-4.6.0/library/*.php -tar xzf htmlpurifier-4.6.0.tar.gz --strip-components 3 htmlpurifier-4.6.0/library/HTMLPurifier/* -rm htmlpurifier-4.6.0.tar.gz +curl https://codeload.github.com/ezyang/htmlpurifier/tar.gz/v4.7.0 -o htmlpurifier-4.7.0.tar.gz +tar xzf htmlpurifier-4.7.0.tar.gz --strip-components 1 htmlpurifier-4.7.0/LICENSE +tar xzf htmlpurifier-4.7.0.tar.gz --strip-components 2 htmlpurifier-4.7.0/library/*.php +tar xzf htmlpurifier-4.7.0.tar.gz --strip-components 3 htmlpurifier-4.7.0/library/HTMLPurifier/* +rm htmlpurifier-4.7.0.tar.gz From 63734b923ab5e0abeca6ba285395337f92e2f5b1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 13:00:00 +0200 Subject: [PATCH 231/280] vendor: Upgrade JShrink to version 1.1.0 refs #10044 --- library/vendor/JShrink/Minifier.php | 34 ++++++++++++++--------------- library/vendor/JShrink/SOURCE | 8 +++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/library/vendor/JShrink/Minifier.php b/library/vendor/JShrink/Minifier.php index 22ae087a0..86734dab7 100644 --- a/library/vendor/JShrink/Minifier.php +++ b/library/vendor/JShrink/Minifier.php @@ -222,7 +222,7 @@ class Minifier default: // check for some regex that breaks stuff - if ($this->a == '/' && ($this->b == '\'' || $this->b == '"')) { + if ($this->a === '/' && ($this->b === '\'' || $this->b === '"')) { $this->saveRegex(); continue; } @@ -311,10 +311,10 @@ class Minifier $this->c = $this->getChar(); - if ($this->c == '/') { + if ($this->c === '/') { return $this->processOneLineComments($startIndex); - } elseif ($this->c == '*') { + } elseif ($this->c === '*') { return $this->processMultiLineComments($startIndex); } @@ -336,7 +336,7 @@ class Minifier $this->getNext("\n"); if ($thirdCommentString == '@') { - $endPoint = ($this->index) - $startIndex; + $endPoint = $this->index - $startIndex; unset($this->c); $char = "\n" . substr($this->input, $startIndex, $endPoint); } else { @@ -369,8 +369,8 @@ class Minifier $char = $this->getChar(); // get next real character // Now we reinsert conditional comments and YUI-style licensing comments - if (($this->options['flaggedComments'] && $thirdCommentString == '!') - || ($thirdCommentString == '@') ) { + if (($this->options['flaggedComments'] && $thirdCommentString === '!') + || ($thirdCommentString === '@') ) { // If conditional comments or flagged comments are not the first thing in the script // we need to echo a and fill it with a space before moving on. @@ -379,7 +379,7 @@ class Minifier $this->a = " "; // If the comment started on a new line we let it stay on the new line - if ($this->input[($startIndex - 1)] == "\n") { + if ($this->input[($startIndex - 1)] === "\n") { echo "\n"; } } @@ -444,7 +444,7 @@ class Minifier $this->a = $this->b; // If this isn't a string we don't need to do anything. - if ($this->a != "'" && $this->a != '"') { + if ($this->a !== "'" && $this->a !== '"') { return; } @@ -455,7 +455,7 @@ class Minifier echo $this->a; // Loop until the string is done - while (1) { + while (true) { // Grab the very next character and load it into a $this->a = $this->getChar(); @@ -485,7 +485,7 @@ class Minifier $this->b = $this->getChar(); // If b is a new line we discard a and b and restart the loop. - if ($this->b == "\n") { + if ($this->b === "\n") { break; } @@ -513,15 +513,15 @@ class Minifier echo $this->a . $this->b; while (($this->a = $this->getChar()) !== false) { - if($this->a == '/') + if($this->a === '/') break; - if ($this->a == '\\') { + if ($this->a === '\\') { echo $this->a; $this->a = $this->getChar(); } - if($this->a == "\n") + if($this->a === "\n") throw new \RuntimeException('Unclosed regex pattern at position: ' . $this->index); echo $this->a; @@ -537,7 +537,7 @@ class Minifier */ protected static function isAlphaNumeric($char) { - return preg_match('/^[\w\$]$/', $char) === 1 || $char == '/'; + return preg_match('/^[\w\$\pL]$/', $char) === 1 || $char == '/'; } /** @@ -552,14 +552,14 @@ class Minifier $lock = '"LOCK---' . crc32(time()) . '"'; $matches = array(); - preg_match('/([+-])(\s+)([+-])/', $js, $matches); + preg_match('/([+-])(\s+)([+-])/S', $js, $matches); if (empty($matches)) { return $js; } $this->locks[$lock] = $matches[2]; - $js = preg_replace('/([+-])\s+([+-])/', "$1{$lock}$2", $js); + $js = preg_replace('/([+-])\s+([+-])/S', "$1{$lock}$2", $js); /* -- */ return $js; @@ -573,7 +573,7 @@ class Minifier */ protected function unlock($js) { - if (!count($this->locks)) { + if (empty($this->locks)) { return $js; } diff --git a/library/vendor/JShrink/SOURCE b/library/vendor/JShrink/SOURCE index fb7b42024..cf70941e4 100644 --- a/library/vendor/JShrink/SOURCE +++ b/library/vendor/JShrink/SOURCE @@ -1,4 +1,4 @@ -curl https://codeload.github.com/tedious/JShrink/tar.gz/v1.0.1 -o JShrink-1.0.1.tar.gz -tar xzf JShrink-1.0.1.tar.gz --strip-components 1 JShrink-1.0.1/LICENSE -tar xzf JShrink-1.0.1.tar.gz --strip-components 3 JShrink-1.0.1/src/JShrink/Minifier.php -rm JShrink-1.0.1.tar.gz +curl https://codeload.github.com/tedious/JShrink/tar.gz/v1.1.0 -o JShrink-1.1.0.tar.gz +tar xzf JShrink-1.1.0.tar.gz --strip-components 1 JShrink-1.1.0/LICENSE +tar xzf JShrink-1.1.0.tar.gz --strip-components 3 JShrink-1.1.0/src/JShrink/Minifier.php +rm JShrink-1.1.0.tar.gz From 4adaf5a2d0068e8f140b1f0dbbe076711dc75c12 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 14:25:18 +0200 Subject: [PATCH 232/280] vendor: Upgrade Parsedown to version 1.5.0 refs #10044 --- library/vendor/Parsedown/Parsedown.php | 1230 +++++++++++++----------- library/vendor/Parsedown/SOURCE | 12 +- 2 files changed, 687 insertions(+), 555 deletions(-) diff --git a/library/vendor/Parsedown/Parsedown.php b/library/vendor/Parsedown/Parsedown.php index 92f3dd897..71a033e2e 100644 --- a/library/vendor/Parsedown/Parsedown.php +++ b/library/vendor/Parsedown/Parsedown.php @@ -15,29 +15,19 @@ class Parsedown { - # - # Philosophy + # ~ - # Markdown is intended to be easy-to-read by humans - those of us who read - # line by line, left to right, top to bottom. In order to take advantage of - # this, Parsedown tries to read in a similar way. It breaks texts into - # lines, it iterates through them and it looks at how they start and relate - # to each other. + const version = '1.5.0'; - # # ~ function text($text) { # make sure no definitions are set - $this->Definitions = array(); + $this->DefinitionData = array(); # standardize line breaks - $text = str_replace("\r\n", "\n", $text); - $text = str_replace("\r", "\n", $text); - - # replace tabs with spaces - $text = str_replace("\t", ' ', $text); + $text = str_replace(array("\r\n", "\r"), "\n", $text); # remove surrounding line breaks $text = trim($text, "\n"); @@ -58,8 +48,6 @@ class Parsedown # Setters # - private $breaksEnabled; - function setBreaksEnabled($breaksEnabled) { $this->breaksEnabled = $breaksEnabled; @@ -67,15 +55,35 @@ class Parsedown return $this; } + protected $breaksEnabled; + + function setMarkupEscaped($markupEscaped) + { + $this->markupEscaped = $markupEscaped; + + return $this; + } + + protected $markupEscaped; + + function setUrlsLinked($urlsLinked) + { + $this->urlsLinked = $urlsLinked; + + return $this; + } + + protected $urlsLinked = true; + # # Lines # protected $BlockTypes = array( - '#' => array('Atx'), + '#' => array('Header'), '*' => array('Rule', 'List'), '+' => array('List'), - '-' => array('Setext', 'Table', 'Rule', 'List'), + '-' => array('SetextHeader', 'Table', 'Rule', 'List'), '0' => array('List'), '1' => array('List'), '2' => array('List'), @@ -88,8 +96,9 @@ class Parsedown '9' => array('List'), ':' => array('Table'), '<' => array('Comment', 'Markup'), - '=' => array('Setext'), + '=' => array('SetextHeader'), '>' => array('Quote'), + '[' => array('Reference'), '_' => array('Rule'), '`' => array('FencedCode'), '|' => array('Table'), @@ -105,7 +114,7 @@ class Parsedown # ~ protected $unmarkedBlockTypes = array( - 'CodeBlock', + 'Code', ); # @@ -128,6 +137,23 @@ class Parsedown continue; } + if (strpos($line, "\t") !== false) + { + $parts = explode("\t", $line); + + $line = $parts[0]; + + unset($parts[0]); + + foreach ($parts as $part) + { + $shortage = 4 - mb_strlen($line, 'utf-8') % 4; + + $line .= str_repeat(' ', $shortage); + $line .= $part; + } + } + $indent = 0; while (isset($line[$indent]) and $line[$indent] === ' ') @@ -145,7 +171,7 @@ class Parsedown if (isset($CurrentBlock['incomplete'])) { - $Block = $this->{'addTo'.$CurrentBlock['type']}($Line, $CurrentBlock); + $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); if (isset($Block)) { @@ -155,9 +181,9 @@ class Parsedown } else { - if (method_exists($this, 'complete'.$CurrentBlock['type'])) + if (method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) { - $CurrentBlock = $this->{'complete'.$CurrentBlock['type']}($CurrentBlock); + $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } unset($CurrentBlock['incomplete']); @@ -168,21 +194,6 @@ class Parsedown $marker = $text[0]; - if (isset($this->DefinitionTypes[$marker])) - { - foreach ($this->DefinitionTypes[$marker] as $definitionType) - { - $Definition = $this->{'identify'.$definitionType}($Line, $CurrentBlock); - - if (isset($Definition)) - { - $this->Definitions[$definitionType][$Definition['id']] = $Definition['data']; - - continue 2; - } - } - } - # ~ $blockTypes = $this->unmarkedBlockTypes; @@ -200,7 +211,7 @@ class Parsedown foreach ($blockTypes as $blockType) { - $Block = $this->{'identify'.$blockType}($Line, $CurrentBlock); + $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); if (isset($Block)) { @@ -208,12 +219,12 @@ class Parsedown if ( ! isset($Block['identified'])) { - $Elements []= $CurrentBlock['element']; + $Blocks []= $CurrentBlock; $Block['identified'] = true; } - if (method_exists($this, 'addTo'.$blockType)) + if (method_exists($this, 'block'.$blockType.'Continue')) { $Block['incomplete'] = true; } @@ -232,9 +243,9 @@ class Parsedown } else { - $Elements []= $CurrentBlock['element']; + $Blocks []= $CurrentBlock; - $CurrentBlock = $this->buildParagraph($Line); + $CurrentBlock = $this->paragraph($Line); $CurrentBlock['identified'] = true; } @@ -242,59 +253,49 @@ class Parsedown # ~ - if (isset($CurrentBlock['incomplete']) and method_exists($this, 'complete'.$CurrentBlock['type'])) + if (isset($CurrentBlock['incomplete']) and method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) { - $CurrentBlock = $this->{'complete'.$CurrentBlock['type']}($CurrentBlock); + $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } # ~ - $Elements []= $CurrentBlock['element']; + $Blocks []= $CurrentBlock; - unset($Elements[0]); + unset($Blocks[0]); # ~ - $markup = $this->elements($Elements); + $markup = ''; + + foreach ($Blocks as $Block) + { + if (isset($Block['hidden'])) + { + continue; + } + + $markup .= "\n"; + $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); + } + + $markup .= "\n"; # ~ return $markup; } - # - # Atx - - protected function identifyAtx($Line) - { - if (isset($Line['text'][1])) - { - $level = 1; - - while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') - { - $level ++; - } - - $text = trim($Line['text'], '# '); - - $Block = array( - 'element' => array( - 'name' => 'h'.$level, - 'text' => $text, - 'handler' => 'line', - ), - ); - - return $Block; - } - } - # # Code - protected function identifyCodeBlock($Line) + protected function blockCode($Line, $Block = null) { + if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) + { + return; + } + if ($Line['indent'] >= 4) { $text = substr($Line['body'], 4); @@ -314,7 +315,7 @@ class Parsedown } } - protected function addToCodeBlock($Line, $Block) + protected function blockCodeContinue($Line, $Block) { if ($Line['indent'] >= 4) { @@ -335,7 +336,7 @@ class Parsedown } } - protected function completeCodeBlock($Block) + protected function blockCodeComplete($Block) { $text = $Block['element']['text']['text']; @@ -349,12 +350,17 @@ class Parsedown # # Comment - protected function identifyComment($Line) + protected function blockComment($Line) { + if ($this->markupEscaped) + { + return; + } + if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') { $Block = array( - 'element' => $Line['body'], + 'markup' => $Line['body'], ); if (preg_match('/-->$/', $Line['text'])) @@ -366,14 +372,14 @@ class Parsedown } } - protected function addToComment($Line, array $Block) + protected function blockCommentContinue($Line, array $Block) { if (isset($Block['closed'])) { return; } - $Block['element'] .= "\n" . $Line['body']; + $Block['markup'] .= "\n" . $Line['body']; if (preg_match('/-->$/', $Line['text'])) { @@ -386,7 +392,7 @@ class Parsedown # # Fenced Code - protected function identifyFencedCode($Line) + protected function blockFencedCode($Line) { if (preg_match('/^(['.$Line['text'][0].']{3,})[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) { @@ -417,7 +423,7 @@ class Parsedown } } - protected function addToFencedCode($Line, $Block) + protected function blockFencedCodeContinue($Line, $Block) { if (isset($Block['complete'])) { @@ -445,7 +451,7 @@ class Parsedown return $Block; } - protected function completeFencedCode($Block) + protected function blockFencedCodeComplete($Block) { $text = $Block['element']['text']['text']; @@ -456,10 +462,43 @@ class Parsedown return $Block; } + # + # Header + + protected function blockHeader($Line) + { + if (isset($Line['text'][1])) + { + $level = 1; + + while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') + { + $level ++; + } + + if ($level > 6) + { + return; + } + + $text = trim($Line['text'], '# '); + + $Block = array( + 'element' => array( + 'name' => 'h' . min(6, $level), + 'text' => $text, + 'handler' => 'line', + ), + ); + + return $Block; + } + } + # # List - protected function identifyList($Line) + protected function blockList($Line) { list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); @@ -488,9 +527,9 @@ class Parsedown } } - protected function addToList($Line, array $Block) + protected function blockListContinue($Line, array $Block) { - if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'[ ]+(.*)/', $Line['text'], $matches)) + if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) { if (isset($Block['interrupted'])) { @@ -501,11 +540,13 @@ class Parsedown unset($Block['li']); + $text = isset($matches[1]) ? $matches[1] : ''; + $Block['li'] = array( 'name' => 'li', 'handler' => 'li', 'text' => array( - $matches[1], + $text, ), ); @@ -514,6 +555,11 @@ class Parsedown return $Block; } + if ($Line['text'][0] === '[' and $this->blockReference($Line)) + { + return $Block; + } + if ( ! isset($Block['interrupted'])) { $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); @@ -540,7 +586,7 @@ class Parsedown # # Quote - protected function identifyQuote($Line) + protected function blockQuote($Line) { if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) { @@ -556,7 +602,7 @@ class Parsedown } } - protected function addToQuote($Line, array $Block) + protected function blockQuoteContinue($Line, array $Block) { if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) { @@ -583,9 +629,9 @@ class Parsedown # # Rule - protected function identifyRule($Line) + protected function blockRule($Line) { - if (preg_match('/^(['.$Line['text'][0].'])([ ]{0,2}\1){2,}[ ]*$/', $Line['text'])) + if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) { $Block = array( 'element' => array( @@ -600,7 +646,7 @@ class Parsedown # # Setext - protected function identifySetext($Line, array $Block = null) + protected function blockSetextHeader($Line, array $Block = null) { if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) { @@ -618,9 +664,14 @@ class Parsedown # # Markup - protected function identifyMarkup($Line) + protected function blockMarkup($Line) { - if (preg_match('/^<(\w[\w\d]*)(?:[ ][^>\/]*)?(\/?)[ ]*>/', $Line['text'], $matches)) + if ($this->markupEscaped) + { + return; + } + + if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) { if (in_array($matches[1], $this->textLevelElements)) { @@ -628,36 +679,54 @@ class Parsedown } $Block = array( - 'element' => $Line['body'], + 'name' => $matches[1], + 'depth' => 0, + 'markup' => $Line['text'], ); - if ($matches[2] or $matches[1] === 'hr' or preg_match('/<\/'.$matches[1].'>[ ]*$/', $Line['text'])) + $length = strlen($matches[0]); + + $remainder = substr($Line['text'], $length); + + if (trim($remainder) === '') { - $Block['closed'] = true; + if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) + { + $Block['closed'] = true; + + $Block['void'] = true; + } } else { - $Block['depth'] = 0; - $Block['name'] = $matches[1]; + if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) + { + return; + } + + if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) + { + $Block['closed'] = true; + } } return $Block; } } - protected function addToMarkup($Line, array $Block) + protected function blockMarkupContinue($Line, array $Block) { if (isset($Block['closed'])) { return; } - if (preg_match('/<'.$Block['name'].'([ ][^\/]+)?>/', $Line['text'])) # opening tag + if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open { $Block['depth'] ++; } - if (stripos($Line['text'], '') !== false) # closing tag + if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close { if ($Block['depth'] > 0) { @@ -667,17 +736,55 @@ class Parsedown { $Block['closed'] = true; } + + $Block['markup'] .= $matches[1]; } - $Block['element'] .= "\n".$Line['body']; + if (isset($Block['interrupted'])) + { + $Block['markup'] .= "\n"; + + unset($Block['interrupted']); + } + + $Block['markup'] .= "\n".$Line['body']; return $Block; } + # + # Reference + + protected function blockReference($Line) + { + if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) + { + $id = strtolower($matches[1]); + + $Data = array( + 'url' => $matches[2], + 'title' => null, + ); + + if (isset($matches[3])) + { + $Data['title'] = $matches[3]; + } + + $this->DefinitionData['Reference'][$id] = $Data; + + $Block = array( + 'hidden' => true, + ); + + return $Block; + } + } + # # Table - protected function identifyTable($Line, array $Block = null) + protected function blockTable($Line, array $Block = null) { if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) { @@ -711,7 +818,7 @@ class Parsedown $alignment = 'left'; } - if (substr($dividerCell, -1) === ':') + if (substr($dividerCell, - 1) === ':') { $alignment = $alignment === 'left' ? 'center' : 'right'; } @@ -745,7 +852,7 @@ class Parsedown $alignment = $alignments[$index]; $HeaderElement['attributes'] = array( - 'align' => $alignment, + 'style' => 'text-align: '.$alignment.';', ); } @@ -784,8 +891,13 @@ class Parsedown } } - protected function addToTable($Line, array $Block) + protected function blockTableContinue($Line, array $Block) { + if (isset($Block['interrupted'])) + { + return; + } + if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) { $Elements = array(); @@ -795,9 +907,9 @@ class Parsedown $row = trim($row); $row = trim($row, '|'); - $cells = explode('|', $row); + preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); - foreach ($cells as $index => $cell) + foreach ($matches[0] as $index => $cell) { $cell = trim($cell); @@ -810,7 +922,7 @@ class Parsedown if (isset($Block['alignments'][$index])) { $Element['attributes'] = array( - 'align' => $Block['alignments'][$index], + 'style' => 'text-align: '.$Block['alignments'][$index].';', ); } @@ -829,35 +941,11 @@ class Parsedown } } - # - # Definitions - # - - protected function identifyReference($Line) - { - if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) - { - $Definition = array( - 'id' => strtolower($matches[1]), - 'data' => array( - 'url' => $matches[2], - ), - ); - - if (isset($matches[3])) - { - $Definition['data']['title'] = $matches[3]; - } - - return $Definition; - } - } - # # ~ # - protected function buildParagraph($Line) + protected function paragraph($Line) { $Block = array( 'element' => array( @@ -871,7 +959,431 @@ class Parsedown } # + # Inline Elements + # + + protected $InlineTypes = array( + '"' => array('SpecialCharacter'), + '!' => array('Image'), + '&' => array('SpecialCharacter'), + '*' => array('Emphasis'), + ':' => array('Url'), + '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), + '>' => array('SpecialCharacter'), + '[' => array('Link'), + '_' => array('Emphasis'), + '`' => array('Code'), + '~' => array('Strikethrough'), + '\\' => array('EscapeSequence'), + ); + # ~ + + protected $inlineMarkerList = '!"*_&[:<>`~\\'; + + # + # ~ + # + + public function line($text) + { + $markup = ''; + + $unexaminedText = $text; + + $markerPosition = 0; + + while ($excerpt = strpbrk($unexaminedText, $this->inlineMarkerList)) + { + $marker = $excerpt[0]; + + $markerPosition += strpos($unexaminedText, $marker); + + $Excerpt = array('text' => $excerpt, 'context' => $text); + + foreach ($this->InlineTypes[$marker] as $inlineType) + { + $Inline = $this->{'inline'.$inlineType}($Excerpt); + + if ( ! isset($Inline)) + { + continue; + } + + if (isset($Inline['position']) and $Inline['position'] > $markerPosition) # position is ahead of marker + { + continue; + } + + if ( ! isset($Inline['position'])) + { + $Inline['position'] = $markerPosition; + } + + $unmarkedText = substr($text, 0, $Inline['position']); + + $markup .= $this->unmarkedText($unmarkedText); + + $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); + + $text = substr($text, $Inline['position'] + $Inline['extent']); + + $unexaminedText = $text; + + $markerPosition = 0; + + continue 2; + } + + $unexaminedText = substr($excerpt, 1); + + $markerPosition ++; + } + + $markup .= $this->unmarkedText($text); + + return $markup; + } + + # + # ~ + # + + protected function inlineCode($Excerpt) + { + $marker = $Excerpt['text'][0]; + + if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), + 'element' => array( + 'name' => 'code', + 'text' => $text, + ), + ); + } + } + + protected function inlineEmailTag($Excerpt) + { + if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) + { + $url = $matches[1]; + + if ( ! isset($matches[2])) + { + $url = 'mailto:' . $url; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $matches[1], + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + protected function inlineEmphasis($Excerpt) + { + if ( ! isset($Excerpt['text'][1])) + { + return; + } + + $marker = $Excerpt['text'][0]; + + if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) + { + $emphasis = 'strong'; + } + elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) + { + $emphasis = 'em'; + } + else + { + return; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => $emphasis, + 'handler' => 'line', + 'text' => $matches[1], + ), + ); + } + + protected function inlineEscapeSequence($Excerpt) + { + if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) + { + return array( + 'markup' => $Excerpt['text'][1], + 'extent' => 2, + ); + } + } + + protected function inlineImage($Excerpt) + { + if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') + { + return; + } + + $Excerpt['text']= substr($Excerpt['text'], 1); + + $Link = $this->inlineLink($Excerpt); + + if ($Link === null) + { + return; + } + + $Inline = array( + 'extent' => $Link['extent'] + 1, + 'element' => array( + 'name' => 'img', + 'attributes' => array( + 'src' => $Link['element']['attributes']['href'], + 'alt' => $Link['element']['text'], + ), + ), + ); + + $Inline['element']['attributes'] += $Link['element']['attributes']; + + unset($Inline['element']['attributes']['href']); + + return $Inline; + } + + protected function inlineLink($Excerpt) + { + $Element = array( + 'name' => 'a', + 'handler' => 'line', + 'text' => null, + 'attributes' => array( + 'href' => null, + 'title' => null, + ), + ); + + $extent = 0; + + $remainder = $Excerpt['text']; + + if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches)) + { + $Element['text'] = $matches[1]; + + $extent += strlen($matches[0]); + + $remainder = substr($remainder, $extent); + } + else + { + return; + } + + if (preg_match('/^[(]((?:[^ (]|[(][^ )]+[)])+)(?:[ ]+("[^"]+"|\'[^\']+\'))?[)]/', $remainder, $matches)) + { + $Element['attributes']['href'] = $matches[1]; + + if (isset($matches[2])) + { + $Element['attributes']['title'] = substr($matches[2], 1, - 1); + } + + $extent += strlen($matches[0]); + } + else + { + if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) + { + $definition = $matches[1] ? $matches[1] : $Element['text']; + $definition = strtolower($definition); + + $extent += strlen($matches[0]); + } + else + { + $definition = strtolower($Element['text']); + } + + if ( ! isset($this->DefinitionData['Reference'][$definition])) + { + return; + } + + $Definition = $this->DefinitionData['Reference'][$definition]; + + $Element['attributes']['href'] = $Definition['url']; + $Element['attributes']['title'] = $Definition['title']; + } + + $Element['attributes']['href'] = str_replace(array('&', '<'), array('&', '<'), $Element['attributes']['href']); + + return array( + 'extent' => $extent, + 'element' => $Element, + ); + } + + protected function inlineMarkup($Excerpt) + { + if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false) + { + return; + } + + if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + + if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + + if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + } + + protected function inlineSpecialCharacter($Excerpt) + { + if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) + { + return array( + 'markup' => '&', + 'extent' => 1, + ); + } + + $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); + + if (isset($SpecialCharacter[$Excerpt['text'][0]])) + { + return array( + 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', + 'extent' => 1, + ); + } + } + + protected function inlineStrikethrough($Excerpt) + { + if ( ! isset($Excerpt['text'][1])) + { + return; + } + + if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) + { + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'del', + 'text' => $matches[1], + 'handler' => 'line', + ), + ); + } + } + + protected function inlineUrl($Excerpt) + { + if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') + { + return; + } + + if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) + { + $Inline = array( + 'extent' => strlen($matches[0][0]), + 'position' => $matches[0][1], + 'element' => array( + 'name' => 'a', + 'text' => $matches[0][0], + 'attributes' => array( + 'href' => $matches[0][0], + ), + ), + ); + + return $Inline; + } + } + + protected function inlineUrlTag($Excerpt) + { + if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) + { + $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $url, + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + # + # ~ + + protected $unmarkedInlineTypes = array("\n" => 'Break', '://' => 'Url'); + + # ~ + + protected function unmarkedText($text) + { + if ($this->breaksEnabled) + { + $text = preg_replace('/[ ]*\n/', "
\n", $text); + } + else + { + $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); + $text = str_replace(" \n", "\n", $text); + } + + return $text; + } + + # + # Handlers # protected function element(array $Element) @@ -882,6 +1394,11 @@ class Parsedown { foreach ($Element['attributes'] as $name => $value) { + if ($value === null) + { + continue; + } + $markup .= ' '.$name.'="'.$value.'"'; } } @@ -915,21 +1432,7 @@ class Parsedown foreach ($Elements as $Element) { - if ($Element === null) - { - continue; - } - - $markup .= "\n"; - - if (is_string($Element)) # because of Markup - { - $markup .= $Element; - - continue; - } - - $markup .= $this->element($Element); + $markup .= "\n" . $this->element($Element); } $markup .= "\n"; @@ -937,382 +1440,8 @@ class Parsedown return $markup; } - # - # Spans - # - - protected $SpanTypes = array( - '!' => array('Link'), # ? - '&' => array('Ampersand'), - '*' => array('Emphasis'), - '/' => array('Url'), - '<' => array('UrlTag', 'EmailTag', 'Tag', 'LessThan'), - '[' => array('Link'), - '_' => array('Emphasis'), - '`' => array('InlineCode'), - '~' => array('Strikethrough'), - '\\' => array('EscapeSequence'), - ); - # ~ - protected $spanMarkerList = '*_!&[spanMarkerList)) - { - $marker = $excerpt[0]; - - $markerPosition += strpos($remainder, $marker); - - $Excerpt = array('text' => $excerpt, 'context' => $text); - - foreach ($this->SpanTypes[$marker] as $spanType) - { - $handler = 'identify'.$spanType; - - $Span = $this->$handler($Excerpt); - - if ( ! isset($Span)) - { - continue; - } - - # The identified span can be ahead of the marker. - - if (isset($Span['position']) and $Span['position'] > $markerPosition) - { - continue; - } - - # Spans that start at the position of their marker don't have to set a position. - - if ( ! isset($Span['position'])) - { - $Span['position'] = $markerPosition; - } - - $plainText = substr($text, 0, $Span['position']); - - $markup .= $this->readPlainText($plainText); - - $markup .= isset($Span['markup']) ? $Span['markup'] : $this->element($Span['element']); - - $text = substr($text, $Span['position'] + $Span['extent']); - - $remainder = $text; - - $markerPosition = 0; - - continue 2; - } - - $remainder = substr($excerpt, 1); - - $markerPosition ++; - } - - $markup .= $this->readPlainText($text); - - return $markup; - } - - # - # ~ - # - - protected function identifyUrl($Excerpt) - { - if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '/') - { - return; - } - - if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) - { - $url = str_replace(array('&', '<'), array('&', '<'), $matches[0][0]); - - return array( - 'extent' => strlen($matches[0][0]), - 'position' => $matches[0][1], - 'element' => array( - 'name' => 'a', - 'text' => $url, - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - protected function identifyAmpersand($Excerpt) - { - if ( ! preg_match('/^&#?\w+;/', $Excerpt['text'])) - { - return array( - 'markup' => '&', - 'extent' => 1, - ); - } - } - - protected function identifyStrikethrough($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) - { - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'del', - 'text' => $matches[1], - 'handler' => 'line', - ), - ); - } - } - - protected function identifyEscapeSequence($Excerpt) - { - if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) - { - return array( - 'markup' => $Excerpt['text'][1], - 'extent' => 2, - ); - } - } - - protected function identifyLessThan() - { - return array( - 'markup' => '<', - 'extent' => 1, - ); - } - - protected function identifyUrlTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(https?:[\/]{2}[^\s]+?)>/i', $Excerpt['text'], $matches)) - { - $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $url, - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - protected function identifyEmailTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\S+?@\S+?)>/', $Excerpt['text'], $matches)) - { - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $matches[1], - 'attributes' => array( - 'href' => 'mailto:'.$matches[1], - ), - ), - ); - } - } - - protected function identifyTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<\/?\w.*?>/', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - } - - protected function identifyInlineCode($Excerpt) - { - $marker = $Excerpt['text'][0]; - - if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), - 'element' => array( - 'name' => 'code', - 'text' => $text, - ), - ); - } - } - - protected function identifyLink($Excerpt) - { - $extent = $Excerpt['text'][0] === '!' ? 1 : 0; - - if (strpos($Excerpt['text'], ']') and preg_match('/\[((?:[^][]|(?R))*)\]/', $Excerpt['text'], $matches)) - { - $Link = array('text' => $matches[1], 'label' => strtolower($matches[1])); - - $extent += strlen($matches[0]); - - $substring = substr($Excerpt['text'], $extent); - - if (preg_match('/^\s*\[([^][]+)\]/', $substring, $matches)) - { - $Link['label'] = strtolower($matches[1]); - - if (isset($this->Definitions['Reference'][$Link['label']])) - { - $Link += $this->Definitions['Reference'][$Link['label']]; - - $extent += strlen($matches[0]); - } - else - { - return; - } - } - elseif (isset($this->Definitions['Reference'][$Link['label']])) - { - $Link += $this->Definitions['Reference'][$Link['label']]; - - if (preg_match('/^[ ]*\[\]/', $substring, $matches)) - { - $extent += strlen($matches[0]); - } - } - elseif (preg_match('/^\([ ]*(.*?)(?:[ ]+[\'"](.+?)[\'"])?[ ]*\)/', $substring, $matches)) - { - $Link['url'] = $matches[1]; - - if (isset($matches[2])) - { - $Link['title'] = $matches[2]; - } - - $extent += strlen($matches[0]); - } - else - { - return; - } - } - else - { - return; - } - - $url = str_replace(array('&', '<'), array('&', '<'), $Link['url']); - - if ($Excerpt['text'][0] === '!') - { - $Element = array( - 'name' => 'img', - 'attributes' => array( - 'alt' => $Link['text'], - 'src' => $url, - ), - ); - } - else - { - $Element = array( - 'name' => 'a', - 'handler' => 'line', - 'text' => $Link['text'], - 'attributes' => array( - 'href' => $url, - ), - ); - } - - if (isset($Link['title'])) - { - $Element['attributes']['title'] = $Link['title']; - } - - return array( - 'extent' => $extent, - 'element' => $Element, - ); - } - - protected function identifyEmphasis($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - $marker = $Excerpt['text'][0]; - - if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'strong'; - } - elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'em'; - } - else - { - return; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => $emphasis, - 'handler' => 'line', - 'text' => $matches[1], - ), - ); - } - - # - # ~ - - protected function readPlainText($text) - { - $breakMarker = $this->breaksEnabled ? "\n" : " \n"; - - $text = str_replace($breakMarker, "
\n", $text); - - return $text; - } - - # - # ~ - # - protected function li($lines) { $markup = $this->lines($lines); @@ -1333,7 +1462,18 @@ class Parsedown } # - # Multiton + # Deprecated Methods + # + + function parse($text) + { + $markup = $this->text($text); + + return $markup; + } + + # + # Static Methods # static function instance($name = 'default') @@ -1352,41 +1492,33 @@ class Parsedown private static $instances = array(); - # - # Deprecated Methods - # - - /** - * @deprecated in favor of "text" - */ - function parse($text) - { - $markup = $this->text($text); - - return $markup; - } - # # Fields # - protected $Definitions; + protected $DefinitionData; # - # Read-only + # Read-Only protected $specialCharacters = array( - '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', + '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', ); protected $StrongRegex = array( - '*' => '/^[*]{2}((?:[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', - '_' => '/^__((?:[^_]|_[^_]*_)+?)__(?!_)/us', + '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', + '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', ); protected $EmRegex = array( - '*' => '/^[*]((?:[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', - '_' => '/^_((?:[^_]|__[^_]*__)+?)_(?!_)\b/us', + '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', + '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', + ); + + protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; + + protected $voidElements = array( + 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', ); protected $textLevelElements = array( diff --git a/library/vendor/Parsedown/SOURCE b/library/vendor/Parsedown/SOURCE index 43ee6c61c..cbbe887be 100644 --- a/library/vendor/Parsedown/SOURCE +++ b/library/vendor/Parsedown/SOURCE @@ -1,7 +1,7 @@ -RELEASE=1.0.0 -FILENAME=parsedown-$RELEASE -DESTINATION=. -wget -O ${FILENAME}.tar.gz https://github.com/erusev/parsedown/archive/${RELEASE}.tar.gz -tar xfz ${FILENAME}.tar.gz -C $DESTINATION/ --strip-components 1 $FILENAME/Parsedown.php $FILENAME/LICENSE.txt -chmod 644 $DESTINATION/Parsedown.php +RELEASE=1.5.0 +PARSEDOWN=parsedown-$RELEASE +curl https://codeload.github.com/erusev/parsedown/tar.gz/${RELEASE} -o ${PARSEDOWN}.tar.gz +tar xfz ${PARSEDOWN}.tar.gz --strip-components 1 ${PARSEDOWN}/Parsedown.php ${PARSEDOWN}/LICENSE.txt +chmod 0644 Parsedown.php mv LICENSE.txt LICENSE +rm ${PARSEDOWN}.tar.gz From bcdbf413a64b40d7660c189268eb1a85d100b454 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Tue, 1 Sep 2015 16:38:06 +0200 Subject: [PATCH 233/280] Add acknowledgement view and query Add backend queries and the controller to inspect active acknowledgements. refs #10032 --- .../controllers/AcknowledgementController.php | 78 +++++++++++++ .../views/scripts/acknowledgement/index.phtml | 104 ++++++++++++++++++ modules/monitoring/configuration.php | 5 +- .../Ido/Query/AcknowledgementQuery.php | 80 ++++++++++++++ .../Monitoring/DataView/Acknowledgement.php | 54 +++++++++ 5 files changed, 320 insertions(+), 1 deletion(-) create mode 100644 modules/monitoring/application/controllers/AcknowledgementController.php create mode 100644 modules/monitoring/application/views/scripts/acknowledgement/index.phtml create mode 100644 modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php create mode 100644 modules/monitoring/library/Monitoring/DataView/Acknowledgement.php diff --git a/modules/monitoring/application/controllers/AcknowledgementController.php b/modules/monitoring/application/controllers/AcknowledgementController.php new file mode 100644 index 000000000..a229a22a3 --- /dev/null +++ b/modules/monitoring/application/controllers/AcknowledgementController.php @@ -0,0 +1,78 @@ +getTabs()->add( + 'acknowledgement', + array( + 'title' => $this->translate( + 'Show acknowledgements' + ), + 'label' => $this->translate('Acknowledgements'), + 'url' => Url::fromRequest() + ) + )->extend(new DashboardAction())->activate('acknowledgement'); + $this->view->title = $this->translate('Acknowledgement'); + $this->setAutorefreshInterval(15); + $query = $this->backend->select()->from( + 'acknowledgement', + array( + 'acknowledgement_id', + 'instance_id', + 'entry_time', + 'acknowledgement_type', + 'object_id', + 'state', + 'author_name', + 'comment_data', + 'is_sticky', + 'persistent_comment', + 'acknowledgement_id', + 'notify_contacts', + 'end_time', + 'endpoint_object_id', + 'acknowledgement_is_service', + 'service', + 'host' + ) + ); + + $this->applyRestriction('monitoring/filter/objects', $query); + $this->filterQuery($query); + $this->view->acknowledgements = $query; + + $this->setupLimitControl(); + $this->setupPaginationControl($this->view->acknowledgements); + $this->setupSortControl(array( + 'entry_time' => $this->translate('Entry Time'), + 'end_time' => $this->translate('End Time'), + 'state' => $this->translate('Object State'), + 'author_name' => $this->translate('Author Name') + ), $query); + } + + /** + * Apply filters on a DataView + * + * @param DataView $dataView The DataView to apply filters on + * + * @return DataView $dataView + */ + protected function filterQuery(DataView $dataView) + { + $this->setupFilterControl($dataView); + $this->handleFormatRequest($dataView); + return $dataView; + } +} diff --git a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml b/modules/monitoring/application/views/scripts/acknowledgement/index.phtml new file mode 100644 index 000000000..83d41e4c1 --- /dev/null +++ b/modules/monitoring/application/views/scripts/acknowledgement/index.phtml @@ -0,0 +1,104 @@ + + +compact): ?> +
+ tabs; ?> +
+ render('list/components/selectioninfo.phtml'); ?> +
+

translate('Acknowledgements') ?>

+ sortBox; ?> + limiter; ?> + paginator; ?> + filterEditor; ?> +
+ +
+ + + + acknowledgement_is_service ? + Service::getStateText($acknowledgement->state) : Host::getStateText($acknowledgement->state); + ?> + + + + + + + +
+ icon('ok') ?> + timeAgo($acknowledgement->entry_time, $this->compact); ?> +
+ translate( + 'State was %s.', + 'Describes the past host or service state when an acknowledgement was set.' + ), $state) ?> +
+ acknowledgement_is_service): ?> + icon('service', $this->translate('Service Acknowledgement')) ?> + qlink( + $this->escape($acknowledgement->host) . ': ' . $this->escape($acknowledgement->service), + 'monitoring/service/show', + array( + 'service' => $acknowledgement->service, + 'host' => $acknowledgement->host + ), + array( + 'title' => sprintf( + $this->translate( + 'Show detailed information for this acknowledgement about service %s on host %s' + ), + $acknowledgement->service, + $acknowledgement->host + ), + 'class' => 'rowaction' + ) + ); ?> + + icon('host', $this->translate('Host Acknowledgement')) ?> + qlink( + $this->escape($acknowledgement->host), + 'monitoring/host/show', + array( + 'host' => $acknowledgement->host + ), + array( + 'title' => sprintf( + $this->translate('Show detailed information for this acknowledgement on host %s'), + $acknowledgement->host + ), + 'class' => 'rowaction' + ) + ); ?> + + +
+ icon('comment_data', $this->translate('Comment')); ?> + author_name) ? '[' . $this->escape($acknowledgement->author_name) . '] ' : ''; ?> + escape($acknowledgement->comment_data); ?> + +
+ is_sticky ? $this->icon( + 'attach', + $this->translate('Sticky, all notifications are disabled until the host or services recovers' + )) : ''; ?> + notify_contacts ? $this->icon( + 'bell', + $this->translate('Contacts are being notified about this acknowledgement.' + )) : ''; ?> + end_time ? sprintf( + $this->translate('Expires %s.'), + '' . $this->timeUntil($acknowledgement->end_time) . '' + ) : $this->translate('Does not expire.'); ?> +
+ + + translate('No comments found matching the filter'); ?> + +
diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 12b8236ab..4d915c123 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -184,7 +184,10 @@ $section->add($this->translate('Notifications'), array( 'url' => 'monitoring/list/notifications', 'priority' => 80 )); - +$section->add($this->translate('Acknowledgements'), array( + 'url' => 'monitoring/acknowledgement', + 'priority' => 90 +)); /* * History Section diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php new file mode 100644 index 000000000..a65eb0240 --- /dev/null +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php @@ -0,0 +1,80 @@ + array( + 'acknowledgement_id' => 'a.acknowledgement_id', + 'instance_id' => 'a.instance_id', + 'entry_time' => 'UNIX_TIMESTAMP(a.entry_time)', + 'acknowledgement_type' => 'IF (a.acknowledgement_type = 0, \'host\', \'service\')', + 'object_id' => 'a.object_id', + 'state' => 'a.state', + 'author_name' => 'a.author_name', + 'comment_data' => 'a.comment_data', + 'is_sticky' => 'a.is_sticky', + 'persistent_comment' => 'a.persistent_comment', + 'acknowledgement_id' => 'a.acknowledgement_id', + 'notify_contacts' => 'a.notify_contacts', + 'end_time' => 'UNIX_TIMESTAMP(a.end_time)', + 'endpoint_object_id' => 'a.endpoint_object_id' + ), + 'objects' => array( + 'acknowledgement_is_service' => 'IF (o.objecttype_id = 2, 1, 0)', + 'host' => 'o.name1', + 'service' => 'o.name2' + ) + ); + + /** + * @var Zend_Db_Select + */ + protected $acknowledgementQuery; + + /** + * {@inheritdoc} + */ + protected function joinBaseTables() + { + $this->acknowledgementQuery = $this->db->select(); + $this->select = $this->select->from( + array('o' => $this->prefix . 'objects') + ); + $this->select->joinLeft( + array('hs' => $this->prefix . 'hoststatus'), + 'hs.host_object_id = o.object_id AND o.is_active = 1', + array() + ); + $this->select->joinLeft( + array('ss' => $this->prefix . 'servicestatus'), + 'ss.service_object_id = o.object_id AND o.is_active = 1', + array() + ); + $ackTable = $this->prefix . 'acknowledgements'; + $subQuery = '(SELECT MAX(acknowledgement_id) FROM ' . $ackTable . ' WHERE object_id = a.object_id)'; + $this->select->join( + array('a' => $ackTable), + 'o.object_id = a.object_id ' . + 'AND ((o.objecttype_id = 2 AND ss.problem_has_been_acknowledged AND ss.acknowledgement_type = 2) ' . + ' OR (o.objecttype_id = 1 AND hs.problem_has_been_acknowledged AND hs.acknowledgement_type = 2)) ' . + 'AND o.is_active = 1 AND a.acknowledgement_id = ' . $subQuery, + array() + ); + + $this->joinedVirtualTables['objects'] = true; + $this->joinedVirtualTables['acknowledgements'] = true; + $this->joinedVirtualTables['hoststatus'] = true; + $this->joinedVirtualTables['servicestatus'] = true; + } +} diff --git a/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php b/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php new file mode 100644 index 000000000..2ed457af4 --- /dev/null +++ b/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php @@ -0,0 +1,54 @@ + Date: Tue, 1 Sep 2015 17:42:33 +0200 Subject: [PATCH 234/280] Cleanup --- .../controllers/AcknowledgementController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/controllers/AcknowledgementController.php b/modules/monitoring/application/controllers/AcknowledgementController.php index a229a22a3..55e003c49 100644 --- a/modules/monitoring/application/controllers/AcknowledgementController.php +++ b/modules/monitoring/application/controllers/AcknowledgementController.php @@ -52,14 +52,14 @@ class Monitoring_AcknowledgementController extends Controller $this->filterQuery($query); $this->view->acknowledgements = $query; - $this->setupLimitControl(); - $this->setupPaginationControl($this->view->acknowledgements); - $this->setupSortControl(array( - 'entry_time' => $this->translate('Entry Time'), - 'end_time' => $this->translate('End Time'), - 'state' => $this->translate('Object State'), - 'author_name' => $this->translate('Author Name') - ), $query); + $this->setupLimitControl() + ->setupPaginationControl($this->view->acknowledgements) + ->setupSortControl(array( + 'entry_time' => $this->translate('Entry Time'), + 'end_time' => $this->translate('End Time'), + 'state' => $this->translate('Object State'), + 'author_name' => $this->translate('Author Name') + ), $this->view->acknowledgements); } /** From 985f6ab85ef3fcbb6611e4e198cf2b528d8d9018 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Tue, 1 Sep 2015 17:42:51 +0200 Subject: [PATCH 235/280] Fix acknowledgement count query refs #10032 --- .../Monitoring/Backend/Ido/Query/AcknowledgementQuery.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php index a65eb0240..77782ec09 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php @@ -48,8 +48,9 @@ class AcknowledgementQuery extends IdoQuery protected function joinBaseTables() { $this->acknowledgementQuery = $this->db->select(); - $this->select = $this->select->from( - array('o' => $this->prefix . 'objects') + $this->select->from( + array('o' => $this->prefix . 'objects'), + array() ); $this->select->joinLeft( array('hs' => $this->prefix . 'hoststatus'), From 935691233b550829d80b9618a3d52421e93261a0 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 22:53:57 +0200 Subject: [PATCH 236/280] vendor: Upgrade Zend to version 1.12.15 refs #10044 --- library/vendor/Zend/Acl.php | 4 +- library/vendor/Zend/Acl/Assert/Interface.php | 4 +- library/vendor/Zend/Acl/Exception.php | 4 +- library/vendor/Zend/Acl/Resource.php | 4 +- .../vendor/Zend/Acl/Resource/Interface.php | 4 +- library/vendor/Zend/Acl/Role.php | 4 +- library/vendor/Zend/Acl/Role/Interface.php | 4 +- library/vendor/Zend/Acl/Role/Registry.php | 4 +- .../Zend/Acl/Role/Registry/Exception.php | 4 +- library/vendor/Zend/Amf/Adobe/Auth.php | 131 - library/vendor/Zend/Amf/Adobe/DbInspector.php | 103 - .../vendor/Zend/Amf/Adobe/Introspector.php | 314 --- library/vendor/Zend/Amf/Constants.php | 87 - .../Zend/Amf/Parse/Amf0/Deserializer.php | 301 --- .../vendor/Zend/Amf/Parse/Amf0/Serializer.php | 355 --- .../Zend/Amf/Parse/Amf3/Deserializer.php | 414 ---- .../vendor/Zend/Amf/Parse/Amf3/Serializer.php | 523 ---- .../vendor/Zend/Amf/Parse/Deserializer.php | 65 - library/vendor/Zend/Amf/Parse/InputStream.php | 38 - .../Zend/Amf/Parse/Resource/MysqlResult.php | 70 - .../Zend/Amf/Parse/Resource/MysqliResult.php | 128 - library/vendor/Zend/Amf/Parse/Serializer.php | 68 - library/vendor/Zend/Amf/Parse/TypeLoader.php | 222 -- library/vendor/Zend/Amf/Request.php | 243 -- library/vendor/Zend/Amf/Request/Http.php | 79 - library/vendor/Zend/Amf/Response.php | 202 -- library/vendor/Zend/Amf/Response/Http.php | 72 - library/vendor/Zend/Amf/Server.php | 1007 -------- library/vendor/Zend/Amf/Util/BinaryStream.php | 294 --- library/vendor/Zend/Amf/Value/MessageBody.php | 182 -- .../vendor/Zend/Amf/Value/MessageHeader.php | 81 - .../Amf/Value/Messaging/AbstractMessage.php | 92 - .../Value/Messaging/AcknowledgeMessage.php | 59 - .../Amf/Value/Messaging/ArrayCollection.php | 35 - .../Amf/Value/Messaging/CommandMessage.php | 118 - .../Zend/Amf/Value/Messaging/ErrorMessage.php | 66 - .../Amf/Value/Messaging/RemotingMessage.php | 72 - library/vendor/Zend/Amf/Value/TraitsInfo.php | 154 -- library/vendor/Zend/Application.php | 47 +- .../Zend/Application/Bootstrap/Bootstrap.php | 26 +- .../Bootstrap/BootstrapAbstract.php | 4 +- .../Application/Bootstrap/Bootstrapper.php | 4 +- .../Zend/Application/Bootstrap/Exception.php | 4 +- .../Bootstrap/ResourceBootstrapper.php | 4 +- library/vendor/Zend/Application/Exception.php | 4 +- .../Zend/Application/Module/Autoloader.php | 74 +- .../Zend/Application/Module/Bootstrap.php | 4 +- .../Application/Resource/Cachemanager.php | 4 +- .../vendor/Zend/Application/Resource/Db.php | 4 +- .../vendor/Zend/Application/Resource/Dojo.php | 4 +- .../Zend/Application/Resource/Exception.php | 4 +- .../Application/Resource/Frontcontroller.php | 17 +- .../Zend/Application/Resource/Layout.php | 4 +- .../Zend/Application/Resource/Locale.php | 10 +- .../vendor/Zend/Application/Resource/Log.php | 4 +- .../vendor/Zend/Application/Resource/Mail.php | 66 +- .../Zend/Application/Resource/Modules.php | 26 +- .../Zend/Application/Resource/Multidb.php | 6 +- .../Zend/Application/Resource/Navigation.php | 23 +- .../Zend/Application/Resource/Resource.php | 4 +- .../Application/Resource/ResourceAbstract.php | 4 +- .../Zend/Application/Resource/Router.php | 4 +- .../Zend/Application/Resource/Session.php | 4 +- .../Zend/Application/Resource/Translate.php | 18 +- .../Zend/Application/Resource/Useragent.php | 4 +- .../vendor/Zend/Application/Resource/View.php | 4 +- library/vendor/Zend/Auth.php | 4 +- library/vendor/Zend/Auth/Adapter/DbTable.php | 4 +- library/vendor/Zend/Auth/Adapter/Digest.php | 4 +- .../vendor/Zend/Auth/Adapter/Exception.php | 4 +- library/vendor/Zend/Auth/Adapter/Http.php | 4 +- .../Auth/Adapter/Http/Resolver/Exception.php | 4 +- .../Zend/Auth/Adapter/Http/Resolver/File.php | 4 +- .../Auth/Adapter/Http/Resolver/Interface.php | 4 +- .../vendor/Zend/Auth/Adapter/Interface.php | 4 +- library/vendor/Zend/Auth/Adapter/Ldap.php | 526 ++++ library/vendor/Zend/Auth/Adapter/OpenId.php | 4 +- library/vendor/Zend/Auth/Exception.php | 4 +- library/vendor/Zend/Auth/Result.php | 4 +- .../vendor/Zend/Auth/Storage/Exception.php | 4 +- .../vendor/Zend/Auth/Storage/Interface.php | 4 +- .../Zend/Auth/Storage/NonPersistent.php | 4 +- library/vendor/Zend/Auth/Storage/Session.php | 4 +- library/vendor/Zend/Barcode.php | 4 +- library/vendor/Zend/Barcode/Exception.php | 4 +- .../vendor/Zend/Barcode/Object/Code128.php | 4 +- library/vendor/Zend/Barcode/Object/Code25.php | 4 +- .../Zend/Barcode/Object/Code25interleaved.php | 4 +- library/vendor/Zend/Barcode/Object/Code39.php | 4 +- library/vendor/Zend/Barcode/Object/Ean13.php | 4 +- library/vendor/Zend/Barcode/Object/Ean2.php | 4 +- library/vendor/Zend/Barcode/Object/Ean5.php | 4 +- library/vendor/Zend/Barcode/Object/Ean8.php | 4 +- library/vendor/Zend/Barcode/Object/Error.php | 4 +- .../vendor/Zend/Barcode/Object/Exception.php | 4 +- .../vendor/Zend/Barcode/Object/Identcode.php | 4 +- library/vendor/Zend/Barcode/Object/Itf14.php | 4 +- .../vendor/Zend/Barcode/Object/Leitcode.php | 4 +- .../Zend/Barcode/Object/ObjectAbstract.php | 308 ++- library/vendor/Zend/Barcode/Object/Planet.php | 4 +- .../vendor/Zend/Barcode/Object/Postnet.php | 4 +- .../vendor/Zend/Barcode/Object/Royalmail.php | 4 +- library/vendor/Zend/Barcode/Object/Upca.php | 4 +- library/vendor/Zend/Barcode/Object/Upce.php | 4 +- .../Zend/Barcode/Renderer/Exception.php | 4 +- .../vendor/Zend/Barcode/Renderer/Image.php | 4 +- library/vendor/Zend/Barcode/Renderer/Pdf.php | 4 +- .../Barcode/Renderer/RendererAbstract.php | 6 +- library/vendor/Zend/Barcode/Renderer/Svg.php | 4 +- library/vendor/Zend/Cache.php | 4 +- library/vendor/Zend/Cache/Backend.php | 6 +- library/vendor/Zend/Cache/Backend/Apc.php | 353 +++ .../vendor/Zend/Cache/Backend/BlackHole.php | 4 +- .../Zend/Cache/Backend/ExtendedInterface.php | 4 +- library/vendor/Zend/Cache/Backend/File.php | 4 +- .../vendor/Zend/Cache/Backend/Interface.php | 4 +- .../Zend/Cache/Backend/Libmemcached.php | 482 ++++ .../vendor/Zend/Cache/Backend/Memcached.php | 507 ++++ library/vendor/Zend/Cache/Backend/Sqlite.php | 4 +- library/vendor/Zend/Cache/Backend/Static.php | 4 +- library/vendor/Zend/Cache/Backend/Test.php | 4 +- .../vendor/Zend/Cache/Backend/TwoLevels.php | 4 +- .../vendor/Zend/Cache/Backend/WinCache.php | 4 +- library/vendor/Zend/Cache/Backend/Xcache.php | 4 +- .../Zend/Cache/Backend/ZendPlatform.php | 4 +- .../vendor/Zend/Cache/Backend/ZendServer.php | 4 +- .../Zend/Cache/Backend/ZendServer/Disk.php | 4 +- .../Zend/Cache/Backend/ZendServer/ShMem.php | 4 +- library/vendor/Zend/Cache/Core.php | 26 +- library/vendor/Zend/Cache/Exception.php | 4 +- .../vendor/Zend/Cache/Frontend/Capture.php | 4 +- library/vendor/Zend/Cache/Frontend/Class.php | 6 +- library/vendor/Zend/Cache/Frontend/File.php | 6 +- .../vendor/Zend/Cache/Frontend/Function.php | 6 +- library/vendor/Zend/Cache/Frontend/Output.php | 4 +- library/vendor/Zend/Cache/Frontend/Page.php | 6 +- library/vendor/Zend/Cache/Manager.php | 4 +- library/vendor/Zend/Captcha/Adapter.php | 75 + library/vendor/Zend/Captcha/Base.php | 174 ++ library/vendor/Zend/Captcha/Dumb.php | 74 + library/vendor/Zend/Captcha/Exception.php | 36 + library/vendor/Zend/Captcha/Figlet.php | 82 + library/vendor/Zend/Captcha/Image.php | 619 +++++ library/vendor/Zend/Captcha/ReCaptcha.php | 278 +++ library/vendor/Zend/Captcha/Word.php | 417 ++++ library/vendor/Zend/Cloud/AbstractFactory.php | 66 - .../Zend/Cloud/DocumentService/Adapter.php | 155 -- .../Adapter/AbstractAdapter.php | 126 - .../DocumentService/Adapter/SimpleDb.php | 462 ---- .../Adapter/SimpleDb/Query.php | 173 -- .../DocumentService/Adapter/WindowsAzure.php | 622 ----- .../Adapter/WindowsAzure/Query.php | 167 -- .../Zend/Cloud/DocumentService/Document.php | 246 -- .../Cloud/DocumentService/DocumentSet.php | 68 - .../Zend/Cloud/DocumentService/Exception.php | 37 - .../Zend/Cloud/DocumentService/Factory.php | 74 - .../Zend/Cloud/DocumentService/Query.php | 185 -- .../Cloud/DocumentService/QueryAdapter.php | 102 - .../Zend/Cloud/Infrastructure/Adapter.php | 167 -- .../Adapter/AbstractAdapter.php | 167 -- .../Zend/Cloud/Infrastructure/Adapter/Ec2.php | 479 ---- .../Infrastructure/Adapter/Rackspace.php | 462 ---- .../Zend/Cloud/Infrastructure/Exception.php | 24 - .../Zend/Cloud/Infrastructure/Factory.php | 62 - .../Zend/Cloud/Infrastructure/Image.php | 174 -- .../Zend/Cloud/Infrastructure/ImageList.php | 213 -- .../Zend/Cloud/Infrastructure/Instance.php | 317 --- .../Cloud/Infrastructure/InstanceList.php | 213 -- .../Zend/Cloud/QueueService/Adapter.php | 146 -- .../QueueService/Adapter/AbstractAdapter.php | 89 - .../Zend/Cloud/QueueService/Adapter/Sqs.php | 273 --- .../QueueService/Adapter/WindowsAzure.php | 340 --- .../Cloud/QueueService/Adapter/ZendQueue.php | 297 --- .../Zend/Cloud/QueueService/Factory.php | 68 - .../Zend/Cloud/QueueService/Message.php | 60 - .../Zend/Cloud/QueueService/MessageSet.php | 68 - .../Zend/Cloud/StorageService/Adapter.php | 145 -- .../StorageService/Adapter/FileSystem.php | 263 -- .../StorageService/Adapter/Rackspace.php | 327 --- .../Zend/Cloud/StorageService/Adapter/S3.php | 324 --- .../StorageService/Adapter/WindowsAzure.php | 440 ---- .../Zend/Cloud/StorageService/Factory.php | 67 - .../vendor/Zend/CodeGenerator/Abstract.php | 147 -- .../Zend/CodeGenerator/Php/Abstract.php | 96 - .../vendor/Zend/CodeGenerator/Php/Class.php | 605 ----- .../Zend/CodeGenerator/Php/Docblock.php | 224 -- .../Zend/CodeGenerator/Php/Docblock/Tag.php | 176 -- .../Php/Docblock/Tag/License.php | 97 - .../CodeGenerator/Php/Docblock/Tag/Param.php | 127 - .../CodeGenerator/Php/Docblock/Tag/Return.php | 97 - .../vendor/Zend/CodeGenerator/Php/File.php | 460 ---- .../CodeGenerator/Php/Member/Abstract.php | 219 -- .../vendor/Zend/CodeGenerator/Php/Method.php | 232 -- .../Zend/CodeGenerator/Php/Parameter.php | 248 -- .../Php/Parameter/DefaultValue.php | 59 - .../Zend/CodeGenerator/Php/Property.php | 176 -- .../Php/Property/DefaultValue.php | 323 --- library/vendor/Zend/Config.php | 4 +- library/vendor/Zend/Config/Exception.php | 4 +- library/vendor/Zend/Config/Ini.php | 4 +- library/vendor/Zend/Config/Writer.php | 4 +- library/vendor/Zend/Config/Writer/Array.php | 4 +- .../Zend/Config/Writer/FileAbstract.php | 4 +- library/vendor/Zend/Config/Writer/Ini.php | 4 +- library/vendor/Zend/Config/Writer/Xml.php | 4 +- library/vendor/Zend/Config/Xml.php | 4 +- library/vendor/Zend/Config/Yaml.php | 4 +- library/vendor/Zend/Console/Getopt.php | 27 +- .../vendor/Zend/Console/Getopt/Exception.php | 4 +- library/vendor/Zend/Controller/Action.php | 4 +- .../Zend/Controller/Action/Exception.php | 4 +- .../Controller/Action/Helper/Abstract.php | 4 +- .../Controller/Action/Helper/ActionStack.php | 4 +- .../Controller/Action/Helper/AjaxContext.php | 4 +- .../Action/Helper/AutoComplete/Abstract.php | 4 +- .../Action/Helper/AutoCompleteDojo.php | 4 +- .../Helper/AutoCompleteScriptaculous.php | 4 +- .../Zend/Controller/Action/Helper/Cache.php | 4 +- .../Action/Helper/ContextSwitch.php | 4 +- .../Action/Helper/FlashMessenger.php | 4 +- .../Zend/Controller/Action/Helper/Json.php | 4 +- .../Controller/Action/Helper/Redirector.php | 8 +- .../Zend/Controller/Action/Helper/Url.php | 4 +- .../Controller/Action/Helper/ViewRenderer.php | 21 +- .../Zend/Controller/Action/HelperBroker.php | 4 +- .../Action/HelperBroker/PriorityStack.php | 4 +- .../Zend/Controller/Action/Interface.php | 4 +- .../Zend/Controller/Dispatcher/Abstract.php | 4 +- .../Zend/Controller/Dispatcher/Exception.php | 4 +- .../Zend/Controller/Dispatcher/Interface.php | 4 +- .../Zend/Controller/Dispatcher/Standard.php | 4 +- library/vendor/Zend/Controller/Exception.php | 4 +- library/vendor/Zend/Controller/Front.php | 4 +- .../Zend/Controller/Plugin/Abstract.php | 4 +- .../Zend/Controller/Plugin/ActionStack.php | 4 +- .../vendor/Zend/Controller/Plugin/Broker.php | 4 +- .../Zend/Controller/Plugin/ErrorHandler.php | 4 +- .../Zend/Controller/Plugin/PutHandler.php | 4 +- .../Zend/Controller/Request/Abstract.php | 4 +- .../Zend/Controller/Request/Apache404.php | 2 +- .../Zend/Controller/Request/Exception.php | 4 +- .../vendor/Zend/Controller/Request/Http.php | 30 +- .../Zend/Controller/Request/HttpTestCase.php | 3 +- .../vendor/Zend/Controller/Request/Simple.php | 4 +- .../Zend/Controller/Response/Abstract.php | 4 +- .../vendor/Zend/Controller/Response/Cli.php | 4 +- .../Zend/Controller/Response/Exception.php | 4 +- .../vendor/Zend/Controller/Response/Http.php | 2 +- .../Zend/Controller/Response/HttpTestCase.php | 2 +- .../Zend/Controller/Router/Abstract.php | 27 +- .../Zend/Controller/Router/Exception.php | 9 +- .../Zend/Controller/Router/Interface.php | 13 +- .../vendor/Zend/Controller/Router/Rewrite.php | 87 +- .../vendor/Zend/Controller/Router/Route.php | 129 +- .../Zend/Controller/Router/Route/Abstract.php | 7 +- .../Zend/Controller/Router/Route/Chain.php | 31 +- .../Zend/Controller/Router/Route/Hostname.php | 79 +- .../Controller/Router/Route/Interface.php | 14 +- .../Zend/Controller/Router/Route/Module.php | 87 +- .../Zend/Controller/Router/Route/Regex.php | 84 +- .../Zend/Controller/Router/Route/Static.php | 40 +- library/vendor/Zend/Crypt.php | 4 +- library/vendor/Zend/Crypt/DiffieHellman.php | 4 +- .../Zend/Crypt/DiffieHellman/Exception.php | 4 +- library/vendor/Zend/Crypt/Exception.php | 4 +- library/vendor/Zend/Crypt/Hmac.php | 4 +- library/vendor/Zend/Crypt/Hmac/Exception.php | 4 +- library/vendor/Zend/Crypt/Math.php | 4 +- library/vendor/Zend/Crypt/Math/BigInteger.php | 4 +- .../Zend/Crypt/Math/BigInteger/Bcmath.php | 4 +- .../Zend/Crypt/Math/BigInteger/Exception.php | 4 +- .../vendor/Zend/Crypt/Math/BigInteger/Gmp.php | 4 +- .../Zend/Crypt/Math/BigInteger/Interface.php | 4 +- library/vendor/Zend/Crypt/Math/Exception.php | 4 +- library/vendor/Zend/Crypt/Rsa.php | 4 +- library/vendor/Zend/Crypt/Rsa/Exception.php | 4 +- library/vendor/Zend/Crypt/Rsa/Key.php | 4 +- library/vendor/Zend/Crypt/Rsa/Key/Private.php | 4 +- library/vendor/Zend/Crypt/Rsa/Key/Public.php | 4 +- library/vendor/Zend/Currency.php | 4 +- .../Zend/Currency/CurrencyInterface.php | 4 +- library/vendor/Zend/Currency/Exception.php | 4 +- library/vendor/Zend/Date.php | 114 +- library/vendor/Zend/Date/Cities.php | 4 +- library/vendor/Zend/Date/DateObject.php | 6 +- library/vendor/Zend/Date/Exception.php | 4 +- library/vendor/Zend/Db.php | 4 +- library/vendor/Zend/Db/Adapter/Abstract.php | 12 +- library/vendor/Zend/Db/Adapter/Db2.php | 827 +++++++ .../Adapter/Db2/Exception.php} | 31 +- library/vendor/Zend/Db/Adapter/Exception.php | 4 +- library/vendor/Zend/Db/Adapter/Mysqli.php | 543 +++++ .../Zend/Db/Adapter/Mysqli/Exception.php | 39 + library/vendor/Zend/Db/Adapter/Oracle.php | 631 +++++ .../Zend/Db/Adapter/Oracle/Exception.php | 59 + .../vendor/Zend/Db/Adapter/Pdo/Abstract.php | 4 +- library/vendor/Zend/Db/Adapter/Pdo/Ibm.php | 354 +++ .../vendor/Zend/Db/Adapter/Pdo/Ibm/Db2.php | 224 ++ .../vendor/Zend/Db/Adapter/Pdo/Ibm/Ids.php | 297 +++ library/vendor/Zend/Db/Adapter/Pdo/Mssql.php | 420 ++++ library/vendor/Zend/Db/Adapter/Pdo/Mysql.php | 4 +- library/vendor/Zend/Db/Adapter/Pdo/Oci.php | 375 +++ library/vendor/Zend/Db/Adapter/Pdo/Pgsql.php | 4 +- library/vendor/Zend/Db/Adapter/Pdo/Sqlite.php | 4 +- library/vendor/Zend/Db/Adapter/Sqlsrv.php | 4 +- .../Zend/Db/Adapter/Sqlsrv/Exception.php | 4 +- library/vendor/Zend/Db/Exception.php | 4 +- library/vendor/Zend/Db/Expr.php | 4 +- library/vendor/Zend/Db/Profiler.php | 4 +- library/vendor/Zend/Db/Profiler/Exception.php | 4 +- library/vendor/Zend/Db/Profiler/Firebug.php | 4 +- library/vendor/Zend/Db/Profiler/Query.php | 4 +- library/vendor/Zend/Db/Select.php | 14 +- library/vendor/Zend/Db/Select/Exception.php | 4 +- library/vendor/Zend/Db/Statement.php | 4 +- library/vendor/Zend/Db/Statement/Db2.php | 354 +++ .../Statement/Db2/Exception.php} | 47 +- .../vendor/Zend/Db/Statement/Exception.php | 4 +- .../vendor/Zend/Db/Statement/Interface.php | 4 +- library/vendor/Zend/Db/Statement/Mysqli.php | 356 +++ .../Zend/Db/Statement/Mysqli/Exception.php | 37 + library/vendor/Zend/Db/Statement/Oracle.php | 561 +++++ .../Zend/Db/Statement/Oracle/Exception.php | 58 + library/vendor/Zend/Db/Statement/Pdo.php | 4 +- library/vendor/Zend/Db/Statement/Pdo/Ibm.php | 92 + library/vendor/Zend/Db/Statement/Pdo/Oci.php | 90 + library/vendor/Zend/Db/Statement/Sqlsrv.php | 4 +- .../Zend/Db/Statement/Sqlsrv/Exception.php | 4 +- library/vendor/Zend/Db/Table.php | 4 +- library/vendor/Zend/Db/Table/Abstract.php | 16 +- library/vendor/Zend/Db/Table/Definition.php | 4 +- library/vendor/Zend/Db/Table/Exception.php | 4 +- library/vendor/Zend/Db/Table/Row.php | 4 +- library/vendor/Zend/Db/Table/Row/Abstract.php | 4 +- .../vendor/Zend/Db/Table/Row/Exception.php | 4 +- library/vendor/Zend/Db/Table/Rowset.php | 4 +- .../vendor/Zend/Db/Table/Rowset/Abstract.php | 4 +- .../vendor/Zend/Db/Table/Rowset/Exception.php | 4 +- library/vendor/Zend/Db/Table/Select.php | 4 +- .../vendor/Zend/Db/Table/Select/Exception.php | 4 +- library/vendor/Zend/Debug.php | 4 +- library/vendor/Zend/Dom/Exception.php | 4 +- library/vendor/Zend/Dom/Query.php | 11 +- library/vendor/Zend/Dom/Query/Css2Xpath.php | 4 +- library/vendor/Zend/Dom/Query/Result.php | 9 +- library/vendor/Zend/EventManager/Event.php | 4 +- .../Zend/EventManager/EventCollection.php | 4 +- .../Zend/EventManager/EventDescription.php | 4 +- .../vendor/Zend/EventManager/EventManager.php | 8 +- .../Zend/EventManager/EventManagerAware.php | 4 +- .../vendor/Zend/EventManager/Exception.php | 4 +- .../Exception/InvalidArgumentException.php | 4 +- library/vendor/Zend/EventManager/Filter.php | 4 +- .../EventManager/Filter/FilterIterator.php | 14 +- .../vendor/Zend/EventManager/FilterChain.php | 9 +- .../Zend/EventManager/GlobalEventManager.php | 8 +- .../Zend/EventManager/ListenerAggregate.php | 4 +- .../Zend/EventManager/ResponseCollection.php | 4 +- .../EventManager/SharedEventCollection.php | 4 +- .../SharedEventCollectionAware.php | 4 +- .../Zend/EventManager/SharedEventManager.php | 4 +- .../Zend/EventManager/StaticEventManager.php | 4 +- library/vendor/Zend/Exception.php | 4 +- library/vendor/Zend/Feed.php | 395 +++ library/vendor/Zend/Feed/Abstract.php | 295 +++ library/vendor/Zend/Feed/Atom.php | 386 +++ library/vendor/Zend/Feed/Builder.php | 390 +++ library/vendor/Zend/Feed/Builder/Entry.php | 295 +++ .../Php => Feed/Builder}/Exception.php | 23 +- library/vendor/Zend/Feed/Builder/Header.php | 410 ++++ .../Zend/Feed/Builder/Header/Itunes.php | 281 +++ .../vendor/Zend/Feed/Builder/Interface.php | 52 + library/vendor/Zend/Feed/Element.php | 436 ++++ library/vendor/Zend/Feed/Entry/Abstract.php | 121 + library/vendor/Zend/Feed/Entry/Atom.php | 272 +++ library/vendor/Zend/Feed/Entry/Rss.php | 121 + library/vendor/Zend/Feed/Exception.php | 41 + library/vendor/Zend/Feed/Pubsubhubbub.php | 147 ++ .../Feed/Pubsubhubbub/CallbackAbstract.php | 309 +++ .../Feed/Pubsubhubbub/CallbackInterface.php | 69 + .../Pubsubhubbub}/Exception.php | 11 +- .../Zend/Feed/Pubsubhubbub/HttpResponse.php | 232 ++ .../Feed/Pubsubhubbub/Model/ModelAbstract.php | 61 + .../Feed/Pubsubhubbub/Model/Subscription.php | 135 ++ .../Model/SubscriptionInterface.php | 65 + .../Zend/Feed/Pubsubhubbub/Publisher.php | 414 ++++ .../Zend/Feed/Pubsubhubbub/Subscriber.php | 852 +++++++ .../Feed/Pubsubhubbub/Subscriber/Callback.php | 327 +++ library/vendor/Zend/Feed/Reader.php | 733 ++++++ .../Reader/Collection.php} | 18 +- .../Zend/Feed/Reader/Collection/Author.php | 50 + .../Zend/Feed/Reader/Collection/Category.php | 56 + .../Reader/Collection/CollectionAbstract.php} | 31 +- .../vendor/Zend/Feed/Reader/Entry/Atom.php | 396 ++++ library/vendor/Zend/Feed/Reader/Entry/Rss.php | 656 +++++ .../vendor/Zend/Feed/Reader/EntryAbstract.php | 241 ++ .../Zend/Feed/Reader/EntryInterface.php | 143 ++ .../Zend/Feed/Reader/Extension/Atom/Entry.php | 653 +++++ .../Zend/Feed/Reader/Extension/Atom/Feed.php | 586 +++++ .../Feed/Reader/Extension/Content/Entry.php | 59 + .../Extension/CreativeCommons/Entry.php | 95 + .../Reader/Extension/CreativeCommons/Feed.php | 88 + .../Reader/Extension/DublinCore/Entry.php | 263 ++ .../Feed/Reader/Extension/DublinCore/Feed.php | 306 +++ .../Feed/Reader/Extension/EntryAbstract.php | 200 ++ .../Feed/Reader/Extension/FeedAbstract.php | 186 ++ .../Feed/Reader/Extension/Podcast/Entry.php | 200 ++ .../Feed/Reader/Extension/Podcast/Feed.php | 292 +++ .../Feed/Reader/Extension/Slash/Entry.php | 142 ++ .../Reader/Extension/Syndication/Feed.php | 166 ++ .../Feed/Reader/Extension/Thread/Entry.php | 90 + .../Reader/Extension/WellFormedWeb/Entry.php | 71 + library/vendor/Zend/Feed/Reader/Feed/Atom.php | 419 ++++ .../Zend/Feed/Reader/Feed/Atom/Source.php | 101 + library/vendor/Zend/Feed/Reader/Feed/Rss.php | 726 ++++++ .../vendor/Zend/Feed/Reader/FeedAbstract.php | 318 +++ .../vendor/Zend/Feed/Reader/FeedInterface.php | 122 + library/vendor/Zend/Feed/Reader/FeedSet.php | 146 ++ library/vendor/Zend/Feed/Rss.php | 526 ++++ library/vendor/Zend/Feed/Writer.php | 265 +++ library/vendor/Zend/Feed/Writer/Deleted.php | 195 ++ library/vendor/Zend/Feed/Writer/Entry.php | 734 ++++++ .../Exception/InvalidMethodException.php} | 21 +- .../Writer/Extension/Atom/Renderer/Feed.php | 122 + .../Extension/Content/Renderer/Entry.php | 91 + .../Extension/DublinCore/Renderer/Entry.php | 95 + .../Extension/DublinCore/Renderer/Feed.php | 95 + .../Feed/Writer/Extension/ITunes/Entry.php | 232 ++ .../Feed/Writer/Extension/ITunes/Feed.php | 343 +++ .../Extension/ITunes/Renderer/Entry.php | 215 ++ .../Writer/Extension/ITunes/Renderer/Feed.php | 319 +++ .../Writer/Extension/RendererAbstract.php | 179 ++ .../Writer/Extension/RendererInterface.php | 60 + .../Writer/Extension/Slash/Renderer/Entry.php | 90 + .../Extension/Threading/Renderer/Entry.php | 144 ++ .../WellFormedWeb/Renderer/Entry.php | 95 + library/vendor/Zend/Feed/Writer/Feed.php | 271 +++ .../Zend/Feed/Writer/Feed/FeedAbstract.php | 834 +++++++ .../Zend/Feed/Writer/Renderer/Entry/Atom.php | 440 ++++ .../Writer/Renderer/Entry/Atom/Deleted.php | 120 + .../Zend/Feed/Writer/Renderer/Entry/Rss.php | 340 +++ .../Zend/Feed/Writer/Renderer/Feed/Atom.php | 124 + .../Renderer/Feed/Atom/AtomAbstract.php | 437 ++++ .../Feed/Writer/Renderer/Feed/Atom/Source.php | 109 + .../Zend/Feed/Writer/Renderer/Feed/Rss.php | 492 ++++ .../Feed/Writer/Renderer/RendererAbstract.php | 247 ++ .../Writer/Renderer/RendererInterface.php | 111 + library/vendor/Zend/Feed/Writer/Source.php | 32 + library/vendor/Zend/File/ClassFileLocator.php | 4 +- library/vendor/Zend/File/PhpClassFile.php | 4 +- library/vendor/Zend/File/Transfer.php | 4 +- .../Zend/File/Transfer/Adapter/Abstract.php | 4 +- .../Zend/File/Transfer/Adapter/Http.php | 4 +- .../vendor/Zend/File/Transfer/Exception.php | 4 +- library/vendor/Zend/Filter.php | 4 +- library/vendor/Zend/Filter/Alnum.php | 4 +- library/vendor/Zend/Filter/Alpha.php | 4 +- library/vendor/Zend/Filter/BaseName.php | 4 +- library/vendor/Zend/Filter/Boolean.php | 4 +- library/vendor/Zend/Filter/Callback.php | 4 +- library/vendor/Zend/Filter/Compress.php | 4 +- library/vendor/Zend/Filter/Compress/Bz2.php | 4 +- .../Zend/Filter/Compress/CompressAbstract.php | 4 +- .../Filter/Compress/CompressInterface.php | 4 +- library/vendor/Zend/Filter/Compress/Gz.php | 4 +- library/vendor/Zend/Filter/Compress/Lzf.php | 4 +- library/vendor/Zend/Filter/Compress/Rar.php | 4 +- library/vendor/Zend/Filter/Compress/Tar.php | 4 +- library/vendor/Zend/Filter/Compress/Zip.php | 4 +- library/vendor/Zend/Filter/Decompress.php | 4 +- library/vendor/Zend/Filter/Decrypt.php | 4 +- library/vendor/Zend/Filter/Digits.php | 4 +- library/vendor/Zend/Filter/Dir.php | 4 +- library/vendor/Zend/Filter/Encrypt.php | 4 +- .../vendor/Zend/Filter/Encrypt/Interface.php | 4 +- library/vendor/Zend/Filter/Encrypt/Mcrypt.php | 4 +- .../vendor/Zend/Filter/Encrypt/Openssl.php | 4 +- library/vendor/Zend/Filter/Exception.php | 4 +- library/vendor/Zend/Filter/File/Decrypt.php | 4 +- library/vendor/Zend/Filter/File/Encrypt.php | 4 +- library/vendor/Zend/Filter/File/LowerCase.php | 4 +- library/vendor/Zend/Filter/File/Rename.php | 4 +- library/vendor/Zend/Filter/File/UpperCase.php | 4 +- library/vendor/Zend/Filter/HtmlEntities.php | 4 +- library/vendor/Zend/Filter/Inflector.php | 4 +- library/vendor/Zend/Filter/Input.php | 4 +- library/vendor/Zend/Filter/Int.php | 4 +- library/vendor/Zend/Filter/Interface.php | 4 +- .../Zend/Filter/LocalizedToNormalized.php | 4 +- .../Zend/Filter/NormalizedToLocalized.php | 4 +- library/vendor/Zend/Filter/Null.php | 4 +- library/vendor/Zend/Filter/PregReplace.php | 4 +- library/vendor/Zend/Filter/RealPath.php | 4 +- library/vendor/Zend/Filter/StringToLower.php | 4 +- library/vendor/Zend/Filter/StringToUpper.php | 4 +- library/vendor/Zend/Filter/StringTrim.php | 4 +- library/vendor/Zend/Filter/StripNewlines.php | 4 +- library/vendor/Zend/Filter/StripTags.php | 4 +- .../Zend/Filter/Word/CamelCaseToDash.php | 4 +- .../Zend/Filter/Word/CamelCaseToSeparator.php | 4 +- .../Filter/Word/CamelCaseToUnderscore.php | 4 +- .../Zend/Filter/Word/DashToCamelCase.php | 4 +- .../Zend/Filter/Word/DashToSeparator.php | 4 +- .../Zend/Filter/Word/DashToUnderscore.php | 4 +- .../Zend/Filter/Word/Separator/Abstract.php | 4 +- .../Zend/Filter/Word/SeparatorToCamelCase.php | 4 +- .../Zend/Filter/Word/SeparatorToDash.php | 4 +- .../Zend/Filter/Word/SeparatorToSeparator.php | 4 +- .../Filter/Word/UnderscoreToCamelCase.php | 4 +- .../Zend/Filter/Word/UnderscoreToDash.php | 4 +- .../Filter/Word/UnderscoreToSeparator.php | 4 +- library/vendor/Zend/Form.php | 6 +- .../vendor/Zend/Form/Decorator/Abstract.php | 4 +- .../vendor/Zend/Form/Decorator/Callback.php | 4 +- .../vendor/Zend/Form/Decorator/Captcha.php | 4 +- .../Zend/Form/Decorator/Captcha/ReCaptcha.php | 4 +- .../Zend/Form/Decorator/Captcha/Word.php | 4 +- .../Zend/Form/Decorator/Description.php | 4 +- .../Zend/Form/Decorator/DtDdWrapper.php | 4 +- library/vendor/Zend/Form/Decorator/Errors.php | 4 +- .../vendor/Zend/Form/Decorator/Exception.php | 4 +- .../vendor/Zend/Form/Decorator/Fieldset.php | 4 +- library/vendor/Zend/Form/Decorator/File.php | 4 +- library/vendor/Zend/Form/Decorator/Form.php | 4 +- .../Zend/Form/Decorator/FormElements.php | 4 +- .../vendor/Zend/Form/Decorator/FormErrors.php | 4 +- .../vendor/Zend/Form/Decorator/HtmlTag.php | 4 +- library/vendor/Zend/Form/Decorator/Image.php | 4 +- .../vendor/Zend/Form/Decorator/Interface.php | 4 +- library/vendor/Zend/Form/Decorator/Label.php | 4 +- .../Form/Decorator/Marker/File/Interface.php | 4 +- .../Zend/Form/Decorator/PrepareElements.php | 4 +- .../vendor/Zend/Form/Decorator/Tooltip.php | 4 +- .../vendor/Zend/Form/Decorator/ViewHelper.php | 4 +- .../vendor/Zend/Form/Decorator/ViewScript.php | 4 +- library/vendor/Zend/Form/DisplayGroup.php | 4 +- library/vendor/Zend/Form/Element.php | 4 +- library/vendor/Zend/Form/Element/Button.php | 4 +- library/vendor/Zend/Form/Element/Captcha.php | 4 +- library/vendor/Zend/Form/Element/Checkbox.php | 4 +- .../vendor/Zend/Form/Element/Exception.php | 4 +- library/vendor/Zend/Form/Element/File.php | 4 +- library/vendor/Zend/Form/Element/Hash.php | 4 +- library/vendor/Zend/Form/Element/Hidden.php | 4 +- library/vendor/Zend/Form/Element/Image.php | 4 +- library/vendor/Zend/Form/Element/Multi.php | 4 +- .../Zend/Form/Element/MultiCheckbox.php | 4 +- .../vendor/Zend/Form/Element/Multiselect.php | 4 +- library/vendor/Zend/Form/Element/Note.php | 4 +- library/vendor/Zend/Form/Element/Password.php | 4 +- library/vendor/Zend/Form/Element/Radio.php | 4 +- library/vendor/Zend/Form/Element/Reset.php | 4 +- library/vendor/Zend/Form/Element/Select.php | 4 +- library/vendor/Zend/Form/Element/Submit.php | 4 +- library/vendor/Zend/Form/Element/Text.php | 4 +- library/vendor/Zend/Form/Element/Textarea.php | 4 +- library/vendor/Zend/Form/Element/Xhtml.php | 4 +- library/vendor/Zend/Form/Exception.php | 4 +- library/vendor/Zend/Form/SubForm.php | 4 +- library/vendor/Zend/Gdata.php | 238 -- library/vendor/Zend/Http/Client.php | 94 +- .../vendor/Zend/Http/Client/Adapter/Curl.php | 27 +- .../Zend/Http/Client/Adapter/Exception.php | 4 +- .../Zend/Http/Client/Adapter/Interface.php | 4 +- .../vendor/Zend/Http/Client/Adapter/Proxy.php | 6 +- .../Zend/Http/Client/Adapter/Socket.php | 4 +- .../Zend/Http/Client/Adapter/Stream.php | 4 +- .../vendor/Zend/Http/Client/Adapter/Test.php | 4 +- library/vendor/Zend/Http/Client/Exception.php | 4 +- library/vendor/Zend/Http/Cookie.php | 4 +- library/vendor/Zend/Http/CookieJar.php | 4 +- library/vendor/Zend/Http/Exception.php | 4 +- .../Exception/InvalidArgumentException.php | 4 +- .../Header/Exception/RuntimeException.php | 4 +- .../vendor/Zend/Http/Header/HeaderValue.php | 126 + library/vendor/Zend/Http/Header/SetCookie.php | 11 +- library/vendor/Zend/Http/Response.php | 76 +- library/vendor/Zend/Http/Response/Stream.php | 4 +- library/vendor/Zend/Http/UserAgent.php | 4 +- .../Zend/Http/UserAgent/AbstractDevice.php | 8 +- library/vendor/Zend/Http/UserAgent/Bot.php | 4 +- .../vendor/Zend/Http/UserAgent/Checker.php | 4 +- .../vendor/Zend/Http/UserAgent/Console.php | 4 +- .../vendor/Zend/Http/UserAgent/Desktop.php | 4 +- library/vendor/Zend/Http/UserAgent/Device.php | 4 +- library/vendor/Zend/Http/UserAgent/Email.php | 4 +- .../vendor/Zend/Http/UserAgent/Exception.php | 4 +- .../Zend/Http/UserAgent/Features/Adapter.php | 4 +- .../UserAgent/Features/Adapter/Browscap.php | 4 +- .../Features/Adapter/DeviceAtlas.php | 4 +- .../UserAgent/Features/Adapter/TeraWurfl.php | 4 +- .../Http/UserAgent/Features/Exception.php | 4 +- library/vendor/Zend/Http/UserAgent/Feed.php | 4 +- library/vendor/Zend/Http/UserAgent/Mobile.php | 4 +- .../vendor/Zend/Http/UserAgent/Offline.php | 4 +- library/vendor/Zend/Http/UserAgent/Probe.php | 4 +- library/vendor/Zend/Http/UserAgent/Spam.php | 4 +- .../vendor/Zend/Http/UserAgent/Storage.php | 4 +- .../Zend/Http/UserAgent/Storage/Exception.php | 4 +- .../Http/UserAgent/Storage/NonPersistent.php | 4 +- .../Zend/Http/UserAgent/Storage/Session.php | 4 +- library/vendor/Zend/Http/UserAgent/Text.php | 4 +- .../vendor/Zend/Http/UserAgent/Validator.php | 4 +- library/vendor/Zend/Json.php | 4 +- library/vendor/Zend/Json/Decoder.php | 4 +- library/vendor/Zend/Json/Encoder.php | 4 +- library/vendor/Zend/Json/Exception.php | 4 +- library/vendor/Zend/Json/Expr.php | 4 +- library/vendor/Zend/Json/Server.php | 6 +- library/vendor/Zend/Json/Server/Cache.php | 4 +- library/vendor/Zend/Json/Server/Error.php | 4 +- library/vendor/Zend/Json/Server/Exception.php | 4 +- library/vendor/Zend/Json/Server/Request.php | 4 +- .../vendor/Zend/Json/Server/Request/Http.php | 4 +- library/vendor/Zend/Json/Server/Response.php | 4 +- .../vendor/Zend/Json/Server/Response/Http.php | 4 +- library/vendor/Zend/Json/Server/Smd.php | 4 +- .../vendor/Zend/Json/Server/Smd/Service.php | 4 +- library/vendor/Zend/LICENSE | 27 - library/vendor/Zend/Layout.php | 4 +- .../Controller/Action/Helper/Layout.php | 4 +- .../Zend/Layout/Controller/Plugin/Layout.php | 4 +- library/vendor/Zend/Layout/Exception.php | 4 +- library/vendor/Zend/Ldap.php | 1560 ++++++++++++ library/vendor/Zend/Ldap/Attribute.php | 416 ++++ library/vendor/Zend/Ldap/Collection.php | 239 ++ .../Zend/Ldap/Collection/Iterator/Default.php | 308 +++ library/vendor/Zend/Ldap/Converter.php | 410 ++++ .../vendor/Zend/Ldap/Converter/Exception.php | 34 + library/vendor/Zend/Ldap/Dn.php | 785 ++++++ library/vendor/Zend/Ldap/Exception.php | 171 ++ library/vendor/Zend/Ldap/Filter.php | 261 ++ library/vendor/Zend/Ldap/Filter/Abstract.php | 152 ++ library/vendor/Zend/Ldap/Filter/And.php | 47 + library/vendor/Zend/Ldap/Filter/Exception.php | 36 + library/vendor/Zend/Ldap/Filter/Logical.php | 104 + library/vendor/Zend/Ldap/Filter/Mask.php | 65 + library/vendor/Zend/Ldap/Filter/Not.php | 74 + .../Stream.php => Ldap/Filter/Or.php} | 31 +- .../Php/Body.php => Ldap/Filter/String.php} | 48 +- library/vendor/Zend/Ldap/Ldif/Encoder.php | 304 +++ library/vendor/Zend/Ldap/Node.php | 1170 +++++++++ library/vendor/Zend/Ldap/Node/Abstract.php | 483 ++++ .../Zend/Ldap/Node/ChildrenIterator.php | 208 ++ library/vendor/Zend/Ldap/Node/Collection.php | 65 + library/vendor/Zend/Ldap/Node/RootDse.php | 153 ++ .../Ldap/Node/RootDse/ActiveDirectory.php | 245 ++ .../Zend/Ldap/Node/RootDse/OpenLdap.php | 101 + .../Zend/Ldap/Node/RootDse/eDirectory.php | 159 ++ library/vendor/Zend/Ldap/Node/Schema.php | 117 + .../Zend/Ldap/Node/Schema/ActiveDirectory.php | 100 + .../Schema/AttributeType/ActiveDirectory.php | 102 + .../Node/Schema/AttributeType/Interface.php | 75 + .../Node/Schema/AttributeType/OpenLdap.php | 127 + library/vendor/Zend/Ldap/Node/Schema/Item.php | 163 ++ .../Schema/ObjectClass/ActiveDirectory.php | 113 + .../Node/Schema/ObjectClass/Interface.php | 83 + .../Ldap/Node/Schema/ObjectClass/OpenLdap.php | 173 ++ .../vendor/Zend/Ldap/Node/Schema/OpenLdap.php | 499 ++++ library/vendor/Zend/Loader.php | 4 +- library/vendor/Zend/Loader/Autoloader.php | 4 +- .../Zend/Loader/Autoloader/Interface.php | 4 +- .../Zend/Loader/Autoloader/Resource.php | 4 +- .../vendor/Zend/Loader/AutoloaderFactory.php | 19 +- .../vendor/Zend/Loader/ClassMapAutoloader.php | 4 +- library/vendor/Zend/Loader/Exception.php | 4 +- .../Exception/InvalidArgumentException.php | 4 +- library/vendor/Zend/Loader/PluginLoader.php | 4 +- .../Zend/Loader/PluginLoader/Exception.php | 4 +- .../Zend/Loader/PluginLoader/Interface.php | 4 +- library/vendor/Zend/Loader/SplAutoloader.php | 4 +- .../vendor/Zend/Loader/StandardAutoloader.php | 4 +- library/vendor/Zend/Locale.php | 4 +- library/vendor/Zend/Locale/Data.php | 87 +- .../vendor/Zend/Locale/Data/Translation.php | 4 +- library/vendor/Zend/Locale/Exception.php | 4 +- library/vendor/Zend/Locale/Format.php | 4 +- library/vendor/Zend/Locale/Math.php | 4 +- library/vendor/Zend/Locale/Math/Exception.php | 4 +- library/vendor/Zend/Locale/Math/PhpMath.php | 4 +- library/vendor/Zend/Log.php | 4 +- library/vendor/Zend/Log/Exception.php | 4 +- library/vendor/Zend/Log/FactoryInterface.php | 4 +- library/vendor/Zend/Log/Filter/Abstract.php | 4 +- library/vendor/Zend/Log/Filter/Interface.php | 4 +- library/vendor/Zend/Log/Filter/Message.php | 4 +- library/vendor/Zend/Log/Filter/Priority.php | 4 +- library/vendor/Zend/Log/Filter/Suppress.php | 4 +- .../vendor/Zend/Log/Formatter/Abstract.php | 4 +- library/vendor/Zend/Log/Formatter/Firebug.php | 4 +- .../vendor/Zend/Log/Formatter/Interface.php | 4 +- library/vendor/Zend/Log/Formatter/Simple.php | 4 +- library/vendor/Zend/Log/Formatter/Xml.php | 4 +- library/vendor/Zend/Log/Writer/Abstract.php | 13 +- library/vendor/Zend/Log/Writer/Db.php | 4 +- library/vendor/Zend/Log/Writer/Firebug.php | 4 +- library/vendor/Zend/Log/Writer/Mail.php | 4 +- library/vendor/Zend/Log/Writer/Mock.php | 4 +- library/vendor/Zend/Log/Writer/Null.php | 4 +- library/vendor/Zend/Log/Writer/Stream.php | 4 +- library/vendor/Zend/Log/Writer/Syslog.php | 4 +- .../vendor/Zend/Log/Writer/ZendMonitor.php | 4 +- library/vendor/Zend/Mail.php | 4 +- library/vendor/Zend/Mail/Exception.php | 4 +- .../vendor/Zend/Mail/Header/HeaderName.php | 91 + .../vendor/Zend/Mail/Header/HeaderValue.php | 135 ++ library/vendor/Zend/Mail/Message.php | 5 +- library/vendor/Zend/Mail/Message/File.php | 4 +- .../vendor/Zend/Mail/Message/Interface.php | 4 +- library/vendor/Zend/Mail/Part.php | 42 +- library/vendor/Zend/Mail/Part/File.php | 4 +- library/vendor/Zend/Mail/Part/Interface.php | 4 +- .../vendor/Zend/Mail/Protocol/Abstract.php | 4 +- .../vendor/Zend/Mail/Protocol/Exception.php | 4 +- library/vendor/Zend/Mail/Protocol/Imap.php | 4 +- library/vendor/Zend/Mail/Protocol/Pop3.php | 4 +- library/vendor/Zend/Mail/Protocol/Smtp.php | 4 +- .../Zend/Mail/Protocol/Smtp/Auth/Crammd5.php | 4 +- .../Zend/Mail/Protocol/Smtp/Auth/Login.php | 4 +- .../Zend/Mail/Protocol/Smtp/Auth/Plain.php | 4 +- library/vendor/Zend/Mail/Storage.php | 5 +- library/vendor/Zend/Mail/Storage/Abstract.php | 4 +- .../vendor/Zend/Mail/Storage/Exception.php | 4 +- library/vendor/Zend/Mail/Storage/Folder.php | 4 +- .../Zend/Mail/Storage/Folder/Interface.php | 4 +- .../Zend/Mail/Storage/Folder/Maildir.php | 4 +- .../vendor/Zend/Mail/Storage/Folder/Mbox.php | 4 +- library/vendor/Zend/Mail/Storage/Imap.php | 6 +- library/vendor/Zend/Mail/Storage/Maildir.php | 4 +- library/vendor/Zend/Mail/Storage/Mbox.php | 4 +- library/vendor/Zend/Mail/Storage/Pop3.php | 4 +- .../Zend/Mail/Storage/Writable/Interface.php | 4 +- .../Zend/Mail/Storage/Writable/Maildir.php | 4 +- .../vendor/Zend/Mail/Transport/Abstract.php | 4 +- .../vendor/Zend/Mail/Transport/Exception.php | 4 +- library/vendor/Zend/Mail/Transport/File.php | 4 +- .../vendor/Zend/Mail/Transport/Sendmail.php | 4 +- library/vendor/Zend/Mail/Transport/Smtp.php | 4 +- library/vendor/Zend/Markup.php | 4 +- library/vendor/Zend/Markup/Exception.php | 4 +- library/vendor/Zend/Markup/Parser/Bbcode.php | 4 +- .../vendor/Zend/Markup/Parser/Exception.php | 4 +- .../Zend/Markup/Parser/ParserInterface.php | 4 +- .../vendor/Zend/Markup/Renderer/Exception.php | 4 +- library/vendor/Zend/Markup/Renderer/Html.php | 4 +- .../vendor/Zend/Markup/Renderer/Html/Code.php | 4 +- .../Markup/Renderer/Html/HtmlAbstract.php | 4 +- .../vendor/Zend/Markup/Renderer/Html/Img.php | 4 +- .../vendor/Zend/Markup/Renderer/Html/List.php | 4 +- .../vendor/Zend/Markup/Renderer/Html/Url.php | 4 +- .../Zend/Markup/Renderer/RendererAbstract.php | 4 +- .../Renderer/TokenConverterInterface.php | 4 +- library/vendor/Zend/Markup/Token.php | 4 +- library/vendor/Zend/Markup/TokenList.php | 4 +- library/vendor/Zend/Measure/Abstract.php | 4 +- library/vendor/Zend/Measure/Acceleration.php | 4 +- library/vendor/Zend/Measure/Angle.php | 4 +- library/vendor/Zend/Measure/Area.php | 4 +- library/vendor/Zend/Measure/Binary.php | 4 +- library/vendor/Zend/Measure/Capacitance.php | 4 +- .../vendor/Zend/Measure/Cooking/Volume.php | 4 +- .../vendor/Zend/Measure/Cooking/Weight.php | 4 +- library/vendor/Zend/Measure/Current.php | 4 +- library/vendor/Zend/Measure/Density.php | 4 +- library/vendor/Zend/Measure/Energy.php | 4 +- library/vendor/Zend/Measure/Exception.php | 4 +- library/vendor/Zend/Measure/Flow/Mass.php | 4 +- library/vendor/Zend/Measure/Flow/Mole.php | 4 +- library/vendor/Zend/Measure/Flow/Volume.php | 4 +- library/vendor/Zend/Measure/Force.php | 4 +- library/vendor/Zend/Measure/Frequency.php | 4 +- library/vendor/Zend/Measure/Illumination.php | 4 +- library/vendor/Zend/Measure/Length.php | 4 +- library/vendor/Zend/Measure/Lightness.php | 4 +- library/vendor/Zend/Measure/Number.php | 10 +- library/vendor/Zend/Measure/Power.php | 4 +- library/vendor/Zend/Measure/Pressure.php | 4 +- library/vendor/Zend/Measure/Speed.php | 4 +- library/vendor/Zend/Measure/Temperature.php | 4 +- library/vendor/Zend/Measure/Time.php | 4 +- library/vendor/Zend/Measure/Torque.php | 4 +- .../vendor/Zend/Measure/Viscosity/Dynamic.php | 4 +- .../Zend/Measure/Viscosity/Kinematic.php | 4 +- library/vendor/Zend/Measure/Volume.php | 4 +- library/vendor/Zend/Measure/Weight.php | 4 +- library/vendor/Zend/Memory.php | 4 +- .../vendor/Zend/Memory/AccessController.php | 4 +- library/vendor/Zend/Memory/Container.php | 4 +- .../Zend/Memory/Container/Interface.php | 4 +- .../vendor/Zend/Memory/Container/Locked.php | 4 +- .../vendor/Zend/Memory/Container/Movable.php | 4 +- library/vendor/Zend/Memory/Exception.php | 4 +- library/vendor/Zend/Memory/Manager.php | 4 +- library/vendor/Zend/Memory/Value.php | 4 +- library/vendor/Zend/Mime.php | 521 +++- library/vendor/Zend/Mime/Decode.php | 94 +- library/vendor/Zend/Mime/Exception.php | 9 +- library/vendor/Zend/Mime/Message.php | 71 +- library/vendor/Zend/Mime/Part.php | 169 +- library/vendor/Zend/Mobile/Exception.php | 4 +- library/vendor/Zend/Mobile/Push/Abstract.php | 4 +- library/vendor/Zend/Mobile/Push/Apns.php | 21 +- library/vendor/Zend/Mobile/Push/Exception.php | 4 +- .../Push/Exception/DeviceQuotaExceeded.php | 4 +- .../Push/Exception/InvalidAuthToken.php | 4 +- .../Mobile/Push/Exception/InvalidPayload.php | 4 +- .../Push/Exception/InvalidRegistration.php | 4 +- .../Mobile/Push/Exception/InvalidToken.php | 4 +- .../Mobile/Push/Exception/InvalidTopic.php | 4 +- .../Mobile/Push/Exception/QuotaExceeded.php | 4 +- .../Push/Exception/ServerUnavailable.php | 4 +- library/vendor/Zend/Mobile/Push/Gcm.php | 14 +- library/vendor/Zend/Mobile/Push/Interface.php | 6 +- .../Zend/Mobile/Push/Message/Abstract.php | 11 +- .../vendor/Zend/Mobile/Push/Message/Apns.php | 19 +- .../Zend/Mobile/Push/Message/Exception.php | 4 +- .../vendor/Zend/Mobile/Push/Message/Gcm.php | 7 +- .../Zend/Mobile/Push/Message/Interface.php | 8 +- .../vendor/Zend/Mobile/Push/Message/Mpns.php | 4 +- .../Zend/Mobile/Push/Message/Mpns/Raw.php | 4 +- .../Zend/Mobile/Push/Message/Mpns/Tile.php | 4 +- .../Zend/Mobile/Push/Message/Mpns/Toast.php | 4 +- library/vendor/Zend/Mobile/Push/Mpns.php | 16 +- .../vendor/Zend/Mobile/Push/Response/Gcm.php | 7 +- .../Zend/Mobile/Push/Test/ApnsProxy.php | 3 +- library/vendor/Zend/Navigation.php | 4 +- library/vendor/Zend/Navigation/Container.php | 16 +- library/vendor/Zend/Navigation/Exception.php | 4 +- library/vendor/Zend/Navigation/Page.php | 4 +- library/vendor/Zend/Navigation/Page/Mvc.php | 4 +- library/vendor/Zend/Navigation/Page/Uri.php | 4 +- library/vendor/Zend/Oauth.php | 4 +- library/vendor/Zend/Oauth/Client.php | 4 +- library/vendor/Zend/Oauth/Config.php | 4 +- .../Zend/Oauth/Config/ConfigInterface.php | 4 +- library/vendor/Zend/Oauth/Consumer.php | 4 +- library/vendor/Zend/Oauth/Exception.php | 4 +- library/vendor/Zend/Oauth/Http.php | 4 +- .../vendor/Zend/Oauth/Http/AccessToken.php | 4 +- .../vendor/Zend/Oauth/Http/RequestToken.php | 4 +- .../Zend/Oauth/Http/UserAuthorization.php | 4 +- library/vendor/Zend/Oauth/Http/Utility.php | 4 +- library/vendor/Zend/Oauth/Signature/Hmac.php | 4 +- .../vendor/Zend/Oauth/Signature/Plaintext.php | 4 +- library/vendor/Zend/Oauth/Signature/Rsa.php | 4 +- .../Oauth/Signature/SignatureAbstract.php | 4 +- library/vendor/Zend/Oauth/Token.php | 4 +- library/vendor/Zend/Oauth/Token/Access.php | 4 +- .../Zend/Oauth/Token/AuthorizedRequest.php | 4 +- library/vendor/Zend/Oauth/Token/Request.php | 4 +- library/vendor/Zend/OpenId.php | 4 +- library/vendor/Zend/OpenId/Consumer.php | 4 +- .../vendor/Zend/OpenId/Consumer/Storage.php | 4 +- .../Zend/OpenId/Consumer/Storage/File.php | 4 +- library/vendor/Zend/OpenId/Exception.php | 4 +- library/vendor/Zend/OpenId/Extension.php | 4 +- library/vendor/Zend/OpenId/Extension/Sreg.php | 4 +- library/vendor/Zend/OpenId/Provider.php | 4 +- .../vendor/Zend/OpenId/Provider/Storage.php | 4 +- .../Zend/OpenId/Provider/Storage/File.php | 4 +- library/vendor/Zend/OpenId/Provider/User.php | 4 +- .../Zend/OpenId/Provider/User/Session.php | 4 +- library/vendor/Zend/Paginator.php | 4 +- .../vendor/Zend/Paginator/Adapter/Array.php | 4 +- .../Zend/Paginator/Adapter/DbSelect.php | 4 +- .../Zend/Paginator/Adapter/DbTableSelect.php | 4 +- .../Zend/Paginator/Adapter/Interface.php | 4 +- .../Zend/Paginator/Adapter/Iterator.php | 4 +- .../vendor/Zend/Paginator/Adapter/Null.php | 4 +- .../Zend/Paginator/AdapterAggregate.php | 4 +- library/vendor/Zend/Paginator/Exception.php | 4 +- .../Zend/Paginator/ScrollingStyle/All.php | 4 +- .../Zend/Paginator/ScrollingStyle/Elastic.php | 4 +- .../Paginator/ScrollingStyle/Interface.php | 4 +- .../Zend/Paginator/ScrollingStyle/Jumping.php | 4 +- .../Zend/Paginator/ScrollingStyle/Sliding.php | 4 +- .../Paginator/SerializableLimitIterator.php | 4 +- library/vendor/Zend/ProgressBar.php | 4 +- library/vendor/Zend/ProgressBar/Adapter.php | 4 +- .../Zend/ProgressBar/Adapter/Console.php | 4 +- .../Zend/ProgressBar/Adapter/Exception.php | 4 +- .../Zend/ProgressBar/Adapter/JsPull.php | 4 +- .../Zend/ProgressBar/Adapter/JsPush.php | 4 +- library/vendor/Zend/ProgressBar/Exception.php | 4 +- library/vendor/Zend/Queue.php | 4 +- .../vendor/Zend/Queue/Adapter/Activemq.php | 4 +- .../Zend/Queue/Adapter/AdapterAbstract.php | 4 +- .../Zend/Queue/Adapter/AdapterInterface.php | 4 +- library/vendor/Zend/Queue/Adapter/Array.php | 4 +- library/vendor/Zend/Queue/Adapter/Db.php | 4 +- .../vendor/Zend/Queue/Adapter/Db/Message.php | 4 +- .../vendor/Zend/Queue/Adapter/Db/Queue.php | 4 +- .../vendor/Zend/Queue/Adapter/Memcacheq.php | 4 +- library/vendor/Zend/Queue/Adapter/Null.php | 4 +- .../Zend/Queue/Adapter/PlatformJobQueue.php | 4 +- library/vendor/Zend/Queue/Exception.php | 4 +- library/vendor/Zend/Queue/Message.php | 4 +- .../vendor/Zend/Queue/Message/Iterator.php | 4 +- .../vendor/Zend/Queue/Message/PlatformJob.php | 4 +- library/vendor/Zend/Queue/Stomp/Client.php | 4 +- .../Zend/Queue/Stomp/Client/Connection.php | 4 +- .../Stomp/Client/ConnectionInterface.php | 4 +- library/vendor/Zend/Queue/Stomp/Frame.php | 4 +- .../Zend/Queue/Stomp/FrameInterface.php | 4 +- library/vendor/Zend/Reflection/Class.php | 4 +- library/vendor/Zend/Reflection/Docblock.php | 4 +- .../vendor/Zend/Reflection/Docblock/Tag.php | 4 +- .../Zend/Reflection/Docblock/Tag/Param.php | 4 +- .../Zend/Reflection/Docblock/Tag/Return.php | 4 +- library/vendor/Zend/Reflection/Exception.php | 4 +- library/vendor/Zend/Reflection/Extension.php | 4 +- library/vendor/Zend/Reflection/File.php | 4 +- library/vendor/Zend/Reflection/Function.php | 4 +- library/vendor/Zend/Reflection/Method.php | 4 +- library/vendor/Zend/Reflection/Parameter.php | 4 +- library/vendor/Zend/Reflection/Property.php | 4 +- library/vendor/Zend/Registry.php | 6 +- library/vendor/Zend/Rest/Client.php | 4 +- library/vendor/Zend/Rest/Client/Exception.php | 4 +- library/vendor/Zend/Rest/Client/Result.php | 4 +- .../Zend/Rest/Client/Result/Exception.php | 4 +- library/vendor/Zend/Rest/Controller.php | 4 +- library/vendor/Zend/Rest/Exception.php | 4 +- library/vendor/Zend/Rest/Route.php | 4 +- library/vendor/Zend/Rest/Server.php | 137 +- library/vendor/Zend/Rest/Server/Exception.php | 4 +- library/vendor/Zend/SOURCE | 23 +- .../Exception.php} | 15 +- library/vendor/Zend/Search/Lucene.php | 1537 ++++++++++++ .../Zend/Search/Lucene/Analysis/Analyzer.php | 166 ++ .../Lucene/Analysis/Analyzer/Common.php | 91 + .../Lucene/Analysis/Analyzer/Common/Text.php | 95 + .../Analyzer/Common/Text/CaseInsensitive.php | 45 + .../Analysis/Analyzer/Common/TextNum.php | 94 + .../Common/TextNum/CaseInsensitive.php} | 37 +- .../Lucene/Analysis/Analyzer/Common/Utf8.php | 124 + .../Analyzer/Common/Utf8/CaseInsensitive.php} | 37 +- .../Analysis/Analyzer/Common/Utf8Num.php | 124 + .../Common/Utf8Num/CaseInsensitive.php | 47 + .../Zend/Search/Lucene/Analysis/Token.php | 166 ++ .../Search/Lucene/Analysis/TokenFilter.php | 46 + .../Lucene/Analysis/TokenFilter/LowerCase.php | 51 + .../Analysis/TokenFilter/LowerCaseUtf8.php | 62 + .../Analysis/TokenFilter/ShortWords.php | 68 + .../Lucene/Analysis/TokenFilter/StopWords.php | 97 + .../vendor/Zend/Search/Lucene/Document.php | 129 + .../Zend/Search/Lucene/Document/Docx.php | 149 ++ .../Lucene/Document}/Exception.php | 16 +- .../Zend/Search/Lucene/Document/Html.php | 476 ++++ .../Zend/Search/Lucene/Document/OpenXml.php | 129 + .../Zend/Search/Lucene/Document/Pptx.php | 198 ++ .../Zend/Search/Lucene/Document/Xlsx.php | 262 ++ .../vendor/Zend/Search/Lucene/Exception.php | 36 + library/vendor/Zend/Search/Lucene/FSM.php | 428 ++++ .../vendor/Zend/Search/Lucene/FSMAction.php | 66 + library/vendor/Zend/Search/Lucene/Field.php | 226 ++ .../Search/Lucene/Index/DictionaryLoader.php | 264 +++ .../Zend/Search/Lucene/Index/DocsFilter.php | 59 + .../Zend/Search/Lucene/Index/FieldInfo.php | 50 + .../Zend/Search/Lucene/Index/SegmentInfo.php | 2110 +++++++++++++++++ .../Search/Lucene/Index/SegmentMerger.php | 266 +++ .../Search/Lucene/Index/SegmentWriter.php | 631 +++++ .../Index/SegmentWriter/DocumentWriter.php | 225 ++ .../Index/SegmentWriter/StreamWriter.php | 92 + .../vendor/Zend/Search/Lucene/Index/Term.php | 144 ++ .../Zend/Search/Lucene/Index/TermInfo.php | 80 + .../Lucene/Index/TermsPriorityQueue.php | 48 + .../Lucene/Index/TermsStream/Interface.php | 66 + .../Zend/Search/Lucene/Index/Writer.php | 836 +++++++ .../vendor/Zend/Search/Lucene/Interface.php | 413 ++++ .../Search/Lucene/Interface/MultiSearcher.php | 24 + .../vendor/Zend/Search/Lucene/LockManager.php | 231 ++ .../Zend/Search/Lucene/MultiSearcher.php | 965 ++++++++ .../Zend/Search/Lucene/PriorityQueue.php | 171 ++ library/vendor/Zend/Search/Lucene/Proxy.php | 611 +++++ .../Search/BooleanExpressionRecognizer.php | 274 +++ .../Lucene/Search/Highlighter/Default.php | 93 + .../Lucene/Search/Highlighter/Interface.php | 53 + .../Zend/Search/Lucene/Search/Query.php | 229 ++ .../Search/Lucene/Search/Query/Boolean.php | 802 +++++++ .../Zend/Search/Lucene/Search/Query/Empty.php | 136 ++ .../Zend/Search/Lucene/Search/Query/Fuzzy.php | 472 ++++ .../Lucene/Search/Query/Insignificant.php | 137 ++ .../Search/Lucene/Search/Query/MultiTerm.php | 657 +++++ .../Search/Lucene/Search/Query/Phrase.php | 563 +++++ .../Lucene/Search/Query/Preprocessing.php | 120 + .../Search/Query/Preprocessing/Fuzzy.php | 270 +++ .../Search/Query/Preprocessing/Phrase.php | 257 ++ .../Search/Query/Preprocessing/Term.php | 319 +++ .../Zend/Search/Lucene/Search/Query/Range.php | 360 +++ .../Zend/Search/Lucene/Search/Query/Term.php | 223 ++ .../Search/Lucene/Search/Query/Wildcard.php | 347 +++ .../Zend/Search/Lucene/Search/QueryEntry.php | 67 + .../Lucene/Search/QueryEntry/Phrase.php | 114 + .../Lucene/Search/QueryEntry/Subquery.php | 75 + .../Search/Lucene/Search/QueryEntry/Term.php | 126 + .../Zend/Search/Lucene/Search/QueryHit.php | 109 + .../Zend/Search/Lucene/Search/QueryLexer.php | 502 ++++ .../Zend/Search/Lucene/Search/QueryParser.php | 603 +++++ .../Lucene/Search/QueryParserContext.php | 385 +++ .../Lucene/Search/QueryParserException.php | 40 + .../Zend/Search/Lucene/Search/QueryToken.php | 223 ++ .../Zend/Search/Lucene/Search/Similarity.php | 550 +++++ .../Lucene/Search/Similarity/Default.php | 109 + .../Zend/Search/Lucene/Search/Weight.php | 85 + .../Search/Lucene/Search/Weight/Boolean.php | 136 ++ .../Lucene/Search/Weight/Empty.php} | 49 +- .../Search/Lucene/Search/Weight/MultiTerm.php | 137 ++ .../Search/Lucene/Search/Weight/Phrase.php | 107 + .../Zend/Search/Lucene/Search/Weight/Term.php | 124 + .../Zend/Search/Lucene/Storage/Directory.php | 136 ++ .../Lucene/Storage/Directory/Filesystem.php | 355 +++ .../Zend/Search/Lucene/Storage/File.php | 470 ++++ .../Search/Lucene/Storage/File/Filesystem.php | 226 ++ .../Search/Lucene/Storage/File/Memory.php | 597 +++++ .../Lucene/TermStreamsPriorityQueue.php | 170 ++ library/vendor/Zend/Serializer.php | 4 +- .../Serializer/Adapter/AdapterAbstract.php | 4 +- .../Serializer/Adapter/AdapterInterface.php | 4 +- .../vendor/Zend/Serializer/Adapter/Amf0.php | 4 +- .../vendor/Zend/Serializer/Adapter/Amf3.php | 4 +- .../Zend/Serializer/Adapter/Igbinary.php | 94 + .../vendor/Zend/Serializer/Adapter/Json.php | 4 +- .../Zend/Serializer/Adapter/PhpCode.php | 4 +- .../Zend/Serializer/Adapter/PhpSerialize.php | 4 +- .../Zend/Serializer/Adapter/PythonPickle.php | 20 +- .../vendor/Zend/Serializer/Adapter/Wddx.php | 4 +- library/vendor/Zend/Serializer/Exception.php | 4 +- library/vendor/Zend/Server/Abstract.php | 4 +- library/vendor/Zend/Server/Cache.php | 4 +- library/vendor/Zend/Server/Definition.php | 4 +- library/vendor/Zend/Server/Exception.php | 2 +- library/vendor/Zend/Server/Interface.php | 4 +- .../vendor/Zend/Server/Method/Callback.php | 4 +- .../vendor/Zend/Server/Method/Definition.php | 4 +- .../vendor/Zend/Server/Method/Parameter.php | 4 +- .../vendor/Zend/Server/Method/Prototype.php | 4 +- library/vendor/Zend/Server/Reflection.php | 4 +- .../vendor/Zend/Server/Reflection/Class.php | 4 +- .../Zend/Server/Reflection/Exception.php | 4 +- .../Zend/Server/Reflection/Function.php | 4 +- .../Server/Reflection/Function/Abstract.php | 4 +- .../vendor/Zend/Server/Reflection/Method.php | 4 +- .../vendor/Zend/Server/Reflection/Node.php | 4 +- .../Zend/Server/Reflection/Parameter.php | 4 +- .../Zend/Server/Reflection/Prototype.php | 4 +- .../Zend/Server/Reflection/ReturnValue.php | 4 +- library/vendor/Zend/Session.php | 8 +- library/vendor/Zend/Session/Abstract.php | 4 +- library/vendor/Zend/Session/Exception.php | 4 +- library/vendor/Zend/Session/Namespace.php | 4 +- .../Zend/Session/SaveHandler/DbTable.php | 4 +- .../Zend/Session/SaveHandler/Exception.php | 4 +- .../Zend/Session/SaveHandler/Interface.php | 4 +- .../Zend/Session/Validator/Abstract.php | 4 +- .../Zend/Session/Validator/Exception.php | 42 + .../Zend/Session/Validator/HttpUserAgent.php | 4 +- .../Zend/Session/Validator/Interface.php | 4 +- library/vendor/Zend/Soap/AutoDiscover.php | 597 +++++ .../Zend/Soap/AutoDiscover/Exception.php | 33 + library/vendor/Zend/Soap/Client.php | 1223 ++++++++++ library/vendor/Zend/Soap/Client/Common.php | 76 + library/vendor/Zend/Soap/Client/DotNet.php | 93 + library/vendor/Zend/Soap/Client/Exception.php | 34 + library/vendor/Zend/Soap/Client/Local.php | 97 + library/vendor/Zend/Soap/Server.php | 999 ++++++++ .../Zend/{Amf => Soap}/Server/Exception.php | 32 +- library/vendor/Zend/Soap/Server/Proxy.php | 75 + library/vendor/Zend/Soap/Wsdl.php | 661 ++++++ library/vendor/Zend/Soap/Wsdl/Exception.php | 36 + .../Zend/Soap/Wsdl/Strategy/Abstract.php | 65 + .../Zend/Soap/Wsdl/Strategy/AnyType.php | 58 + .../Soap/Wsdl/Strategy/ArrayOfTypeComplex.php | 142 ++ .../Wsdl/Strategy/ArrayOfTypeSequence.php | 154 ++ .../Zend/Soap/Wsdl/Strategy/Composite.php | 183 ++ .../Soap/Wsdl/Strategy/DefaultComplexType.php | 89 + .../Zend/Soap/Wsdl/Strategy/Interface.php | 48 + .../vendor/Zend/Stdlib/CallbackHandler.php | 9 +- library/vendor/Zend/Stdlib/Exception.php | 4 +- .../Exception/InvalidCallbackException.php | 4 +- library/vendor/Zend/Stdlib/PriorityQueue.php | 4 +- .../vendor/Zend/Stdlib/SplPriorityQueue.php | 4 +- library/vendor/Zend/Tag/Cloud.php | 4 +- .../vendor/Zend/Tag/Cloud/Decorator/Cloud.php | 4 +- .../Zend/Tag/Cloud/Decorator/Exception.php | 4 +- .../Zend/Tag/Cloud/Decorator/HtmlCloud.php | 4 +- .../Zend/Tag/Cloud/Decorator/HtmlTag.php | 4 +- .../vendor/Zend/Tag/Cloud/Decorator/Tag.php | 4 +- library/vendor/Zend/Tag/Cloud/Exception.php | 4 +- library/vendor/Zend/Tag/Exception.php | 4 +- library/vendor/Zend/Tag/Item.php | 4 +- library/vendor/Zend/Tag/ItemList.php | 4 +- library/vendor/Zend/Tag/Taggable.php | 4 +- library/vendor/Zend/Test/DbAdapter.php | 4 +- library/vendor/Zend/Test/DbStatement.php | 4 +- .../Zend/Test/PHPUnit/Constraint/DomQuery.php | 11 +- .../Test/PHPUnit/Constraint/DomQuery34.php | 12 +- .../Test/PHPUnit/Constraint/DomQuery37.php | 12 +- .../Test/PHPUnit/Constraint/DomQuery41.php | 12 +- .../Test/PHPUnit/Constraint/Exception.php | 4 +- .../Zend/Test/PHPUnit/Constraint/Redirect.php | 11 +- .../Test/PHPUnit/Constraint/Redirect34.php | 11 +- .../Test/PHPUnit/Constraint/Redirect37.php | 11 +- .../Test/PHPUnit/Constraint/Redirect41.php | 11 +- .../PHPUnit/Constraint/ResponseHeader.php | 11 +- .../PHPUnit/Constraint/ResponseHeader34.php | 14 +- .../PHPUnit/Constraint/ResponseHeader37.php | 14 +- .../PHPUnit/Constraint/ResponseHeader41.php | 14 +- .../Zend/Test/PHPUnit/ControllerTestCase.php | 339 +-- .../Zend/Test/PHPUnit/DatabaseTestCase.php | 9 +- .../Zend/Test/PHPUnit/Db/Connection.php | 6 +- .../Zend/Test/PHPUnit/Db/DataSet/DbRowset.php | 6 +- .../Zend/Test/PHPUnit/Db/DataSet/DbTable.php | 5 +- .../PHPUnit/Db/DataSet/DbTableDataSet.php | 6 +- .../Test/PHPUnit/Db/DataSet/QueryDataSet.php | 7 +- .../Test/PHPUnit/Db/DataSet/QueryTable.php | 10 +- .../vendor/Zend/Test/PHPUnit/Db/Exception.php | 5 +- .../Zend/Test/PHPUnit/Db/Metadata/Generic.php | 7 +- .../Test/PHPUnit/Db/Operation/DeleteAll.php | 6 +- .../Zend/Test/PHPUnit/Db/Operation/Insert.php | 6 +- .../Test/PHPUnit/Db/Operation/Truncate.php | 7 +- .../Zend/Test/PHPUnit/Db/SimpleTester.php | 7 +- library/vendor/Zend/Text/Exception.php | 5 +- library/vendor/Zend/Text/Figlet.php | 9 +- library/vendor/Zend/Text/Figlet/Exception.php | 5 +- .../Zend/Text/Figlet/zend-framework.flf | 2 +- library/vendor/Zend/Text/MultiByte.php | 4 +- library/vendor/Zend/Text/Table.php | 13 +- library/vendor/Zend/Text/Table/Column.php | 11 +- .../Zend/Text/Table/Decorator/Ascii.php | 5 +- .../Zend/Text/Table/Decorator/Interface.php | 4 +- .../Zend/Text/Table/Decorator/Unicode.php | 5 +- library/vendor/Zend/Text/Table/Exception.php | 5 +- library/vendor/Zend/Text/Table/Row.php | 8 +- library/vendor/Zend/TimeSync.php | 12 +- library/vendor/Zend/TimeSync/Exception.php | 5 +- library/vendor/Zend/TimeSync/Ntp.php | 5 +- library/vendor/Zend/TimeSync/Protocol.php | 4 +- library/vendor/Zend/TimeSync/Sntp.php | 5 +- .../Zend/Tool/Framework/Action/Base.php | 5 +- .../Zend/Tool/Framework/Action/Exception.php | 5 +- .../Zend/Tool/Framework/Action/Interface.php | 4 +- .../Zend/Tool/Framework/Action/Repository.php | 7 +- .../Zend/Tool/Framework/Client/Abstract.php | 17 +- .../Zend/Tool/Framework/Client/Config.php | 14 +- .../Zend/Tool/Framework/Client/Console.php | 7 +- .../Client/Console/ArgumentParser.php | 11 +- .../Framework/Client/Console/HelpSystem.php | 5 +- .../Framework/Client/Console/Manifest.php | 10 +- .../Console/ResponseDecorator/AlignCenter.php | 5 +- .../Console/ResponseDecorator/Blockize.php | 5 +- .../Console/ResponseDecorator/Colorizer.php | 4 +- .../Console/ResponseDecorator/Indention.php | 5 +- .../Zend/Tool/Framework/Client/Exception.php | 5 +- .../Client/Interactive/InputHandler.php | 8 +- .../Client/Interactive/InputInterface.php | 4 +- .../Client/Interactive/InputRequest.php | 4 +- .../Client/Interactive/InputResponse.php | 4 +- .../Client/Interactive/OutputInterface.php | 4 +- .../Zend/Tool/Framework/Client/Manifest.php | 10 +- .../Zend/Tool/Framework/Client/Request.php | 4 +- .../Zend/Tool/Framework/Client/Response.php | 5 +- .../Response/ContentDecorator/Interface.php | 4 +- .../Response/ContentDecorator/Separator.php | 5 +- .../Zend/Tool/Framework/Client/Storage.php | 5 +- .../Client/Storage/AdapterInterface.php | 4 +- .../Framework/Client/Storage/Directory.php | 5 +- .../vendor/Zend/Tool/Framework/Exception.php | 5 +- .../Zend/Tool/Framework/Loader/Abstract.php | 8 +- .../Tool/Framework/Loader/BasicLoader.php | 9 +- .../Framework/Loader/IncludePathLoader.php | 7 +- .../RecursiveFilterIterator.php | 4 +- .../Zend/Tool/Framework/Loader/Interface.php | 4 +- .../Framework/Manifest/ActionManifestable.php | 5 +- .../Framework/Manifest/ActionMetadata.php | 4 +- .../Tool/Framework/Manifest/Exception.php | 5 +- .../Tool/Framework/Manifest/Indexable.php | 4 +- .../Tool/Framework/Manifest/Interface.php | 4 +- .../Zend/Tool/Framework/Manifest/Metadata.php | 4 +- .../Manifest/MetadataManifestable.php | 5 +- .../Manifest/ProviderManifestable.php | 5 +- .../Framework/Manifest/ProviderMetadata.php | 4 +- .../Tool/Framework/Manifest/Repository.php | 8 +- .../Tool/Framework/Metadata/Attributable.php | 4 +- .../Zend/Tool/Framework/Metadata/Basic.php | 6 +- .../Zend/Tool/Framework/Metadata/Dynamic.php | 8 +- .../Tool/Framework/Metadata/Interface.php | 4 +- .../Zend/Tool/Framework/Metadata/Tool.php | 5 +- .../Zend/Tool/Framework/Provider/Abstract.php | 6 +- .../Provider/DocblockManifestable.php | 4 +- .../Tool/Framework/Provider/Exception.php | 5 +- .../Tool/Framework/Provider/Initializable.php | 4 +- .../Tool/Framework/Provider/Interactable.php | 4 +- .../Tool/Framework/Provider/Interface.php | 4 +- .../Tool/Framework/Provider/Pretendable.php | 4 +- .../Tool/Framework/Provider/Repository.php | 7 +- .../Tool/Framework/Provider/Signature.php | 9 +- .../vendor/Zend/Tool/Framework/Registry.php | 17 +- .../Framework/Registry/EnabledInterface.php | 4 +- .../Tool/Framework/Registry/Exception.php | 5 +- .../Tool/Framework/Registry/Interface.php | 4 +- .../Tool/Framework/System/Action/Create.php | 5 +- .../Tool/Framework/System/Action/Delete.php | 5 +- .../Zend/Tool/Framework/System/Manifest.php | 12 +- .../Tool/Framework/System/Provider/Config.php | 16 +- .../Framework/System/Provider/Manifest.php | 6 +- .../Framework/System/Provider/Phpinfo.php | 5 +- .../Framework/System/Provider/Version.php | 7 +- .../Tool/Project/Context/Content/Engine.php | 6 +- .../Context/Content/Engine/CodeGenerator.php | 4 +- .../Project/Context/Content/Engine/Phtml.php | 4 +- .../Zend/Tool/Project/Context/Exception.php | 5 +- .../Project/Context/Filesystem/Abstract.php | 5 +- .../Project/Context/Filesystem/Directory.php | 5 +- .../Tool/Project/Context/Filesystem/File.php | 5 +- .../Zend/Tool/Project/Context/Interface.php | 4 +- .../Zend/Tool/Project/Context/Repository.php | 10 +- .../Tool/Project/Context/System/Interface.php | 4 +- .../Context/System/NotOverwritable.php | 4 +- .../Context/System/ProjectDirectory.php | 10 +- .../Context/System/ProjectProfileFile.php | 8 +- .../System/ProjectProvidersDirectory.php | 7 +- .../Context/System/TopLevelRestrictable.php | 4 +- .../Project/Context/Zf/AbstractClassFile.php | 5 +- .../Tool/Project/Context/Zf/ActionMethod.php | 9 +- .../Tool/Project/Context/Zf/ApisDirectory.php | 5 +- .../Context/Zf/ApplicationConfigFile.php | 5 +- .../Context/Zf/ApplicationDirectory.php | 5 +- .../Tool/Project/Context/Zf/BootstrapFile.php | 4 +- .../Project/Context/Zf/CacheDirectory.php | 5 +- .../Tool/Project/Context/Zf/ConfigFile.php | 5 +- .../Project/Context/Zf/ConfigsDirectory.php | 5 +- .../Project/Context/Zf/ControllerFile.php | 4 +- .../Context/Zf/ControllersDirectory.php | 5 +- .../Tool/Project/Context/Zf/DataDirectory.php | 5 +- .../Project/Context/Zf/DbTableDirectory.php | 5 +- .../Tool/Project/Context/Zf/DbTableFile.php | 4 +- .../Tool/Project/Context/Zf/DocsDirectory.php | 5 +- .../Zend/Tool/Project/Context/Zf/FormFile.php | 5 +- .../Project/Context/Zf/FormsDirectory.php | 5 +- .../Tool/Project/Context/Zf/HtaccessFile.php | 5 +- .../Project/Context/Zf/LayoutScriptFile.php | 5 +- .../Context/Zf/LayoutScriptsDirectory.php | 5 +- .../Project/Context/Zf/LayoutsDirectory.php | 5 +- .../Project/Context/Zf/LibraryDirectory.php | 5 +- .../Project/Context/Zf/LocalesDirectory.php | 5 +- .../Tool/Project/Context/Zf/LogsDirectory.php | 5 +- .../Tool/Project/Context/Zf/ModelFile.php | 5 +- .../Project/Context/Zf/ModelsDirectory.php | 5 +- .../Project/Context/Zf/ModuleDirectory.php | 5 +- .../Project/Context/Zf/ModulesDirectory.php | 5 +- .../Context/Zf/ProjectProviderFile.php | 6 +- .../Project/Context/Zf/PublicDirectory.php | 5 +- .../Context/Zf/PublicImagesDirectory.php | 5 +- .../Project/Context/Zf/PublicIndexFile.php | 6 +- .../Context/Zf/PublicScriptsDirectory.php | 5 +- .../Context/Zf/PublicStylesheetsDirectory.php | 5 +- .../Context/Zf/SearchIndexesDirectory.php | 5 +- .../Project/Context/Zf/ServicesDirectory.php | 5 +- .../Project/Context/Zf/SessionsDirectory.php | 5 +- .../Project/Context/Zf/TemporaryDirectory.php | 5 +- .../Zf/TestApplicationActionMethod.php | 8 +- .../Zf/TestApplicationBootstrapFile.php | 5 +- .../Zf/TestApplicationControllerDirectory.php | 5 +- .../Zf/TestApplicationControllerFile.php | 5 +- .../Context/Zf/TestApplicationDirectory.php | 5 +- .../Zf/TestApplicationModuleDirectory.php | 5 +- .../Zf/TestApplicationModulesDirectory.php | 5 +- .../Context/Zf/TestLibraryBootstrapFile.php | 5 +- .../Context/Zf/TestLibraryDirectory.php | 5 +- .../Project/Context/Zf/TestLibraryFile.php | 5 +- .../Zf/TestLibraryNamespaceDirectory.php | 5 +- .../Context/Zf/TestPHPUnitBootstrapFile.php | 6 +- .../Context/Zf/TestPHPUnitConfigFile.php | 5 +- .../Project/Context/Zf/TestsDirectory.php | 5 +- .../Project/Context/Zf/UploadsDirectory.php | 5 +- .../Zf/ViewControllerScriptsDirectory.php | 8 +- .../Context/Zf/ViewFiltersDirectory.php | 5 +- .../Context/Zf/ViewHelpersDirectory.php | 5 +- .../Project/Context/Zf/ViewScriptFile.php | 8 +- .../Context/Zf/ViewScriptsDirectory.php | 5 +- .../Project/Context/Zf/ViewsDirectory.php | 5 +- .../Context/Zf/ZfStandardLibraryDirectory.php | 6 +- .../vendor/Zend/Tool/Project/Exception.php | 5 +- library/vendor/Zend/Tool/Project/Profile.php | 12 +- .../Zend/Tool/Project/Profile/Exception.php | 5 +- .../Project/Profile/FileParser/Interface.php | 4 +- .../Tool/Project/Profile/FileParser/Xml.php | 8 +- .../Profile/Iterator/ContextFilter.php | 4 +- .../Iterator/EnabledResourceFilter.php | 4 +- .../Zend/Tool/Project/Profile/Resource.php | 6 +- .../Project/Profile/Resource/Container.php | 9 +- .../Profile/Resource/SearchConstraints.php | 4 +- .../Zend/Tool/Project/Provider/Abstract.php | 12 +- .../Zend/Tool/Project/Provider/Action.php | 7 +- .../Tool/Project/Provider/Application.php | 4 +- .../Zend/Tool/Project/Provider/Controller.php | 5 +- .../Zend/Tool/Project/Provider/DbAdapter.php | 6 +- .../Zend/Tool/Project/Provider/DbTable.php | 4 +- .../Zend/Tool/Project/Provider/Exception.php | 5 +- .../Zend/Tool/Project/Provider/Form.php | 4 +- .../Zend/Tool/Project/Provider/Layout.php | 5 +- .../Zend/Tool/Project/Provider/Manifest.php | 5 +- .../Zend/Tool/Project/Provider/Model.php | 4 +- .../Zend/Tool/Project/Provider/Module.php | 9 +- .../Zend/Tool/Project/Provider/Profile.php | 5 +- .../Zend/Tool/Project/Provider/Project.php | 7 +- .../Tool/Project/Provider/ProjectProvider.php | 6 +- .../Zend/Tool/Project/Provider/Test.php | 6 +- .../Zend/Tool/Project/Provider/View.php | 9 +- library/vendor/Zend/Translate.php | 16 +- library/vendor/Zend/Translate/Adapter.php | 17 +- .../vendor/Zend/Translate/Adapter/Array.php | 7 +- library/vendor/Zend/Translate/Adapter/Csv.php | 7 +- .../vendor/Zend/Translate/Adapter/Gettext.php | 9 +- library/vendor/Zend/Translate/Adapter/Ini.php | 7 +- library/vendor/Zend/Translate/Adapter/Qt.php | 11 +- library/vendor/Zend/Translate/Adapter/Tbx.php | 11 +- library/vendor/Zend/Translate/Adapter/Tmx.php | 11 +- .../vendor/Zend/Translate/Adapter/Xliff.php | 11 +- .../vendor/Zend/Translate/Adapter/XmlTm.php | 11 +- library/vendor/Zend/Translate/Exception.php | 5 +- library/vendor/Zend/Translate/Plural.php | 7 +- library/vendor/Zend/Uri.php | 10 +- library/vendor/Zend/Uri/Exception.php | 5 +- library/vendor/Zend/Uri/Http.php | 24 +- library/vendor/Zend/Validate.php | 11 +- library/vendor/Zend/Validate/Abstract.php | 13 +- library/vendor/Zend/Validate/Alnum.php | 9 +- library/vendor/Zend/Validate/Alpha.php | 9 +- library/vendor/Zend/Validate/Barcode.php | 12 +- .../Zend/Validate/Barcode/AdapterAbstract.php | 5 +- .../Validate/Barcode/AdapterInterface.php | 6 +- .../vendor/Zend/Validate/Barcode/Code25.php | 7 +- .../Validate/Barcode/Code25interleaved.php | 7 +- .../vendor/Zend/Validate/Barcode/Code39.php | 7 +- .../Zend/Validate/Barcode/Code39ext.php | 7 +- .../vendor/Zend/Validate/Barcode/Code93.php | 7 +- .../Zend/Validate/Barcode/Code93ext.php | 7 +- .../vendor/Zend/Validate/Barcode/Ean12.php | 5 +- .../vendor/Zend/Validate/Barcode/Ean13.php | 5 +- .../vendor/Zend/Validate/Barcode/Ean14.php | 5 +- .../vendor/Zend/Validate/Barcode/Ean18.php | 5 +- library/vendor/Zend/Validate/Barcode/Ean2.php | 7 +- library/vendor/Zend/Validate/Barcode/Ean5.php | 7 +- library/vendor/Zend/Validate/Barcode/Ean8.php | 5 +- .../vendor/Zend/Validate/Barcode/Gtin12.php | 5 +- .../vendor/Zend/Validate/Barcode/Gtin13.php | 5 +- .../vendor/Zend/Validate/Barcode/Gtin14.php | 5 +- .../Zend/Validate/Barcode/Identcode.php | 5 +- .../Zend/Validate/Barcode/Intelligentmail.php | 7 +- library/vendor/Zend/Validate/Barcode/Issn.php | 5 +- .../vendor/Zend/Validate/Barcode/Itf14.php | 5 +- .../vendor/Zend/Validate/Barcode/Leitcode.php | 5 +- .../vendor/Zend/Validate/Barcode/Planet.php | 5 +- .../vendor/Zend/Validate/Barcode/Postnet.php | 5 +- .../Zend/Validate/Barcode/Royalmail.php | 5 +- library/vendor/Zend/Validate/Barcode/Sscc.php | 5 +- library/vendor/Zend/Validate/Barcode/Upca.php | 5 +- library/vendor/Zend/Validate/Barcode/Upce.php | 5 +- library/vendor/Zend/Validate/Between.php | 8 +- library/vendor/Zend/Validate/Callback.php | 16 +- library/vendor/Zend/Validate/Ccnum.php | 6 +- library/vendor/Zend/Validate/CreditCard.php | 17 +- library/vendor/Zend/Validate/Date.php | 12 +- library/vendor/Zend/Validate/Db/Abstract.php | 13 +- .../Zend/Validate/Db/NoRecordExists.php | 5 +- .../vendor/Zend/Validate/Db/RecordExists.php | 5 +- library/vendor/Zend/Validate/Digits.php | 6 +- library/vendor/Zend/Validate/EmailAddress.php | 32 +- library/vendor/Zend/Validate/Exception.php | 5 +- library/vendor/Zend/Validate/File/Count.php | 13 +- library/vendor/Zend/Validate/File/Crc32.php | 10 +- .../Zend/Validate/File/ExcludeExtension.php | 6 +- .../Zend/Validate/File/ExcludeMimeType.php | 6 +- library/vendor/Zend/Validate/File/Exists.php | 10 +- .../vendor/Zend/Validate/File/Extension.php | 9 +- .../vendor/Zend/Validate/File/FilesSize.php | 9 +- library/vendor/Zend/Validate/File/Hash.php | 12 +- .../vendor/Zend/Validate/File/ImageSize.php | 13 +- .../Zend/Validate/File/IsCompressed.php | 8 +- library/vendor/Zend/Validate/File/IsImage.php | 8 +- library/vendor/Zend/Validate/File/Md5.php | 12 +- .../vendor/Zend/Validate/File/MimeType.php | 31 +- .../vendor/Zend/Validate/File/NotExists.php | 5 +- library/vendor/Zend/Validate/File/Sha1.php | 10 +- library/vendor/Zend/Validate/File/Size.php | 12 +- library/vendor/Zend/Validate/File/Upload.php | 12 +- .../vendor/Zend/Validate/File/WordCount.php | 6 +- library/vendor/Zend/Validate/Float.php | 9 +- library/vendor/Zend/Validate/GreaterThan.php | 8 +- library/vendor/Zend/Validate/Hex.php | 5 +- library/vendor/Zend/Validate/Hostname.php | 288 ++- library/vendor/Zend/Validate/Hostname/Biz.php | 4 +- library/vendor/Zend/Validate/Hostname/Cn.php | 4 +- library/vendor/Zend/Validate/Hostname/Com.php | 6 +- library/vendor/Zend/Validate/Hostname/Jp.php | 4 +- library/vendor/Zend/Validate/Iban.php | 13 +- library/vendor/Zend/Validate/Identical.php | 9 +- library/vendor/Zend/Validate/InArray.php | 10 +- library/vendor/Zend/Validate/Int.php | 9 +- library/vendor/Zend/Validate/Interface.php | 4 +- library/vendor/Zend/Validate/Ip.php | 9 +- library/vendor/Zend/Validate/Isbn.php | 9 +- library/vendor/Zend/Validate/Ldap/Dn.php | 5 +- library/vendor/Zend/Validate/LessThan.php | 8 +- library/vendor/Zend/Validate/NotEmpty.php | 6 +- library/vendor/Zend/Validate/PostCode.php | 16 +- library/vendor/Zend/Validate/Regex.php | 8 +- .../Zend/Validate/Sitemap/Changefreq.php | 5 +- .../vendor/Zend/Validate/Sitemap/Lastmod.php | 5 +- library/vendor/Zend/Validate/Sitemap/Loc.php | 6 +- .../vendor/Zend/Validate/Sitemap/Priority.php | 5 +- library/vendor/Zend/Validate/StringLength.php | 12 +- library/vendor/Zend/Version.php | 6 +- library/vendor/Zend/View.php | 61 +- library/vendor/Zend/View/Abstract.php | 18 +- library/vendor/Zend/View/Exception.php | 5 +- library/vendor/Zend/View/Helper/Abstract.php | 5 +- library/vendor/Zend/View/Helper/Action.php | 7 +- library/vendor/Zend/View/Helper/BaseUrl.php | 6 +- library/vendor/Zend/View/Helper/Currency.php | 8 +- library/vendor/Zend/View/Helper/Cycle.php | 4 +- .../vendor/Zend/View/Helper/DeclareVars.php | 5 +- library/vendor/Zend/View/Helper/Doctype.php | 7 +- library/vendor/Zend/View/Helper/Fieldset.php | 5 +- library/vendor/Zend/View/Helper/Form.php | 5 +- .../vendor/Zend/View/Helper/FormButton.php | 5 +- .../vendor/Zend/View/Helper/FormCheckbox.php | 5 +- .../vendor/Zend/View/Helper/FormElement.php | 6 +- .../vendor/Zend/View/Helper/FormErrors.php | 5 +- library/vendor/Zend/View/Helper/FormFile.php | 5 +- .../vendor/Zend/View/Helper/FormHidden.php | 5 +- library/vendor/Zend/View/Helper/FormImage.php | 5 +- library/vendor/Zend/View/Helper/FormLabel.php | 5 +- .../Zend/View/Helper/FormMultiCheckbox.php | 5 +- library/vendor/Zend/View/Helper/FormNote.php | 5 +- .../vendor/Zend/View/Helper/FormPassword.php | 5 +- library/vendor/Zend/View/Helper/FormRadio.php | 6 +- library/vendor/Zend/View/Helper/FormReset.php | 5 +- .../vendor/Zend/View/Helper/FormSelect.php | 5 +- .../vendor/Zend/View/Helper/FormSubmit.php | 5 +- library/vendor/Zend/View/Helper/FormText.php | 5 +- .../vendor/Zend/View/Helper/FormTextarea.php | 5 +- library/vendor/Zend/View/Helper/Gravatar.php | 2 + library/vendor/Zend/View/Helper/HeadLink.php | 24 +- library/vendor/Zend/View/Helper/HeadMeta.php | 30 +- .../vendor/Zend/View/Helper/HeadScript.php | 26 +- library/vendor/Zend/View/Helper/HeadStyle.php | 20 +- library/vendor/Zend/View/Helper/HeadTitle.php | 8 +- .../vendor/Zend/View/Helper/HtmlElement.php | 6 +- library/vendor/Zend/View/Helper/HtmlFlash.php | 5 +- library/vendor/Zend/View/Helper/HtmlList.php | 6 +- .../vendor/Zend/View/Helper/HtmlObject.php | 5 +- library/vendor/Zend/View/Helper/HtmlPage.php | 5 +- .../vendor/Zend/View/Helper/HtmlQuicktime.php | 5 +- .../vendor/Zend/View/Helper/InlineScript.php | 5 +- library/vendor/Zend/View/Helper/Interface.php | 4 +- library/vendor/Zend/View/Helper/Json.php | 8 +- library/vendor/Zend/View/Helper/Layout.php | 6 +- .../vendor/Zend/View/Helper/Navigation.php | 10 +- .../View/Helper/Navigation/Breadcrumbs.php | 7 +- .../Zend/View/Helper/Navigation/Helper.php | 4 +- .../View/Helper/Navigation/HelperAbstract.php | 13 +- .../Zend/View/Helper/Navigation/Links.php | 7 +- .../Zend/View/Helper/Navigation/Menu.php | 7 +- .../Zend/View/Helper/Navigation/Sitemap.php | 13 +- .../Zend/View/Helper/PaginationControl.php | 7 +- library/vendor/Zend/View/Helper/Partial.php | 7 +- .../Zend/View/Helper/Partial/Exception.php | 5 +- .../vendor/Zend/View/Helper/PartialLoop.php | 6 +- .../vendor/Zend/View/Helper/Placeholder.php | 6 +- .../View/Helper/Placeholder/Container.php | 5 +- .../Helper/Placeholder/Container/Abstract.php | 5 +- .../Placeholder/Container/Exception.php | 5 +- .../Placeholder/Container/Standalone.php | 7 +- .../Zend/View/Helper/Placeholder/Registry.php | 9 +- .../Helper/Placeholder/Registry/Exception.php | 5 +- .../Zend/View/Helper/RenderToPlaceholder.php | 5 +- library/vendor/Zend/View/Helper/ServerUrl.php | 4 +- library/vendor/Zend/View/Helper/Translate.php | 10 +- library/vendor/Zend/View/Helper/Url.php | 5 +- library/vendor/Zend/View/Helper/UserAgent.php | 6 +- library/vendor/Zend/View/Interface.php | 4 +- library/vendor/Zend/View/Stream.php | 4 +- .../Zend/Wildfire/Channel/HttpHeaders.php | 17 +- .../Zend/Wildfire/Channel/Interface.php | 4 +- library/vendor/Zend/Wildfire/Exception.php | 5 +- .../vendor/Zend/Wildfire/Plugin/FirePhp.php | 19 +- .../Zend/Wildfire/Plugin/FirePhp/Message.php | 4 +- .../Wildfire/Plugin/FirePhp/TableMessage.php | 9 +- .../vendor/Zend/Wildfire/Plugin/Interface.php | 4 +- .../Zend/Wildfire/Protocol/JsonStream.php | 9 +- library/vendor/Zend/Xml/Exception.php | 5 +- library/vendor/Zend/Xml/Security.php | 356 ++- library/vendor/Zend/XmlRpc/Client.php | 13 +- .../vendor/Zend/XmlRpc/Client/Exception.php | 5 +- .../Zend/XmlRpc/Client/FaultException.php | 5 +- .../Zend/XmlRpc/Client/HttpException.php | 5 +- .../XmlRpc/Client/IntrospectException.php | 5 +- .../XmlRpc/Client/ServerIntrospection.php | 8 +- .../vendor/Zend/XmlRpc/Client/ServerProxy.php | 4 +- library/vendor/Zend/XmlRpc/Exception.php | 5 +- library/vendor/Zend/XmlRpc/Fault.php | 10 +- .../Zend/XmlRpc/Generator/DomDocument.php | 3 +- .../XmlRpc/Generator/GeneratorAbstract.php | 2 +- .../Zend/XmlRpc/Generator/XmlWriter.php | 3 +- library/vendor/Zend/XmlRpc/Request.php | 8 +- library/vendor/Zend/XmlRpc/Request/Http.php | 6 +- library/vendor/Zend/XmlRpc/Request/Stdin.php | 5 +- library/vendor/Zend/XmlRpc/Response.php | 9 +- library/vendor/Zend/XmlRpc/Response/Http.php | 5 +- library/vendor/Zend/XmlRpc/Server.php | 41 +- library/vendor/Zend/XmlRpc/Server/Cache.php | 5 +- .../vendor/Zend/XmlRpc/Server/Exception.php | 5 +- library/vendor/Zend/XmlRpc/Server/Fault.php | 5 +- library/vendor/Zend/XmlRpc/Server/System.php | 6 +- library/vendor/Zend/XmlRpc/Value.php | 39 +- library/vendor/Zend/XmlRpc/Value/Array.php | 5 +- library/vendor/Zend/XmlRpc/Value/Base64.php | 5 +- .../vendor/Zend/XmlRpc/Value/BigInteger.php | 6 +- library/vendor/Zend/XmlRpc/Value/Boolean.php | 5 +- .../vendor/Zend/XmlRpc/Value/Collection.php | 5 +- library/vendor/Zend/XmlRpc/Value/DateTime.php | 6 +- library/vendor/Zend/XmlRpc/Value/Double.php | 5 +- .../vendor/Zend/XmlRpc/Value/Exception.php | 5 +- library/vendor/Zend/XmlRpc/Value/Integer.php | 6 +- library/vendor/Zend/XmlRpc/Value/Nil.php | 5 +- library/vendor/Zend/XmlRpc/Value/Scalar.php | 5 +- library/vendor/Zend/XmlRpc/Value/String.php | 5 +- library/vendor/Zend/XmlRpc/Value/Struct.php | 5 +- 1531 files changed, 73757 insertions(+), 20557 deletions(-) delete mode 100644 library/vendor/Zend/Amf/Adobe/Auth.php delete mode 100644 library/vendor/Zend/Amf/Adobe/DbInspector.php delete mode 100644 library/vendor/Zend/Amf/Adobe/Introspector.php delete mode 100644 library/vendor/Zend/Amf/Constants.php delete mode 100644 library/vendor/Zend/Amf/Parse/Amf0/Deserializer.php delete mode 100644 library/vendor/Zend/Amf/Parse/Amf0/Serializer.php delete mode 100644 library/vendor/Zend/Amf/Parse/Amf3/Deserializer.php delete mode 100644 library/vendor/Zend/Amf/Parse/Amf3/Serializer.php delete mode 100644 library/vendor/Zend/Amf/Parse/Deserializer.php delete mode 100644 library/vendor/Zend/Amf/Parse/InputStream.php delete mode 100644 library/vendor/Zend/Amf/Parse/Resource/MysqlResult.php delete mode 100644 library/vendor/Zend/Amf/Parse/Resource/MysqliResult.php delete mode 100644 library/vendor/Zend/Amf/Parse/Serializer.php delete mode 100644 library/vendor/Zend/Amf/Parse/TypeLoader.php delete mode 100644 library/vendor/Zend/Amf/Request.php delete mode 100644 library/vendor/Zend/Amf/Request/Http.php delete mode 100644 library/vendor/Zend/Amf/Response.php delete mode 100644 library/vendor/Zend/Amf/Response/Http.php delete mode 100644 library/vendor/Zend/Amf/Server.php delete mode 100644 library/vendor/Zend/Amf/Util/BinaryStream.php delete mode 100644 library/vendor/Zend/Amf/Value/MessageBody.php delete mode 100644 library/vendor/Zend/Amf/Value/MessageHeader.php delete mode 100644 library/vendor/Zend/Amf/Value/Messaging/AbstractMessage.php delete mode 100644 library/vendor/Zend/Amf/Value/Messaging/AcknowledgeMessage.php delete mode 100644 library/vendor/Zend/Amf/Value/Messaging/ArrayCollection.php delete mode 100644 library/vendor/Zend/Amf/Value/Messaging/CommandMessage.php delete mode 100644 library/vendor/Zend/Amf/Value/Messaging/ErrorMessage.php delete mode 100644 library/vendor/Zend/Amf/Value/Messaging/RemotingMessage.php delete mode 100644 library/vendor/Zend/Amf/Value/TraitsInfo.php create mode 100644 library/vendor/Zend/Auth/Adapter/Ldap.php create mode 100644 library/vendor/Zend/Cache/Backend/Apc.php create mode 100644 library/vendor/Zend/Cache/Backend/Libmemcached.php create mode 100644 library/vendor/Zend/Cache/Backend/Memcached.php create mode 100644 library/vendor/Zend/Captcha/Adapter.php create mode 100644 library/vendor/Zend/Captcha/Base.php create mode 100644 library/vendor/Zend/Captcha/Dumb.php create mode 100644 library/vendor/Zend/Captcha/Exception.php create mode 100644 library/vendor/Zend/Captcha/Figlet.php create mode 100644 library/vendor/Zend/Captcha/Image.php create mode 100644 library/vendor/Zend/Captcha/ReCaptcha.php create mode 100644 library/vendor/Zend/Captcha/Word.php delete mode 100644 library/vendor/Zend/Cloud/AbstractFactory.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Adapter.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Adapter/AbstractAdapter.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Adapter/SimpleDb.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Adapter/SimpleDb/Query.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Adapter/WindowsAzure.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Document.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/DocumentSet.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Exception.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Factory.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/Query.php delete mode 100644 library/vendor/Zend/Cloud/DocumentService/QueryAdapter.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/Adapter.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/Adapter/AbstractAdapter.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/Adapter/Ec2.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/Adapter/Rackspace.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/Exception.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/Factory.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/Image.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/ImageList.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/Instance.php delete mode 100644 library/vendor/Zend/Cloud/Infrastructure/InstanceList.php delete mode 100644 library/vendor/Zend/Cloud/QueueService/Adapter.php delete mode 100644 library/vendor/Zend/Cloud/QueueService/Adapter/AbstractAdapter.php delete mode 100644 library/vendor/Zend/Cloud/QueueService/Adapter/Sqs.php delete mode 100644 library/vendor/Zend/Cloud/QueueService/Adapter/WindowsAzure.php delete mode 100644 library/vendor/Zend/Cloud/QueueService/Adapter/ZendQueue.php delete mode 100644 library/vendor/Zend/Cloud/QueueService/Factory.php delete mode 100644 library/vendor/Zend/Cloud/QueueService/Message.php delete mode 100644 library/vendor/Zend/Cloud/QueueService/MessageSet.php delete mode 100644 library/vendor/Zend/Cloud/StorageService/Adapter.php delete mode 100644 library/vendor/Zend/Cloud/StorageService/Adapter/FileSystem.php delete mode 100644 library/vendor/Zend/Cloud/StorageService/Adapter/Rackspace.php delete mode 100644 library/vendor/Zend/Cloud/StorageService/Adapter/S3.php delete mode 100644 library/vendor/Zend/Cloud/StorageService/Adapter/WindowsAzure.php delete mode 100644 library/vendor/Zend/Cloud/StorageService/Factory.php delete mode 100644 library/vendor/Zend/CodeGenerator/Abstract.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Abstract.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Class.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Docblock.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Docblock/Tag.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/License.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/Param.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/Return.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/File.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Member/Abstract.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Method.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Parameter.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Parameter/DefaultValue.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Property.php delete mode 100644 library/vendor/Zend/CodeGenerator/Php/Property/DefaultValue.php create mode 100644 library/vendor/Zend/Db/Adapter/Db2.php rename library/vendor/Zend/{Amf/Auth/Abstract.php => Db/Adapter/Db2/Exception.php} (55%) create mode 100644 library/vendor/Zend/Db/Adapter/Mysqli.php create mode 100644 library/vendor/Zend/Db/Adapter/Mysqli/Exception.php create mode 100644 library/vendor/Zend/Db/Adapter/Oracle.php create mode 100644 library/vendor/Zend/Db/Adapter/Oracle/Exception.php create mode 100644 library/vendor/Zend/Db/Adapter/Pdo/Ibm.php create mode 100644 library/vendor/Zend/Db/Adapter/Pdo/Ibm/Db2.php create mode 100644 library/vendor/Zend/Db/Adapter/Pdo/Ibm/Ids.php create mode 100644 library/vendor/Zend/Db/Adapter/Pdo/Mssql.php create mode 100644 library/vendor/Zend/Db/Adapter/Pdo/Oci.php create mode 100644 library/vendor/Zend/Db/Statement/Db2.php rename library/vendor/Zend/{Amf/Value/ByteArray.php => Db/Statement/Db2/Exception.php} (54%) create mode 100644 library/vendor/Zend/Db/Statement/Mysqli.php create mode 100644 library/vendor/Zend/Db/Statement/Mysqli/Exception.php create mode 100644 library/vendor/Zend/Db/Statement/Oracle.php create mode 100644 library/vendor/Zend/Db/Statement/Oracle/Exception.php create mode 100644 library/vendor/Zend/Db/Statement/Pdo/Ibm.php create mode 100644 library/vendor/Zend/Db/Statement/Pdo/Oci.php create mode 100644 library/vendor/Zend/Feed.php create mode 100644 library/vendor/Zend/Feed/Abstract.php create mode 100644 library/vendor/Zend/Feed/Atom.php create mode 100644 library/vendor/Zend/Feed/Builder.php create mode 100644 library/vendor/Zend/Feed/Builder/Entry.php rename library/vendor/Zend/{CodeGenerator/Php => Feed/Builder}/Exception.php (69%) create mode 100644 library/vendor/Zend/Feed/Builder/Header.php create mode 100644 library/vendor/Zend/Feed/Builder/Header/Itunes.php create mode 100644 library/vendor/Zend/Feed/Builder/Interface.php create mode 100644 library/vendor/Zend/Feed/Element.php create mode 100644 library/vendor/Zend/Feed/Entry/Abstract.php create mode 100644 library/vendor/Zend/Feed/Entry/Atom.php create mode 100644 library/vendor/Zend/Feed/Entry/Rss.php create mode 100644 library/vendor/Zend/Feed/Exception.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/CallbackAbstract.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/CallbackInterface.php rename library/vendor/Zend/{CodeGenerator => Feed/Pubsubhubbub}/Exception.php (73%) create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/HttpResponse.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/Model/Subscription.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/Model/SubscriptionInterface.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/Publisher.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/Subscriber.php create mode 100644 library/vendor/Zend/Feed/Pubsubhubbub/Subscriber/Callback.php create mode 100644 library/vendor/Zend/Feed/Reader.php rename library/vendor/Zend/{Amf/Exception.php => Feed/Reader/Collection.php} (72%) create mode 100644 library/vendor/Zend/Feed/Reader/Collection/Author.php create mode 100644 library/vendor/Zend/Feed/Reader/Collection/Category.php rename library/vendor/Zend/{Amf/Value/Messaging/AsyncMessage.php => Feed/Reader/Collection/CollectionAbstract.php} (53%) create mode 100644 library/vendor/Zend/Feed/Reader/Entry/Atom.php create mode 100644 library/vendor/Zend/Feed/Reader/Entry/Rss.php create mode 100644 library/vendor/Zend/Feed/Reader/EntryAbstract.php create mode 100644 library/vendor/Zend/Feed/Reader/EntryInterface.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/Atom/Entry.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/Atom/Feed.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/Content/Entry.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/DublinCore/Entry.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/DublinCore/Feed.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/EntryAbstract.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/FeedAbstract.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/Podcast/Entry.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/Podcast/Feed.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/Slash/Entry.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/Syndication/Feed.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/Thread/Entry.php create mode 100644 library/vendor/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php create mode 100644 library/vendor/Zend/Feed/Reader/Feed/Atom.php create mode 100644 library/vendor/Zend/Feed/Reader/Feed/Atom/Source.php create mode 100644 library/vendor/Zend/Feed/Reader/Feed/Rss.php create mode 100644 library/vendor/Zend/Feed/Reader/FeedAbstract.php create mode 100644 library/vendor/Zend/Feed/Reader/FeedInterface.php create mode 100644 library/vendor/Zend/Feed/Reader/FeedSet.php create mode 100644 library/vendor/Zend/Feed/Rss.php create mode 100644 library/vendor/Zend/Feed/Writer.php create mode 100644 library/vendor/Zend/Feed/Writer/Deleted.php create mode 100644 library/vendor/Zend/Feed/Writer/Entry.php rename library/vendor/Zend/{Cloud/StorageService/Exception.php => Feed/Writer/Exception/InvalidMethodException.php} (64%) create mode 100644 library/vendor/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/ITunes/Entry.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/ITunes/Feed.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/RendererAbstract.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/RendererInterface.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php create mode 100644 library/vendor/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php create mode 100644 library/vendor/Zend/Feed/Writer/Feed.php create mode 100644 library/vendor/Zend/Feed/Writer/Feed/FeedAbstract.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/Entry/Atom.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/Entry/Rss.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom/AtomAbstract.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/Feed/Rss.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/RendererAbstract.php create mode 100644 library/vendor/Zend/Feed/Writer/Renderer/RendererInterface.php create mode 100644 library/vendor/Zend/Feed/Writer/Source.php delete mode 100644 library/vendor/Zend/Gdata.php create mode 100644 library/vendor/Zend/Http/Header/HeaderValue.php delete mode 100644 library/vendor/Zend/LICENSE create mode 100644 library/vendor/Zend/Ldap.php create mode 100644 library/vendor/Zend/Ldap/Attribute.php create mode 100644 library/vendor/Zend/Ldap/Collection.php create mode 100644 library/vendor/Zend/Ldap/Collection/Iterator/Default.php create mode 100644 library/vendor/Zend/Ldap/Converter.php create mode 100644 library/vendor/Zend/Ldap/Converter/Exception.php create mode 100644 library/vendor/Zend/Ldap/Dn.php create mode 100644 library/vendor/Zend/Ldap/Exception.php create mode 100644 library/vendor/Zend/Ldap/Filter.php create mode 100644 library/vendor/Zend/Ldap/Filter/Abstract.php create mode 100644 library/vendor/Zend/Ldap/Filter/And.php create mode 100644 library/vendor/Zend/Ldap/Filter/Exception.php create mode 100644 library/vendor/Zend/Ldap/Filter/Logical.php create mode 100644 library/vendor/Zend/Ldap/Filter/Mask.php create mode 100644 library/vendor/Zend/Ldap/Filter/Not.php rename library/vendor/Zend/{Amf/Parse/Resource/Stream.php => Ldap/Filter/Or.php} (56%) rename library/vendor/Zend/{CodeGenerator/Php/Body.php => Ldap/Filter/String.php} (53%) create mode 100644 library/vendor/Zend/Ldap/Ldif/Encoder.php create mode 100644 library/vendor/Zend/Ldap/Node.php create mode 100644 library/vendor/Zend/Ldap/Node/Abstract.php create mode 100644 library/vendor/Zend/Ldap/Node/ChildrenIterator.php create mode 100644 library/vendor/Zend/Ldap/Node/Collection.php create mode 100644 library/vendor/Zend/Ldap/Node/RootDse.php create mode 100644 library/vendor/Zend/Ldap/Node/RootDse/ActiveDirectory.php create mode 100644 library/vendor/Zend/Ldap/Node/RootDse/OpenLdap.php create mode 100644 library/vendor/Zend/Ldap/Node/RootDse/eDirectory.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/ActiveDirectory.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/AttributeType/Interface.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/Item.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/ObjectClass/Interface.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php create mode 100644 library/vendor/Zend/Ldap/Node/Schema/OpenLdap.php create mode 100644 library/vendor/Zend/Mail/Header/HeaderName.php create mode 100644 library/vendor/Zend/Mail/Header/HeaderValue.php rename library/vendor/Zend/{Cloud/OperationNotAvailableException.php => Search/Exception.php} (72%) create mode 100644 library/vendor/Zend/Search/Lucene.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Analyzer.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum.php rename library/vendor/Zend/{Amf/Parse/OutputStream.php => Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php} (53%) create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php rename library/vendor/Zend/{Cloud/Exception.php => Search/Lucene/Analysis/Analyzer/Common/Utf8/CaseInsensitive.php} (52%) create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num/CaseInsensitive.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/Token.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/TokenFilter.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/LowerCase.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/LowerCaseUtf8.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/ShortWords.php create mode 100644 library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php create mode 100644 library/vendor/Zend/Search/Lucene/Document.php create mode 100644 library/vendor/Zend/Search/Lucene/Document/Docx.php rename library/vendor/Zend/{Cloud/QueueService => Search/Lucene/Document}/Exception.php (68%) create mode 100644 library/vendor/Zend/Search/Lucene/Document/Html.php create mode 100644 library/vendor/Zend/Search/Lucene/Document/OpenXml.php create mode 100644 library/vendor/Zend/Search/Lucene/Document/Pptx.php create mode 100644 library/vendor/Zend/Search/Lucene/Document/Xlsx.php create mode 100644 library/vendor/Zend/Search/Lucene/Exception.php create mode 100644 library/vendor/Zend/Search/Lucene/FSM.php create mode 100644 library/vendor/Zend/Search/Lucene/FSMAction.php create mode 100644 library/vendor/Zend/Search/Lucene/Field.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/DictionaryLoader.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/DocsFilter.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/FieldInfo.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/SegmentInfo.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/SegmentMerger.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/SegmentWriter.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/SegmentWriter/StreamWriter.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/Term.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/TermInfo.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/TermsPriorityQueue.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/TermsStream/Interface.php create mode 100644 library/vendor/Zend/Search/Lucene/Index/Writer.php create mode 100644 library/vendor/Zend/Search/Lucene/Interface.php create mode 100644 library/vendor/Zend/Search/Lucene/Interface/MultiSearcher.php create mode 100644 library/vendor/Zend/Search/Lucene/LockManager.php create mode 100644 library/vendor/Zend/Search/Lucene/MultiSearcher.php create mode 100644 library/vendor/Zend/Search/Lucene/PriorityQueue.php create mode 100644 library/vendor/Zend/Search/Lucene/Proxy.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/BooleanExpressionRecognizer.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Highlighter/Default.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Highlighter/Interface.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Boolean.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Empty.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Fuzzy.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Insignificant.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/MultiTerm.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Phrase.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Fuzzy.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Phrase.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Term.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Range.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Term.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Query/Wildcard.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryEntry.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryEntry/Phrase.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryEntry/Subquery.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryEntry/Term.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryHit.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryLexer.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryParser.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryParserContext.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryParserException.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/QueryToken.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Similarity.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Similarity/Default.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Weight.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Weight/Boolean.php rename library/vendor/Zend/{CodeGenerator/Php/Member/Container.php => Search/Lucene/Search/Weight/Empty.php} (53%) create mode 100644 library/vendor/Zend/Search/Lucene/Search/Weight/MultiTerm.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Weight/Phrase.php create mode 100644 library/vendor/Zend/Search/Lucene/Search/Weight/Term.php create mode 100644 library/vendor/Zend/Search/Lucene/Storage/Directory.php create mode 100644 library/vendor/Zend/Search/Lucene/Storage/Directory/Filesystem.php create mode 100644 library/vendor/Zend/Search/Lucene/Storage/File.php create mode 100644 library/vendor/Zend/Search/Lucene/Storage/File/Filesystem.php create mode 100644 library/vendor/Zend/Search/Lucene/Storage/File/Memory.php create mode 100644 library/vendor/Zend/Search/Lucene/TermStreamsPriorityQueue.php create mode 100644 library/vendor/Zend/Serializer/Adapter/Igbinary.php create mode 100644 library/vendor/Zend/Session/Validator/Exception.php create mode 100644 library/vendor/Zend/Soap/AutoDiscover.php create mode 100644 library/vendor/Zend/Soap/AutoDiscover/Exception.php create mode 100644 library/vendor/Zend/Soap/Client.php create mode 100644 library/vendor/Zend/Soap/Client/Common.php create mode 100644 library/vendor/Zend/Soap/Client/DotNet.php create mode 100644 library/vendor/Zend/Soap/Client/Exception.php create mode 100644 library/vendor/Zend/Soap/Client/Local.php create mode 100644 library/vendor/Zend/Soap/Server.php rename library/vendor/Zend/{Amf => Soap}/Server/Exception.php (72%) create mode 100644 library/vendor/Zend/Soap/Server/Proxy.php create mode 100644 library/vendor/Zend/Soap/Wsdl.php create mode 100644 library/vendor/Zend/Soap/Wsdl/Exception.php create mode 100644 library/vendor/Zend/Soap/Wsdl/Strategy/Abstract.php create mode 100644 library/vendor/Zend/Soap/Wsdl/Strategy/AnyType.php create mode 100644 library/vendor/Zend/Soap/Wsdl/Strategy/ArrayOfTypeComplex.php create mode 100644 library/vendor/Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php create mode 100644 library/vendor/Zend/Soap/Wsdl/Strategy/Composite.php create mode 100644 library/vendor/Zend/Soap/Wsdl/Strategy/DefaultComplexType.php create mode 100644 library/vendor/Zend/Soap/Wsdl/Strategy/Interface.php diff --git a/library/vendor/Zend/Acl.php b/library/vendor/Zend/Acl.php index 79a2eac15..4cc608da3 100644 --- a/library/vendor/Zend/Acl.php +++ b/library/vendor/Zend/Acl.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -48,7 +48,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Acl diff --git a/library/vendor/Zend/Acl/Assert/Interface.php b/library/vendor/Zend/Acl/Assert/Interface.php index 37fdabaac..35ce9a510 100644 --- a/library/vendor/Zend/Acl/Assert/Interface.php +++ b/library/vendor/Zend/Acl/Assert/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Acl_Assert_Interface diff --git a/library/vendor/Zend/Acl/Exception.php b/library/vendor/Zend/Acl/Exception.php index 5e0479fa3..72d8671d7 100644 --- a/library/vendor/Zend/Acl/Exception.php +++ b/library/vendor/Zend/Acl/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Acl_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Acl/Resource.php b/library/vendor/Zend/Acl/Resource.php index eaec291d1..2c0162848 100644 --- a/library/vendor/Zend/Acl/Resource.php +++ b/library/vendor/Zend/Acl/Resource.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Acl_Resource implements Zend_Acl_Resource_Interface diff --git a/library/vendor/Zend/Acl/Resource/Interface.php b/library/vendor/Zend/Acl/Resource/Interface.php index 3c6d35807..dcf10586d 100644 --- a/library/vendor/Zend/Acl/Resource/Interface.php +++ b/library/vendor/Zend/Acl/Resource/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Acl_Resource_Interface diff --git a/library/vendor/Zend/Acl/Role.php b/library/vendor/Zend/Acl/Role.php index d8ee46ebe..a8b771db4 100644 --- a/library/vendor/Zend/Acl/Role.php +++ b/library/vendor/Zend/Acl/Role.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Acl_Role implements Zend_Acl_Role_Interface diff --git a/library/vendor/Zend/Acl/Role/Interface.php b/library/vendor/Zend/Acl/Role/Interface.php index 0bd3fb59d..e2510003c 100644 --- a/library/vendor/Zend/Acl/Role/Interface.php +++ b/library/vendor/Zend/Acl/Role/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Acl_Role_Interface diff --git a/library/vendor/Zend/Acl/Role/Registry.php b/library/vendor/Zend/Acl/Role/Registry.php index bbdf04128..d1165f623 100644 --- a/library/vendor/Zend/Acl/Role/Registry.php +++ b/library/vendor/Zend/Acl/Role/Registry.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Acl_Role_Registry diff --git a/library/vendor/Zend/Acl/Role/Registry/Exception.php b/library/vendor/Zend/Acl/Role/Registry/Exception.php index 10ff5345b..972d65410 100644 --- a/library/vendor/Zend/Acl/Role/Registry/Exception.php +++ b/library/vendor/Zend/Acl/Role/Registry/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Acl - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Acl_Role_Registry_Exception extends Zend_Acl_Exception diff --git a/library/vendor/Zend/Amf/Adobe/Auth.php b/library/vendor/Zend/Amf/Adobe/Auth.php deleted file mode 100644 index 0831877af..000000000 --- a/library/vendor/Zend/Amf/Adobe/Auth.php +++ /dev/null @@ -1,131 +0,0 @@ -_acl = new Zend_Acl(); - $xml = Zend_Xml_Security::scanFile($rolefile); -/* -Roles file format: - - - - - - - - -*/ - foreach($xml->role as $role) { - $this->_acl->addRole(new Zend_Acl_Role((string)$role["id"])); - foreach($role->user as $user) { - $this->_users[(string)$user["name"]] = array("password" => (string)$user["password"], - "role" => (string)$role["id"]); - } - } - } - - /** - * Get ACL with roles from XML file - * - * @return Zend_Acl - */ - public function getAcl() - { - return $this->_acl; - } - - /** - * Perform authentication - * - * @throws Zend_Auth_Adapter_Exception - * @return Zend_Auth_Result - * @see Zend_Auth_Adapter_Interface#authenticate() - */ - public function authenticate() - { - if (empty($this->_username) || - empty($this->_password)) { - /** - * @see Zend_Auth_Adapter_Exception - */ - throw new Zend_Auth_Adapter_Exception('Username/password should be set'); - } - - if(!isset($this->_users[$this->_username])) { - return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND, - null, - array('Username not found') - ); - } - - $user = $this->_users[$this->_username]; - if($user["password"] != $this->_password) { - return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, - null, - array('Authentication failed') - ); - } - - $id = new stdClass(); - $id->role = $user["role"]; - $id->name = $this->_username; - return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $id); - } -} diff --git a/library/vendor/Zend/Amf/Adobe/DbInspector.php b/library/vendor/Zend/Amf/Adobe/DbInspector.php deleted file mode 100644 index 48b46be43..000000000 --- a/library/vendor/Zend/Amf/Adobe/DbInspector.php +++ /dev/null @@ -1,103 +0,0 @@ -describeTable('Pdo_Mysql', - * array( - * 'host' => '127.0.0.1', - * 'username' => 'webuser', - * 'password' => 'xxxxxxxx', - * 'dbname' => 'test' - * ), - * 'mytable' - * ); - * - * @param string $dbType Database adapter type for Zend_Db - * @param array|object $dbDescription Adapter-specific connection settings - * @param string $tableName Table name - * @return array Table description - * @see Zend_Db::describeTable() - * @see Zend_Db::factory() - */ - public function describeTable($dbType, $dbDescription, $tableName) - { - $db = $this->_connect($dbType, $dbDescription); - return $db->describeTable($tableName); - } - - /** - * Test database connection - * - * @param string $dbType Database adapter type for Zend_Db - * @param array|object $dbDescription Adapter-specific connection settings - * @return bool - * @see Zend_Db::factory() - */ - public function connect($dbType, $dbDescription) - { - $db = $this->_connect($dbType, $dbDescription); - $db->listTables(); - return true; - } - - /** - * Get the list of database tables - * - * @param string $dbType Database adapter type for Zend_Db - * @param array|object $dbDescription Adapter-specific connection settings - * @return array List of the tables - */ - public function getTables($dbType, $dbDescription) - { - $db = $this->_connect($dbType, $dbDescription); - return $db->listTables(); - } -} diff --git a/library/vendor/Zend/Amf/Adobe/Introspector.php b/library/vendor/Zend/Amf/Adobe/Introspector.php deleted file mode 100644 index f5b144c60..000000000 --- a/library/vendor/Zend/Amf/Adobe/Introspector.php +++ /dev/null @@ -1,314 +0,0 @@ -_xml = new DOMDocument('1.0', 'utf-8'); - } - - /** - * Create XML definition on an AMF service class - * - * @param string $serviceClass Service class name - * @param array $options invocation options - * @return string XML with service class introspection - */ - public function introspect($serviceClass, $options = array()) - { - $this->_options = $options; - - if (strpbrk($serviceClass, '\\/<>')) { - return $this->_returnError('Invalid service name'); - } - - // Transform com.foo.Bar into com_foo_Bar - $serviceClass = str_replace('.' , '_', $serviceClass); - - // Introspect! - if (!class_exists($serviceClass)) { - Zend_Loader::loadClass($serviceClass, $this->_getServicePath()); - } - - $serv = $this->_xml->createElement('service-description'); - $serv->setAttribute('xmlns', 'http://ns.adobe.com/flex/service-description/2008'); - - $this->_types = $this->_xml->createElement('types'); - $this->_ops = $this->_xml->createElement('operations'); - - $r = Zend_Server_Reflection::reflectClass($serviceClass); - $this->_addService($r, $this->_ops); - - $serv->appendChild($this->_types); - $serv->appendChild($this->_ops); - $this->_xml->appendChild($serv); - - return $this->_xml->saveXML(); - } - - /** - * Authentication handler - * - * @param Zend_Acl $acl - * @return unknown_type - */ - public function initAcl(Zend_Acl $acl) - { - return false; // we do not need auth for this class - } - - /** - * Generate map of public class attributes - * - * @param string $typename type name - * @param DOMElement $typexml target XML element - * @return void - */ - protected function _addClassAttributes($typename, DOMElement $typexml) - { - // Do not try to autoload here because _phpTypeToAS should - // have already attempted to load this class - if (!class_exists($typename, false)) { - return; - } - - $rc = new Zend_Reflection_Class($typename); - foreach ($rc->getProperties() as $prop) { - if (!$prop->isPublic()) { - continue; - } - - $propxml = $this->_xml->createElement('property'); - $propxml->setAttribute('name', $prop->getName()); - - $type = $this->_registerType($this->_getPropertyType($prop)); - $propxml->setAttribute('type', $type); - - $typexml->appendChild($propxml); - } - } - - /** - * Build XML service description from reflection class - * - * @param Zend_Server_Reflection_Class $refclass - * @param DOMElement $target target XML element - * @return void - */ - protected function _addService(Zend_Server_Reflection_Class $refclass, DOMElement $target) - { - foreach ($refclass->getMethods() as $method) { - if (!$method->isPublic() - || $method->isConstructor() - || ('__' == substr($method->name, 0, 2)) - ) { - continue; - } - - foreach ($method->getPrototypes() as $proto) { - $op = $this->_xml->createElement('operation'); - $op->setAttribute('name', $method->getName()); - - $rettype = $this->_registerType($proto->getReturnType()); - $op->setAttribute('returnType', $rettype); - - foreach ($proto->getParameters() as $param) { - $arg = $this->_xml->createElement('argument'); - $arg->setAttribute('name', $param->getName()); - - $type = $param->getType(); - if ($type == 'mixed' && ($pclass = $param->getClass())) { - $type = $pclass->getName(); - } - - $ptype = $this->_registerType($type); - $arg->setAttribute('type', $ptype); - - if($param->isDefaultValueAvailable()) { - $arg->setAttribute('defaultvalue', $param->getDefaultValue()); - } - - $op->appendChild($arg); - } - - $target->appendChild($op); - } - } - } - - /** - * Extract type of the property from DocBlock - * - * @param Zend_Reflection_Property $prop reflection property object - * @return string Property type - */ - protected function _getPropertyType(Zend_Reflection_Property $prop) - { - $docBlock = $prop->getDocComment(); - - if (!$docBlock) { - return 'Unknown'; - } - - if (!$docBlock->hasTag('var')) { - return 'Unknown'; - } - - $tag = $docBlock->getTag('var'); - return trim($tag->getDescription()); - } - - /** - * Get the array of service directories - * - * @return array Service class directories - */ - protected function _getServicePath() - { - if (isset($this->_options['server'])) { - return $this->_options['server']->getDirectory(); - } - - if (isset($this->_options['directories'])) { - return $this->_options['directories']; - } - - return array(); - } - - /** - * Map from PHP type name to AS type name - * - * @param string $typename PHP type name - * @return string AS type name - */ - protected function _phpTypeToAS($typename) - { - if (class_exists($typename)) { - $vars = get_class_vars($typename); - - if (isset($vars['_explicitType'])) { - return $vars['_explicitType']; - } - } - - if (false !== ($asname = Zend_Amf_Parse_TypeLoader::getMappedClassName($typename))) { - return $asname; - } - - return $typename; - } - - /** - * Register new type on the system - * - * @param string $typename type name - * @return string New type name - */ - protected function _registerType($typename) - { - // Known type - return its AS name - if (isset($this->_typesMap[$typename])) { - return $this->_typesMap[$typename]; - } - - // Standard types - if (in_array($typename, array('void', 'null', 'mixed', 'unknown_type'))) { - return 'Unknown'; - } - - // Arrays - if ('array' == $typename) { - return 'Unknown[]'; - } - - if (in_array($typename, array('int', 'integer', 'bool', 'boolean', 'float', 'string', 'object', 'Unknown', 'stdClass'))) { - return $typename; - } - - // Resolve and store AS name - $asTypeName = $this->_phpTypeToAS($typename); - $this->_typesMap[$typename] = $asTypeName; - - // Create element for the name - $typeEl = $this->_xml->createElement('type'); - $typeEl->setAttribute('name', $asTypeName); - $this->_addClassAttributes($typename, $typeEl); - $this->_types->appendChild($typeEl); - - return $asTypeName; - } - - /** - * Return error with error message - * - * @param string $msg Error message - * @return string - */ - protected function _returnError($msg) - { - return 'ERROR: $msg'; - } -} diff --git a/library/vendor/Zend/Amf/Constants.php b/library/vendor/Zend/Amf/Constants.php deleted file mode 100644 index 5584e25d1..000000000 --- a/library/vendor/Zend/Amf/Constants.php +++ /dev/null @@ -1,87 +0,0 @@ -_stream->readByte(); - } - - switch($typeMarker) { - // number - case Zend_Amf_Constants::AMF0_NUMBER: - return $this->_stream->readDouble(); - - // boolean - case Zend_Amf_Constants::AMF0_BOOLEAN: - return (boolean) $this->_stream->readByte(); - - // string - case Zend_Amf_Constants::AMF0_STRING: - return $this->_stream->readUTF(); - - // object - case Zend_Amf_Constants::AMF0_OBJECT: - return $this->readObject(); - - // null - case Zend_Amf_Constants::AMF0_NULL: - return null; - - // undefined - case Zend_Amf_Constants::AMF0_UNDEFINED: - return null; - - // Circular references are returned here - case Zend_Amf_Constants::AMF0_REFERENCE: - return $this->readReference(); - - // mixed array with numeric and string keys - case Zend_Amf_Constants::AMF0_MIXEDARRAY: - return $this->readMixedArray(); - - // array - case Zend_Amf_Constants::AMF0_ARRAY: - return $this->readArray(); - - // date - case Zend_Amf_Constants::AMF0_DATE: - return $this->readDate(); - - // longString strlen(string) > 2^16 - case Zend_Amf_Constants::AMF0_LONGSTRING: - return $this->_stream->readLongUTF(); - - //internal AS object, not supported - case Zend_Amf_Constants::AMF0_UNSUPPORTED: - return null; - - // XML - case Zend_Amf_Constants::AMF0_XML: - return $this->readXmlString(); - - // typed object ie Custom Class - case Zend_Amf_Constants::AMF0_TYPEDOBJECT: - return $this->readTypedObject(); - - //AMF3-specific - case Zend_Amf_Constants::AMF0_AMF3: - return $this->readAmf3TypeMarker(); - - default: - throw new Zend_Amf_Exception('Unsupported marker type: ' . $typeMarker); - } - } - - /** - * Read AMF objects and convert to PHP objects - * - * Read the name value pair objects form the php message and convert them to - * a php object class. - * - * Called when the marker type is 3. - * - * @param array|null $object - * @return object - */ - public function readObject($object = null) - { - if ($object === null) { - $object = array(); - } - - while (true) { - $key = $this->_stream->readUTF(); - $typeMarker = $this->_stream->readByte(); - if ($typeMarker != Zend_Amf_Constants::AMF0_OBJECTTERM ){ - //Recursivly call readTypeMarker to get the types of properties in the object - $object[$key] = $this->readTypeMarker($typeMarker); - } else { - //encountered AMF object terminator - break; - } - } - $this->_reference[] = $object; - return (object) $object; - } - - /** - * Read reference objects - * - * Used to gain access to the private array of reference objects. - * Called when marker type is 7. - * - * @return object - * @throws Zend_Amf_Exception for invalid reference keys - */ - public function readReference() - { - $key = $this->_stream->readInt(); - if (!array_key_exists($key, $this->_reference)) { - throw new Zend_Amf_Exception('Invalid reference key: '. $key); - } - return $this->_reference[$key]; - } - - /** - * Reads an array with numeric and string indexes. - * - * Called when marker type is 8 - * - * @todo As of Flash Player 9 there is not support for mixed typed arrays - * so we handle this as an object. With the introduction of vectors - * in Flash Player 10 this may need to be reconsidered. - * @return array - */ - public function readMixedArray() - { - $length = $this->_stream->readLong(); - return $this->readObject(); - } - - /** - * Converts numerically indexed actiosncript arrays into php arrays. - * - * Called when marker type is 10 - * - * @return array - */ - public function readArray() - { - $length = $this->_stream->readLong(); - $array = array(); - while ($length--) { - $array[] = $this->readTypeMarker(); - } - return $array; - } - - /** - * Convert AS Date to Zend_Date - * - * @return Zend_Date - */ - public function readDate() - { - // get the unix time stamp. Not sure why ActionScript does not use - // milliseconds - $timestamp = floor($this->_stream->readDouble() / 1000); - - // The timezone offset is never returned to the server; it is always 0, - // so read and ignore. - $offset = $this->_stream->readInt(); - - $date = new Zend_Date($timestamp); - return $date; - } - - /** - * Convert XML to SimpleXml - * If user wants DomDocument they can use dom_import_simplexml - * - * @return SimpleXml Object - */ - public function readXmlString() - { - $string = $this->_stream->readLongUTF(); - return Zend_Xml_Security::scan($string); //simplexml_load_string($string); - } - - /** - * Read Class that is to be mapped to a server class. - * - * Commonly used for Value Objects on the server - * - * @todo implement Typed Class mapping - * @return object|array - * @throws Zend_Amf_Exception if unable to load type - */ - public function readTypedObject() - { - // get the remote class name - $className = $this->_stream->readUTF(); - $loader = Zend_Amf_Parse_TypeLoader::loadType($className); - $returnObject = new $loader(); - $properties = get_object_vars($this->readObject()); - foreach($properties as $key=>$value) { - if($key) { - $returnObject->$key = $value; - } - } - if($returnObject instanceof Zend_Amf_Value_Messaging_ArrayCollection) { - $returnObject = get_object_vars($returnObject); - } - return $returnObject; - } - - /** - * AMF3 data type encountered load AMF3 Deserializer to handle - * type markers. - * - * @return string - */ - public function readAmf3TypeMarker() - { - $deserializer = new Zend_Amf_Parse_Amf3_Deserializer($this->_stream); - $this->_objectEncoding = Zend_Amf_Constants::AMF3_OBJECT_ENCODING; - return $deserializer->readTypeMarker(); - } - - /** - * Return the object encoding to check if an AMF3 object - * is going to be return. - * - * @return int - */ - public function getObjectEncoding() - { - return $this->_objectEncoding; - } -} diff --git a/library/vendor/Zend/Amf/Parse/Amf0/Serializer.php b/library/vendor/Zend/Amf/Parse/Amf0/Serializer.php deleted file mode 100644 index 12674b394..000000000 --- a/library/vendor/Zend/Amf/Parse/Amf0/Serializer.php +++ /dev/null @@ -1,355 +0,0 @@ -writeObjectReference($data, $markerType)) { - // Write the Type Marker to denote the following action script data type - $this->_stream->writeByte($markerType); - switch($markerType) { - case Zend_Amf_Constants::AMF0_NUMBER: - $this->_stream->writeDouble($data); - break; - case Zend_Amf_Constants::AMF0_BOOLEAN: - $this->_stream->writeByte($data); - break; - case Zend_Amf_Constants::AMF0_STRING: - $this->_stream->writeUTF($data); - break; - case Zend_Amf_Constants::AMF0_OBJECT: - $this->writeObject($data); - break; - case Zend_Amf_Constants::AMF0_NULL: - break; - case Zend_Amf_Constants::AMF0_REFERENCE: - $this->_stream->writeInt($data); - break; - case Zend_Amf_Constants::AMF0_MIXEDARRAY: - // Write length of numeric keys as zero. - $this->_stream->writeLong(0); - $this->writeObject($data); - break; - case Zend_Amf_Constants::AMF0_ARRAY: - $this->writeArray($data); - break; - case Zend_Amf_Constants::AMF0_DATE: - $this->writeDate($data); - break; - case Zend_Amf_Constants::AMF0_LONGSTRING: - $this->_stream->writeLongUTF($data); - break; - case Zend_Amf_Constants::AMF0_TYPEDOBJECT: - $this->writeTypedObject($data); - break; - case Zend_Amf_Constants::AMF0_AMF3: - $this->writeAmf3TypeMarker($data); - break; - default: - throw new Zend_Amf_Exception("Unknown Type Marker: " . $markerType); - } - } - } else { - if (is_resource($data)) { - $data = Zend_Amf_Parse_TypeLoader::handleResource($data); - } - switch (true) { - case (is_int($data) || is_float($data)): - $markerType = Zend_Amf_Constants::AMF0_NUMBER; - break; - case (is_bool($data)): - $markerType = Zend_Amf_Constants::AMF0_BOOLEAN; - break; - case (is_string($data) && (($this->_mbStringFunctionsOverloaded ? mb_strlen($data, '8bit') : strlen($data)) > 65536)): - $markerType = Zend_Amf_Constants::AMF0_LONGSTRING; - break; - case (is_string($data)): - $markerType = Zend_Amf_Constants::AMF0_STRING; - break; - case (is_object($data)): - if (($data instanceof DateTime) || ($data instanceof Zend_Date)) { - $markerType = Zend_Amf_Constants::AMF0_DATE; - } else { - - if($className = $this->getClassName($data)){ - //Object is a Typed object set classname - $markerType = Zend_Amf_Constants::AMF0_TYPEDOBJECT; - $this->_className = $className; - } else { - // Object is a generic classname - $markerType = Zend_Amf_Constants::AMF0_OBJECT; - } - break; - } - break; - case (null === $data): - $markerType = Zend_Amf_Constants::AMF0_NULL; - break; - case (is_array($data)): - // check if it is an associative array - $i = 0; - foreach (array_keys($data) as $key) { - // check if it contains non-integer keys - if (!is_numeric($key) || intval($key) != $key) { - $markerType = Zend_Amf_Constants::AMF0_OBJECT; - break; - // check if it is a sparse indexed array - } else if ($key != $i) { - $markerType = Zend_Amf_Constants::AMF0_MIXEDARRAY; - break; - } - $i++; - } - // Dealing with a standard numeric array - if(!$markerType){ - $markerType = Zend_Amf_Constants::AMF0_ARRAY; - break; - } - break; - default: - throw new Zend_Amf_Exception('Unsupported data type: ' . gettype($data)); - } - - $this->writeTypeMarker($data, $markerType); - } - return $this; - } - - /** - * Check if the given object is in the reference table, write the reference if it exists, - * otherwise add the object to the reference table - * - * @param mixed $object object reference to check for reference - * @param string $markerType AMF type of the object to write - * @param mixed $objectByVal object to check for reference - * @return Boolean true, if the reference was written, false otherwise - */ - protected function writeObjectReference(&$object, $markerType, $objectByVal = false) - { - // Workaround for PHP5 with E_STRICT enabled complaining about "Only - // variables should be passed by reference" - if ((null === $object) && ($objectByVal !== false)) { - $object = &$objectByVal; - } - - if ($markerType == Zend_Amf_Constants::AMF0_OBJECT - || $markerType == Zend_Amf_Constants::AMF0_MIXEDARRAY - || $markerType == Zend_Amf_Constants::AMF0_ARRAY - || $markerType == Zend_Amf_Constants::AMF0_TYPEDOBJECT - ) { - $ref = array_search($object, $this->_referenceObjects, true); - //handle object reference - if($ref !== false){ - $this->writeTypeMarker($ref,Zend_Amf_Constants::AMF0_REFERENCE); - return true; - } - - $this->_referenceObjects[] = $object; - } - - return false; - } - - /** - * Write a PHP array with string or mixed keys. - * - * @param object $data - * @return Zend_Amf_Parse_Amf0_Serializer - */ - public function writeObject($object) - { - // Loop each element and write the name of the property. - foreach ($object as $key => &$value) { - // skip variables starting with an _ private transient - if( $key[0] == "_") continue; - $this->_stream->writeUTF($key); - $this->writeTypeMarker($value); - } - - // Write the end object flag - $this->_stream->writeInt(0); - $this->_stream->writeByte(Zend_Amf_Constants::AMF0_OBJECTTERM); - return $this; - } - - /** - * Write a standard numeric array to the output stream. If a mixed array - * is encountered call writeTypeMarker with mixed array. - * - * @param array $array - * @return Zend_Amf_Parse_Amf0_Serializer - */ - public function writeArray(&$array) - { - $length = count($array); - if (!$length < 0) { - // write the length of the array - $this->_stream->writeLong(0); - } else { - // Write the length of the numeric array - $this->_stream->writeLong($length); - for ($i=0; $i<$length; $i++) { - $value = isset($array[$i]) ? $array[$i] : null; - $this->writeTypeMarker($value); - } - } - return $this; - } - - /** - * Convert the DateTime into an AMF Date - * - * @param DateTime|Zend_Date $data - * @return Zend_Amf_Parse_Amf0_Serializer - */ - public function writeDate($data) - { - if ($data instanceof DateTime) { - $dateString = $data->format('U'); - } elseif ($data instanceof Zend_Date) { - $dateString = $data->toString('U'); - } else { - throw new Zend_Amf_Exception('Invalid date specified; must be a DateTime or Zend_Date object'); - } - $dateString *= 1000; - - // Make the conversion and remove milliseconds. - $this->_stream->writeDouble($dateString); - - // Flash does not respect timezone but requires it. - $this->_stream->writeInt(0); - - return $this; - } - - /** - * Write a class mapped object to the output stream. - * - * @param object $data - * @return Zend_Amf_Parse_Amf0_Serializer - */ - public function writeTypedObject($data) - { - $this->_stream->writeUTF($this->_className); - $this->writeObject($data); - return $this; - } - - /** - * Encountered and AMF3 Type Marker use AMF3 serializer. Once AMF3 is - * encountered it will not return to AMf0. - * - * @param string $data - * @return Zend_Amf_Parse_Amf0_Serializer - */ - public function writeAmf3TypeMarker(&$data) - { - $serializer = new Zend_Amf_Parse_Amf3_Serializer($this->_stream); - $serializer->writeTypeMarker($data); - return $this; - } - - /** - * Find if the class name is a class mapped name and return the - * respective classname if it is. - * - * @param object $object - * @return false|string $className - */ - protected function getClassName($object) - { - //Check to see if the object is a typed object and we need to change - $className = ''; - switch (true) { - // the return class mapped name back to actionscript class name. - case Zend_Amf_Parse_TypeLoader::getMappedClassName(get_class($object)): - $className = Zend_Amf_Parse_TypeLoader::getMappedClassName(get_class($object)); - break; - // Check to see if the user has defined an explicit Action Script type. - case isset($object->_explicitType): - $className = $object->_explicitType; - break; - // Check if user has defined a method for accessing the Action Script type - case method_exists($object, 'getASClassName'): - $className = $object->getASClassName(); - break; - // No return class name is set make it a generic object - case ($object instanceof stdClass): - $className = ''; - break; - // By default, use object's class name - default: - $className = get_class($object); - break; - } - if(!$className == '') { - return $className; - } else { - return false; - } - } -} diff --git a/library/vendor/Zend/Amf/Parse/Amf3/Deserializer.php b/library/vendor/Zend/Amf/Parse/Amf3/Deserializer.php deleted file mode 100644 index 3ead204ae..000000000 --- a/library/vendor/Zend/Amf/Parse/Amf3/Deserializer.php +++ /dev/null @@ -1,414 +0,0 @@ -_stream->readByte(); - } - - switch($typeMarker) { - case Zend_Amf_Constants::AMF3_UNDEFINED: - return null; - case Zend_Amf_Constants::AMF3_NULL: - return null; - case Zend_Amf_Constants::AMF3_BOOLEAN_FALSE: - return false; - case Zend_Amf_Constants::AMF3_BOOLEAN_TRUE: - return true; - case Zend_Amf_Constants::AMF3_INTEGER: - return $this->readInteger(); - case Zend_Amf_Constants::AMF3_NUMBER: - return $this->_stream->readDouble(); - case Zend_Amf_Constants::AMF3_STRING: - return $this->readString(); - case Zend_Amf_Constants::AMF3_DATE: - return $this->readDate(); - case Zend_Amf_Constants::AMF3_ARRAY: - return $this->readArray(); - case Zend_Amf_Constants::AMF3_OBJECT: - return $this->readObject(); - case Zend_Amf_Constants::AMF3_XML: - case Zend_Amf_Constants::AMF3_XMLSTRING: - return $this->readXmlString(); - case Zend_Amf_Constants::AMF3_BYTEARRAY: - return $this->readString(); - default: - throw new Zend_Amf_Exception('Unsupported type marker: ' . $typeMarker); - } - } - - /** - * Read and deserialize an integer - * - * AMF 3 represents smaller integers with fewer bytes using the most - * significant bit of each byte. The worst case uses 32-bits - * to represent a 29-bit number, which is what we would have - * done with no compression. - * - 0x00000000 - 0x0000007F : 0xxxxxxx - * - 0x00000080 - 0x00003FFF : 1xxxxxxx 0xxxxxxx - * - 0x00004000 - 0x001FFFFF : 1xxxxxxx 1xxxxxxx 0xxxxxxx - * - 0x00200000 - 0x3FFFFFFF : 1xxxxxxx 1xxxxxxx 1xxxxxxx xxxxxxxx - * - 0x40000000 - 0xFFFFFFFF : throw range exception - * - * 0x04 -> integer type code, followed by up to 4 bytes of data. - * - * Parsing integers on OSFlash for the AMF3 integer data format: - * @link http://osflash.org/amf3/parsing_integers - * @return int|float - */ - public function readInteger() - { - $count = 1; - $intReference = $this->_stream->readByte(); - $result = 0; - while ((($intReference & 0x80) != 0) && $count < 4) { - $result <<= 7; - $result |= ($intReference & 0x7f); - $intReference = $this->_stream->readByte(); - $count++; - } - if ($count < 4) { - $result <<= 7; - $result |= $intReference; - } else { - // Use all 8 bits from the 4th byte - $result <<= 8; - $result |= $intReference; - - // Check if the integer should be negative - if (($result & 0x10000000) != 0) { - //and extend the sign bit - $result |= ~0xFFFFFFF; - } - } - return $result; - } - - /** - * Read and deserialize a string - * - * Strings can be sent as a reference to a previously - * occurring String by using an index to the implicit string reference table. - * Strings are encoding using UTF-8 - however the header may either - * describe a string literal or a string reference. - * - * - string = 0x06 string-data - * - string-data = integer-data [ modified-utf-8 ] - * - modified-utf-8 = *OCTET - * - * @return String - */ - public function readString() - { - $stringReference = $this->readInteger(); - - //Check if this is a reference string - if (($stringReference & 0x01) == 0) { - // reference string - $stringReference = $stringReference >> 1; - if ($stringReference >= count($this->_referenceStrings)) { - throw new Zend_Amf_Exception('Undefined string reference: ' . $stringReference); - } - // reference string found - return $this->_referenceStrings[$stringReference]; - } - - $length = $stringReference >> 1; - if ($length) { - $string = $this->_stream->readBytes($length); - $this->_referenceStrings[] = $string; - } else { - $string = ""; - } - return $string; - } - - /** - * Read and deserialize a date - * - * Data is the number of milliseconds elapsed since the epoch - * of midnight, 1st Jan 1970 in the UTC time zone. - * Local time zone information is not sent to flash. - * - * - date = 0x08 integer-data [ number-data ] - * - * @return Zend_Date - */ - public function readDate() - { - $dateReference = $this->readInteger(); - if (($dateReference & 0x01) == 0) { - $dateReference = $dateReference >> 1; - if ($dateReference>=count($this->_referenceObjects)) { - throw new Zend_Amf_Exception('Undefined date reference: ' . $dateReference); - } - return $this->_referenceObjects[$dateReference]; - } - - $timestamp = floor($this->_stream->readDouble() / 1000); - - $dateTime = new Zend_Date($timestamp); - $this->_referenceObjects[] = $dateTime; - return $dateTime; - } - - /** - * Read amf array to PHP array - * - * - array = 0x09 integer-data ( [ 1OCTET *amf3-data ] | [OCTET *amf3-data 1] | [ OCTET *amf-data ] ) - * - * @return array - */ - public function readArray() - { - $arrayReference = $this->readInteger(); - if (($arrayReference & 0x01)==0){ - $arrayReference = $arrayReference >> 1; - if ($arrayReference>=count($this->_referenceObjects)) { - throw new Zend_Amf_Exception('Unknow array reference: ' . $arrayReference); - } - return $this->_referenceObjects[$arrayReference]; - } - - // Create a holder for the array in the reference list - $data = array(); - $this->_referenceObjects[] =& $data; - $key = $this->readString(); - - // Iterating for string based keys. - while ($key != '') { - $data[$key] = $this->readTypeMarker(); - $key = $this->readString(); - } - - $arrayReference = $arrayReference >>1; - - //We have a dense array - for ($i=0; $i < $arrayReference; $i++) { - $data[] = $this->readTypeMarker(); - } - - return $data; - } - - /** - * Read an object from the AMF stream and convert it into a PHP object - * - * @todo Rather than using an array of traitsInfo create Zend_Amf_Value_TraitsInfo - * @return object|array - */ - public function readObject() - { - $traitsInfo = $this->readInteger(); - $storedObject = ($traitsInfo & 0x01)==0; - $traitsInfo = $traitsInfo >> 1; - - // Check if the Object is in the stored Objects reference table - if ($storedObject) { - $ref = $traitsInfo; - if (!isset($this->_referenceObjects[$ref])) { - throw new Zend_Amf_Exception('Unknown Object reference: ' . $ref); - } - $returnObject = $this->_referenceObjects[$ref]; - } else { - // Check if the Object is in the stored Definitions reference table - $storedClass = ($traitsInfo & 0x01) == 0; - $traitsInfo = $traitsInfo >> 1; - if ($storedClass) { - $ref = $traitsInfo; - if (!isset($this->_referenceDefinitions[$ref])) { - throw new Zend_Amf_Exception('Unknows Definition reference: '. $ref); - } - // Populate the reference attributes - $className = $this->_referenceDefinitions[$ref]['className']; - $encoding = $this->_referenceDefinitions[$ref]['encoding']; - $propertyNames = $this->_referenceDefinitions[$ref]['propertyNames']; - } else { - // The class was not in the reference tables. Start reading rawdata to build traits. - // Create a traits table. Zend_Amf_Value_TraitsInfo would be ideal - $className = $this->readString(); - $encoding = $traitsInfo & 0x03; - $propertyNames = array(); - $traitsInfo = $traitsInfo >> 2; - } - - // We now have the object traits defined in variables. Time to go to work: - if (!$className) { - // No class name generic object - $returnObject = new stdClass(); - } else { - // Defined object - // Typed object lookup against registered classname maps - if ($loader = Zend_Amf_Parse_TypeLoader::loadType($className)) { - $returnObject = new $loader(); - } else { - //user defined typed object - throw new Zend_Amf_Exception('Typed object not found: '. $className . ' '); - } - } - - // Add the Object to the reference table - $this->_referenceObjects[] = $returnObject; - - $properties = array(); // clear value - // Check encoding types for additional processing. - switch ($encoding) { - case (Zend_Amf_Constants::ET_EXTERNAL): - // Externalizable object such as {ArrayCollection} and {ObjectProxy} - if (!$storedClass) { - $this->_referenceDefinitions[] = array( - 'className' => $className, - 'encoding' => $encoding, - 'propertyNames' => $propertyNames, - ); - } - $returnObject->externalizedData = $this->readTypeMarker(); - break; - case (Zend_Amf_Constants::ET_DYNAMIC): - // used for Name-value encoding - if (!$storedClass) { - $this->_referenceDefinitions[] = array( - 'className' => $className, - 'encoding' => $encoding, - 'propertyNames' => $propertyNames, - ); - } - // not a reference object read name value properties from byte stream - do { - $property = $this->readString(); - if ($property != "") { - $propertyNames[] = $property; - $properties[$property] = $this->readTypeMarker(); - } - } while ($property !=""); - break; - default: - // basic property list object. - if (!$storedClass) { - $count = $traitsInfo; // Number of properties in the list - for($i=0; $i< $count; $i++) { - $propertyNames[] = $this->readString(); - } - // Add a reference to the class. - $this->_referenceDefinitions[] = array( - 'className' => $className, - 'encoding' => $encoding, - 'propertyNames' => $propertyNames, - ); - } - foreach ($propertyNames as $property) { - $properties[$property] = $this->readTypeMarker(); - } - break; - } - - // Add properties back to the return object. - if (!is_array($properties)) $properties = array(); - foreach($properties as $key=>$value) { - if($key) { - $returnObject->$key = $value; - } - } - - - } - - if ($returnObject instanceof Zend_Amf_Value_Messaging_ArrayCollection) { - if (isset($returnObject->externalizedData)) { - $returnObject = $returnObject->externalizedData; - } else { - $returnObject = get_object_vars($returnObject); - } - } - - return $returnObject; - } - - /** - * Convert XML to SimpleXml - * If user wants DomDocument they can use dom_import_simplexml - * - * @return SimpleXml Object - */ - public function readXmlString() - { - $xmlReference = $this->readInteger(); - $length = $xmlReference >> 1; - $string = $this->_stream->readBytes($length); - return Zend_Xml_Security::scan($string); - } -} diff --git a/library/vendor/Zend/Amf/Parse/Amf3/Serializer.php b/library/vendor/Zend/Amf/Parse/Amf3/Serializer.php deleted file mode 100644 index 77a6059cd..000000000 --- a/library/vendor/Zend/Amf/Parse/Amf3/Serializer.php +++ /dev/null @@ -1,523 +0,0 @@ -_stream->writeByte($markerType); - - switch ($markerType) { - case Zend_Amf_Constants::AMF3_NULL: - break; - case Zend_Amf_Constants::AMF3_BOOLEAN_FALSE: - break; - case Zend_Amf_Constants::AMF3_BOOLEAN_TRUE: - break; - case Zend_Amf_Constants::AMF3_INTEGER: - $this->writeInteger($data); - break; - case Zend_Amf_Constants::AMF3_NUMBER: - $this->_stream->writeDouble($data); - break; - case Zend_Amf_Constants::AMF3_STRING: - $this->writeString($data); - break; - case Zend_Amf_Constants::AMF3_DATE: - $this->writeDate($data); - break; - case Zend_Amf_Constants::AMF3_ARRAY: - $this->writeArray($data); - break; - case Zend_Amf_Constants::AMF3_OBJECT: - $this->writeObject($data); - break; - case Zend_Amf_Constants::AMF3_BYTEARRAY: - $this->writeByteArray($data); - break; - case Zend_Amf_Constants::AMF3_XMLSTRING; - $this->writeXml($data); - break; - default: - throw new Zend_Amf_Exception('Unknown Type Marker: ' . $markerType); - } - } else { - // Detect Type Marker - if (is_resource($data)) { - $data = Zend_Amf_Parse_TypeLoader::handleResource($data); - } - switch (true) { - case (null === $data): - $markerType = Zend_Amf_Constants::AMF3_NULL; - break; - case (is_bool($data)): - if ($data){ - $markerType = Zend_Amf_Constants::AMF3_BOOLEAN_TRUE; - } else { - $markerType = Zend_Amf_Constants::AMF3_BOOLEAN_FALSE; - } - break; - case (is_int($data)): - if (($data > 0xFFFFFFF) || ($data < -268435456)) { - $markerType = Zend_Amf_Constants::AMF3_NUMBER; - } else { - $markerType = Zend_Amf_Constants::AMF3_INTEGER; - } - break; - case (is_float($data)): - $markerType = Zend_Amf_Constants::AMF3_NUMBER; - break; - case (is_string($data)): - $markerType = Zend_Amf_Constants::AMF3_STRING; - break; - case (is_array($data)): - $markerType = Zend_Amf_Constants::AMF3_ARRAY; - break; - case (is_object($data)): - // Handle object types. - if (($data instanceof DateTime) || ($data instanceof Zend_Date)) { - $markerType = Zend_Amf_Constants::AMF3_DATE; - } else if ($data instanceof Zend_Amf_Value_ByteArray) { - $markerType = Zend_Amf_Constants::AMF3_BYTEARRAY; - } else if (($data instanceof DOMDocument) || ($data instanceof SimpleXMLElement)) { - $markerType = Zend_Amf_Constants::AMF3_XMLSTRING; - } else { - $markerType = Zend_Amf_Constants::AMF3_OBJECT; - } - break; - default: - throw new Zend_Amf_Exception('Unsupported data type: ' . gettype($data)); - } - $this->writeTypeMarker($data, $markerType); - } - } - - /** - * Write an AMF3 integer - * - * @param int|float $data - * @return Zend_Amf_Parse_Amf3_Serializer - */ - public function writeInteger($int) - { - if (($int & 0xffffff80) == 0) { - $this->_stream->writeByte($int & 0x7f); - return $this; - } - - if (($int & 0xffffc000) == 0 ) { - $this->_stream->writeByte(($int >> 7 ) | 0x80); - $this->_stream->writeByte($int & 0x7f); - return $this; - } - - if (($int & 0xffe00000) == 0) { - $this->_stream->writeByte(($int >> 14 ) | 0x80); - $this->_stream->writeByte(($int >> 7 ) | 0x80); - $this->_stream->writeByte($int & 0x7f); - return $this; - } - - $this->_stream->writeByte(($int >> 22 ) | 0x80); - $this->_stream->writeByte(($int >> 15 ) | 0x80); - $this->_stream->writeByte(($int >> 8 ) | 0x80); - $this->_stream->writeByte($int & 0xff); - return $this; - } - - /** - * Send string to output stream, without trying to reference it. - * The string is prepended with strlen($string) << 1 | 0x01 - * - * @param string $string - * @return Zend_Amf_Parse_Amf3_Serializer - */ - protected function writeBinaryString(&$string){ - $ref = ($this->_mbStringFunctionsOverloaded ? mb_strlen($string, '8bit') : strlen($string)) << 1 | 0x01; - $this->writeInteger($ref); - $this->_stream->writeBytes($string); - - return $this; - } - - /** - * Send string to output stream - * - * @param string $string - * @return Zend_Amf_Parse_Amf3_Serializer - */ - public function writeString(&$string) - { - $len = $this->_mbStringFunctionsOverloaded ? mb_strlen($string, '8bit') : strlen($string); - if(!$len){ - $this->writeInteger(0x01); - return $this; - } - - $ref = array_key_exists($string, $this->_referenceStrings) - ? $this->_referenceStrings[$string] - : false; - if ($ref === false){ - $this->_referenceStrings[$string] = count($this->_referenceStrings); - $this->writeBinaryString($string); - } else { - $ref <<= 1; - $this->writeInteger($ref); - } - - return $this; - } - - /** - * Send ByteArray to output stream - * - * @param string|Zend_Amf_Value_ByteArray $data - * @return Zend_Amf_Parse_Amf3_Serializer - */ - public function writeByteArray(&$data) - { - if ($this->writeObjectReference($data)) { - return $this; - } - - if (is_string($data)) { - //nothing to do - } else if ($data instanceof Zend_Amf_Value_ByteArray) { - $data = $data->getData(); - } else { - throw new Zend_Amf_Exception('Invalid ByteArray specified; must be a string or Zend_Amf_Value_ByteArray'); - } - - $this->writeBinaryString($data); - - return $this; - } - - /** - * Send xml to output stream - * - * @param DOMDocument|SimpleXMLElement $xml - * @return Zend_Amf_Parse_Amf3_Serializer - */ - public function writeXml($xml) - { - if ($this->writeObjectReference($xml)) { - return $this; - } - - if(is_string($xml)) { - //nothing to do - } else if ($xml instanceof DOMDocument) { - $xml = $xml->saveXml(); - } else if ($xml instanceof SimpleXMLElement) { - $xml = $xml->asXML(); - } else { - throw new Zend_Amf_Exception('Invalid xml specified; must be a DOMDocument or SimpleXMLElement'); - } - - $this->writeBinaryString($xml); - - return $this; - } - - /** - * Convert DateTime/Zend_Date to AMF date - * - * @param DateTime|Zend_Date $date - * @return Zend_Amf_Parse_Amf3_Serializer - */ - public function writeDate($date) - { - if ($this->writeObjectReference($date)) { - return $this; - } - - if ($date instanceof DateTime) { - $dateString = $date->format('U') * 1000; - } elseif ($date instanceof Zend_Date) { - $dateString = $date->toString('U') * 1000; - } else { - throw new Zend_Amf_Exception('Invalid date specified; must be a string DateTime or Zend_Date object'); - } - - $this->writeInteger(0x01); - // write time to stream minus milliseconds - $this->_stream->writeDouble($dateString); - return $this; - } - - /** - * Write a PHP array back to the amf output stream - * - * @param array $array - * @return Zend_Amf_Parse_Amf3_Serializer - */ - public function writeArray(&$array) - { - // arrays aren't reference here but still counted - $this->_referenceObjects[] = $array; - - // have to seperate mixed from numberic keys. - $numeric = array(); - $string = array(); - foreach ($array as $key => &$value) { - if (is_int($key)) { - $numeric[] = $value; - } else { - $string[$key] = $value; - } - } - - // write the preamble id of the array - $length = count($numeric); - $id = ($length << 1) | 0x01; - $this->writeInteger($id); - - //Write the mixed type array to the output stream - foreach($string as $key => &$value) { - $this->writeString($key) - ->writeTypeMarker($value); - } - $this->writeString($this->_strEmpty); - - // Write the numeric array to ouput stream - foreach($numeric as &$value) { - $this->writeTypeMarker($value); - } - return $this; - } - - /** - * Check if the given object is in the reference table, write the reference if it exists, - * otherwise add the object to the reference table - * - * @param mixed $object object reference to check for reference - * @param mixed $objectByVal object to check for reference - * @return Boolean true, if the reference was written, false otherwise - */ - protected function writeObjectReference(&$object, $objectByVal = false) - { - // Workaround for PHP5 with E_STRICT enabled complaining about "Only - // variables should be passed by reference" - if ((null === $object) && ($objectByVal !== false)) { - $object = &$objectByVal; - } - - $hash = spl_object_hash($object); - $ref = array_key_exists($hash, $this->_referenceObjects) - ? $this->_referenceObjects[$hash] - : false; - - // quickly handle object references - if ($ref !== false){ - $ref <<= 1; - $this->writeInteger($ref); - return true; - } - $this->_referenceObjects[$hash] = count($this->_referenceObjects); - return false; - } - - /** - * Write object to ouput stream - * - * @param mixed $data - * @return Zend_Amf_Parse_Amf3_Serializer - */ - public function writeObject($object) - { - if($this->writeObjectReference($object)){ - return $this; - } - - $className = ''; - - //Check to see if the object is a typed object and we need to change - switch (true) { - // the return class mapped name back to actionscript class name. - case ($className = Zend_Amf_Parse_TypeLoader::getMappedClassName(get_class($object))): - break; - - // Check to see if the user has defined an explicit Action Script type. - case isset($object->_explicitType): - $className = $object->_explicitType; - break; - - // Check if user has defined a method for accessing the Action Script type - case method_exists($object, 'getASClassName'): - $className = $object->getASClassName(); - break; - - // No return class name is set make it a generic object - case ($object instanceof stdClass): - $className = ''; - break; - - // By default, use object's class name - default: - $className = get_class($object); - break; - } - - $writeTraits = true; - - //check to see, if we have a corresponding definition - if(array_key_exists($className, $this->_referenceDefinitions)){ - $traitsInfo = $this->_referenceDefinitions[$className]['id']; - $encoding = $this->_referenceDefinitions[$className]['encoding']; - $propertyNames = $this->_referenceDefinitions[$className]['propertyNames']; - - $traitsInfo = ($traitsInfo << 2) | 0x01; - - $writeTraits = false; - } else { - $propertyNames = array(); - - if($className == ''){ - //if there is no className, we interpret the class as dynamic without any sealed members - $encoding = Zend_Amf_Constants::ET_DYNAMIC; - } else { - $encoding = Zend_Amf_Constants::ET_PROPLIST; - - foreach($object as $key => $value) { - if( $key[0] != "_") { - $propertyNames[] = $key; - } - } - } - - $this->_referenceDefinitions[$className] = array( - 'id' => count($this->_referenceDefinitions), - 'encoding' => $encoding, - 'propertyNames' => $propertyNames, - ); - - $traitsInfo = Zend_Amf_Constants::AMF3_OBJECT_ENCODING; - $traitsInfo |= $encoding << 2; - $traitsInfo |= (count($propertyNames) << 4); - } - - $this->writeInteger($traitsInfo); - - if($writeTraits){ - $this->writeString($className); - foreach ($propertyNames as $value) { - $this->writeString($value); - } - } - - try { - switch($encoding) { - case Zend_Amf_Constants::ET_PROPLIST: - //Write the sealed values to the output stream. - foreach ($propertyNames as $key) { - $this->writeTypeMarker($object->$key); - } - break; - case Zend_Amf_Constants::ET_DYNAMIC: - //Write the sealed values to the output stream. - foreach ($propertyNames as $key) { - $this->writeTypeMarker($object->$key); - } - - //Write remaining properties - foreach($object as $key => $value){ - if(!in_array($key,$propertyNames) && $key[0] != "_"){ - $this->writeString($key); - $this->writeTypeMarker($value); - } - } - - //Write an empty string to end the dynamic part - $this->writeString($this->_strEmpty); - break; - case Zend_Amf_Constants::ET_EXTERNAL: - throw new Zend_Amf_Exception('External Object Encoding not implemented'); - break; - default: - throw new Zend_Amf_Exception('Unknown Object Encoding type: ' . $encoding); - } - } catch (Exception $e) { - throw new Zend_Amf_Exception('Unable to writeObject output: ' . $e->getMessage(), 0, $e); - } - - return $this; - } -} diff --git a/library/vendor/Zend/Amf/Parse/Deserializer.php b/library/vendor/Zend/Amf/Parse/Deserializer.php deleted file mode 100644 index ce99c6cbd..000000000 --- a/library/vendor/Zend/Amf/Parse/Deserializer.php +++ /dev/null @@ -1,65 +0,0 @@ -_stream = $stream; - } - - /** - * Checks for AMF marker types and calls the appropriate methods - * for deserializing those marker types. Markers are the data type of - * the following value. - * - * @param int $typeMarker - * @return mixed Whatever the data type is of the marker in php - */ - public abstract function readTypeMarker($markerType = null); -} diff --git a/library/vendor/Zend/Amf/Parse/InputStream.php b/library/vendor/Zend/Amf/Parse/InputStream.php deleted file mode 100644 index b77dd65a4..000000000 --- a/library/vendor/Zend/Amf/Parse/InputStream.php +++ /dev/null @@ -1,38 +0,0 @@ - Value is Mysql type (exact string) => PHP type - */ - static public $fieldTypes = array( - "int" => "int", - "timestamp" => "int", - "year" => "int", - "real" => "float", - ); - /** - * Parse resource into array - * - * @param resource $resource - * @return array - */ - public function parse($resource) { - $result = array(); - $fieldcnt = mysql_num_fields($resource); - $fields_transform = array(); - for($i=0;$i<$fieldcnt;$i++) { - $type = mysql_field_type($resource, $i); - if(isset(self::$fieldTypes[$type])) { - $fields_transform[mysql_field_name($resource, $i)] = self::$fieldTypes[$type]; - } - } - - while($row = mysql_fetch_object($resource)) { - foreach($fields_transform as $fieldname => $fieldtype) { - settype($row->$fieldname, $fieldtype); - } - $result[] = $row; - } - return $result; - } -} diff --git a/library/vendor/Zend/Amf/Parse/Resource/MysqliResult.php b/library/vendor/Zend/Amf/Parse/Resource/MysqliResult.php deleted file mode 100644 index 86ac44890..000000000 --- a/library/vendor/Zend/Amf/Parse/Resource/MysqliResult.php +++ /dev/null @@ -1,128 +0,0 @@ - "MYSQLI_TYPE_DECIMAL", - 1 => "MYSQLI_TYPE_TINYINT", - 2 => "MYSQLI_TYPE_SMALLINT", - 3 => "MYSQLI_TYPE_INTEGER", - 4 => "MYSQLI_TYPE_FLOAT", - 5 => "MYSQLI_TYPE_DOUBLE", - 7 => "MYSQLI_TYPE_TIMESTAMP", - 8 => "MYSQLI_TYPE_BIGINT", - 9 => "MYSQLI_TYPE_MEDIUMINT", - 10 => "MYSQLI_TYPE_DATE", - 11 => "MYSQLI_TYPE_TIME", - 12 => "MYSQLI_TYPE_DATETIME", - 13 => "MYSQLI_TYPE_YEAR", - 14 => "MYSQLI_TYPE_DATE", - 16 => "MYSQLI_TYPE_BIT", - 246 => "MYSQLI_TYPE_DECIMAL", - 247 => "MYSQLI_TYPE_ENUM", - 248 => "MYSQLI_TYPE_SET", - 249 => "MYSQLI_TYPE_TINYBLOB", - 250 => "MYSQLI_TYPE_MEDIUMBLOB", - 251 => "MYSQLI_TYPE_LONGBLOB", - 252 => "MYSQLI_TYPE_BLOB", - 253 => "MYSQLI_TYPE_VARCHAR", - 254 => "MYSQLI_TYPE_CHAR", - 255 => "MYSQLI_TYPE_GEOMETRY", - ); - - // Build an associative array for a type look up - static $mysqli_to_php = array( - "MYSQLI_TYPE_DECIMAL" => 'float', - "MYSQLI_TYPE_NEWDECIMAL" => 'float', - "MYSQLI_TYPE_BIT" => 'integer', - "MYSQLI_TYPE_TINYINT" => 'integer', - "MYSQLI_TYPE_SMALLINT" => 'integer', - "MYSQLI_TYPE_MEDIUMINT" => 'integer', - "MYSQLI_TYPE_BIGINT" => 'integer', - "MYSQLI_TYPE_INTEGER" => 'integer', - "MYSQLI_TYPE_FLOAT" => 'float', - "MYSQLI_TYPE_DOUBLE" => 'float', - "MYSQLI_TYPE_NULL" => 'null', - "MYSQLI_TYPE_TIMESTAMP" => 'string', - "MYSQLI_TYPE_INT24" => 'integer', - "MYSQLI_TYPE_DATE" => 'string', - "MYSQLI_TYPE_TIME" => 'string', - "MYSQLI_TYPE_DATETIME" => 'string', - "MYSQLI_TYPE_YEAR" => 'string', - "MYSQLI_TYPE_NEWDATE" => 'string', - "MYSQLI_TYPE_ENUM" => 'string', - "MYSQLI_TYPE_SET" => 'string', - "MYSQLI_TYPE_TINYBLOB" => 'object', - "MYSQLI_TYPE_MEDIUMBLOB" => 'object', - "MYSQLI_TYPE_LONGBLOB" => 'object', - "MYSQLI_TYPE_BLOB" => 'object', - "MYSQLI_TYPE_CHAR" => 'string', - "MYSQLI_TYPE_VARCHAR" => 'string', - "MYSQLI_TYPE_GEOMETRY" => 'object', - "MYSQLI_TYPE_BIT" => 'integer', - ); - - /** - * Parse resource into array - * - * @param resource $resource - * @return array - */ - public function parse($resource) { - - $result = array(); - $fieldcnt = mysqli_num_fields($resource); - - - $fields_transform = array(); - - for($i=0;$i<$fieldcnt;$i++) { - $finfo = mysqli_fetch_field_direct($resource, $i); - - if(isset(self::$mysqli_type[$finfo->type])) { - $fields_transform[$finfo->name] = self::$mysqli_to_php[self::$mysqli_type[$finfo->type]]; - } - } - - while($row = mysqli_fetch_assoc($resource)) { - foreach($fields_transform as $fieldname => $fieldtype) { - settype($row[$fieldname], $fieldtype); - } - $result[] = $row; - } - return $result; - } -} diff --git a/library/vendor/Zend/Amf/Parse/Serializer.php b/library/vendor/Zend/Amf/Parse/Serializer.php deleted file mode 100644 index 6c0dea5cb..000000000 --- a/library/vendor/Zend/Amf/Parse/Serializer.php +++ /dev/null @@ -1,68 +0,0 @@ -_stream = $stream; - $this->_mbStringFunctionsOverloaded = function_exists('mb_strlen') && (ini_get('mbstring.func_overload') !== '') && ((int)ini_get('mbstring.func_overload') & 2); - } - - /** - * Find the PHP object type and convert it into an AMF object type - * - * @param mixed $content - * @param int $markerType - * @param mixed $contentByVal - * @return void - */ - public abstract function writeTypeMarker(&$content, $markerType = null, $contentByVal = false); -} diff --git a/library/vendor/Zend/Amf/Parse/TypeLoader.php b/library/vendor/Zend/Amf/Parse/TypeLoader.php deleted file mode 100644 index 431734f31..000000000 --- a/library/vendor/Zend/Amf/Parse/TypeLoader.php +++ /dev/null @@ -1,222 +0,0 @@ - 'Zend_Amf_Value_Messaging_AcknowledgeMessage', - 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_AsyncMessage', - 'flex.messaging.messages.CommandMessage' => 'Zend_Amf_Value_Messaging_CommandMessage', - 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_ErrorMessage', - 'flex.messaging.messages.RemotingMessage' => 'Zend_Amf_Value_Messaging_RemotingMessage', - 'flex.messaging.io.ArrayCollection' => 'Zend_Amf_Value_Messaging_ArrayCollection', - ); - - /** - * @var array Default class map - */ - protected static $_defaultClassMap = array( - 'flex.messaging.messages.AcknowledgeMessage' => 'Zend_Amf_Value_Messaging_AcknowledgeMessage', - 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_AsyncMessage', - 'flex.messaging.messages.CommandMessage' => 'Zend_Amf_Value_Messaging_CommandMessage', - 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_ErrorMessage', - 'flex.messaging.messages.RemotingMessage' => 'Zend_Amf_Value_Messaging_RemotingMessage', - 'flex.messaging.io.ArrayCollection' => 'Zend_Amf_Value_Messaging_ArrayCollection', - ); - - /** - * @var Zend_Loader_PluginLoader_Interface - */ - protected static $_resourceLoader = null; - - - /** - * Load the mapped class type into a callback. - * - * @param string $className - * @return object|false - */ - public static function loadType($className) - { - $class = self::getMappedClassName($className); - if(!$class) { - $class = str_replace('.', '_', $className); - } - if (!class_exists($class)) { - return "stdClass"; - } - return $class; - } - - /** - * Looks up the supplied call name to its mapped class name - * - * @param string $className - * @return string - */ - public static function getMappedClassName($className) - { - $mappedName = array_search($className, self::$classMap); - - if ($mappedName) { - return $mappedName; - } - - $mappedName = array_search($className, array_flip(self::$classMap)); - - if ($mappedName) { - return $mappedName; - } - - return false; - } - - /** - * Map PHP class names to ActionScript class names - * - * Allows users to map the class names of there action script classes - * to the equivelent php class name. Used in deserialization to load a class - * and serialiation to set the class name of the returned object. - * - * @param string $asClassName - * @param string $phpClassName - * @return void - */ - public static function setMapping($asClassName, $phpClassName) - { - self::$classMap[$asClassName] = $phpClassName; - } - - /** - * Reset type map - * - * @return void - */ - public static function resetMap() - { - self::$classMap = self::$_defaultClassMap; - } - - /** - * Set loader for resource type handlers - * - * @param Zend_Loader_PluginLoader_Interface $loader - */ - public static function setResourceLoader(Zend_Loader_PluginLoader_Interface $loader) - { - self::$_resourceLoader = $loader; - } - - /** - * Add directory to the list of places where to look for resource handlers - * - * @param string $prefix - * @param string $dir - */ - public static function addResourceDirectory($prefix, $dir) - { - if(self::$_resourceLoader) { - self::$_resourceLoader->addPrefixPath($prefix, $dir); - } - } - - /** - * Get plugin class that handles this resource - * - * @param resource $resource Resource type - * @return string Class name - */ - public static function getResourceParser($resource) - { - if(self::$_resourceLoader) { - $type = preg_replace("/[^A-Za-z0-9_]/", " ", get_resource_type($resource)); - $type = str_replace(" ","", ucwords($type)); - return self::$_resourceLoader->load($type); - } - return false; - } - - /** - * Convert resource to a serializable object - * - * @param resource $resource - * @return mixed - */ - public static function handleResource($resource) - { - if(!self::$_resourceLoader) { - throw new Zend_Amf_Exception('Unable to handle resources - resource plugin loader not set'); - } - try { - while(is_resource($resource)) { - $resclass = self::getResourceParser($resource); - if(!$resclass) { - throw new Zend_Amf_Exception('Can not serialize resource type: '. get_resource_type($resource)); - } - $parser = new $resclass(); - if(is_callable(array($parser, 'parse'))) { - $resource = $parser->parse($resource); - } else { - throw new Zend_Amf_Exception("Could not call parse() method on class $resclass"); - } - } - return $resource; - } catch(Zend_Amf_Exception $e) { - throw new Zend_Amf_Exception($e->getMessage(), $e->getCode(), $e); - } catch(Exception $e) { - throw new Zend_Amf_Exception('Can not serialize resource type: '. get_resource_type($resource), 0, $e); - } - } -} diff --git a/library/vendor/Zend/Amf/Request.php b/library/vendor/Zend/Amf/Request.php deleted file mode 100644 index 89731e90e..000000000 --- a/library/vendor/Zend/Amf/Request.php +++ /dev/null @@ -1,243 +0,0 @@ -_inputStream = new Zend_Amf_Parse_InputStream($request); - $this->_deserializer = new Zend_Amf_Parse_Amf0_Deserializer($this->_inputStream); - $this->readMessage($this->_inputStream); - return $this; - } - - /** - * Takes the raw AMF input stream and converts it into valid PHP objects - * - * @param Zend_Amf_Parse_InputStream - * @return Zend_Amf_Request - */ - public function readMessage(Zend_Amf_Parse_InputStream $stream) - { - $clientVersion = $stream->readUnsignedShort(); - if (($clientVersion != Zend_Amf_Constants::AMF0_OBJECT_ENCODING) - && ($clientVersion != Zend_Amf_Constants::AMF3_OBJECT_ENCODING) - && ($clientVersion != Zend_Amf_Constants::FMS_OBJECT_ENCODING) - ) { - throw new Zend_Amf_Exception('Unknown Player Version ' . $clientVersion); - } - - $this->_bodies = array(); - $this->_headers = array(); - $headerCount = $stream->readInt(); - - // Iterate through the AMF envelope header - while ($headerCount--) { - $this->_headers[] = $this->readHeader(); - } - - // Iterate through the AMF envelope body - $bodyCount = $stream->readInt(); - while ($bodyCount--) { - $this->_bodies[] = $this->readBody(); - } - - return $this; - } - - /** - * Deserialize a message header from the input stream. - * - * A message header is structured as: - * - NAME String - * - MUST UNDERSTAND Boolean - * - LENGTH Int - * - DATA Object - * - * @return Zend_Amf_Value_MessageHeader - */ - public function readHeader() - { - $name = $this->_inputStream->readUTF(); - $mustRead = (bool)$this->_inputStream->readByte(); - $length = $this->_inputStream->readLong(); - - try { - $data = $this->_deserializer->readTypeMarker(); - } catch (Exception $e) { - throw new Zend_Amf_Exception('Unable to parse ' . $name . ' header data: ' . $e->getMessage() . ' '. $e->getLine(), 0, $e); - } - - $header = new Zend_Amf_Value_MessageHeader($name, $mustRead, $data, $length); - return $header; - } - - /** - * Deserialize a message body from the input stream - * - * @return Zend_Amf_Value_MessageBody - */ - public function readBody() - { - $targetURI = $this->_inputStream->readUTF(); - $responseURI = $this->_inputStream->readUTF(); - $length = $this->_inputStream->readLong(); - - try { - $data = $this->_deserializer->readTypeMarker(); - } catch (Exception $e) { - throw new Zend_Amf_Exception('Unable to parse ' . $targetURI . ' body data ' . $e->getMessage(), 0, $e); - } - - // Check for AMF3 objectEncoding - if ($this->_deserializer->getObjectEncoding() == Zend_Amf_Constants::AMF3_OBJECT_ENCODING) { - /* - * When and AMF3 message is sent to the server it is nested inside - * an AMF0 array called Content. The following code gets the object - * out of the content array and sets it as the message data. - */ - if(is_array($data) && $data[0] instanceof Zend_Amf_Value_Messaging_AbstractMessage){ - $data = $data[0]; - } - - // set the encoding so we return our message in AMF3 - $this->_objectEncoding = Zend_Amf_Constants::AMF3_OBJECT_ENCODING; - } - - $body = new Zend_Amf_Value_MessageBody($targetURI, $responseURI, $data); - return $body; - } - - /** - * Return an array of the body objects that were found in the amf request. - * - * @return array {target, response, length, content} - */ - public function getAmfBodies() - { - return $this->_bodies; - } - - /** - * Accessor to private array of message bodies. - * - * @param Zend_Amf_Value_MessageBody $message - * @return Zend_Amf_Request - */ - public function addAmfBody(Zend_Amf_Value_MessageBody $message) - { - $this->_bodies[] = $message; - return $this; - } - - /** - * Return an array of headers that were found in the amf request. - * - * @return array {operation, mustUnderstand, length, param} - */ - public function getAmfHeaders() - { - return $this->_headers; - } - - /** - * Return the either 0 or 3 for respect AMF version - * - * @return int - */ - public function getObjectEncoding() - { - return $this->_objectEncoding; - } - - /** - * Set the object response encoding - * - * @param mixed $int - * @return Zend_Amf_Request - */ - public function setObjectEncoding($int) - { - $this->_objectEncoding = $int; - return $this; - } -} diff --git a/library/vendor/Zend/Amf/Request/Http.php b/library/vendor/Zend/Amf/Request/Http.php deleted file mode 100644 index a3369484d..000000000 --- a/library/vendor/Zend/Amf/Request/Http.php +++ /dev/null @@ -1,79 +0,0 @@ -_rawRequest = $amfRequest; - $this->initialize($amfRequest); - } else { - echo '

Zend Amf Endpoint

' ; - } - } - - /** - * Retrieve raw AMF Request - * - * @return string - */ - public function getRawRequest() - { - return $this->_rawRequest; - } -} diff --git a/library/vendor/Zend/Amf/Response.php b/library/vendor/Zend/Amf/Response.php deleted file mode 100644 index c077f1e20..000000000 --- a/library/vendor/Zend/Amf/Response.php +++ /dev/null @@ -1,202 +0,0 @@ -_outputStream = new Zend_Amf_Parse_OutputStream(); - $this->writeMessage($this->_outputStream); - return $this; - } - - /** - * Serialize the PHP data types back into Actionscript and - * create and AMF stream. - * - * @param Zend_Amf_Parse_OutputStream $stream - * @return Zend_Amf_Response - */ - public function writeMessage(Zend_Amf_Parse_OutputStream $stream) - { - $objectEncoding = $this->_objectEncoding; - - //Write encoding to start of stream. Preamble byte is written of two byte Unsigned Short - $stream->writeByte(0x00); - $stream->writeByte($objectEncoding); - - // Loop through the AMF Headers that need to be returned. - $headerCount = count($this->_headers); - $stream->writeInt($headerCount); - foreach ($this->getAmfHeaders() as $header) { - $serializer = new Zend_Amf_Parse_Amf0_Serializer($stream); - $stream->writeUTF($header->name); - $stream->writeByte($header->mustRead); - $stream->writeLong(Zend_Amf_Constants::UNKNOWN_CONTENT_LENGTH); - if (is_object($header->data)) { - // Workaround for PHP5 with E_STRICT enabled complaining about - // "Only variables should be passed by reference" - $placeholder = null; - $serializer->writeTypeMarker($placeholder, null, $header->data); - } else { - $serializer->writeTypeMarker($header->data); - } - } - - // loop through the AMF bodies that need to be returned. - $bodyCount = count($this->_bodies); - $stream->writeInt($bodyCount); - foreach ($this->_bodies as $body) { - $serializer = new Zend_Amf_Parse_Amf0_Serializer($stream); - $stream->writeUTF($body->getTargetURI()); - $stream->writeUTF($body->getResponseURI()); - $stream->writeLong(Zend_Amf_Constants::UNKNOWN_CONTENT_LENGTH); - $bodyData = $body->getData(); - $markerType = ($this->_objectEncoding == Zend_Amf_Constants::AMF0_OBJECT_ENCODING) ? null : Zend_Amf_Constants::AMF0_AMF3; - if (is_object($bodyData)) { - // Workaround for PHP5 with E_STRICT enabled complaining about - // "Only variables should be passed by reference" - $placeholder = null; - $serializer->writeTypeMarker($placeholder, $markerType, $bodyData); - } else { - $serializer->writeTypeMarker($bodyData, $markerType); - } - } - - return $this; - } - - /** - * Return the output stream content - * - * @return string The contents of the output stream - */ - public function getResponse() - { - return $this->_outputStream->getStream(); - } - - /** - * Return the output stream content - * - * @return string - */ - public function __toString() - { - return $this->getResponse(); - } - - /** - * Add an AMF body to be sent to the Flash Player - * - * @param Zend_Amf_Value_MessageBody $body - * @return Zend_Amf_Response - */ - public function addAmfBody(Zend_Amf_Value_MessageBody $body) - { - $this->_bodies[] = $body; - return $this; - } - - /** - * Return an array of AMF bodies to be serialized - * - * @return array - */ - public function getAmfBodies() - { - return $this->_bodies; - } - - /** - * Add an AMF Header to be sent back to the flash player - * - * @param Zend_Amf_Value_MessageHeader $header - * @return Zend_Amf_Response - */ - public function addAmfHeader(Zend_Amf_Value_MessageHeader $header) - { - $this->_headers[] = $header; - return $this; - } - - /** - * Retrieve attached AMF message headers - * - * @return array Array of Zend_Amf_Value_MessageHeader objects - */ - public function getAmfHeaders() - { - return $this->_headers; - } - - /** - * Set the AMF encoding that will be used for serialization - * - * @param int $encoding - * @return Zend_Amf_Response - */ - public function setObjectEncoding($encoding) - { - $this->_objectEncoding = $encoding; - return $this; - } -} diff --git a/library/vendor/Zend/Amf/Response/Http.php b/library/vendor/Zend/Amf/Response/Http.php deleted file mode 100644 index c80de673c..000000000 --- a/library/vendor/Zend/Amf/Response/Http.php +++ /dev/null @@ -1,72 +0,0 @@ -isIeOverSsl()) { - header('Cache-Control: cache, must-revalidate'); - header('Pragma: public'); - } else { - header('Cache-Control: no-cache, must-revalidate'); - header('Pragma: no-cache'); - } - header('Expires: Thu, 19 Nov 1981 08:52:00 GMT'); - header('Content-Type: application/x-amf'); - } - return parent::getResponse(); - } - - protected function isIeOverSsl() - { - $ssl = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : false; - if (!$ssl || ($ssl == 'off')) { - // IIS reports "off", whereas other browsers simply don't populate - return false; - } - - $ua = $_SERVER['HTTP_USER_AGENT']; - if (!preg_match('/; MSIE \d+\.\d+;/', $ua)) { - // Not MicroSoft Internet Explorer - return false; - } - - return true; - } -} diff --git a/library/vendor/Zend/Amf/Server.php b/library/vendor/Zend/Amf/Server.php deleted file mode 100644 index f1099b934..000000000 --- a/library/vendor/Zend/Amf/Server.php +++ /dev/null @@ -1,1007 +0,0 @@ - method pairs - * @var array - */ - protected $_table = array(); - - /** - * - * @var bool session flag; whether or not to add a session to each response. - */ - protected $_session = false; - - /** - * Namespace allows all AMF calls to not clobber other PHP session variables - * @var Zend_Session_NameSpace default session namespace zend_amf - */ - protected $_sesionNamespace = 'zend_amf'; - - /** - * Set the default session.name if php_ - * @var string - */ - protected $_sessionName = 'PHPSESSID'; - - /** - * Authentication handler object - * - * @var Zend_Amf_Auth_Abstract - */ - protected $_auth; - /** - * ACL handler object - * - * @var Zend_Acl - */ - protected $_acl; - /** - * The server constructor - */ - public function __construct() - { - Zend_Amf_Parse_TypeLoader::setResourceLoader(new Zend_Loader_PluginLoader(array("Zend_Amf_Parse_Resource" => "Zend/Amf/Parse/Resource"))); - } - - /** - * Set authentication adapter - * - * If the authentication adapter implements a "getAcl()" method, populate - * the ACL of this instance with it (if none exists already). - * - * @param Zend_Amf_Auth_Abstract $auth - * @return Zend_Amf_Server - */ - public function setAuth(Zend_Amf_Auth_Abstract $auth) - { - $this->_auth = $auth; - if ((null === $this->getAcl()) && method_exists($auth, 'getAcl')) { - $this->setAcl($auth->getAcl()); - } - return $this; - } - /** - * Get authentication adapter - * - * @return Zend_Amf_Auth_Abstract - */ - public function getAuth() - { - return $this->_auth; - } - - /** - * Set ACL adapter - * - * @param Zend_Acl $acl - * @return Zend_Amf_Server - */ - public function setAcl(Zend_Acl $acl) - { - $this->_acl = $acl; - return $this; - } - /** - * Get ACL adapter - * - * @return Zend_Acl - */ - public function getAcl() - { - return $this->_acl; - } - - /** - * Set production flag - * - * @param bool $flag - * @return Zend_Amf_Server - */ - public function setProduction($flag) - { - $this->_production = (bool) $flag; - return $this; - } - - /** - * Whether or not the server is in production - * - * @return bool - */ - public function isProduction() - { - return $this->_production; - } - - /** - * @param namespace of all incoming sessions defaults to Zend_Amf - * @return Zend_Amf_Server - */ - public function setSession($namespace = 'Zend_Amf') - { - $this->_session = true; - $this->_sesionNamespace = new Zend_Session_Namespace($namespace); - return $this; - } - - /** - * Whether of not the server is using sessions - * @return bool - */ - public function isSession() - { - return $this->_session; - } - - /** - * Check if the ACL allows accessing the function or method - * - * @param string|object $object Object or class being accessed - * @param string $function Function or method being accessed - * @return unknown_type - */ - protected function _checkAcl($object, $function) - { - if(!$this->_acl) { - return true; - } - if($object) { - $class = is_object($object)?get_class($object):$object; - if(!$this->_acl->has($class)) { - $this->_acl->add(new Zend_Acl_Resource($class)); - } - $call = array($object, "initAcl"); - if(is_callable($call) && !call_user_func($call, $this->_acl)) { - // if initAcl returns false, no ACL check - return true; - } - } else { - $class = null; - } - - $auth = Zend_Auth::getInstance(); - if($auth->hasIdentity()) { - $role = $auth->getIdentity()->role; - } else { - if($this->_acl->hasRole(Zend_Amf_Constants::GUEST_ROLE)) { - $role = Zend_Amf_Constants::GUEST_ROLE; - } else { - throw new Zend_Amf_Server_Exception("Unauthenticated access not allowed"); - } - } - if($this->_acl->isAllowed($role, $class, $function)) { - return true; - } else { - throw new Zend_Amf_Server_Exception("Access not allowed"); - } - } - - /** - * Get PluginLoader for the Server - * - * @return Zend_Loader_PluginLoader - */ - protected function getLoader() - { - if(empty($this->_loader)) { - $this->_loader = new Zend_Loader_PluginLoader(); - } - return $this->_loader; - } - - /** - * Loads a remote class or method and executes the function and returns - * the result - * - * @param string $method Is the method to execute - * @param mixed $param values for the method - * @return mixed $response the result of executing the method - * @throws Zend_Amf_Server_Exception - */ - protected function _dispatch($method, $params = null, $source = null) - { - if($source) { - if(($mapped = Zend_Amf_Parse_TypeLoader::getMappedClassName($source)) !== false) { - $source = $mapped; - } - } - $qualifiedName = empty($source) ? $method : $source . '.' . $method; - - if (!isset($this->_table[$qualifiedName])) { - // if source is null a method that was not defined was called. - if ($source) { - $className = str_replace('.', '_', $source); - if(class_exists($className, false) && !isset($this->_classAllowed[$className])) { - throw new Zend_Amf_Server_Exception('Can not call "' . $className . '" - use setClass()'); - } - try { - $this->getLoader()->load($className); - } catch (Exception $e) { - throw new Zend_Amf_Server_Exception('Class "' . $className . '" does not exist: '.$e->getMessage(), 0, $e); - } - // Add the new loaded class to the server. - $this->setClass($className, $source); - } - - if (!isset($this->_table[$qualifiedName])) { - // Source is null or doesn't contain specified method - throw new Zend_Amf_Server_Exception('Method "' . $method . '" does not exist'); - } - } - - $info = $this->_table[$qualifiedName]; - $argv = $info->getInvokeArguments(); - - if (0 < count($argv)) { - $params = array_merge($params, $argv); - } - - $params = $this->_castParameters($info, $params); - - if ($info instanceof Zend_Server_Reflection_Function) { - $func = $info->getName(); - $this->_checkAcl(null, $func); - $return = call_user_func_array($func, $params); - } elseif ($info instanceof Zend_Server_Reflection_Method) { - // Get class - $class = $info->getDeclaringClass()->getName(); - if ('static' == $info->isStatic()) { - // for some reason, invokeArgs() does not work the same as - // invoke(), and expects the first argument to be an object. - // So, using a callback if the method is static. - $this->_checkAcl($class, $info->getName()); - $return = call_user_func_array(array($class, $info->getName()), $params); - } else { - // Object methods - try { - $object = $info->getDeclaringClass()->newInstance(); - } catch (Exception $e) { - throw new Zend_Amf_Server_Exception('Error instantiating class ' . $class . ' to invoke method ' . $info->getName() . ': '.$e->getMessage(), 621, $e); - } - $this->_checkAcl($object, $info->getName()); - $return = $info->invokeArgs($object, $params); - } - } else { - throw new Zend_Amf_Server_Exception('Method missing implementation ' . get_class($info)); - } - - return $return; - } - - /** - * Handles each of the 11 different command message types. - * - * A command message is a flex.messaging.messages.CommandMessage - * - * @see Zend_Amf_Value_Messaging_CommandMessage - * @param Zend_Amf_Value_Messaging_CommandMessage $message - * @return Zend_Amf_Value_Messaging_AcknowledgeMessage - */ - protected function _loadCommandMessage(Zend_Amf_Value_Messaging_CommandMessage $message) - { - switch($message->operation) { - case Zend_Amf_Value_Messaging_CommandMessage::DISCONNECT_OPERATION : - case Zend_Amf_Value_Messaging_CommandMessage::CLIENT_PING_OPERATION : - $return = new Zend_Amf_Value_Messaging_AcknowledgeMessage($message); - break; - case Zend_Amf_Value_Messaging_CommandMessage::LOGIN_OPERATION : - $data = explode(':', base64_decode($message->body)); - $userid = $data[0]; - $password = isset($data[1])?$data[1]:""; - if(empty($userid)) { - throw new Zend_Amf_Server_Exception('Login failed: username not supplied'); - } - if(!$this->_handleAuth($userid, $password)) { - throw new Zend_Amf_Server_Exception('Authentication failed'); - } - $return = new Zend_Amf_Value_Messaging_AcknowledgeMessage($message); - break; - case Zend_Amf_Value_Messaging_CommandMessage::LOGOUT_OPERATION : - if($this->_auth) { - Zend_Auth::getInstance()->clearIdentity(); - } - $return = new Zend_Amf_Value_Messaging_AcknowledgeMessage($message); - break; - default : - throw new Zend_Amf_Server_Exception('CommandMessage::' . $message->operation . ' not implemented'); - break; - } - return $return; - } - - /** - * Create appropriate error message - * - * @param int $objectEncoding Current AMF encoding - * @param string $message Message that was being processed when error happened - * @param string $description Error description - * @param mixed $detail Detailed data about the error - * @param int $code Error code - * @param int $line Error line - * @return Zend_Amf_Value_Messaging_ErrorMessage|array - */ - protected function _errorMessage($objectEncoding, $message, $description, $detail, $code, $line) - { - $return = null; - switch ($objectEncoding) { - case Zend_Amf_Constants::AMF0_OBJECT_ENCODING : - return array ( - 'description' => ($this->isProduction ()) ? '' : $description, - 'detail' => ($this->isProduction ()) ? '' : $detail, - 'line' => ($this->isProduction ()) ? 0 : $line, - 'code' => $code - ); - case Zend_Amf_Constants::AMF3_OBJECT_ENCODING : - $return = new Zend_Amf_Value_Messaging_ErrorMessage ( $message ); - $return->faultString = $this->isProduction () ? '' : $description; - $return->faultCode = $code; - $return->faultDetail = $this->isProduction () ? '' : $detail; - break; - } - return $return; - } - - /** - * Handle AMF authentication - * - * @param string $userid - * @param string $password - * @return boolean - */ - protected function _handleAuth( $userid, $password) - { - if (!$this->_auth) { - return true; - } - $this->_auth->setCredentials($userid, $password); - $auth = Zend_Auth::getInstance(); - $result = $auth->authenticate($this->_auth); - if ($result->isValid()) { - if (!$this->isSession()) { - $this->setSession(); - } - return true; - } else { - // authentication failed, good bye - throw new Zend_Amf_Server_Exception( - "Authentication failed: " . join("\n", - $result->getMessages()), $result->getCode()); - } - - } - - /** - * Takes the deserialized AMF request and performs any operations. - * - * @todo should implement and SPL observer pattern for custom AMF headers - * @todo DescribeService support - * @param Zend_Amf_Request $request - * @return Zend_Amf_Response - * @throws Zend_Amf_server_Exception|Exception - */ - protected function _handle(Zend_Amf_Request $request) - { - // Get the object encoding of the request. - $objectEncoding = $request->getObjectEncoding(); - - // create a response object to place the output from the services. - $response = $this->getResponse(); - - // set response encoding - $response->setObjectEncoding($objectEncoding); - - // Authenticate, if we have credential headers - $error = false; - $headers = $request->getAmfHeaders(); - if (isset($headers[Zend_Amf_Constants::CREDENTIALS_HEADER]) - && isset($headers[Zend_Amf_Constants::CREDENTIALS_HEADER]->userid) - && isset($headers[Zend_Amf_Constants::CREDENTIALS_HEADER]->password) - ) { - try { - if ($this->_handleAuth( - $headers[Zend_Amf_Constants::CREDENTIALS_HEADER]->userid, - $headers[Zend_Amf_Constants::CREDENTIALS_HEADER]->password - )) { - // use RequestPersistentHeader to clear credentials - $response->addAmfHeader( - new Zend_Amf_Value_MessageHeader( - Zend_Amf_Constants::PERSISTENT_HEADER, - false, - new Zend_Amf_Value_MessageHeader( - Zend_Amf_Constants::CREDENTIALS_HEADER, - false, null - ) - ) - ); - } - } catch (Exception $e) { - // Error during authentication; report it - $error = $this->_errorMessage( - $objectEncoding, - '', - $e->getMessage(), - $e->getTraceAsString(), - $e->getCode(), - $e->getLine() - ); - $responseType = Zend_AMF_Constants::STATUS_METHOD; - } - } - - // Iterate through each of the service calls in the AMF request - foreach($request->getAmfBodies() as $body) - { - if ($error) { - // Error during authentication; just report it and be done - $responseURI = $body->getResponseURI() . $responseType; - $newBody = new Zend_Amf_Value_MessageBody($responseURI, null, $error); - $response->addAmfBody($newBody); - continue; - } - try { - switch ($objectEncoding) { - case Zend_Amf_Constants::AMF0_OBJECT_ENCODING: - // AMF0 Object Encoding - $targetURI = $body->getTargetURI(); - $message = ''; - - // Split the target string into its values. - $source = substr($targetURI, 0, strrpos($targetURI, '.')); - - if ($source) { - // Break off method name from namespace into source - $method = substr(strrchr($targetURI, '.'), 1); - $return = $this->_dispatch($method, $body->getData(), $source); - } else { - // Just have a method name. - $return = $this->_dispatch($targetURI, $body->getData()); - } - break; - case Zend_Amf_Constants::AMF3_OBJECT_ENCODING: - default: - // AMF3 read message type - $message = $body->getData(); - if ($message instanceof Zend_Amf_Value_Messaging_CommandMessage) { - // async call with command message - $return = $this->_loadCommandMessage($message); - } elseif ($message instanceof Zend_Amf_Value_Messaging_RemotingMessage) { - $return = new Zend_Amf_Value_Messaging_AcknowledgeMessage($message); - $return->body = $this->_dispatch($message->operation, $message->body, $message->source); - } else { - // Amf3 message sent with netConnection - $targetURI = $body->getTargetURI(); - - // Split the target string into its values. - $source = substr($targetURI, 0, strrpos($targetURI, '.')); - - if ($source) { - // Break off method name from namespace into source - $method = substr(strrchr($targetURI, '.'), 1); - $return = $this->_dispatch($method, $body->getData(), $source); - } else { - // Just have a method name. - $return = $this->_dispatch($targetURI, $body->getData()); - } - } - break; - } - $responseType = Zend_AMF_Constants::RESULT_METHOD; - } catch (Exception $e) { - $return = $this->_errorMessage($objectEncoding, $message, - $e->getMessage(), $e->getTraceAsString(),$e->getCode(), $e->getLine()); - $responseType = Zend_AMF_Constants::STATUS_METHOD; - } - - $responseURI = $body->getResponseURI() . $responseType; - $newBody = new Zend_Amf_Value_MessageBody($responseURI, null, $return); - $response->addAmfBody($newBody); - } - // Add a session header to the body if session is requested. - if($this->isSession()) { - $currentID = session_id(); - $joint = "?"; - if(isset($_SERVER['QUERY_STRING'])) { - if(!strpos($_SERVER['QUERY_STRING'], $currentID) !== FALSE) { - if(strrpos($_SERVER['QUERY_STRING'], "?") !== FALSE) { - $joint = "&"; - } - } - } - - // create a new AMF message header with the session id as a variable. - $sessionValue = $joint . $this->_sessionName . "=" . $currentID; - $sessionHeader = new Zend_Amf_Value_MessageHeader(Zend_Amf_Constants::URL_APPEND_HEADER, false, $sessionValue); - $response->addAmfHeader($sessionHeader); - } - - // serialize the response and return serialized body. - $response->finalize(); - } - - /** - * Handle an AMF call from the gateway. - * - * @param null|Zend_Amf_Request $request Optional - * @return Zend_Amf_Response - */ - public function handle($request = null) - { - // Check if request was passed otherwise get it from the server - if ($request === null || !$request instanceof Zend_Amf_Request) { - $request = $this->getRequest(); - } else { - $this->setRequest($request); - } - if ($this->isSession()) { - // Check if a session is being sent from the amf call - if (isset($_COOKIE[$this->_sessionName])) { - session_id($_COOKIE[$this->_sessionName]); - } - } - - // Check for errors that may have happend in deserialization of Request. - try { - // Take converted PHP objects and handle service call. - // Serialize to Zend_Amf_response for output stream - $this->_handle($request); - $response = $this->getResponse(); - } catch (Exception $e) { - // Handle any errors in the serialization and service calls. - throw new Zend_Amf_Server_Exception('Handle error: ' . $e->getMessage() . ' ' . $e->getLine(), 0, $e); - } - - // Return the Amf serialized output string - return $response; - } - - /** - * Set request object - * - * @param string|Zend_Amf_Request $request - * @return Zend_Amf_Server - */ - public function setRequest($request) - { - if (is_string($request) && class_exists($request)) { - $request = new $request(); - if (!$request instanceof Zend_Amf_Request) { - throw new Zend_Amf_Server_Exception('Invalid request class'); - } - } elseif (!$request instanceof Zend_Amf_Request) { - throw new Zend_Amf_Server_Exception('Invalid request object'); - } - $this->_request = $request; - return $this; - } - - /** - * Return currently registered request object - * - * @return null|Zend_Amf_Request - */ - public function getRequest() - { - if (null === $this->_request) { - $this->setRequest(new Zend_Amf_Request_Http()); - } - - return $this->_request; - } - - /** - * Public access method to private Zend_Amf_Server_Response reference - * - * @param string|Zend_Amf_Server_Response $response - * @return Zend_Amf_Server - */ - public function setResponse($response) - { - if (is_string($response) && class_exists($response)) { - $response = new $response(); - if (!$response instanceof Zend_Amf_Response) { - throw new Zend_Amf_Server_Exception('Invalid response class'); - } - } elseif (!$response instanceof Zend_Amf_Response) { - throw new Zend_Amf_Server_Exception('Invalid response object'); - } - $this->_response = $response; - return $this; - } - - /** - * get a reference to the Zend_Amf_response instance - * - * @return Zend_Amf_Server_Response - */ - public function getResponse() - { - if (null === ($response = $this->_response)) { - $this->setResponse(new Zend_Amf_Response_Http()); - } - return $this->_response; - } - - /** - * Attach a class or object to the server - * - * Class may be either a class name or an instantiated object. Reflection - * is done on the class or object to determine the available public - * methods, and each is attached to the server as and available method. If - * a $namespace has been provided, that namespace is used to prefix - * AMF service call. - * - * @param string|object $class - * @param string $namespace Optional - * @param mixed $arg Optional arguments to pass to a method - * @return Zend_Amf_Server - * @throws Zend_Amf_Server_Exception on invalid input - */ - public function setClass($class, $namespace = '', $argv = null) - { - if (is_string($class) && !class_exists($class)){ - throw new Zend_Amf_Server_Exception('Invalid method or class'); - } elseif (!is_string($class) && !is_object($class)) { - throw new Zend_Amf_Server_Exception('Invalid method or class; must be a classname or object'); - } - - $argv = null; - if (2 < func_num_args()) { - $argv = array_slice(func_get_args(), 2); - } - - // Use the class name as the name space by default. - - if ($namespace == '') { - $namespace = is_object($class) ? get_class($class) : $class; - } - - $this->_classAllowed[is_object($class) ? get_class($class) : $class] = true; - - $this->_methods[] = Zend_Server_Reflection::reflectClass($class, $argv, $namespace); - $this->_buildDispatchTable(); - - return $this; - } - - /** - * Attach a function to the server - * - * Additional arguments to pass to the function at dispatch may be passed; - * any arguments following the namespace will be aggregated and passed at - * dispatch time. - * - * @param string|array $function Valid callback - * @param string $namespace Optional namespace prefix - * @return Zend_Amf_Server - * @throws Zend_Amf_Server_Exception - */ - public function addFunction($function, $namespace = '') - { - if (!is_string($function) && !is_array($function)) { - throw new Zend_Amf_Server_Exception('Unable to attach function'); - } - - $argv = null; - if (2 < func_num_args()) { - $argv = array_slice(func_get_args(), 2); - } - - $function = (array) $function; - foreach ($function as $func) { - if (!is_string($func) || !function_exists($func)) { - throw new Zend_Amf_Server_Exception('Unable to attach function'); - } - $this->_methods[] = Zend_Server_Reflection::reflectFunction($func, $argv, $namespace); - } - - $this->_buildDispatchTable(); - return $this; - } - - - /** - * Creates an array of directories in which services can reside. - * TODO: add support for prefixes? - * - * @param string $dir - */ - public function addDirectory($dir) - { - $this->getLoader()->addPrefixPath("", $dir); - } - - /** - * Returns an array of directories that can hold services. - * - * @return array - */ - public function getDirectory() - { - return $this->getLoader()->getPaths(""); - } - - /** - * (Re)Build the dispatch table - * - * The dispatch table consists of a an array of method name => - * Zend_Server_Reflection_Function_Abstract pairs - * - * @return void - */ - protected function _buildDispatchTable() - { - $table = array(); - foreach ($this->_methods as $key => $dispatchable) { - if ($dispatchable instanceof Zend_Server_Reflection_Function_Abstract) { - $ns = $dispatchable->getNamespace(); - $name = $dispatchable->getName(); - $name = empty($ns) ? $name : $ns . '.' . $name; - - if (isset($table[$name])) { - throw new Zend_Amf_Server_Exception('Duplicate method registered: ' . $name); - } - $table[$name] = $dispatchable; - continue; - } - - if ($dispatchable instanceof Zend_Server_Reflection_Class) { - foreach ($dispatchable->getMethods() as $method) { - $ns = $method->getNamespace(); - $name = $method->getName(); - $name = empty($ns) ? $name : $ns . '.' . $name; - - if (isset($table[$name])) { - throw new Zend_Amf_Server_Exception('Duplicate method registered: ' . $name); - } - $table[$name] = $method; - continue; - } - } - } - $this->_table = $table; - } - - - - /** - * Raise a server fault - * - * Unimplemented - * - * @param string|Exception $fault - * @return void - */ - public function fault($fault = null, $code = 404) - { - } - - /** - * Returns a list of registered methods - * - * Returns an array of dispatchables (Zend_Server_Reflection_Function, - * _Method, and _Class items). - * - * @return array - */ - public function getFunctions() - { - return $this->_table; - } - - /** - * Set server persistence - * - * Unimplemented - * - * @param mixed $mode - * @return void - */ - public function setPersistence($mode) - { - } - - /** - * Load server definition - * - * Unimplemented - * - * @param array $definition - * @return void - */ - public function loadFunctions($definition) - { - } - - /** - * Map ActionScript classes to PHP classes - * - * @param string $asClass - * @param string $phpClass - * @return Zend_Amf_Server - */ - public function setClassMap($asClass, $phpClass) - { - Zend_Amf_Parse_TypeLoader::setMapping($asClass, $phpClass); - return $this; - } - - /** - * List all available methods - * - * Returns an array of method names. - * - * @return array - */ - public function listMethods() - { - return array_keys($this->_table); - } - - /** - * Cast parameters - * - * Takes the provided parameters from the request, and attempts to cast them - * to objects, if the prototype defines any as explicit object types - * - * @param Reflection $reflectionMethod - * @param array $params - * @return array - */ - protected function _castParameters($reflectionMethod, array $params) - { - $prototypes = $reflectionMethod->getPrototypes(); - $nonObjectTypes = array( - 'null', - 'mixed', - 'void', - 'unknown', - 'bool', - 'boolean', - 'number', - 'int', - 'integer', - 'double', - 'float', - 'string', - 'array', - 'object', - 'stdclass', - ); - $types = array(); - foreach ($prototypes as $prototype) { - foreach ($prototype->getParameters() as $parameter) { - $type = $parameter->getType(); - if (in_array(strtolower($type), $nonObjectTypes)) { - continue; - } - $position = $parameter->getPosition(); - $types[$position] = $type; - } - } - - if (empty($types)) { - return $params; - } - - foreach ($params as $position => $value) { - if (!isset($types[$position])) { - // No specific type to cast to? done - continue; - } - - $type = $types[$position]; - - if (!class_exists($type)) { - // Not a class, apparently. done - continue; - } - - if ($value instanceof $type) { - // Already of the right type? done - continue; - } - - if (!is_array($value) && !is_object($value)) { - // Can't cast scalars to objects easily; done - continue; - } - - // Create instance, and loop through value to set - $object = new $type; - foreach ($value as $property => $defined) { - $object->{$property} = $defined; - } - - $params[$position] = $object; - } - - return $params; - } -} diff --git a/library/vendor/Zend/Amf/Util/BinaryStream.php b/library/vendor/Zend/Amf/Util/BinaryStream.php deleted file mode 100644 index 9f0aa83b9..000000000 --- a/library/vendor/Zend/Amf/Util/BinaryStream.php +++ /dev/null @@ -1,294 +0,0 @@ -_stream = $stream; - $this->_needle = 0; - $this->_mbStringFunctionsOverloaded = function_exists('mb_strlen') && (ini_get('mbstring.func_overload') !== '') && ((int)ini_get('mbstring.func_overload') & 2); - $this->_streamLength = $this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream); - $this->_bigEndian = (pack('l', 1) === "\x00\x00\x00\x01"); - } - - /** - * Returns the current stream - * - * @return string - */ - public function getStream() - { - return $this->_stream; - } - - /** - * Read the number of bytes in a row for the length supplied. - * - * @todo Should check that there are enough bytes left in the stream we are about to read. - * @param int $length - * @return string - * @throws Zend_Amf_Exception for buffer underrun - */ - public function readBytes($length) - { - if (($length + $this->_needle) > $this->_streamLength) { - throw new Zend_Amf_Exception('Buffer underrun at needle position: ' . $this->_needle . ' while requesting length: ' . $length); - } - $bytes = $this->_mbStringFunctionsOverloaded ? mb_substr($this->_stream, $this->_needle, $length, '8bit') : substr($this->_stream, $this->_needle, $length); - $this->_needle+= $length; - return $bytes; - } - - /** - * Write any length of bytes to the stream - * - * Usually a string. - * - * @param string $bytes - * @return Zend_Amf_Util_BinaryStream - */ - public function writeBytes($bytes) - { - $this->_stream.= $bytes; - return $this; - } - - /** - * Reads a signed byte - * - * @return int Value is in the range of -128 to 127. - * @throws Zend_Amf_Exception - */ - public function readByte() - { - if (($this->_needle + 1) > $this->_streamLength) { - throw new Zend_Amf_Exception( - 'Buffer underrun at needle position: ' - . $this->_needle - . ' while requesting length: ' - . $this->_streamLength - ); - } - - return ord($this->_stream{$this->_needle++}); - } - - /** - * Writes the passed string into a signed byte on the stream. - * - * @param string $stream - * @return Zend_Amf_Util_BinaryStream - */ - public function writeByte($stream) - { - $this->_stream.= pack('c', $stream); - return $this; - } - - /** - * Reads a signed 32-bit integer from the data stream. - * - * @return int Value is in the range of -2147483648 to 2147483647 - */ - public function readInt() - { - return ($this->readByte() << 8) + $this->readByte(); - } - - /** - * Write an the integer to the output stream as a 32 bit signed integer - * - * @param int $stream - * @return Zend_Amf_Util_BinaryStream - */ - public function writeInt($stream) - { - $this->_stream.= pack('n', $stream); - return $this; - } - - /** - * Reads a UTF-8 string from the data stream - * - * @return string A UTF-8 string produced by the byte representation of characters - */ - public function readUtf() - { - $length = $this->readInt(); - return $this->readBytes($length); - } - - /** - * Wite a UTF-8 string to the outputstream - * - * @param string $stream - * @return Zend_Amf_Util_BinaryStream - */ - public function writeUtf($stream) - { - $this->writeInt($this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream)); - $this->_stream.= $stream; - return $this; - } - - - /** - * Read a long UTF string - * - * @return string - */ - public function readLongUtf() - { - $length = $this->readLong(); - return $this->readBytes($length); - } - - /** - * Write a long UTF string to the buffer - * - * @param string $stream - * @return Zend_Amf_Util_BinaryStream - */ - public function writeLongUtf($stream) - { - $this->writeLong($this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream)); - $this->_stream.= $stream; - } - - /** - * Read a long numeric value - * - * @return double - */ - public function readLong() - { - return ($this->readByte() << 24) + ($this->readByte() << 16) + ($this->readByte() << 8) + $this->readByte(); - } - - /** - * Write long numeric value to output stream - * - * @param int|string $stream - * @return Zend_Amf_Util_BinaryStream - */ - public function writeLong($stream) - { - $this->_stream.= pack('N', $stream); - return $this; - } - - /** - * Read a 16 bit unsigned short. - * - * @todo This could use the unpack() w/ S,n, or v - * @return double - */ - public function readUnsignedShort() - { - $byte1 = $this->readByte(); - $byte2 = $this->readByte(); - return (($byte1 << 8) | $byte2); - } - - /** - * Reads an IEEE 754 double-precision floating point number from the data stream. - * - * @return double Floating point number - */ - public function readDouble() - { - $bytes = $this->_mbStringFunctionsOverloaded ? mb_substr($this->_stream, $this->_needle, 8, '8bit') : substr($this->_stream, $this->_needle, 8); - $this->_needle+= 8; - - if (!$this->_bigEndian) { - $bytes = strrev($bytes); - } - - $double = unpack('dflt', $bytes); - return $double['flt']; - } - - /** - * Writes an IEEE 754 double-precision floating point number from the data stream. - * - * @param string|double $stream - * @return Zend_Amf_Util_BinaryStream - */ - public function writeDouble($stream) - { - $stream = pack('d', $stream); - if (!$this->_bigEndian) { - $stream = strrev($stream); - } - $this->_stream.= $stream; - return $this; - } - -} diff --git a/library/vendor/Zend/Amf/Value/MessageBody.php b/library/vendor/Zend/Amf/Value/MessageBody.php deleted file mode 100644 index 55b3fe5ba..000000000 --- a/library/vendor/Zend/Amf/Value/MessageBody.php +++ /dev/null @@ -1,182 +0,0 @@ - - * This Message structure defines how a local client would - * invoke a method/operation on a remote server. Additionally, - * the response from the Server is structured identically. - * - * @package Zend_Amf - * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -class Zend_Amf_Value_MessageBody -{ - /** - * A string describing which operation, function, or method - * is to be remotley invoked. - * @var string - */ - protected $_targetUri = ""; - - /** - * Universal Resource Identifier that uniquely targets the originator's - * Object that should receive the server's response. The server will - * use this path specification to target the "OnResult()" or "onStatus()" - * handlers within the client. For Flash, it specifies an ActionScript - * Object path only. The NetResponse object pointed to by the Response Uri - * contains the connection state information. Passing/specifying this - * provides a convenient mechanism for the client/server to share access - * to an object that is managing the state of the shared connection. - * - * Since the server will use this field in the event of an error, - * this field is required even if a successful server request would - * not be expected to return a value to the client. - * - * @var string - */ - protected $_responseUri = ""; - - /** - * Contains the actual data associated with the operation. It contains - * the client's parameter data that is passed to the server's operation/method. - * When serializing a root level data type or a parameter list array, no - * name field is included. That is, the data is anonomously represented - * as "Type Marker"/"Value" pairs. When serializing member data, the data is - * represented as a series of "Name"/"Type"/"Value" combinations. - * - * For server generated responses, it may contain any ActionScript - * data/objects that the server was expected to provide. - * - * @var string - */ - protected $_data; - - /** - * Constructor - * - * @param string $targetUri - * @param string $responseUri - * @param string $data - * @return void - */ - public function __construct($targetUri, $responseUri, $data) - { - $this->setTargetUri($targetUri); - $this->setResponseUri($responseUri); - $this->setData($data); - } - - /** - * Retrieve target Uri - * - * @return string - */ - public function getTargetUri() - { - return $this->_targetUri; - } - - /** - * Set target Uri - * - * @param string $targetUri - * @return Zend_Amf_Value_MessageBody - */ - public function setTargetUri($targetUri) - { - if (null === $targetUri) { - $targetUri = ''; - } - $this->_targetUri = (string) $targetUri; - return $this; - } - - /** - * Get target Uri - * - * @return string - */ - public function getResponseUri() - { - return $this->_responseUri; - } - - /** - * Set response Uri - * - * @param string $responseUri - * @return Zend_Amf_Value_MessageBody - */ - public function setResponseUri($responseUri) - { - if (null === $responseUri) { - $responseUri = ''; - } - $this->_responseUri = $responseUri; - return $this; - } - - /** - * Retrieve response data - * - * @return string - */ - public function getData() - { - return $this->_data; - } - - /** - * Set response data - * - * @param mixed $data - * @return Zend_Amf_Value_MessageBody - */ - public function setData($data) - { - $this->_data = $data; - return $this; - } - - /** - * Set reply method - * - * @param string $methodName - * @return Zend_Amf_Value_MessageBody - */ - public function setReplyMethod($methodName) - { - if (!preg_match('#^[/?]#', $methodName)) { - $this->_targetUri = rtrim($this->_targetUri, '/') . '/'; - } - $this->_targetUri = $this->_targetUri . $methodName; - return $this; - } -} diff --git a/library/vendor/Zend/Amf/Value/MessageHeader.php b/library/vendor/Zend/Amf/Value/MessageHeader.php deleted file mode 100644 index 9b0a49fb9..000000000 --- a/library/vendor/Zend/Amf/Value/MessageHeader.php +++ /dev/null @@ -1,81 +0,0 @@ -name = $name; - $this->mustRead = (bool) $mustRead; - $this->data = $data; - if (null !== $length) { - $this->length = (int) $length; - } - } -} diff --git a/library/vendor/Zend/Amf/Value/Messaging/AbstractMessage.php b/library/vendor/Zend/Amf/Value/Messaging/AbstractMessage.php deleted file mode 100644 index f832f9390..000000000 --- a/library/vendor/Zend/Amf/Value/Messaging/AbstractMessage.php +++ /dev/null @@ -1,92 +0,0 @@ -clientId = $this->generateId(); - $this->destination = null; - $this->messageId = $this->generateId(); - $this->timestamp = time().'00'; - $this->timeToLive = 0; - $this->headers = new STDClass(); - $this->body = null; - - // correleate the two messages - if ($message && isset($message->messageId)) { - $this->correlationId = $message->messageId; - } - } -} diff --git a/library/vendor/Zend/Amf/Value/Messaging/ArrayCollection.php b/library/vendor/Zend/Amf/Value/Messaging/ArrayCollection.php deleted file mode 100644 index 8b1933e10..000000000 --- a/library/vendor/Zend/Amf/Value/Messaging/ArrayCollection.php +++ /dev/null @@ -1,35 +0,0 @@ -body - * of the message. - */ - const LOGIN_OPERATION = 8; - - /** - * This operation is used to log the user out of the current channel, and - * will invalidate the server session if the channel is HTTP based. - */ - const LOGOUT_OPERATION = 9; - - /** - * This operation is used to indicate that the client's subscription to a - * remote destination has been invalidated. - */ - const SESSION_INVALIDATE_OPERATION = 10; - - /** - * This operation is used by the MultiTopicConsumer to subscribe/unsubscribe - * from multiple subtopics/selectors in the same message. - */ - const MULTI_SUBSCRIBE_OPERATION = 11; - - /** - * This operation is used to indicate that a channel has disconnected - */ - const DISCONNECT_OPERATION = 12; - - /** - * This is the default operation for new CommandMessage instances. - */ - const UNKNOWN_OPERATION = 10000; - - /** - * The operation to execute for messages of this type - * @var int - */ - public $operation = self::UNKNOWN_OPERATION; -} diff --git a/library/vendor/Zend/Amf/Value/Messaging/ErrorMessage.php b/library/vendor/Zend/Amf/Value/Messaging/ErrorMessage.php deleted file mode 100644 index beb93300c..000000000 --- a/library/vendor/Zend/Amf/Value/Messaging/ErrorMessage.php +++ /dev/null @@ -1,66 +0,0 @@ -clientId = $this->generateId(); - $this->destination = null; - $this->messageId = $this->generateId(); - $this->timestamp = time().'00'; - $this->timeToLive = 0; - $this->headers = new stdClass(); - $this->body = null; - } -} diff --git a/library/vendor/Zend/Amf/Value/TraitsInfo.php b/library/vendor/Zend/Amf/Value/TraitsInfo.php deleted file mode 100644 index f048b946a..000000000 --- a/library/vendor/Zend/Amf/Value/TraitsInfo.php +++ /dev/null @@ -1,154 +0,0 @@ -_className = $className; - $this->_dynamic = $dynamic; - $this->_externalizable = $externalizable; - $this->_properties = $properties; - } - - /** - * Test if the class is a dynamic class - * - * @return boolean - */ - public function isDynamic() - { - return $this->_dynamic; - } - - /** - * Test if class is externalizable - * - * @return boolean - */ - public function isExternalizable() - { - return $this->_externalizable; - } - - /** - * Return the number of properties in the class - * - * @return int - */ - public function length() - { - return count($this->_properties); - } - - /** - * Return the class name - * - * @return string - */ - public function getClassName() - { - return $this->_className; - } - - /** - * Add an additional property - * - * @param string $name - * @return Zend_Amf_Value_TraitsInfo - */ - public function addProperty($name) - { - $this->_properties[] = $name; - return $this; - } - - /** - * Add all properties of the class. - * - * @param array $props - * @return Zend_Amf_Value_TraitsInfo - */ - public function addAllProperties(array $props) - { - $this->_properties = $props; - return $this; - } - - /** - * Get the property at a given index - * - * @param int $index - * @return string - */ - public function getProperty($index) - { - return $this->_properties[(int) $index]; - } - - /** - * Return all properties of the class. - * - * @return array - */ - public function getAllProperties() - { - return $this->_properties; - } -} diff --git a/library/vendor/Zend/Application.php b/library/vendor/Zend/Application.php index fcb9a1c45..0bab62ba6 100644 --- a/library/vendor/Zend/Application.php +++ b/library/vendor/Zend/Application.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Application - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Application - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application @@ -70,14 +70,16 @@ class Zend_Application * * @param string $environment * @param string|array|Zend_Config $options String path to configuration file, or array/Zend_Config of configuration options + * @param bool $suppressNotFoundWarnings Should warnings be suppressed when a file is not found during autoloading? * @throws Zend_Application_Exception When invalid options are provided * @return void */ - public function __construct($environment, $options = null) + public function __construct($environment, $options = null, $suppressNotFoundWarnings = null) { $this->_environment = (string) $environment; $this->_autoloader = Zend_Loader_Autoloader::getInstance(); + $this->_autoloader->suppressNotFoundWarnings($suppressNotFoundWarnings); if (null !== $options) { if (is_string($options)) { @@ -85,7 +87,10 @@ class Zend_Application } elseif ($options instanceof Zend_Config) { $options = $options->toArray(); } elseif (!is_array($options)) { - throw new Zend_Application_Exception('Invalid options provided; must be location of config file, a config object, or an array'); + throw new Zend_Application_Exception( + 'Invalid options provided; must be location of config file,' + . ' a config object, or an array' + ); } $this->setOptions($options); @@ -126,11 +131,15 @@ class Zend_Application if (is_array($options['config'])) { $_options = array(); foreach ($options['config'] as $tmp) { - $_options = $this->mergeOptions($_options, $this->_loadConfig($tmp)); + $_options = $this->mergeOptions( + $_options, $this->_loadConfig($tmp) + ); } $options = $this->mergeOptions($_options, $options); } else { - $options = $this->mergeOptions($this->_loadConfig($options['config']), $options); + $options = $this->mergeOptions( + $this->_loadConfig($options['config']), $options + ); } } @@ -170,7 +179,9 @@ class Zend_Application $this->setBootstrap($bootstrap); } elseif (is_array($bootstrap)) { if (empty($bootstrap['path'])) { - throw new Zend_Application_Exception('No bootstrap path provided'); + throw new Zend_Application_Exception( + 'No bootstrap path provided' + ); } $path = $bootstrap['path']; @@ -182,7 +193,9 @@ class Zend_Application $this->setBootstrap($path, $class); } else { - throw new Zend_Application_Exception('Invalid bootstrap information provided'); + throw new Zend_Application_Exception( + 'Invalid bootstrap information provided' + ); } } @@ -317,13 +330,18 @@ class Zend_Application if (!class_exists($class, false)) { if (!class_exists($class, false)) { - throw new Zend_Application_Exception('Bootstrap class not found'); + throw new Zend_Application_Exception( + 'Bootstrap class not found' + ); } } $this->_bootstrap = new $class($this); if (!$this->_bootstrap instanceof Zend_Application_Bootstrap_Bootstrapper) { - throw new Zend_Application_Exception('Bootstrap class does not implement Zend_Application_Bootstrap_Bootstrapper'); + throw new Zend_Application_Exception( + 'Bootstrap class does not implement' + . ' Zend_Application_Bootstrap_Bootstrapper' + ); } return $this; @@ -401,13 +419,18 @@ class Zend_Application case 'inc': $config = include $file; if (!is_array($config)) { - throw new Zend_Application_Exception('Invalid configuration file provided; PHP file does not return array value'); + throw new Zend_Application_Exception( + 'Invalid configuration file provided; PHP file does not' + . ' return array value' + ); } return $config; break; default: - throw new Zend_Application_Exception('Invalid configuration file provided; unknown config type'); + throw new Zend_Application_Exception( + 'Invalid configuration file provided; unknown config type' + ); } return $config->toArray(); diff --git a/library/vendor/Zend/Application/Bootstrap/Bootstrap.php b/library/vendor/Zend/Application/Bootstrap/Bootstrap.php index a62c78fcc..ffab23d9c 100644 --- a/library/vendor/Zend/Application/Bootstrap/Bootstrap.php +++ b/library/vendor/Zend/Application/Bootstrap/Bootstrap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Bootstrap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Application * @subpackage Bootstrap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Bootstrap_Bootstrap @@ -63,9 +63,13 @@ class Zend_Application_Bootstrap_Bootstrap parent::__construct($application); if ($application->hasOption('resourceloader')) { - $this->setOptions(array( - 'resourceloader' => $application->getOption('resourceloader') - )); + $this->setOptions( + array( + 'resourceloader' => $application->getOption( + 'resourceloader' + ) + ) + ); } $this->getResourceLoader(); @@ -127,10 +131,14 @@ class Zend_Application_Bootstrap_Bootstrap ) { $r = new ReflectionClass($this); $path = $r->getFileName(); - $this->setResourceLoader(new Zend_Application_Module_Autoloader(array( - 'namespace' => $namespace, - 'basePath' => dirname($path), - ))); + $this->setResourceLoader( + new Zend_Application_Module_Autoloader( + array( + 'namespace' => $namespace, + 'basePath' => dirname($path), + ) + ) + ); } return $this->_resourceLoader; } diff --git a/library/vendor/Zend/Application/Bootstrap/BootstrapAbstract.php b/library/vendor/Zend/Application/Bootstrap/BootstrapAbstract.php index 055266e74..2b1477cf4 100644 --- a/library/vendor/Zend/Application/Bootstrap/BootstrapAbstract.php +++ b/library/vendor/Zend/Application/Bootstrap/BootstrapAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Bootstrap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Application * @subpackage Bootstrap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Application_Bootstrap_BootstrapAbstract diff --git a/library/vendor/Zend/Application/Bootstrap/Bootstrapper.php b/library/vendor/Zend/Application/Bootstrap/Bootstrapper.php index 9ea7c784f..edf56d15e 100644 --- a/library/vendor/Zend/Application/Bootstrap/Bootstrapper.php +++ b/library/vendor/Zend/Application/Bootstrap/Bootstrapper.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Bootstrap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Application * @subpackage Bootstrap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Application_Bootstrap_Bootstrapper diff --git a/library/vendor/Zend/Application/Bootstrap/Exception.php b/library/vendor/Zend/Application/Bootstrap/Exception.php index a7e0bf5b6..d0d3eaeb5 100644 --- a/library/vendor/Zend/Application/Bootstrap/Exception.php +++ b/library/vendor/Zend/Application/Bootstrap/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Application - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Application * @uses Zend_Application_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Bootstrap_Exception extends Zend_Application_Exception diff --git a/library/vendor/Zend/Application/Bootstrap/ResourceBootstrapper.php b/library/vendor/Zend/Application/Bootstrap/ResourceBootstrapper.php index 449ee6e98..5421a94d6 100644 --- a/library/vendor/Zend/Application/Bootstrap/ResourceBootstrapper.php +++ b/library/vendor/Zend/Application/Bootstrap/ResourceBootstrapper.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Bootstrap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Application * @subpackage Bootstrap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Application_Bootstrap_ResourceBootstrapper diff --git a/library/vendor/Zend/Application/Exception.php b/library/vendor/Zend/Application/Exception.php index e8fb96169..c53061620 100644 --- a/library/vendor/Zend/Application/Exception.php +++ b/library/vendor/Zend/Application/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Application - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @uses Zend_Exception * @category Zend * @package Zend_Application - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Application/Module/Autoloader.php b/library/vendor/Zend/Application/Module/Autoloader.php index b2fe6248a..66b45eb81 100644 --- a/library/vendor/Zend/Application/Module/Autoloader.php +++ b/library/vendor/Zend/Application/Module/Autoloader.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Module - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Application * @subpackage Module - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource @@ -53,40 +53,42 @@ class Zend_Application_Module_Autoloader extends Zend_Loader_Autoloader_Resource public function initDefaultResourceTypes() { $basePath = $this->getBasePath(); - $this->addResourceTypes(array( - 'dbtable' => array( - 'namespace' => 'Model_DbTable', - 'path' => 'models/DbTable', - ), - 'mappers' => array( - 'namespace' => 'Model_Mapper', - 'path' => 'models/mappers', - ), - 'form' => array( - 'namespace' => 'Form', - 'path' => 'forms', - ), - 'model' => array( - 'namespace' => 'Model', - 'path' => 'models', - ), - 'plugin' => array( - 'namespace' => 'Plugin', - 'path' => 'plugins', - ), - 'service' => array( - 'namespace' => 'Service', - 'path' => 'services', - ), - 'viewhelper' => array( - 'namespace' => 'View_Helper', - 'path' => 'views/helpers', - ), - 'viewfilter' => array( - 'namespace' => 'View_Filter', - 'path' => 'views/filters', - ), - )); + $this->addResourceTypes( + array( + 'dbtable' => array( + 'namespace' => 'Model_DbTable', + 'path' => 'models/DbTable', + ), + 'mappers' => array( + 'namespace' => 'Model_Mapper', + 'path' => 'models/mappers', + ), + 'form' => array( + 'namespace' => 'Form', + 'path' => 'forms', + ), + 'model' => array( + 'namespace' => 'Model', + 'path' => 'models', + ), + 'plugin' => array( + 'namespace' => 'Plugin', + 'path' => 'plugins', + ), + 'service' => array( + 'namespace' => 'Service', + 'path' => 'services', + ), + 'viewhelper' => array( + 'namespace' => 'View_Helper', + 'path' => 'views/helpers', + ), + 'viewfilter' => array( + 'namespace' => 'View_Filter', + 'path' => 'views/filters', + ), + ) + ); $this->setDefaultResourceType('model'); } } diff --git a/library/vendor/Zend/Application/Module/Bootstrap.php b/library/vendor/Zend/Application/Module/Bootstrap.php index 1dfe6b4e5..a5d2c8971 100644 --- a/library/vendor/Zend/Application/Module/Bootstrap.php +++ b/library/vendor/Zend/Application/Module/Bootstrap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Module - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Module - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Application_Module_Bootstrap diff --git a/library/vendor/Zend/Application/Resource/Cachemanager.php b/library/vendor/Zend/Application/Resource/Cachemanager.php index c52f58d9d..490ab073d 100644 --- a/library/vendor/Zend/Application/Resource/Cachemanager.php +++ b/library/vendor/Zend/Application/Resource/Cachemanager.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Cachemanager extends Zend_Application_Resource_ResourceAbstract diff --git a/library/vendor/Zend/Application/Resource/Db.php b/library/vendor/Zend/Application/Resource/Db.php index 420140336..55137c438 100644 --- a/library/vendor/Zend/Application/Resource/Db.php +++ b/library/vendor/Zend/Application/Resource/Db.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Db extends Zend_Application_Resource_ResourceAbstract diff --git a/library/vendor/Zend/Application/Resource/Dojo.php b/library/vendor/Zend/Application/Resource/Dojo.php index 34bd2f8ff..94c39cb71 100644 --- a/library/vendor/Zend/Application/Resource/Dojo.php +++ b/library/vendor/Zend/Application/Resource/Dojo.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Dojo diff --git a/library/vendor/Zend/Application/Resource/Exception.php b/library/vendor/Zend/Application/Resource/Exception.php index cc0e8346a..f657cc481 100644 --- a/library/vendor/Zend/Application/Resource/Exception.php +++ b/library/vendor/Zend/Application/Resource/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Exception extends Zend_Application_Exception diff --git a/library/vendor/Zend/Application/Resource/Frontcontroller.php b/library/vendor/Zend/Application/Resource/Frontcontroller.php index edba1b11d..3062118ad 100644 --- a/library/vendor/Zend/Application/Resource/Frontcontroller.php +++ b/library/vendor/Zend/Application/Resource/Frontcontroller.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resource_ResourceAbstract @@ -71,7 +71,7 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc if (is_string($value)) { $front->addModuleDirectory($value); } elseif (is_array($value)) { - foreach($value as $moduleDir) { + foreach ($value as $moduleDir) { $front->addModuleDirectory($moduleDir); } } @@ -102,11 +102,10 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc case 'plugins': foreach ((array) $value as $pluginClass) { $stackIndex = null; - if(is_array($pluginClass)) { + if (is_array($pluginClass)) { $pluginClass = array_change_key_case($pluginClass, CASE_LOWER); - if(isset($pluginClass['class'])) - { - if(isset($pluginClass['stackindex'])) { + if (isset($pluginClass['class'])) { + if (isset($pluginClass['stackindex'])) { $stackIndex = $pluginClass['stackindex']; } @@ -136,7 +135,7 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc break; case 'dispatcher': - if(!isset($value['class'])) { + if (!isset($value['class'])) { throw new Zend_Application_Exception('You must specify both '); } if (!isset($value['params'])) { @@ -144,7 +143,7 @@ class Zend_Application_Resource_Frontcontroller extends Zend_Application_Resourc } $dispatchClass = $value['class']; - if(!class_exists($dispatchClass)) { + if (!class_exists($dispatchClass)) { throw new Zend_Application_Exception('Dispatcher class not found!'); } $front->setDispatcher(new $dispatchClass((array)$value['params'])); diff --git a/library/vendor/Zend/Application/Resource/Layout.php b/library/vendor/Zend/Application/Resource/Layout.php index 59b0baffe..32cd6bbca 100644 --- a/library/vendor/Zend/Application/Resource/Layout.php +++ b/library/vendor/Zend/Application/Resource/Layout.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Layout diff --git a/library/vendor/Zend/Application/Resource/Locale.php b/library/vendor/Zend/Application/Resource/Locale.php index bd6853cbc..0e4533908 100644 --- a/library/vendor/Zend/Application/Resource/Locale.php +++ b/library/vendor/Zend/Application/Resource/Locale.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Locale @@ -67,9 +67,9 @@ class Zend_Application_Resource_Locale if (!isset($options['default'])) { $this->_locale = new Zend_Locale(); - } elseif(!isset($options['force']) || - (bool) $options['force'] == false) - { + } elseif (!isset($options['force']) + || (bool)$options['force'] == false + ) { // Don't force any locale, just go for auto detection Zend_Locale::setDefault($options['default']); $this->_locale = new Zend_Locale(); diff --git a/library/vendor/Zend/Application/Resource/Log.php b/library/vendor/Zend/Application/Resource/Log.php index 06f2bca35..a1e9d8475 100644 --- a/library/vendor/Zend/Application/Resource/Log.php +++ b/library/vendor/Zend/Application/Resource/Log.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Log diff --git a/library/vendor/Zend/Application/Resource/Mail.php b/library/vendor/Zend/Application/Resource/Mail.php index 8a86571d4..5ab8d1992 100644 --- a/library/vendor/Zend/Application/Resource/Mail.php +++ b/library/vendor/Zend/Application/Resource/Mail.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceAbstract @@ -42,7 +42,8 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA */ protected $_transport; - public function init() { + public function init() + { return $this->getMail(); } @@ -54,21 +55,21 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA { if (null === $this->_transport) { $options = $this->getOptions(); - foreach($options as $key => $option) { + foreach ($options as $key => $option) { $options[strtolower($key)] = $option; } $this->setOptions($options); - if(isset($options['transport']) && - !is_numeric($options['transport'])) - { + if (isset($options['transport']) + && !is_numeric($options['transport']) + ) { $this->_transport = $this->_setupTransport($options['transport']); - if(!isset($options['transport']['register']) || - $options['transport']['register'] == '1' || - (isset($options['transport']['register']) && - !is_numeric($options['transport']['register']) && - (bool) $options['transport']['register'] == true)) - { + if (!isset($options['transport']['register']) + || $options['transport']['register'] == '1' + || (isset($options['transport']['register']) + && !is_numeric($options['transport']['register']) + && (bool)$options['transport']['register'] == true) + ) { Zend_Mail::setDefaultTransport($this->_transport); } } @@ -80,19 +81,23 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA return $this->_transport; } - protected function _setDefaults($type) { + protected function _setDefaults($type) + { $key = strtolower('default' . $type); $options = $this->getOptions(); - if(isset($options[$key]['email']) && - !is_numeric($options[$key]['email'])) - { + if (isset($options[$key]['email']) + && !is_numeric($options[$key]['email']) + ) { $method = array('Zend_Mail', 'setDefault' . ucfirst($type)); - if(isset($options[$key]['name']) && - !is_numeric($options[$key]['name'])) - { - call_user_func($method, $options[$key]['email'], - $options[$key]['name']); + if (isset($options[$key]['name']) + && !is_numeric( + $options[$key]['name'] + ) + ) { + call_user_func( + $method, $options[$key]['email'], $options[$key]['name'] + ); } else { call_user_func($method, $options[$key]['email']); } @@ -101,19 +106,17 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA protected function _setupTransport($options) { - if(!isset($options['type'])) { + if (!isset($options['type'])) { $options['type'] = 'sendmail'; } - + $transportName = $options['type']; - if(!Zend_Loader_Autoloader::autoload($transportName)) - { + if (!Zend_Loader_Autoloader::autoload($transportName)) { $transportName = ucfirst(strtolower($transportName)); - if(!Zend_Loader_Autoloader::autoload($transportName)) - { + if (!Zend_Loader_Autoloader::autoload($transportName)) { $transportName = 'Zend_Mail_Transport_' . $transportName; - if(!Zend_Loader_Autoloader::autoload($transportName)) { + if (!Zend_Loader_Autoloader::autoload($transportName)) { throw new Zend_Application_Resource_Exception( "Specified Mail Transport '{$transportName}'" . 'could not be found' @@ -127,10 +130,11 @@ class Zend_Application_Resource_Mail extends Zend_Application_Resource_ResourceA switch($transportName) { case 'Zend_Mail_Transport_Smtp': - if(!isset($options['host'])) { + if (!isset($options['host'])) { throw new Zend_Application_Resource_Exception( 'A host is necessary for smtp transport,' - .' but none was given'); + . ' but none was given' + ); } $transport = new $transportName($options['host'], $options); diff --git a/library/vendor/Zend/Application/Resource/Modules.php b/library/vendor/Zend/Application/Resource/Modules.php index de3d8e976..7a0cf246d 100644 --- a/library/vendor/Zend/Application/Resource/Modules.php +++ b/library/vendor/Zend/Application/Resource/Modules.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Modules extends Zend_Application_Resource_ResourceAbstract @@ -71,23 +71,27 @@ class Zend_Application_Resource_Modules extends Zend_Application_Resource_Resour foreach ($modules as $module => $moduleDirectory) { $bootstrapClass = $this->_formatModuleName($module) . '_Bootstrap'; if (!class_exists($bootstrapClass, false)) { - $bootstrapPath = dirname($moduleDirectory) . '/Bootstrap.php'; + $bootstrapPath = dirname($moduleDirectory) . '/Bootstrap.php'; if (file_exists($bootstrapPath)) { $eMsgTpl = 'Bootstrap file found for module "%s" but bootstrap class "%s" not found'; include_once $bootstrapPath; if (($default != $module) && !class_exists($bootstrapClass, false) ) { - throw new Zend_Application_Resource_Exception(sprintf( - $eMsgTpl, $module, $bootstrapClass - )); + throw new Zend_Application_Resource_Exception( + sprintf( + $eMsgTpl, $module, $bootstrapClass + ) + ); } elseif ($default == $module) { if (!class_exists($bootstrapClass, false)) { $bootstrapClass = 'Bootstrap'; if (!class_exists($bootstrapClass, false)) { - throw new Zend_Application_Resource_Exception(sprintf( - $eMsgTpl, $module, $bootstrapClass - )); + throw new Zend_Application_Resource_Exception( + sprintf( + $eMsgTpl, $module, $bootstrapClass + ) + ); } } } @@ -115,9 +119,9 @@ class Zend_Application_Resource_Modules extends Zend_Application_Resource_Resour protected function bootstrapBootstraps($bootstraps) { $bootstrap = $this->getBootstrap(); - $out = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS); + $out = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS); - foreach($bootstraps as $module => $bootstrapClass) { + foreach ($bootstraps as $module => $bootstrapClass) { $moduleBootstrap = new $bootstrapClass($bootstrap); $moduleBootstrap->bootstrap(); $out[$module] = $moduleBootstrap; diff --git a/library/vendor/Zend/Application/Resource/Multidb.php b/library/vendor/Zend/Application/Resource/Multidb.php index 59f00ed9f..4910f4feb 100644 --- a/library/vendor/Zend/Application/Resource/Multidb.php +++ b/library/vendor/Zend/Application/Resource/Multidb.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -49,7 +49,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Multidb extends Zend_Application_Resource_ResourceAbstract @@ -112,7 +112,7 @@ class Zend_Application_Resource_Multidb extends Zend_Application_Resource_Resour */ public function isDefault($db) { - if(!$db instanceof Zend_Db_Adapter_Abstract) { + if (!$db instanceof Zend_Db_Adapter_Abstract) { $db = $this->getDb($db); } diff --git a/library/vendor/Zend/Application/Resource/Navigation.php b/library/vendor/Zend/Application/Resource/Navigation.php index 30cbeed96..b926c597e 100644 --- a/library/vendor/Zend/Application/Resource/Navigation.php +++ b/library/vendor/Zend/Application/Resource/Navigation.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @author Dolf Schimmel * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -56,10 +56,12 @@ class Zend_Application_Resource_Navigation if (!$this->_container) { $options = $this->getOptions(); - if(isset($options['defaultPageType'])) { - Zend_Navigation_Page::setDefaultPageType($options['defaultPageType']); + if (isset($options['defaultPageType'])) { + Zend_Navigation_Page::setDefaultPageType( + $options['defaultPageType'] + ); } - + $pages = isset($options['pages']) ? $options['pages'] : array(); $this->_container = new Zend_Navigation($pages); } @@ -92,15 +94,16 @@ class Zend_Application_Resource_Navigation protected function _storeRegistry() { $options = $this->getOptions(); - if(isset($options['storage']['registry']['key']) && - !is_numeric($options['storage']['registry']['key'])) // see ZF-7461 - { - $key = $options['storage']['registry']['key']; + // see ZF-7461 + if (isset($options['storage']['registry']['key']) + && !is_numeric($options['storage']['registry']['key']) + ) { + $key = $options['storage']['registry']['key']; } else { $key = self::DEFAULT_REGISTRY_KEY; } - Zend_Registry::set($key,$this->getContainer()); + Zend_Registry::set($key, $this->getContainer()); } /** diff --git a/library/vendor/Zend/Application/Resource/Resource.php b/library/vendor/Zend/Application/Resource/Resource.php index 37243cad6..7c7367566 100644 --- a/library/vendor/Zend/Application/Resource/Resource.php +++ b/library/vendor/Zend/Application/Resource/Resource.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Application_Resource_Resource diff --git a/library/vendor/Zend/Application/Resource/ResourceAbstract.php b/library/vendor/Zend/Application/Resource/ResourceAbstract.php index c4a44ad29..cf37c3fe7 100644 --- a/library/vendor/Zend/Application/Resource/ResourceAbstract.php +++ b/library/vendor/Zend/Application/Resource/ResourceAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Application_Resource_ResourceAbstract implements Zend_Application_Resource_Resource diff --git a/library/vendor/Zend/Application/Resource/Router.php b/library/vendor/Zend/Application/Resource/Router.php index 259dbf129..436ede985 100644 --- a/library/vendor/Zend/Application/Resource/Router.php +++ b/library/vendor/Zend/Application/Resource/Router.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Router diff --git a/library/vendor/Zend/Application/Resource/Session.php b/library/vendor/Zend/Application/Resource/Session.php index 59975963e..02e483b56 100644 --- a/library/vendor/Zend/Application/Resource/Session.php +++ b/library/vendor/Zend/Application/Resource/Session.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Session extends Zend_Application_Resource_ResourceAbstract diff --git a/library/vendor/Zend/Application/Resource/Translate.php b/library/vendor/Zend/Application/Resource/Translate.php index 19ebe63b7..98fff902c 100644 --- a/library/vendor/Zend/Application/Resource/Translate.php +++ b/library/vendor/Zend/Application/Resource/Translate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_Translate extends Zend_Application_Resource_ResourceAbstract @@ -90,7 +90,7 @@ class Zend_Application_Resource_Translate extends Zend_Application_Resource_Reso } if (isset($options['options'])) { - foreach($options['options'] as $key => $value) { + foreach ($options['options'] as $key => $value) { $options[$key] = $value; } } @@ -115,12 +115,14 @@ class Zend_Application_Resource_Translate extends Zend_Application_Resource_Reso : self::DEFAULT_REGISTRY_KEY; unset($options['registry_key']); - if(Zend_Registry::isRegistered($key)) { + if (Zend_Registry::isRegistered($key)) { $translate = Zend_Registry::get($key); - if(!$translate instanceof Zend_Translate) { - throw new Zend_Application_Resource_Exception($key - . ' already registered in registry but is ' - . 'no instance of Zend_Translate'); + if (!$translate instanceof Zend_Translate) { + throw new Zend_Application_Resource_Exception( + $key + . ' already registered in registry but is ' + . 'no instance of Zend_Translate' + ); } $translate->addTranslation($options); diff --git a/library/vendor/Zend/Application/Resource/Useragent.php b/library/vendor/Zend/Application/Resource/Useragent.php index fa090c2b7..1ac40a325 100644 --- a/library/vendor/Zend/Application/Resource/Useragent.php +++ b/library/vendor/Zend/Application/Resource/Useragent.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_UserAgent extends Zend_Application_Resource_ResourceAbstract diff --git a/library/vendor/Zend/Application/Resource/View.php b/library/vendor/Zend/Application/Resource/View.php index 699548ee5..78f280f61 100644 --- a/library/vendor/Zend/Application/Resource/View.php +++ b/library/vendor/Zend/Application/Resource/View.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Application * @subpackage Resource - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Application_Resource_View extends Zend_Application_Resource_ResourceAbstract diff --git a/library/vendor/Zend/Auth.php b/library/vendor/Zend/Auth.php index d5ad1150a..78f439c2f 100644 --- a/library/vendor/Zend/Auth.php +++ b/library/vendor/Zend/Auth.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Auth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Auth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth diff --git a/library/vendor/Zend/Auth/Adapter/DbTable.php b/library/vendor/Zend/Auth/Adapter/DbTable.php index 08bacd4f9..f6af67b19 100644 --- a/library/vendor/Zend/Auth/Adapter/DbTable.php +++ b/library/vendor/Zend/Auth/Adapter/DbTable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Auth * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface diff --git a/library/vendor/Zend/Auth/Adapter/Digest.php b/library/vendor/Zend/Auth/Adapter/Digest.php index ab53281bd..c64dc1de1 100644 --- a/library/vendor/Zend/Auth/Adapter/Digest.php +++ b/library/vendor/Zend/Auth/Adapter/Digest.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Auth * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Adapter_Digest implements Zend_Auth_Adapter_Interface diff --git a/library/vendor/Zend/Auth/Adapter/Exception.php b/library/vendor/Zend/Auth/Adapter/Exception.php index b7d4fd125..28e4b7067 100644 --- a/library/vendor/Zend/Auth/Adapter/Exception.php +++ b/library/vendor/Zend/Auth/Adapter/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Auth * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Adapter_Exception extends Zend_Auth_Exception diff --git a/library/vendor/Zend/Auth/Adapter/Http.php b/library/vendor/Zend/Auth/Adapter/Http.php index 00135d3cf..ab7c2f784 100644 --- a/library/vendor/Zend/Auth/Adapter/Http.php +++ b/library/vendor/Zend/Auth/Adapter/Http.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @todo Support auth-int * @todo Track nonces, nonce-count, opaque for replay protection and stale support diff --git a/library/vendor/Zend/Auth/Adapter/Http/Resolver/Exception.php b/library/vendor/Zend/Auth/Adapter/Http/Resolver/Exception.php index 50b0b51de..76aa2506b 100644 --- a/library/vendor/Zend/Auth/Adapter/Http/Resolver/Exception.php +++ b/library/vendor/Zend/Auth/Adapter/Http/Resolver/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Adapter_Http_Resolver_Exception extends Zend_Auth_Exception diff --git a/library/vendor/Zend/Auth/Adapter/Http/Resolver/File.php b/library/vendor/Zend/Auth/Adapter/Http/Resolver/File.php index c809e395d..674326055 100644 --- a/library/vendor/Zend/Auth/Adapter/Http/Resolver/File.php +++ b/library/vendor/Zend/Auth/Adapter/Http/Resolver/File.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Adapter_Http_Resolver_File implements Zend_Auth_Adapter_Http_Resolver_Interface diff --git a/library/vendor/Zend/Auth/Adapter/Http/Resolver/Interface.php b/library/vendor/Zend/Auth/Adapter/Http/Resolver/Interface.php index 59f765eea..4326ee820 100644 --- a/library/vendor/Zend/Auth/Adapter/Http/Resolver/Interface.php +++ b/library/vendor/Zend/Auth/Adapter/Http/Resolver/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Auth_Adapter_Http_Resolver_Interface diff --git a/library/vendor/Zend/Auth/Adapter/Interface.php b/library/vendor/Zend/Auth/Adapter/Interface.php index 21ba488f5..3c4c5564f 100644 --- a/library/vendor/Zend/Auth/Adapter/Interface.php +++ b/library/vendor/Zend/Auth/Adapter/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Auth_Adapter_Interface diff --git a/library/vendor/Zend/Auth/Adapter/Ldap.php b/library/vendor/Zend/Auth/Adapter/Ldap.php new file mode 100644 index 000000000..f9e43fbc3 --- /dev/null +++ b/library/vendor/Zend/Auth/Adapter/Ldap.php @@ -0,0 +1,526 @@ +setOptions($options); + if ($username !== null) { + $this->setUsername($username); + } + if ($password !== null) { + $this->setPassword($password); + } + } + + /** + * Returns the array of arrays of Zend_Ldap options of this adapter. + * + * @return array|null + */ + public function getOptions() + { + return $this->_options; + } + + /** + * Sets the array of arrays of Zend_Ldap options to be used by + * this adapter. + * + * @param array $options The array of arrays of Zend_Ldap options + * @return Zend_Auth_Adapter_Ldap Provides a fluent interface + */ + public function setOptions($options) + { + $this->_options = is_array($options) ? $options : array(); + return $this; + } + + /** + * Returns the username of the account being authenticated, or + * NULL if none is set. + * + * @return string|null + */ + public function getUsername() + { + return $this->_username; + } + + /** + * Sets the username for binding + * + * @param string $username The username for binding + * @return Zend_Auth_Adapter_Ldap Provides a fluent interface + */ + public function setUsername($username) + { + $this->_username = (string) $username; + return $this; + } + + /** + * Returns the password of the account being authenticated, or + * NULL if none is set. + * + * @return string|null + */ + public function getPassword() + { + return $this->_password; + } + + /** + * Sets the passwort for the account + * + * @param string $password The password of the account being authenticated + * @return Zend_Auth_Adapter_Ldap Provides a fluent interface + */ + public function setPassword($password) + { + $this->_password = (string) $password; + return $this; + } + + /** + * setIdentity() - set the identity (username) to be used + * + * Proxies to {@see setUsername()} + * + * Closes ZF-6813 + * + * @param string $identity + * @return Zend_Auth_Adapter_Ldap Provides a fluent interface + */ + public function setIdentity($identity) + { + return $this->setUsername($identity); + } + + /** + * setCredential() - set the credential (password) value to be used + * + * Proxies to {@see setPassword()} + * + * Closes ZF-6813 + * + * @param string $credential + * @return Zend_Auth_Adapter_Ldap Provides a fluent interface + */ + public function setCredential($credential) + { + return $this->setPassword($credential); + } + + /** + * Returns the LDAP Object + * + * @return Zend_Ldap The Zend_Ldap object used to authenticate the credentials + */ + public function getLdap() + { + if ($this->_ldap === null) { + /** + * @see Zend_Ldap + */ + $this->_ldap = new Zend_Ldap(); + } + + return $this->_ldap; + } + + /** + * Set an Ldap connection + * + * @param Zend_Ldap $ldap An existing Ldap object + * @return Zend_Auth_Adapter_Ldap Provides a fluent interface + */ + public function setLdap(Zend_Ldap $ldap) + { + $this->_ldap = $ldap; + + $this->setOptions(array($ldap->getOptions())); + + return $this; + } + + /** + * Returns a domain name for the current LDAP options. This is used + * for skipping redundant operations (e.g. authentications). + * + * @return string + */ + protected function _getAuthorityName() + { + $options = $this->getLdap()->getOptions(); + $name = $options['accountDomainName']; + if (!$name) + $name = $options['accountDomainNameShort']; + return $name ? $name : ''; + } + + /** + * Authenticate the user + * + * @throws Zend_Auth_Adapter_Exception + * @return Zend_Auth_Result + */ + public function authenticate() + { + /** + * @see Zend_Ldap_Exception + */ + + $messages = array(); + $messages[0] = ''; // reserved + $messages[1] = ''; // reserved + + $username = $this->_username; + $password = $this->_password; + + if (!$username) { + $code = Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND; + $messages[0] = 'A username is required'; + return new Zend_Auth_Result($code, '', $messages); + } + if (!$password) { + /* A password is required because some servers will + * treat an empty password as an anonymous bind. + */ + $code = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID; + $messages[0] = 'A password is required'; + return new Zend_Auth_Result($code, '', $messages); + } + + $ldap = $this->getLdap(); + + $code = Zend_Auth_Result::FAILURE; + $messages[0] = "Authority not found: $username"; + $failedAuthorities = array(); + + /* Iterate through each server and try to authenticate the supplied + * credentials against it. + */ + foreach ($this->_options as $name => $options) { + + if (!is_array($options)) { + /** + * @see Zend_Auth_Adapter_Exception + */ + throw new Zend_Auth_Adapter_Exception('Adapter options array not an array'); + } + $adapterOptions = $this->_prepareOptions($ldap, $options); + $dname = ''; + + try { + if ($messages[1]) + $messages[] = $messages[1]; + $messages[1] = ''; + $messages[] = $this->_optionsToString($options); + + $dname = $this->_getAuthorityName(); + if (isset($failedAuthorities[$dname])) { + /* If multiple sets of server options for the same domain + * are supplied, we want to skip redundant authentications + * where the identity or credentials where found to be + * invalid with another server for the same domain. The + * $failedAuthorities array tracks this condition (and also + * serves to supply the original error message). + * This fixes issue ZF-4093. + */ + $messages[1] = $failedAuthorities[$dname]; + $messages[] = "Skipping previously failed authority: $dname"; + continue; + } + + $canonicalName = $ldap->getCanonicalAccountName($username); + $ldap->bind($canonicalName, $password); + /* + * Fixes problem when authenticated user is not allowed to retrieve + * group-membership information or own account. + * This requires that the user specified with "username" and optionally + * "password" in the Zend_Ldap options is able to retrieve the required + * information. + */ + $requireRebind = false; + if (isset($options['username'])) { + $ldap->bind(); + $requireRebind = true; + } + $dn = $ldap->getCanonicalAccountName($canonicalName, Zend_Ldap::ACCTNAME_FORM_DN); + + $groupResult = $this->_checkGroupMembership($ldap, $canonicalName, $dn, $adapterOptions); + if ($groupResult === true) { + $this->_authenticatedDn = $dn; + $messages[0] = ''; + $messages[1] = ''; + $messages[] = "$canonicalName authentication successful"; + if ($requireRebind === true) { + // rebinding with authenticated user + $ldap->bind($dn, $password); + } + return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $canonicalName, $messages); + } else { + $messages[0] = 'Account is not a member of the specified group'; + $messages[1] = $groupResult; + $failedAuthorities[$dname] = $groupResult; + } + } catch (Zend_Ldap_Exception $zle) { + + /* LDAP based authentication is notoriously difficult to diagnose. Therefore + * we bend over backwards to capture and record every possible bit of + * information when something goes wrong. + */ + + $err = $zle->getCode(); + + if ($err == Zend_Ldap_Exception::LDAP_X_DOMAIN_MISMATCH) { + /* This error indicates that the domain supplied in the + * username did not match the domains in the server options + * and therefore we should just skip to the next set of + * server options. + */ + continue; + } else if ($err == Zend_Ldap_Exception::LDAP_NO_SUCH_OBJECT) { + $code = Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND; + $messages[0] = "Account not found: $username"; + $failedAuthorities[$dname] = $zle->getMessage(); + } else if ($err == Zend_Ldap_Exception::LDAP_INVALID_CREDENTIALS) { + $code = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID; + $messages[0] = 'Invalid credentials'; + $failedAuthorities[$dname] = $zle->getMessage(); + } else { + $line = $zle->getLine(); + $messages[] = $zle->getFile() . "($line): " . $zle->getMessage(); + $messages[] = preg_replace( + '/\b'.preg_quote(substr($password, 0, 15), '/').'\b/', + '*****', + $zle->getTraceAsString() + ); + $messages[0] = 'An unexpected failure occurred'; + } + $messages[1] = $zle->getMessage(); + } + } + + $msg = isset($messages[1]) ? $messages[1] : $messages[0]; + $messages[] = "$username authentication failed: $msg"; + + return new Zend_Auth_Result($code, $username, $messages); + } + + /** + * Sets the LDAP specific options on the Zend_Ldap instance + * + * @param Zend_Ldap $ldap + * @param array $options + * @return array of auth-adapter specific options + */ + protected function _prepareOptions(Zend_Ldap $ldap, array $options) + { + $adapterOptions = array( + 'group' => null, + 'groupDn' => $ldap->getBaseDn(), + 'groupScope' => Zend_Ldap::SEARCH_SCOPE_SUB, + 'groupAttr' => 'cn', + 'groupFilter' => 'objectClass=groupOfUniqueNames', + 'memberAttr' => 'uniqueMember', + 'memberIsDn' => true + ); + foreach ($adapterOptions as $key => $value) { + if (array_key_exists($key, $options)) { + $value = $options[$key]; + unset($options[$key]); + switch ($key) { + case 'groupScope': + $value = (int)$value; + if (in_array($value, array(Zend_Ldap::SEARCH_SCOPE_BASE, + Zend_Ldap::SEARCH_SCOPE_ONE, Zend_Ldap::SEARCH_SCOPE_SUB), true)) { + $adapterOptions[$key] = $value; + } + break; + case 'memberIsDn': + $adapterOptions[$key] = ($value === true || + $value === '1' || strcasecmp($value, 'true') == 0); + break; + default: + $adapterOptions[$key] = trim($value); + break; + } + } + } + $ldap->setOptions($options); + return $adapterOptions; + } + + /** + * Checks the group membership of the bound user + * + * @param Zend_Ldap $ldap + * @param string $canonicalName + * @param string $dn + * @param array $adapterOptions + * @return string|true + */ + protected function _checkGroupMembership(Zend_Ldap $ldap, $canonicalName, $dn, array $adapterOptions) + { + if ($adapterOptions['group'] === null) { + return true; + } + + if ($adapterOptions['memberIsDn'] === false) { + $user = $canonicalName; + } else { + $user = $dn; + } + + /** + * @see Zend_Ldap_Filter + */ + $groupName = Zend_Ldap_Filter::equals($adapterOptions['groupAttr'], $adapterOptions['group']); + $membership = Zend_Ldap_Filter::equals($adapterOptions['memberAttr'], $user); + $group = Zend_Ldap_Filter::andFilter($groupName, $membership); + $groupFilter = $adapterOptions['groupFilter']; + if (!empty($groupFilter)) { + $group = $group->addAnd($groupFilter); + } + + $result = $ldap->count($group, $adapterOptions['groupDn'], $adapterOptions['groupScope']); + + if ($result === 1) { + return true; + } else { + return 'Failed to verify group membership with ' . $group->toString(); + } + } + + /** + * getAccountObject() - Returns the result entry as a stdClass object + * + * This resembles the feature {@see Zend_Auth_Adapter_DbTable::getResultRowObject()}. + * Closes ZF-6813 + * + * @param array $returnAttribs + * @param array $omitAttribs + * @return stdClass|boolean + */ + public function getAccountObject(array $returnAttribs = array(), array $omitAttribs = array()) + { + if (!$this->_authenticatedDn) { + return false; + } + + $returnObject = new stdClass(); + + $returnAttribs = array_map('strtolower', $returnAttribs); + $omitAttribs = array_map('strtolower', $omitAttribs); + $returnAttribs = array_diff($returnAttribs, $omitAttribs); + + $entry = $this->getLdap()->getEntry($this->_authenticatedDn, $returnAttribs, true); + foreach ($entry as $attr => $value) { + if (in_array($attr, $omitAttribs)) { + // skip attributes marked to be omitted + continue; + } + if (is_array($value)) { + $returnObject->$attr = (count($value) > 1) ? $value : $value[0]; + } else { + $returnObject->$attr = $value; + } + } + return $returnObject; + } + + /** + * Converts options to string + * + * @param array $options + * @return string + */ + private function _optionsToString(array $options) + { + $str = ''; + foreach ($options as $key => $val) { + if ($key === 'password') + $val = '*****'; + if ($str) + $str .= ','; + $str .= $key . '=' . $val; + } + return $str; + } +} diff --git a/library/vendor/Zend/Auth/Adapter/OpenId.php b/library/vendor/Zend/Auth/Adapter/OpenId.php index f0179bb0f..c3fda57e0 100644 --- a/library/vendor/Zend/Auth/Adapter/OpenId.php +++ b/library/vendor/Zend/Auth/Adapter/OpenId.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Auth * @subpackage Zend_Auth_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Adapter_OpenId implements Zend_Auth_Adapter_Interface diff --git a/library/vendor/Zend/Auth/Exception.php b/library/vendor/Zend/Auth/Exception.php index 9b4db3e6a..c70033092 100644 --- a/library/vendor/Zend/Auth/Exception.php +++ b/library/vendor/Zend/Auth/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Auth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Auth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Auth/Result.php b/library/vendor/Zend/Auth/Result.php index 384862257..6f81a9a9e 100644 --- a/library/vendor/Zend/Auth/Result.php +++ b/library/vendor/Zend/Auth/Result.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Auth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Auth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Result diff --git a/library/vendor/Zend/Auth/Storage/Exception.php b/library/vendor/Zend/Auth/Storage/Exception.php index 10a81ac56..c4365c626 100644 --- a/library/vendor/Zend/Auth/Storage/Exception.php +++ b/library/vendor/Zend/Auth/Storage/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Auth * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Storage_Exception extends Zend_Auth_Exception diff --git a/library/vendor/Zend/Auth/Storage/Interface.php b/library/vendor/Zend/Auth/Storage/Interface.php index 873b4cc3d..7ca92ebff 100644 --- a/library/vendor/Zend/Auth/Storage/Interface.php +++ b/library/vendor/Zend/Auth/Storage/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Auth * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Auth_Storage_Interface diff --git a/library/vendor/Zend/Auth/Storage/NonPersistent.php b/library/vendor/Zend/Auth/Storage/NonPersistent.php index 023e9df98..185709b1e 100644 --- a/library/vendor/Zend/Auth/Storage/NonPersistent.php +++ b/library/vendor/Zend/Auth/Storage/NonPersistent.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Auth * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Storage_NonPersistent implements Zend_Auth_Storage_Interface diff --git a/library/vendor/Zend/Auth/Storage/Session.php b/library/vendor/Zend/Auth/Storage/Session.php index 3a86fa9cf..f0f5a5274 100644 --- a/library/vendor/Zend/Auth/Storage/Session.php +++ b/library/vendor/Zend/Auth/Storage/Session.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Auth * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -35,7 +35,7 @@ * @category Zend * @package Zend_Auth * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Storage_Session implements Zend_Auth_Storage_Interface diff --git a/library/vendor/Zend/Barcode.php b/library/vendor/Zend/Barcode.php index 914f633ae..d57c3d787 100644 --- a/library/vendor/Zend/Barcode.php +++ b/library/vendor/Zend/Barcode.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode diff --git a/library/vendor/Zend/Barcode/Exception.php b/library/vendor/Zend/Barcode/Exception.php index e40b89290..82cba6869 100644 --- a/library/vendor/Zend/Barcode/Exception.php +++ b/library/vendor/Zend/Barcode/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Barcode/Object/Code128.php b/library/vendor/Zend/Barcode/Object/Code128.php index ce2919354..73863092a 100644 --- a/library/vendor/Zend/Barcode/Object/Code128.php +++ b/library/vendor/Zend/Barcode/Object/Code128.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Code25.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Code128 extends Zend_Barcode_Object_ObjectAbstract diff --git a/library/vendor/Zend/Barcode/Object/Code25.php b/library/vendor/Zend/Barcode/Object/Code25.php index 3dfa1cb12..f4b5b9496 100644 --- a/library/vendor/Zend/Barcode/Object/Code25.php +++ b/library/vendor/Zend/Barcode/Object/Code25.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Code25 extends Zend_Barcode_Object_ObjectAbstract diff --git a/library/vendor/Zend/Barcode/Object/Code25interleaved.php b/library/vendor/Zend/Barcode/Object/Code25interleaved.php index 67612fb50..6c9459469 100644 --- a/library/vendor/Zend/Barcode/Object/Code25interleaved.php +++ b/library/vendor/Zend/Barcode/Object/Code25interleaved.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Code25interleaved extends Zend_Barcode_Object_Code25 diff --git a/library/vendor/Zend/Barcode/Object/Code39.php b/library/vendor/Zend/Barcode/Object/Code39.php index 46441243d..4c271399e 100644 --- a/library/vendor/Zend/Barcode/Object/Code39.php +++ b/library/vendor/Zend/Barcode/Object/Code39.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Code39 extends Zend_Barcode_Object_ObjectAbstract diff --git a/library/vendor/Zend/Barcode/Object/Ean13.php b/library/vendor/Zend/Barcode/Object/Ean13.php index 968d7b293..38d232838 100644 --- a/library/vendor/Zend/Barcode/Object/Ean13.php +++ b/library/vendor/Zend/Barcode/Object/Ean13.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Ean13 extends Zend_Barcode_Object_ObjectAbstract diff --git a/library/vendor/Zend/Barcode/Object/Ean2.php b/library/vendor/Zend/Barcode/Object/Ean2.php index 8868b0190..42f4a9165 100644 --- a/library/vendor/Zend/Barcode/Object/Ean2.php +++ b/library/vendor/Zend/Barcode/Object/Ean2.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Ean2 extends Zend_Barcode_Object_Ean5 diff --git a/library/vendor/Zend/Barcode/Object/Ean5.php b/library/vendor/Zend/Barcode/Object/Ean5.php index 7b50c7302..e2d33332b 100644 --- a/library/vendor/Zend/Barcode/Object/Ean5.php +++ b/library/vendor/Zend/Barcode/Object/Ean5.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Ean5 extends Zend_Barcode_Object_Ean13 diff --git a/library/vendor/Zend/Barcode/Object/Ean8.php b/library/vendor/Zend/Barcode/Object/Ean8.php index 4cb18fbac..e09b431cd 100644 --- a/library/vendor/Zend/Barcode/Object/Ean8.php +++ b/library/vendor/Zend/Barcode/Object/Ean8.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Ean8 extends Zend_Barcode_Object_Ean13 diff --git a/library/vendor/Zend/Barcode/Object/Error.php b/library/vendor/Zend/Barcode/Object/Error.php index ff84afd7a..32d44bc9b 100644 --- a/library/vendor/Zend/Barcode/Object/Error.php +++ b/library/vendor/Zend/Barcode/Object/Error.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Error extends Zend_Barcode_Object_ObjectAbstract diff --git a/library/vendor/Zend/Barcode/Object/Exception.php b/library/vendor/Zend/Barcode/Object/Exception.php index 363335d9f..727bea675 100644 --- a/library/vendor/Zend/Barcode/Object/Exception.php +++ b/library/vendor/Zend/Barcode/Object/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Exception extends Zend_Barcode_Exception diff --git a/library/vendor/Zend/Barcode/Object/Identcode.php b/library/vendor/Zend/Barcode/Object/Identcode.php index 654aa7a49..ef6fcfa14 100644 --- a/library/vendor/Zend/Barcode/Object/Identcode.php +++ b/library/vendor/Zend/Barcode/Object/Identcode.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Identcode extends Zend_Barcode_Object_Code25interleaved diff --git a/library/vendor/Zend/Barcode/Object/Itf14.php b/library/vendor/Zend/Barcode/Object/Itf14.php index 2c80340f0..b50fc38c4 100644 --- a/library/vendor/Zend/Barcode/Object/Itf14.php +++ b/library/vendor/Zend/Barcode/Object/Itf14.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Itf14 extends Zend_Barcode_Object_Code25interleaved diff --git a/library/vendor/Zend/Barcode/Object/Leitcode.php b/library/vendor/Zend/Barcode/Object/Leitcode.php index cf0473a26..e5386fa2b 100644 --- a/library/vendor/Zend/Barcode/Object/Leitcode.php +++ b/library/vendor/Zend/Barcode/Object/Leitcode.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Leitcode extends Zend_Barcode_Object_Identcode diff --git a/library/vendor/Zend/Barcode/Object/ObjectAbstract.php b/library/vendor/Zend/Barcode/Object/ObjectAbstract.php index f22e31ec9..35babbdb1 100644 --- a/library/vendor/Zend/Barcode/Object/ObjectAbstract.php +++ b/library/vendor/Zend/Barcode/Object/ObjectAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,55 +25,63 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Barcode_Object_ObjectAbstract { /** * Namespace of the barcode for autoloading + * * @var string */ protected $_barcodeNamespace = 'Zend_Barcode_Object'; /** * Set of drawing instructions + * * @var array */ protected $_instructions = array(); /** * Barcode type + * * @var string */ protected $_type = null; /** * Height of the object + * * @var integer */ protected $_height = null; /** * Width of the object + * * @var integer */ protected $_width = null; /** * Height of the bar + * * @var integer */ protected $_barHeight = 50; /** * Width of a thin bar + * * @var integer */ protected $_barThinWidth = 1; /** * Width of a thick bar + * * @var integer */ protected $_barThickWidth = 3; @@ -81,42 +89,49 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Factor to multiply bar and font measure * (barHeight, barThinWidth, barThickWidth & fontSize) + * * @var integer */ protected $_factor = 1; /** * Font and bars color of the object + * * @var integer */ protected $_foreColor = 0x000000; /** * Background color of the object + * * @var integer */ protected $_backgroundColor = 0xFFFFFF; /** * Activate/deactivate border of the object + * * @var boolean */ protected $_withBorder = false; /** * Activate/deactivate drawing of quiet zones + * * @var boolean */ protected $_withQuietZones = true; /** * Force quiet zones even if + * * @var boolean */ protected $_mandatoryQuietZones = false; /** * Orientation of the barcode in degrees + * * @var float */ protected $_orientation = 0; @@ -124,6 +139,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Offset from the top the object * (calculated from the orientation) + * * @var integer */ protected $_offsetTop = null; @@ -131,24 +147,28 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Offset from the left the object * (calculated from the orientation) + * * @var integer */ protected $_offsetLeft = null; /** * Text to display + * * @var string */ protected $_text = null; /** * Display (or not) human readable text + * * @var boolean */ protected $_drawText = true; /** * Adjust (or not) position of human readable characters with barcode + * * @var boolean */ protected $_stretchText = false; @@ -157,30 +177,35 @@ abstract class Zend_Barcode_Object_ObjectAbstract * Font resource * - integer (1 to 5): corresponds to GD included fonts * - string: corresponds to path of a TTF font + * * @var integer|string */ protected $_font = null; /** * Font size + * * @var float */ protected $_fontSize = 10; /** * Drawing of checksum + * * @var boolean */ protected $_withChecksum = false; /** * Drawing of checksum inside text + * * @var boolean */ protected $_withChecksumInText = false; /** * Fix barcode length (numeric or string like 'even') + * * @var $_barcodeLength integer | string */ protected $_barcodeLength = null; @@ -188,6 +213,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Activate automatic addition of leading zeros * if barcode length is fixed + * * @var $_addLeadingZeros boolean */ protected $_addLeadingZeros = true; @@ -195,18 +221,21 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Activation of mandatory checksum * to deactivate unauthorized modification + * * @var $_mandatoryChecksum boolean */ protected $_mandatoryChecksum = false; /** * Character used to substitute checksum character for validation + * * @var $_substituteChecksumCharacter mixed */ protected $_substituteChecksumCharacter = 0; /** * TTF font name: can be set before instanciation of the object + * * @var string */ protected static $_staticFont = null; @@ -228,7 +257,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract if (is_array($options)) { $this->setOptions($options); } - $this->_type = strtolower(substr(get_class($this), strlen($this->_barcodeNamespace) + 1)); + $this->_type = strtolower( + substr(get_class($this), strlen($this->_barcodeNamespace) + 1) + ); if ($this->_mandatoryChecksum) { $this->_withChecksum = true; $this->_withChecksumInText = true; @@ -237,7 +268,6 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set default options for particular object - * @return void */ protected function _getDefaultOptions() { @@ -245,8 +275,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set barcode state from options array + * * @param array $options - * @return Zend_Barcode_Object + * @return $this */ public function setOptions($options) { @@ -261,8 +292,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set barcode state from config object + * * @param Zend_Config $config - * @return Zend_Barcode_Object + * @return $this */ public function setConfig(Zend_Config $config) { @@ -273,7 +305,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract * Set barcode namespace for autoloading * * @param string $namespace - * @return Zend_Barcode_Object + * @return $this */ public function setBarcodeNamespace($namespace) { @@ -293,6 +325,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve type of barcode + * * @return string */ public function getType() @@ -302,8 +335,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set height of the barcode bar + * * @param integer $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setBarHeight($value) @@ -319,6 +353,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Get height of the barcode bar + * * @return integer */ public function getBarHeight() @@ -328,8 +363,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set thickness of thin bar + * * @param integer $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setBarThinWidth($value) @@ -345,6 +381,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Get thickness of thin bar + * * @return integer */ public function getBarThinWidth() @@ -354,8 +391,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set thickness of thick bar + * * @param integer $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setBarThickWidth($value) @@ -371,6 +409,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Get thickness of thick bar + * * @return integer */ public function getBarThickWidth() @@ -381,8 +420,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set factor applying to * thinBarWidth - thickBarWidth - barHeight - fontSize - * @param float $value - * @return Zend_Barcode_Object + * + * @param int|float|string|bool $value + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setFactor($value) @@ -399,6 +439,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Get factor applying to * thinBarWidth - thickBarWidth - barHeight - fontSize + * * @return integer */ public function getFactor() @@ -408,8 +449,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set color of the barcode and text + * * @param string $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setForeColor($value) @@ -428,6 +470,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve color of the barcode and text + * * @return unknown */ public function getForeColor() @@ -437,8 +480,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set the color of the background + * * @param integer $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setBackgroundColor($value) @@ -457,6 +501,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve background color of the image + * * @return integer */ public function getBackgroundColor() @@ -466,8 +511,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Activate/deactivate drawing of the bar + * * @param boolean $value - * @return Zend_Barcode_Object + * @return $this */ public function setWithBorder($value) { @@ -477,6 +523,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve if border are draw or not + * * @return boolean */ public function getWithBorder() @@ -486,8 +533,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Activate/deactivate drawing of the quiet zones + * * @param boolean $value - * @return Zend_Barcode_Object + * @return $this */ public function setWithQuietZones($value) { @@ -497,6 +545,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve if quiet zones are draw or not + * * @return boolean */ public function getWithQuietZones() @@ -506,30 +555,35 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Allow fast inversion of font/bars color and background color - * @return Zend_Barcode_Object + * + * @return $this */ public function setReverseColor() { $tmp = $this->_foreColor; $this->_foreColor = $this->_backgroundColor; $this->_backgroundColor = $tmp; + return $this; } /** * Set orientation of barcode and text - * @param float $value - * @return Zend_Barcode_Object + * + * @param int|float|string|bool $value + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setOrientation($value) { - $this->_orientation = floatval($value) - floor(floatval($value) / 360) * 360; + $value = floatval($value); + $this->_orientation = $value - floor($value / 360) * 360; return $this; } /** * Retrieve orientation of barcode and text + * * @return float */ public function getOrientation() @@ -539,8 +593,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set text to encode + * * @param string $value - * @return Zend_Barcode_Object + * @return $this */ public function setText($value) { @@ -550,6 +605,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve text to encode + * * @return string */ public function getText() @@ -588,6 +644,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve text to encode + * * @return string */ public function getRawText() @@ -597,6 +654,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve text to display + * * @return string */ public function getTextToDisplay() @@ -610,8 +668,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Activate/deactivate drawing of text to encode + * * @param boolean $value - * @return Zend_Barcode_Object + * @return $this */ public function setDrawText($value) { @@ -621,6 +680,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve if drawing of text to encode is enabled + * * @return boolean */ public function getDrawText() @@ -631,8 +691,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Activate/deactivate the adjustment of the position * of the characters to the position of the bars + * * @param boolean $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setStretchText($value) @@ -644,6 +705,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve if the adjustment of the position of the characters * to the position of the bars is enabled + * * @return boolean */ public function getStretchText() @@ -655,8 +717,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract * Activate/deactivate the automatic generation * of the checksum character * added to the barcode text + * * @param boolean $value - * @return Zend_Barcode_Object + * @return $this */ public function setWithChecksum($value) { @@ -669,6 +732,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve if the checksum character is automatically * added to the barcode text + * * @return boolean */ public function getWithChecksum() @@ -680,8 +744,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract * Activate/deactivate the automatic generation * of the checksum character * added to the barcode text + * * @param boolean $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setWithChecksumInText($value) @@ -689,12 +754,14 @@ abstract class Zend_Barcode_Object_ObjectAbstract if (!$this->_mandatoryChecksum) { $this->_withChecksumInText = (bool) $value; } + return $this; } /** * Retrieve if the checksum character is automatically * added to the barcode text + * * @return boolean */ public function getWithChecksumInText() @@ -704,8 +771,8 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set the font for all instances of barcode + * * @param string $font - * @return void */ public static function setBarcodeFont($font) { @@ -718,8 +785,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract * Set the font: * - if integer between 1 and 5, use gd built-in fonts * - if string, $value is assumed to be the path to a TTF font + * * @param integer|string $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setFont($value) @@ -739,16 +807,19 @@ abstract class Zend_Barcode_Object_ObjectAbstract } elseif (is_string($value)) { $this->_font = $value; } else { - throw new Zend_Barcode_Object_Exception(sprintf( - 'Invalid font "%s" provided to setFont()', - $value - )); + throw new Zend_Barcode_Object_Exception( + sprintf( + 'Invalid font "%s" provided to setFont()', + $value + ) + ); } return $this; } /** * Retrieve the font + * * @return integer|string */ public function getFont() @@ -758,8 +829,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Set the size of the font in case of TTF + * * @param float $value - * @return Zend_Barcode_Object + * @return $this * @throws Zend_Barcode_Object_Exception */ public function setFontSize($value) @@ -781,6 +853,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve the size of the font in case of TTF + * * @return float */ public function getFontSize() @@ -791,6 +864,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Quiet zone before first bar * and after the last bar + * * @return integer */ public function getQuietZone() @@ -804,6 +878,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Add an instruction in the array of instructions + * * @param array $instruction */ protected function _addInstruction(array $instruction) @@ -813,6 +888,7 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Retrieve the set of drawing instructions + * * @return array */ public function getInstructions() @@ -822,7 +898,8 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Add a polygon drawing instruction in the set of instructions - * @param array $points + * + * @param array $points * @param integer $color * @param boolean $filled */ @@ -831,12 +908,14 @@ abstract class Zend_Barcode_Object_ObjectAbstract if ($color === null) { $color = $this->_foreColor; } - $this->_addInstruction(array( - 'type' => 'polygon', - 'points' => $points, - 'color' => $color, - 'filled' => $filled, - )); + $this->_addInstruction( + array( + 'type' => 'polygon', + 'points' => $points, + 'color' => $color, + 'filled' => $filled, + ) + ); } /** @@ -862,16 +941,18 @@ abstract class Zend_Barcode_Object_ObjectAbstract if ($color === null) { $color = $this->_foreColor; } - $this->_addInstruction(array( - 'type' => 'text', - 'text' => $text, - 'size' => $size, - 'position' => $position, - 'font' => $font, - 'color' => $color, - 'alignment' => $alignment, - 'orientation' => $orientation, - )); + $this->_addInstruction( + array( + 'type' => 'text', + 'text' => $text, + 'size' => $size, + 'position' => $position, + 'font' => $font, + 'color' => $color, + 'alignment' => $alignment, + 'orientation' => $orientation, + ) + ); } /** @@ -891,7 +972,6 @@ abstract class Zend_Barcode_Object_ObjectAbstract * Check if a text is really provided to barcode * * @param string|null $value - * @return void * @throws Zend_Barcode_Object_Exception */ protected function _checkText($value = null) @@ -912,26 +992,26 @@ abstract class Zend_Barcode_Object_ObjectAbstract * * @param int $min * @param int $max - * @return void * @throws Zend_Barcode_Object_Exception */ protected function _checkRatio($min = 2, $max = 3) { $ratio = $this->_barThickWidth / $this->_barThinWidth; if (!($ratio >= $min && $ratio <= $max)) { - throw new Zend_Barcode_Object_Exception(sprintf( - 'Ratio thick/thin bar must be between %0.1f and %0.1f (actual %0.3f)', - $min, - $max, - $ratio - )); + throw new Zend_Barcode_Object_Exception( + sprintf( + 'Ratio thick/thin bar must be between %0.1f and %0.1f (actual %0.3f)', + $min, + $max, + $ratio + ) + ); } } /** * Drawing with an angle is just allow TTF font * - * @return void * @throws Zend_Barcode_Object_Exception */ protected function _checkFontAndOrientation() @@ -987,7 +1067,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract $textHeight += $this->_fontSize; $extraHeight = 2; } - return ($this->_barHeight + $textHeight) * $this->_factor + $extraHeight; + + return ($this->_barHeight + $textHeight) * $this->_factor + + $extraHeight; } /** @@ -1000,8 +1082,16 @@ abstract class Zend_Barcode_Object_ObjectAbstract { if ($this->_height === null || $recalculate) { $this->_height = - abs($this->_calculateHeight() * cos($this->_orientation / 180 * pi())) - + abs($this->_calculateWidth() * sin($this->_orientation / 180 * pi())); + abs( + $this->_calculateHeight() * cos( + $this->_orientation / 180 * pi() + ) + ) + + abs( + $this->_calculateWidth() * sin( + $this->_orientation / 180 * pi() + ) + ); } return $this->_height; } @@ -1016,8 +1106,16 @@ abstract class Zend_Barcode_Object_ObjectAbstract { if ($this->_width === null || $recalculate) { $this->_width = - abs($this->_calculateWidth() * cos($this->_orientation / 180 * pi())) - + abs($this->_calculateHeight() * sin($this->_orientation / 180 * pi())); + abs( + $this->_calculateWidth() * cos( + $this->_orientation / 180 * pi() + ) + ) + + abs( + $this->_calculateHeight() * sin( + $this->_orientation / 180 * pi() + ) + ); } return $this->_width; } @@ -1081,9 +1179,9 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Apply rotation on a point in X/Y dimensions * - * @param float $x1 x-position before rotation - * @param float $y1 y-position before rotation - * @return array Array of two elements corresponding to the new XY point + * @param float $x1 x-position before rotation + * @param float $y1 y-position before rotation + * @return array Array of two elements corresponding to the new XY point */ protected function _rotate($x1, $y1) { @@ -1093,7 +1191,11 @@ abstract class Zend_Barcode_Object_ObjectAbstract $y2 = $y1 * cos($this->_orientation / 180 * pi()) + $x1 * sin($this->_orientation / 180 * pi()) + $this->getOffsetTop(); - return array(intval($x2) , intval($y2)); + + return array( + intval($x2), + intval($y2) + ); } /** @@ -1112,8 +1214,6 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Draw the barcode - * - * @return void */ protected function _drawBarcode() { @@ -1132,12 +1232,14 @@ abstract class Zend_Barcode_Object_ObjectAbstract ); $point4 = $this->_rotate($this->_calculateWidth() - 1, 0); - $this->_addPolygon(array( - $point1, - $point2, - $point3, - $point4 - ), $this->_backgroundColor); + $this->_addPolygon( + array( + $point1, + $point2, + $point3, + $point4 + ), $this->_backgroundColor + ); $xpos += $this->getQuietZone(); $barLength = $this->_barHeight * $this->_factor; @@ -1155,12 +1257,14 @@ abstract class Zend_Barcode_Object_ObjectAbstract $xpos + $width - 1, $ypos + $bar[2] * $barLength ); - $this->_addPolygon(array( - $point1, - $point2, - $point3, - $point4, - )); + $this->_addPolygon( + array( + $point1, + $point2, + $point3, + $point4, + ) + ); } $xpos += $width; } @@ -1170,8 +1274,6 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Partial function to draw border - * - * @return void */ protected function _drawBorder() { @@ -1183,19 +1285,20 @@ abstract class Zend_Barcode_Object_ObjectAbstract $this->_calculateHeight() - 1 ); $point4 = $this->_rotate(0, $this->_calculateHeight() - 1); - $this->_addPolygon(array( - $point1, - $point2, - $point3, - $point4, - $point1, - ), $this->_foreColor, false); + $this->_addPolygon( + array( + $point1, + $point2, + $point3, + $point4, + $point1, + ), $this->_foreColor, false + ); } } /** * Partial function to draw text - * @return void */ protected function _drawText() { @@ -1240,8 +1343,8 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Check for invalid characters - * @param string $value Text to be ckecked - * @return void + * + * @param string $value Text to be ckecked */ public function validateText($value) { @@ -1259,10 +1362,12 @@ abstract class Zend_Barcode_Object_ObjectAbstract { $validatorName = (isset($options['validator'])) ? $options['validator'] : $this->getType(); - $validator = new Zend_Validate_Barcode(array( - 'adapter' => $validatorName, - 'checksum' => false, - )); + $validator = new Zend_Validate_Barcode( + array( + 'adapter' => $validatorName, + 'checksum' => false, + ) + ); $checksumCharacter = ''; $withChecksum = false; @@ -1271,7 +1376,8 @@ abstract class Zend_Barcode_Object_ObjectAbstract $withChecksum = true; } - $value = $this->_addLeadingZeros($value, $withChecksum) . $checksumCharacter; + $value = $this->_addLeadingZeros($value, $withChecksum) + . $checksumCharacter; if (!$validator->isValid($value)) { $message = implode("\n", $validator->getMessages()); @@ -1301,15 +1407,11 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Checking of parameters after all settings - * - * @return void */ abstract protected function _checkParams(); /** * Allow each child to draw something else - * - * @return void */ protected function _preDrawBarcode() { @@ -1318,8 +1420,6 @@ abstract class Zend_Barcode_Object_ObjectAbstract /** * Allow each child to draw something else * (ex: bearer bars in interleaved 2 of 5 code) - * - * @return void */ protected function _postDrawBarcode() { diff --git a/library/vendor/Zend/Barcode/Object/Planet.php b/library/vendor/Zend/Barcode/Object/Planet.php index 262e6fbe7..07af1c30d 100644 --- a/library/vendor/Zend/Barcode/Object/Planet.php +++ b/library/vendor/Zend/Barcode/Object/Planet.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Planet extends Zend_Barcode_Object_Postnet diff --git a/library/vendor/Zend/Barcode/Object/Postnet.php b/library/vendor/Zend/Barcode/Object/Postnet.php index ec7910b91..a00cfea57 100644 --- a/library/vendor/Zend/Barcode/Object/Postnet.php +++ b/library/vendor/Zend/Barcode/Object/Postnet.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Postnet extends Zend_Barcode_Object_ObjectAbstract diff --git a/library/vendor/Zend/Barcode/Object/Royalmail.php b/library/vendor/Zend/Barcode/Object/Royalmail.php index 14db43744..987e7d638 100644 --- a/library/vendor/Zend/Barcode/Object/Royalmail.php +++ b/library/vendor/Zend/Barcode/Object/Royalmail.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Royalmail extends Zend_Barcode_Object_ObjectAbstract diff --git a/library/vendor/Zend/Barcode/Object/Upca.php b/library/vendor/Zend/Barcode/Object/Upca.php index 4fbf5c6ad..4f3eaa395 100644 --- a/library/vendor/Zend/Barcode/Object/Upca.php +++ b/library/vendor/Zend/Barcode/Object/Upca.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Upca extends Zend_Barcode_Object_Ean13 diff --git a/library/vendor/Zend/Barcode/Object/Upce.php b/library/vendor/Zend/Barcode/Object/Upce.php index eafbb3d29..7ee12083d 100644 --- a/library/vendor/Zend/Barcode/Object/Upce.php +++ b/library/vendor/Zend/Barcode/Object/Upce.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Object - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Object_Upce extends Zend_Barcode_Object_Ean13 diff --git a/library/vendor/Zend/Barcode/Renderer/Exception.php b/library/vendor/Zend/Barcode/Renderer/Exception.php index 6d3dd762c..f89d21c31 100644 --- a/library/vendor/Zend/Barcode/Renderer/Exception.php +++ b/library/vendor/Zend/Barcode/Renderer/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Renderer_Exception extends Zend_Barcode_Exception diff --git a/library/vendor/Zend/Barcode/Renderer/Image.php b/library/vendor/Zend/Barcode/Renderer/Image.php index 31f3426a2..922572f9c 100644 --- a/library/vendor/Zend/Barcode/Renderer/Image.php +++ b/library/vendor/Zend/Barcode/Renderer/Image.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Renderer_Image extends Zend_Barcode_Renderer_RendererAbstract diff --git a/library/vendor/Zend/Barcode/Renderer/Pdf.php b/library/vendor/Zend/Barcode/Renderer/Pdf.php index fc49793db..cb70e0f9f 100644 --- a/library/vendor/Zend/Barcode/Renderer/Pdf.php +++ b/library/vendor/Zend/Barcode/Renderer/Pdf.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Renderer_Pdf extends Zend_Barcode_Renderer_RendererAbstract diff --git a/library/vendor/Zend/Barcode/Renderer/RendererAbstract.php b/library/vendor/Zend/Barcode/Renderer/RendererAbstract.php index 3d06645e9..df0763efa 100644 --- a/library/vendor/Zend/Barcode/Renderer/RendererAbstract.php +++ b/library/vendor/Zend/Barcode/Renderer/RendererAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Barcode_Renderer_RendererAbstract @@ -488,7 +488,7 @@ abstract class Zend_Barcode_Renderer_RendererAbstract * @see Zend_Barcode_Renderer_Exception */ throw new Zend_Barcode_Renderer_Exception( - 'Unkown drawing command' + 'Unknown drawing command' ); } } diff --git a/library/vendor/Zend/Barcode/Renderer/Svg.php b/library/vendor/Zend/Barcode/Renderer/Svg.php index b791aaec4..58791a15f 100644 --- a/library/vendor/Zend/Barcode/Renderer/Svg.php +++ b/library/vendor/Zend/Barcode/Renderer/Svg.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Barcode * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Image.php 20366 2010-01-18 03:56:52Z ralph $ */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_Barcode - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Barcode_Renderer_Svg extends Zend_Barcode_Renderer_RendererAbstract diff --git a/library/vendor/Zend/Cache.php b/library/vendor/Zend/Cache.php index 209b7dff9..9ed41ddfc 100644 --- a/library/vendor/Zend/Cache.php +++ b/library/vendor/Zend/Cache.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Cache - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @package Zend_Cache - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Cache diff --git a/library/vendor/Zend/Cache/Backend.php b/library/vendor/Zend/Cache/Backend.php index 988cb08b4..6e1efdeed 100644 --- a/library/vendor/Zend/Cache/Backend.php +++ b/library/vendor/Zend/Cache/Backend.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend @@ -61,7 +61,7 @@ class Zend_Cache_Backend */ public function __construct(array $options = array()) { - while (list($name, $value) = each($options)) { + foreach ($options as $name => $value) { $this->setOption($name, $value); } } diff --git a/library/vendor/Zend/Cache/Backend/Apc.php b/library/vendor/Zend/Cache/Backend/Apc.php new file mode 100644 index 000000000..960532314 --- /dev/null +++ b/library/vendor/Zend/Cache/Backend/Apc.php @@ -0,0 +1,353 @@ + infinite lifetime) + * @return boolean true if no problem + */ + public function save($data, $id, $tags = array(), $specificLifetime = false) + { + $lifetime = $this->getLifetime($specificLifetime); + $result = apc_store($id, array($data, time(), $lifetime), $lifetime); + if (count($tags) > 0) { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_APC_BACKEND); + } + return $result; + } + + /** + * Remove a cache record + * + * @param string $id cache id + * @return boolean true if no problem + */ + public function remove($id) + { + return apc_delete($id); + } + + /** + * Clean some cache records + * + * Available modes are : + * 'all' (default) => remove all cache entries ($tags is not used) + * 'old' => unsupported + * 'matchingTag' => unsupported + * 'notMatchingTag' => unsupported + * 'matchingAnyTag' => unsupported + * + * @param string $mode clean mode + * @param array $tags array of tags + * @throws Zend_Cache_Exception + * @return boolean true if no problem + */ + public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) + { + switch ($mode) { + case Zend_Cache::CLEANING_MODE_ALL: + return apc_clear_cache('user'); + break; + case Zend_Cache::CLEANING_MODE_OLD: + $this->_log("Zend_Cache_Backend_Apc::clean() : CLEANING_MODE_OLD is unsupported by the Apc backend"); + break; + case Zend_Cache::CLEANING_MODE_MATCHING_TAG: + case Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG: + case Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG: + $this->_log(self::TAGS_UNSUPPORTED_BY_CLEAN_OF_APC_BACKEND); + break; + default: + Zend_Cache::throwException('Invalid mode for clean() method'); + break; + } + } + + /** + * Return true if the automatic cleaning is available for the backend + * + * DEPRECATED : use getCapabilities() instead + * + * @deprecated + * @return boolean + */ + public function isAutomaticCleaningAvailable() + { + return false; + } + + /** + * Return the filling percentage of the backend storage + * + * @throws Zend_Cache_Exception + * @return int integer between 0 and 100 + */ + public function getFillingPercentage() + { + $mem = apc_sma_info(true); + $memSize = $mem['num_seg'] * $mem['seg_size']; + $memAvailable= $mem['avail_mem']; + $memUsed = $memSize - $memAvailable; + if ($memSize == 0) { + Zend_Cache::throwException('can\'t get apc memory size'); + } + if ($memUsed > $memSize) { + return 100; + } + return ((int) (100. * ($memUsed / $memSize))); + } + + /** + * Return an array of stored tags + * + * @return array array of stored tags (string) + */ + public function getTags() + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_APC_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which match given tags + * + * In case of multiple tags, a logical AND is made between tags + * + * @param array $tags array of tags + * @return array array of matching cache ids (string) + */ + public function getIdsMatchingTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_APC_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which don't match given tags + * + * In case of multiple tags, a logical OR is made between tags + * + * @param array $tags array of tags + * @return array array of not matching cache ids (string) + */ + public function getIdsNotMatchingTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_APC_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which match any given tags + * + * In case of multiple tags, a logical AND is made between tags + * + * @param array $tags array of tags + * @return array array of any matching cache ids (string) + */ + public function getIdsMatchingAnyTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_APC_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids + * + * @return array array of stored cache ids (string) + */ + public function getIds() + { + $ids = array(); + $iterator = new APCIterator('user', null, APC_ITER_KEY); + foreach ($iterator as $item) { + $ids[] = $item['key']; + } + + return $ids; + } + + /** + * Return an array of metadatas for the given cache id + * + * The array must include these keys : + * - expire : the expire timestamp + * - tags : a string array of tags + * - mtime : timestamp of last modification time + * + * @param string $id cache id + * @return array array of metadatas (false if the cache id is not found) + */ + public function getMetadatas($id) + { + $tmp = apc_fetch($id); + if (is_array($tmp)) { + $data = $tmp[0]; + $mtime = $tmp[1]; + if (!isset($tmp[2])) { + // because this record is only with 1.7 release + // if old cache records are still there... + return false; + } + $lifetime = $tmp[2]; + return array( + 'expire' => $mtime + $lifetime, + 'tags' => array(), + 'mtime' => $mtime + ); + } + return false; + } + + /** + * Give (if possible) an extra lifetime to the given cache id + * + * @param string $id cache id + * @param int $extraLifetime + * @return boolean true if ok + */ + public function touch($id, $extraLifetime) + { + $tmp = apc_fetch($id); + if (is_array($tmp)) { + $data = $tmp[0]; + $mtime = $tmp[1]; + if (!isset($tmp[2])) { + // because this record is only with 1.7 release + // if old cache records are still there... + return false; + } + $lifetime = $tmp[2]; + $newLifetime = $lifetime - (time() - $mtime) + $extraLifetime; + if ($newLifetime <=0) { + return false; + } + apc_store($id, array($data, time(), $newLifetime), $newLifetime); + return true; + } + return false; + } + + /** + * Return an associative array of capabilities (booleans) of the backend + * + * The array must include these keys : + * - automatic_cleaning (is automating cleaning necessary) + * - tags (are tags supported) + * - expired_read (is it possible to read expired cache records + * (for doNotTestCacheValidity option for example)) + * - priority does the backend deal with priority when saving + * - infinite_lifetime (is infinite lifetime can work with this backend) + * - get_list (is it possible to get the list of cache ids and the complete list of tags) + * + * @return array associative of with capabilities + */ + public function getCapabilities() + { + return array( + 'automatic_cleaning' => false, + 'tags' => false, + 'expired_read' => false, + 'priority' => false, + 'infinite_lifetime' => false, + 'get_list' => true + ); + } + +} diff --git a/library/vendor/Zend/Cache/Backend/BlackHole.php b/library/vendor/Zend/Cache/Backend/BlackHole.php index e61ad4bb7..8732c1968 100644 --- a/library/vendor/Zend/Cache/Backend/BlackHole.php +++ b/library/vendor/Zend/Cache/Backend/BlackHole.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_BlackHole diff --git a/library/vendor/Zend/Cache/Backend/ExtendedInterface.php b/library/vendor/Zend/Cache/Backend/ExtendedInterface.php index 1d96f2dcb..2f0f526b7 100644 --- a/library/vendor/Zend/Cache/Backend/ExtendedInterface.php +++ b/library/vendor/Zend/Cache/Backend/ExtendedInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Cache_Backend_ExtendedInterface extends Zend_Cache_Backend_Interface diff --git a/library/vendor/Zend/Cache/Backend/File.php b/library/vendor/Zend/Cache/Backend/File.php index c241f2c2d..0fe5475bf 100644 --- a/library/vendor/Zend/Cache/Backend/File.php +++ b/library/vendor/Zend/Cache/Backend/File.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_File extends Zend_Cache_Backend implements Zend_Cache_Backend_ExtendedInterface diff --git a/library/vendor/Zend/Cache/Backend/Interface.php b/library/vendor/Zend/Cache/Backend/Interface.php index 3a2789529..1bd72d8c1 100644 --- a/library/vendor/Zend/Cache/Backend/Interface.php +++ b/library/vendor/Zend/Cache/Backend/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Cache_Backend_Interface diff --git a/library/vendor/Zend/Cache/Backend/Libmemcached.php b/library/vendor/Zend/Cache/Backend/Libmemcached.php new file mode 100644 index 000000000..ca1f695e6 --- /dev/null +++ b/library/vendor/Zend/Cache/Backend/Libmemcached.php @@ -0,0 +1,482 @@ + (array) servers : + * an array of memcached server ; each memcached server is described by an associative array : + * 'host' => (string) : the name of the memcached server + * 'port' => (int) : the port of the memcached server + * 'weight' => (int) : number of buckets to create for this server which in turn control its + * probability of it being selected. The probability is relative to the total + * weight of all servers. + * =====> (array) client : + * an array of memcached client options ; the memcached client is described by an associative array : + * @see http://php.net/manual/memcached.constants.php + * - The option name can be the name of the constant without the prefix 'OPT_' + * or the integer value of this option constant + * + * @var array available options + */ + protected $_options = array( + 'servers' => array(array( + 'host' => self::DEFAULT_HOST, + 'port' => self::DEFAULT_PORT, + 'weight' => self::DEFAULT_WEIGHT, + )), + 'client' => array() + ); + + /** + * Memcached object + * + * @var mixed memcached object + */ + protected $_memcache = null; + + /** + * Constructor + * + * @param array $options associative array of options + * @throws Zend_Cache_Exception + * @return void + */ + public function __construct(array $options = array()) + { + if (!extension_loaded('memcached')) { + Zend_Cache::throwException('The memcached extension must be loaded for using this backend !'); + } + + // override default client options + $this->_options['client'] = array( + Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT, + Memcached::OPT_HASH => Memcached::HASH_MD5, + Memcached::OPT_LIBKETAMA_COMPATIBLE => true, + ); + + parent::__construct($options); + + if (isset($this->_options['servers'])) { + $value = $this->_options['servers']; + if (isset($value['host'])) { + // in this case, $value seems to be a simple associative array (one server only) + $value = array(0 => $value); // let's transform it into a classical array of associative arrays + } + $this->setOption('servers', $value); + } + $this->_memcache = new Memcached; + + // setup memcached client options + foreach ($this->_options['client'] as $name => $value) { + $optId = null; + if (is_int($name)) { + $optId = $name; + } else { + $optConst = 'Memcached::OPT_' . strtoupper($name); + if (defined($optConst)) { + $optId = constant($optConst); + } else { + $this->_log("Unknown memcached client option '{$name}' ({$optConst})"); + } + } + if (null !== $optId) { + if (!$this->_memcache->setOption($optId, $value)) { + $this->_log("Setting memcached client option '{$optId}' failed"); + } + } + } + + // setup memcached servers + $servers = array(); + foreach ($this->_options['servers'] as $server) { + if (!array_key_exists('port', $server)) { + $server['port'] = self::DEFAULT_PORT; + } + if (!array_key_exists('weight', $server)) { + $server['weight'] = self::DEFAULT_WEIGHT; + } + + $servers[] = array($server['host'], $server['port'], $server['weight']); + } + $this->_memcache->addServers($servers); + } + + /** + * Test if a cache is available for the given id and (if yes) return it (false else) + * + * @param string $id Cache id + * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested + * @return string|false cached datas + */ + public function load($id, $doNotTestCacheValidity = false) + { + $tmp = $this->_memcache->get($id); + if (isset($tmp[0])) { + return $tmp[0]; + } + return false; + } + + /** + * Test if a cache is available or not (for the given id) + * + * @param string $id Cache id + * @return int|false (a cache is not available) or "last modified" timestamp (int) of the available cache record + */ + public function test($id) + { + $tmp = $this->_memcache->get($id); + if (isset($tmp[0], $tmp[1])) { + return (int)$tmp[1]; + } + return false; + } + + /** + * Save some string datas into a cache record + * + * Note : $data is always "string" (serialization is done by the + * core not by the backend) + * + * @param string $data Datas to cache + * @param string $id Cache id + * @param array $tags Array of strings, the cache record will be tagged by each string entry + * @param int $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime) + * @return boolean True if no problem + */ + public function save($data, $id, $tags = array(), $specificLifetime = false) + { + $lifetime = $this->getLifetime($specificLifetime); + + // ZF-8856: using set because add needs a second request if item already exists + $result = @$this->_memcache->set($id, array($data, time(), $lifetime), $lifetime); + if ($result === false) { + $rsCode = $this->_memcache->getResultCode(); + $rsMsg = $this->_memcache->getResultMessage(); + $this->_log("Memcached::set() failed: [{$rsCode}] {$rsMsg}"); + } + + if (count($tags) > 0) { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_LIBMEMCACHED_BACKEND); + } + + return $result; + } + + /** + * Remove a cache record + * + * @param string $id Cache id + * @return boolean True if no problem + */ + public function remove($id) + { + return $this->_memcache->delete($id); + } + + /** + * Clean some cache records + * + * Available modes are : + * 'all' (default) => remove all cache entries ($tags is not used) + * 'old' => unsupported + * 'matchingTag' => unsupported + * 'notMatchingTag' => unsupported + * 'matchingAnyTag' => unsupported + * + * @param string $mode Clean mode + * @param array $tags Array of tags + * @throws Zend_Cache_Exception + * @return boolean True if no problem + */ + public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) + { + switch ($mode) { + case Zend_Cache::CLEANING_MODE_ALL: + return $this->_memcache->flush(); + break; + case Zend_Cache::CLEANING_MODE_OLD: + $this->_log("Zend_Cache_Backend_Libmemcached::clean() : CLEANING_MODE_OLD is unsupported by the Libmemcached backend"); + break; + case Zend_Cache::CLEANING_MODE_MATCHING_TAG: + case Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG: + case Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG: + $this->_log(self::TAGS_UNSUPPORTED_BY_CLEAN_OF_LIBMEMCACHED_BACKEND); + break; + default: + Zend_Cache::throwException('Invalid mode for clean() method'); + break; + } + } + + /** + * Return true if the automatic cleaning is available for the backend + * + * @return boolean + */ + public function isAutomaticCleaningAvailable() + { + return false; + } + + /** + * Set the frontend directives + * + * @param array $directives Assoc of directives + * @throws Zend_Cache_Exception + * @return void + */ + public function setDirectives($directives) + { + parent::setDirectives($directives); + $lifetime = $this->getLifetime(false); + if ($lifetime > 2592000) { + // #ZF-3490 : For the memcached backend, there is a lifetime limit of 30 days (2592000 seconds) + $this->_log('memcached backend has a limit of 30 days (2592000 seconds) for the lifetime'); + } + if ($lifetime === null) { + // #ZF-4614 : we tranform null to zero to get the maximal lifetime + parent::setDirectives(array('lifetime' => 0)); + } + } + + /** + * Return an array of stored cache ids + * + * @return array array of stored cache ids (string) + */ + public function getIds() + { + $this->_log("Zend_Cache_Backend_Libmemcached::save() : getting the list of cache ids is unsupported by the Libmemcached backend"); + return array(); + } + + /** + * Return an array of stored tags + * + * @return array array of stored tags (string) + */ + public function getTags() + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_LIBMEMCACHED_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which match given tags + * + * In case of multiple tags, a logical AND is made between tags + * + * @param array $tags array of tags + * @return array array of matching cache ids (string) + */ + public function getIdsMatchingTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_LIBMEMCACHED_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which don't match given tags + * + * In case of multiple tags, a logical OR is made between tags + * + * @param array $tags array of tags + * @return array array of not matching cache ids (string) + */ + public function getIdsNotMatchingTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_LIBMEMCACHED_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which match any given tags + * + * In case of multiple tags, a logical AND is made between tags + * + * @param array $tags array of tags + * @return array array of any matching cache ids (string) + */ + public function getIdsMatchingAnyTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_LIBMEMCACHED_BACKEND); + return array(); + } + + /** + * Return the filling percentage of the backend storage + * + * @throws Zend_Cache_Exception + * @return int integer between 0 and 100 + */ + public function getFillingPercentage() + { + $mems = $this->_memcache->getStats(); + if ($mems === false) { + return 0; + } + + $memSize = null; + $memUsed = null; + foreach ($mems as $key => $mem) { + if ($mem === false) { + $this->_log('can\'t get stat from ' . $key); + continue; + } + + $eachSize = $mem['limit_maxbytes']; + $eachUsed = $mem['bytes']; + if ($eachUsed > $eachSize) { + $eachUsed = $eachSize; + } + + $memSize += $eachSize; + $memUsed += $eachUsed; + } + + if ($memSize === null || $memUsed === null) { + Zend_Cache::throwException('Can\'t get filling percentage'); + } + + return ((int) (100. * ($memUsed / $memSize))); + } + + /** + * Return an array of metadatas for the given cache id + * + * The array must include these keys : + * - expire : the expire timestamp + * - tags : a string array of tags + * - mtime : timestamp of last modification time + * + * @param string $id cache id + * @return array array of metadatas (false if the cache id is not found) + */ + public function getMetadatas($id) + { + $tmp = $this->_memcache->get($id); + if (isset($tmp[0], $tmp[1], $tmp[2])) { + $data = $tmp[0]; + $mtime = $tmp[1]; + $lifetime = $tmp[2]; + return array( + 'expire' => $mtime + $lifetime, + 'tags' => array(), + 'mtime' => $mtime + ); + } + + return false; + } + + /** + * Give (if possible) an extra lifetime to the given cache id + * + * @param string $id cache id + * @param int $extraLifetime + * @return boolean true if ok + */ + public function touch($id, $extraLifetime) + { + $tmp = $this->_memcache->get($id); + if (isset($tmp[0], $tmp[1], $tmp[2])) { + $data = $tmp[0]; + $mtime = $tmp[1]; + $lifetime = $tmp[2]; + $newLifetime = $lifetime - (time() - $mtime) + $extraLifetime; + if ($newLifetime <=0) { + return false; + } + // #ZF-5702 : we try replace() first becase set() seems to be slower + if (!($result = $this->_memcache->replace($id, array($data, time(), $newLifetime), $newLifetime))) { + $result = $this->_memcache->set($id, array($data, time(), $newLifetime), $newLifetime); + if ($result === false) { + $rsCode = $this->_memcache->getResultCode(); + $rsMsg = $this->_memcache->getResultMessage(); + $this->_log("Memcached::set() failed: [{$rsCode}] {$rsMsg}"); + } + } + return $result; + } + return false; + } + + /** + * Return an associative array of capabilities (booleans) of the backend + * + * The array must include these keys : + * - automatic_cleaning (is automating cleaning necessary) + * - tags (are tags supported) + * - expired_read (is it possible to read expired cache records + * (for doNotTestCacheValidity option for example)) + * - priority does the backend deal with priority when saving + * - infinite_lifetime (is infinite lifetime can work with this backend) + * - get_list (is it possible to get the list of cache ids and the complete list of tags) + * + * @return array associative of with capabilities + */ + public function getCapabilities() + { + return array( + 'automatic_cleaning' => false, + 'tags' => false, + 'expired_read' => false, + 'priority' => false, + 'infinite_lifetime' => false, + 'get_list' => false + ); + } + +} diff --git a/library/vendor/Zend/Cache/Backend/Memcached.php b/library/vendor/Zend/Cache/Backend/Memcached.php new file mode 100644 index 000000000..61ddfdc43 --- /dev/null +++ b/library/vendor/Zend/Cache/Backend/Memcached.php @@ -0,0 +1,507 @@ + (array) servers : + * an array of memcached server ; each memcached server is described by an associative array : + * 'host' => (string) : the name of the memcached server + * 'port' => (int) : the port of the memcached server + * 'persistent' => (bool) : use or not persistent connections to this memcached server + * 'weight' => (int) : number of buckets to create for this server which in turn control its + * probability of it being selected. The probability is relative to the total + * weight of all servers. + * 'timeout' => (int) : value in seconds which will be used for connecting to the daemon. Think twice + * before changing the default value of 1 second - you can lose all the + * advantages of caching if your connection is too slow. + * 'retry_interval' => (int) : controls how often a failed server will be retried, the default value + * is 15 seconds. Setting this parameter to -1 disables automatic retry. + * 'status' => (bool) : controls if the server should be flagged as online. + * 'failure_callback' => (callback) : Allows the user to specify a callback function to run upon + * encountering an error. The callback is run before failover + * is attempted. The function takes two parameters, the hostname + * and port of the failed server. + * + * =====> (boolean) compression : + * true if you want to use on-the-fly compression + * + * =====> (boolean) compatibility : + * true if you use old memcache server or extension + * + * @var array available options + */ + protected $_options = array( + 'servers' => array(array( + 'host' => self::DEFAULT_HOST, + 'port' => self::DEFAULT_PORT, + 'persistent' => self::DEFAULT_PERSISTENT, + 'weight' => self::DEFAULT_WEIGHT, + 'timeout' => self::DEFAULT_TIMEOUT, + 'retry_interval' => self::DEFAULT_RETRY_INTERVAL, + 'status' => self::DEFAULT_STATUS, + 'failure_callback' => self::DEFAULT_FAILURE_CALLBACK + )), + 'compression' => false, + 'compatibility' => false, + ); + + /** + * Memcache object + * + * @var mixed memcache object + */ + protected $_memcache = null; + + /** + * Constructor + * + * @param array $options associative array of options + * @throws Zend_Cache_Exception + * @return void + */ + public function __construct(array $options = array()) + { + if (!extension_loaded('memcache')) { + Zend_Cache::throwException('The memcache extension must be loaded for using this backend !'); + } + parent::__construct($options); + if (isset($this->_options['servers'])) { + $value= $this->_options['servers']; + if (isset($value['host'])) { + // in this case, $value seems to be a simple associative array (one server only) + $value = array(0 => $value); // let's transform it into a classical array of associative arrays + } + $this->setOption('servers', $value); + } + $this->_memcache = new Memcache; + foreach ($this->_options['servers'] as $server) { + if (!array_key_exists('port', $server)) { + $server['port'] = self::DEFAULT_PORT; + } + if (!array_key_exists('persistent', $server)) { + $server['persistent'] = self::DEFAULT_PERSISTENT; + } + if (!array_key_exists('weight', $server)) { + $server['weight'] = self::DEFAULT_WEIGHT; + } + if (!array_key_exists('timeout', $server)) { + $server['timeout'] = self::DEFAULT_TIMEOUT; + } + if (!array_key_exists('retry_interval', $server)) { + $server['retry_interval'] = self::DEFAULT_RETRY_INTERVAL; + } + if (!array_key_exists('status', $server)) { + $server['status'] = self::DEFAULT_STATUS; + } + if (!array_key_exists('failure_callback', $server)) { + $server['failure_callback'] = self::DEFAULT_FAILURE_CALLBACK; + } + if ($this->_options['compatibility']) { + // No status for compatibility mode (#ZF-5887) + $this->_memcache->addServer($server['host'], $server['port'], $server['persistent'], + $server['weight'], $server['timeout'], + $server['retry_interval']); + } else { + $this->_memcache->addServer($server['host'], $server['port'], $server['persistent'], + $server['weight'], $server['timeout'], + $server['retry_interval'], + $server['status'], $server['failure_callback']); + } + } + } + + /** + * Test if a cache is available for the given id and (if yes) return it (false else) + * + * @param string $id Cache id + * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested + * @return string|false cached datas + */ + public function load($id, $doNotTestCacheValidity = false) + { + $tmp = $this->_memcache->get($id); + if (is_array($tmp) && isset($tmp[0])) { + return $tmp[0]; + } + return false; + } + + /** + * Test if a cache is available or not (for the given id) + * + * @param string $id Cache id + * @return mixed|false (a cache is not available) or "last modified" timestamp (int) of the available cache record + */ + public function test($id) + { + $tmp = $this->_memcache->get($id); + if (is_array($tmp)) { + return $tmp[1]; + } + return false; + } + + /** + * Save some string datas into a cache record + * + * Note : $data is always "string" (serialization is done by the + * core not by the backend) + * + * @param string $data Datas to cache + * @param string $id Cache id + * @param array $tags Array of strings, the cache record will be tagged by each string entry + * @param int $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime) + * @return boolean True if no problem + */ + public function save($data, $id, $tags = array(), $specificLifetime = false) + { + $lifetime = $this->getLifetime($specificLifetime); + if ($this->_options['compression']) { + $flag = MEMCACHE_COMPRESSED; + } else { + $flag = 0; + } + + // ZF-8856: using set because add needs a second request if item already exists + $result = @$this->_memcache->set($id, array($data, time(), $lifetime), $flag, $lifetime); + + if (count($tags) > 0) { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_MEMCACHED_BACKEND); + } + + return $result; + } + + /** + * Remove a cache record + * + * @param string $id Cache id + * @return boolean True if no problem + */ + public function remove($id) + { + return $this->_memcache->delete($id, 0); + } + + /** + * Clean some cache records + * + * Available modes are : + * 'all' (default) => remove all cache entries ($tags is not used) + * 'old' => unsupported + * 'matchingTag' => unsupported + * 'notMatchingTag' => unsupported + * 'matchingAnyTag' => unsupported + * + * @param string $mode Clean mode + * @param array $tags Array of tags + * @throws Zend_Cache_Exception + * @return boolean True if no problem + */ + public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) + { + switch ($mode) { + case Zend_Cache::CLEANING_MODE_ALL: + return $this->_memcache->flush(); + break; + case Zend_Cache::CLEANING_MODE_OLD: + $this->_log("Zend_Cache_Backend_Memcached::clean() : CLEANING_MODE_OLD is unsupported by the Memcached backend"); + break; + case Zend_Cache::CLEANING_MODE_MATCHING_TAG: + case Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG: + case Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG: + $this->_log(self::TAGS_UNSUPPORTED_BY_CLEAN_OF_MEMCACHED_BACKEND); + break; + default: + Zend_Cache::throwException('Invalid mode for clean() method'); + break; + } + } + + /** + * Return true if the automatic cleaning is available for the backend + * + * @return boolean + */ + public function isAutomaticCleaningAvailable() + { + return false; + } + + /** + * Set the frontend directives + * + * @param array $directives Assoc of directives + * @throws Zend_Cache_Exception + * @return void + */ + public function setDirectives($directives) + { + parent::setDirectives($directives); + $lifetime = $this->getLifetime(false); + if ($lifetime > 2592000) { + // #ZF-3490 : For the memcached backend, there is a lifetime limit of 30 days (2592000 seconds) + $this->_log('memcached backend has a limit of 30 days (2592000 seconds) for the lifetime'); + } + if ($lifetime === null) { + // #ZF-4614 : we tranform null to zero to get the maximal lifetime + parent::setDirectives(array('lifetime' => 0)); + } + } + + /** + * Return an array of stored cache ids + * + * @return array array of stored cache ids (string) + */ + public function getIds() + { + $this->_log("Zend_Cache_Backend_Memcached::save() : getting the list of cache ids is unsupported by the Memcache backend"); + return array(); + } + + /** + * Return an array of stored tags + * + * @return array array of stored tags (string) + */ + public function getTags() + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_MEMCACHED_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which match given tags + * + * In case of multiple tags, a logical AND is made between tags + * + * @param array $tags array of tags + * @return array array of matching cache ids (string) + */ + public function getIdsMatchingTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_MEMCACHED_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which don't match given tags + * + * In case of multiple tags, a logical OR is made between tags + * + * @param array $tags array of tags + * @return array array of not matching cache ids (string) + */ + public function getIdsNotMatchingTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_MEMCACHED_BACKEND); + return array(); + } + + /** + * Return an array of stored cache ids which match any given tags + * + * In case of multiple tags, a logical AND is made between tags + * + * @param array $tags array of tags + * @return array array of any matching cache ids (string) + */ + public function getIdsMatchingAnyTags($tags = array()) + { + $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_MEMCACHED_BACKEND); + return array(); + } + + /** + * Return the filling percentage of the backend storage + * + * @throws Zend_Cache_Exception + * @return int integer between 0 and 100 + */ + public function getFillingPercentage() + { + $mems = $this->_memcache->getExtendedStats(); + + $memSize = null; + $memUsed = null; + foreach ($mems as $key => $mem) { + if ($mem === false) { + $this->_log('can\'t get stat from ' . $key); + continue; + } + + $eachSize = $mem['limit_maxbytes']; + + /** + * Couchbase 1.x uses 'mem_used' instead of 'bytes' + * @see https://www.couchbase.com/issues/browse/MB-3466 + */ + $eachUsed = isset($mem['bytes']) ? $mem['bytes'] : $mem['mem_used']; + if ($eachUsed > $eachSize) { + $eachUsed = $eachSize; + } + + $memSize += $eachSize; + $memUsed += $eachUsed; + } + + if ($memSize === null || $memUsed === null) { + Zend_Cache::throwException('Can\'t get filling percentage'); + } + + return ((int) (100. * ($memUsed / $memSize))); + } + + /** + * Return an array of metadatas for the given cache id + * + * The array must include these keys : + * - expire : the expire timestamp + * - tags : a string array of tags + * - mtime : timestamp of last modification time + * + * @param string $id cache id + * @return array array of metadatas (false if the cache id is not found) + */ + public function getMetadatas($id) + { + $tmp = $this->_memcache->get($id); + if (is_array($tmp)) { + $data = $tmp[0]; + $mtime = $tmp[1]; + if (!isset($tmp[2])) { + // because this record is only with 1.7 release + // if old cache records are still there... + return false; + } + $lifetime = $tmp[2]; + return array( + 'expire' => $mtime + $lifetime, + 'tags' => array(), + 'mtime' => $mtime + ); + } + return false; + } + + /** + * Give (if possible) an extra lifetime to the given cache id + * + * @param string $id cache id + * @param int $extraLifetime + * @return boolean true if ok + */ + public function touch($id, $extraLifetime) + { + if ($this->_options['compression']) { + $flag = MEMCACHE_COMPRESSED; + } else { + $flag = 0; + } + $tmp = $this->_memcache->get($id); + if (is_array($tmp)) { + $data = $tmp[0]; + $mtime = $tmp[1]; + if (!isset($tmp[2])) { + // because this record is only with 1.7 release + // if old cache records are still there... + return false; + } + $lifetime = $tmp[2]; + $newLifetime = $lifetime - (time() - $mtime) + $extraLifetime; + if ($newLifetime <=0) { + return false; + } + // #ZF-5702 : we try replace() first becase set() seems to be slower + if (!($result = $this->_memcache->replace($id, array($data, time(), $newLifetime), $flag, $newLifetime))) { + $result = $this->_memcache->set($id, array($data, time(), $newLifetime), $flag, $newLifetime); + } + return $result; + } + return false; + } + + /** + * Return an associative array of capabilities (booleans) of the backend + * + * The array must include these keys : + * - automatic_cleaning (is automating cleaning necessary) + * - tags (are tags supported) + * - expired_read (is it possible to read expired cache records + * (for doNotTestCacheValidity option for example)) + * - priority does the backend deal with priority when saving + * - infinite_lifetime (is infinite lifetime can work with this backend) + * - get_list (is it possible to get the list of cache ids and the complete list of tags) + * + * @return array associative of with capabilities + */ + public function getCapabilities() + { + return array( + 'automatic_cleaning' => false, + 'tags' => false, + 'expired_read' => false, + 'priority' => false, + 'infinite_lifetime' => false, + 'get_list' => false + ); + } + +} diff --git a/library/vendor/Zend/Cache/Backend/Sqlite.php b/library/vendor/Zend/Cache/Backend/Sqlite.php index 2b8e911dc..fa6be7db5 100644 --- a/library/vendor/Zend/Cache/Backend/Sqlite.php +++ b/library/vendor/Zend/Cache/Backend/Sqlite.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_Sqlite extends Zend_Cache_Backend implements Zend_Cache_Backend_ExtendedInterface diff --git a/library/vendor/Zend/Cache/Backend/Static.php b/library/vendor/Zend/Cache/Backend/Static.php index c23d31d1e..920302089 100644 --- a/library/vendor/Zend/Cache/Backend/Static.php +++ b/library/vendor/Zend/Cache/Backend/Static.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_Static diff --git a/library/vendor/Zend/Cache/Backend/Test.php b/library/vendor/Zend/Cache/Backend/Test.php index a9cd61bb2..c06f95954 100644 --- a/library/vendor/Zend/Cache/Backend/Test.php +++ b/library/vendor/Zend/Cache/Backend/Test.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_Test extends Zend_Cache_Backend implements Zend_Cache_Backend_ExtendedInterface diff --git a/library/vendor/Zend/Cache/Backend/TwoLevels.php b/library/vendor/Zend/Cache/Backend/TwoLevels.php index 902412952..1e6792b31 100644 --- a/library/vendor/Zend/Cache/Backend/TwoLevels.php +++ b/library/vendor/Zend/Cache/Backend/TwoLevels.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Cache/Backend/WinCache.php b/library/vendor/Zend/Cache/Backend/WinCache.php index f47b998d2..c922280bb 100644 --- a/library/vendor/Zend/Cache/Backend/WinCache.php +++ b/library/vendor/Zend/Cache/Backend/WinCache.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_WinCache extends Zend_Cache_Backend implements Zend_Cache_Backend_ExtendedInterface diff --git a/library/vendor/Zend/Cache/Backend/Xcache.php b/library/vendor/Zend/Cache/Backend/Xcache.php index 6c7e22c28..d78d52d8c 100644 --- a/library/vendor/Zend/Cache/Backend/Xcache.php +++ b/library/vendor/Zend/Cache/Backend/Xcache.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_Xcache extends Zend_Cache_Backend implements Zend_Cache_Backend_Interface diff --git a/library/vendor/Zend/Cache/Backend/ZendPlatform.php b/library/vendor/Zend/Cache/Backend/ZendPlatform.php index 0eea9eef5..8e6f460de 100644 --- a/library/vendor/Zend/Cache/Backend/ZendPlatform.php +++ b/library/vendor/Zend/Cache/Backend/ZendPlatform.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_ZendPlatform extends Zend_Cache_Backend implements Zend_Cache_Backend_Interface diff --git a/library/vendor/Zend/Cache/Backend/ZendServer.php b/library/vendor/Zend/Cache/Backend/ZendServer.php index 47f5539b3..6243d869d 100644 --- a/library/vendor/Zend/Cache/Backend/ZendServer.php +++ b/library/vendor/Zend/Cache/Backend/ZendServer.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Cache_Backend_ZendServer extends Zend_Cache_Backend implements Zend_Cache_Backend_Interface diff --git a/library/vendor/Zend/Cache/Backend/ZendServer/Disk.php b/library/vendor/Zend/Cache/Backend/ZendServer/Disk.php index 017f7d859..09cd126c1 100644 --- a/library/vendor/Zend/Cache/Backend/ZendServer/Disk.php +++ b/library/vendor/Zend/Cache/Backend/ZendServer/Disk.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_ZendServer_Disk extends Zend_Cache_Backend_ZendServer implements Zend_Cache_Backend_Interface diff --git a/library/vendor/Zend/Cache/Backend/ZendServer/ShMem.php b/library/vendor/Zend/Cache/Backend/ZendServer/ShMem.php index 7884362ca..5fe1894df 100644 --- a/library/vendor/Zend/Cache/Backend/ZendServer/ShMem.php +++ b/library/vendor/Zend/Cache/Backend/ZendServer/ShMem.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Backend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Backend_ZendServer_ShMem extends Zend_Cache_Backend_ZendServer implements Zend_Cache_Backend_Interface diff --git a/library/vendor/Zend/Cache/Core.php b/library/vendor/Zend/Cache/Core.php index 7a9626f2b..833f24720 100644 --- a/library/vendor/Zend/Cache/Core.php +++ b/library/vendor/Zend/Cache/Core.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Cache - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @package Zend_Cache - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Core @@ -143,7 +143,7 @@ class Zend_Cache_Core Zend_Cache::throwException("Options passed were not an array" . " or Zend_Config instance."); } - while (list($name, $value) = each($options)) { + foreach ($options as $name => $value) { $this->setOption($name, $value); } $this->_loggerSanity(); @@ -158,7 +158,7 @@ class Zend_Cache_Core public function setConfig(Zend_Config $config) { $options = $config->toArray(); - while (list($name, $value) = each($options)) { + foreach ($options as $name => $value) { $this->setOption($name, $value); } return $this; @@ -300,7 +300,7 @@ class Zend_Cache_Core } $id = $this->_id($id); // cache id may need prefix $this->_lastId = $id; - self::_validateIdOrTag($id); + $this->_validateIdOrTag($id); $this->_log("Zend_Cache_Core: load item '{$id}'", 7); $data = $this->_backend->load($id, $doNotTestCacheValidity); @@ -327,7 +327,7 @@ class Zend_Cache_Core return false; } $id = $this->_id($id); // cache id may need prefix - self::_validateIdOrTag($id); + $this->_validateIdOrTag($id); $this->_lastId = $id; $this->_log("Zend_Cache_Core: test item '{$id}'", 7); @@ -355,8 +355,8 @@ class Zend_Cache_Core } else { $id = $this->_id($id); } - self::_validateIdOrTag($id); - self::_validateTagsArray($tags); + $this->_validateIdOrTag($id); + $this->_validateTagsArray($tags); if ($this->_options['automatic_serialization']) { // we need to serialize datas before storing them $data = serialize($data); @@ -424,7 +424,7 @@ class Zend_Cache_Core return true; } $id = $this->_id($id); // cache id may need prefix - self::_validateIdOrTag($id); + $this->_validateIdOrTag($id); $this->_log("Zend_Cache_Core: remove item '{$id}'", 7); return $this->_backend->remove($id); @@ -460,7 +460,7 @@ class Zend_Cache_Core Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG))) { Zend_Cache::throwException('Invalid cleaning mode'); } - self::_validateTagsArray($tags); + $this->_validateTagsArray($tags); return $this->_backend->clean($mode, $tags); } @@ -667,7 +667,7 @@ class Zend_Cache_Core * @throws Zend_Cache_Exception * @return void */ - protected static function _validateIdOrTag($string) + protected function _validateIdOrTag($string) { if (!is_string($string)) { Zend_Cache::throwException('Invalid id or tag : must be a string'); @@ -689,13 +689,13 @@ class Zend_Cache_Core * @throws Zend_Cache_Exception * @return void */ - protected static function _validateTagsArray($tags) + protected function _validateTagsArray($tags) { if (!is_array($tags)) { Zend_Cache::throwException('Invalid tags array : must be an array'); } foreach($tags as $tag) { - self::_validateIdOrTag($tag); + $this->_validateIdOrTag($tag); } reset($tags); } diff --git a/library/vendor/Zend/Cache/Exception.php b/library/vendor/Zend/Cache/Exception.php index 3a0fde23f..bc3c81518 100644 --- a/library/vendor/Zend/Cache/Exception.php +++ b/library/vendor/Zend/Cache/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Cache - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ /** * @package Zend_Cache - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Exception extends Zend_Exception {} diff --git a/library/vendor/Zend/Cache/Frontend/Capture.php b/library/vendor/Zend/Cache/Frontend/Capture.php index 81c7ed618..4b70da483 100644 --- a/library/vendor/Zend/Cache/Frontend/Capture.php +++ b/library/vendor/Zend/Cache/Frontend/Capture.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Frontend_Capture extends Zend_Cache_Core diff --git a/library/vendor/Zend/Cache/Frontend/Class.php b/library/vendor/Zend/Cache/Frontend/Class.php index af584d17e..c7208a19e 100644 --- a/library/vendor/Zend/Cache/Frontend/Class.php +++ b/library/vendor/Zend/Cache/Frontend/Class.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Frontend_Class extends Zend_Cache_Core @@ -105,7 +105,7 @@ class Zend_Cache_Frontend_Class extends Zend_Cache_Core */ public function __construct(array $options = array()) { - while (list($name, $value) = each($options)) { + foreach ($options as $name => $value) { $this->setOption($name, $value); } if ($this->_specificOptions['cached_entity'] === null) { diff --git a/library/vendor/Zend/Cache/Frontend/File.php b/library/vendor/Zend/Cache/Frontend/File.php index 31edc38b2..98cd5a3b6 100644 --- a/library/vendor/Zend/Cache/Frontend/File.php +++ b/library/vendor/Zend/Cache/Frontend/File.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Frontend_File extends Zend_Cache_Core @@ -87,7 +87,7 @@ class Zend_Cache_Frontend_File extends Zend_Cache_Core */ public function __construct(array $options = array()) { - while (list($name, $value) = each($options)) { + foreach ($options as $name => $value) { $this->setOption($name, $value); } if (!isset($this->_specificOptions['master_files'])) { diff --git a/library/vendor/Zend/Cache/Frontend/Function.php b/library/vendor/Zend/Cache/Frontend/Function.php index ca09ee3f5..3dc7fd82a 100644 --- a/library/vendor/Zend/Cache/Frontend/Function.php +++ b/library/vendor/Zend/Cache/Frontend/Function.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Frontend_Function extends Zend_Cache_Core @@ -62,7 +62,7 @@ class Zend_Cache_Frontend_Function extends Zend_Cache_Core */ public function __construct(array $options = array()) { - while (list($name, $value) = each($options)) { + foreach ($options as $name => $value) { $this->setOption($name, $value); } $this->setOption('automatic_serialization', true); diff --git a/library/vendor/Zend/Cache/Frontend/Output.php b/library/vendor/Zend/Cache/Frontend/Output.php index 115b5dd1c..dd8fe8d70 100644 --- a/library/vendor/Zend/Cache/Frontend/Output.php +++ b/library/vendor/Zend/Cache/Frontend/Output.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Frontend_Output extends Zend_Cache_Core diff --git a/library/vendor/Zend/Cache/Frontend/Page.php b/library/vendor/Zend/Cache/Frontend/Page.php index f08595dbb..832628125 100644 --- a/library/vendor/Zend/Cache/Frontend/Page.php +++ b/library/vendor/Zend/Cache/Frontend/Page.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @package Zend_Cache * @subpackage Zend_Cache_Frontend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Frontend_Page extends Zend_Cache_Core @@ -128,7 +128,7 @@ class Zend_Cache_Frontend_Page extends Zend_Cache_Core */ public function __construct(array $options = array()) { - while (list($name, $value) = each($options)) { + foreach ($options as $name => $value) { $name = strtolower($name); switch ($name) { case 'regexps': diff --git a/library/vendor/Zend/Cache/Manager.php b/library/vendor/Zend/Cache/Manager.php index b7af8cf98..5196c193d 100644 --- a/library/vendor/Zend/Cache/Manager.php +++ b/library/vendor/Zend/Cache/Manager.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Cache - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Cache - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Cache_Manager diff --git a/library/vendor/Zend/Captcha/Adapter.php b/library/vendor/Zend/Captcha/Adapter.php new file mode 100644 index 000000000..e3a451d05 --- /dev/null +++ b/library/vendor/Zend/Captcha/Adapter.php @@ -0,0 +1,75 @@ +_name; + } + + /** + * Set name + * + * @param string $name + * @return Zend_Captcha_Adapter + */ + public function setName($name) + { + $this->_name = $name; + return $this; + } + + /** + * Constructor + * + * @param array|Zend_Config $options + */ + public function __construct($options = null) + { + // Set options + if (is_array($options)) { + $this->setOptions($options); + } else if ($options instanceof Zend_Config) { + $this->setConfig($options); + } + } + + /** + * Set single option for the object + * + * @param string $key + * @param string $value + * @return Zend_Form_Element + */ + public function setOption($key, $value) + { + if (in_array(strtolower($key), $this->_skipOptions)) { + return $this; + } + + $method = 'set' . ucfirst ($key); + if (method_exists ($this, $method)) { + // Setter exists; use it + $this->$method ($value); + $this->_options[$key] = $value; + } elseif (property_exists($this, $key)) { + // Assume it's metadata + $this->$key = $value; + $this->_options[$key] = $value; + } + return $this; + } + + /** + * Set object state from options array + * + * @param array $options + * @return Zend_Form_Element + */ + public function setOptions($options = null) + { + foreach ($options as $key => $value) { + $this->setOption($key, $value); + } + return $this; + } + + /** + * Retrieve options representing object state + * + * @return array + */ + public function getOptions() + { + return $this->_options; + } + + /** + * Set object state from config object + * + * @param Zend_Config $config + * @return Zend_Captcha_Base + */ + public function setConfig(Zend_Config $config) + { + return $this->setOptions($config->toArray()); + } + + /** + * Get optional decorator + * + * By default, return null, indicating no extra decorator needed. + * + * @return null + */ + public function getDecorator() + { + return null; + } +} diff --git a/library/vendor/Zend/Captcha/Dumb.php b/library/vendor/Zend/Captcha/Dumb.php new file mode 100644 index 000000000..413f0e467 --- /dev/null +++ b/library/vendor/Zend/Captcha/Dumb.php @@ -0,0 +1,74 @@ +_label = $label; + } + + /** + * Retrieve the label for the CAPTCHA + * @return string + */ + public function getLabel() + { + return $this->_label; + } + /** + * Render the captcha + * + * @param Zend_View_Interface $view + * @param mixed $element + * @return string + */ + public function render(Zend_View_Interface $view = null, $element = null) + { + return $this->getLabel() . ': ' + . strrev($this->getWord()) + . ''; + } +} diff --git a/library/vendor/Zend/Captcha/Exception.php b/library/vendor/Zend/Captcha/Exception.php new file mode 100644 index 000000000..449cd5146 --- /dev/null +++ b/library/vendor/Zend/Captcha/Exception.php @@ -0,0 +1,36 @@ +_figlet = new Zend_Text_Figlet($options); + } + + /** + * Generate new captcha + * + * @return string + */ + public function generate() + { + $this->_useNumbers = false; + return parent::generate(); + } + + /** + * Display the captcha + * + * @param Zend_View_Interface $view + * @param mixed $element + * @return string + */ + public function render(Zend_View_Interface $view = null, $element = null) + { + return '
'
+             . $this->_figlet->render($this->getWord())
+             . "
\n"; + } +} diff --git a/library/vendor/Zend/Captcha/Image.php b/library/vendor/Zend/Captcha/Image.php new file mode 100644 index 000000000..c8c85fbbb --- /dev/null +++ b/library/vendor/Zend/Captcha/Image.php @@ -0,0 +1,619 @@ +_imgAlt; + } + /** + * @return string + */ + public function getStartImage () + { + return $this->_startImage; + } + /** + * @return int + */ + public function getDotNoiseLevel () + { + return $this->_dotNoiseLevel; + } + /** + * @return int + */ + public function getLineNoiseLevel () + { + return $this->_lineNoiseLevel; + } + /** + * Get captcha expiration + * + * @return int + */ + public function getExpiration() + { + return $this->_expiration; + } + + /** + * Get garbage collection frequency + * + * @return int + */ + public function getGcFreq() + { + return $this->_gcFreq; + } + /** + * Get font to use when generating captcha + * + * @return string + */ + public function getFont() + { + return $this->_font; + } + + /** + * Get font size + * + * @return int + */ + public function getFontSize() + { + return $this->_fsize; + } + + /** + * Get captcha image height + * + * @return int + */ + public function getHeight() + { + return $this->_height; + } + + /** + * Get captcha image directory + * + * @return string + */ + public function getImgDir() + { + return $this->_imgDir; + } + /** + * Get captcha image base URL + * + * @return string + */ + public function getImgUrl() + { + return $this->_imgUrl; + } + /** + * Get captcha image file suffix + * + * @return string + */ + public function getSuffix() + { + return $this->_suffix; + } + /** + * Get captcha image width + * + * @return int + */ + public function getWidth() + { + return $this->_width; + } + + /** + * Set start image + * + * @param string $startImage + * @return Zend_Captcha_Image + */ + public function setStartImage ($startImage) + { + $this->_startImage = $startImage; + return $this; + } + + /** + * Set dot noise level + * + * @param int $dotNoiseLevel + * @return Zend_Captcha_Image + */ + public function setDotNoiseLevel ($dotNoiseLevel) + { + $this->_dotNoiseLevel = $dotNoiseLevel; + return $this; + } + + /** + * Set line noise level + * + * @param int $lineNoiseLevel + * @return Zend_Captcha_Image + */ + public function setLineNoiseLevel ($lineNoiseLevel) + { + $this->_lineNoiseLevel = $lineNoiseLevel; + return $this; + } + + /** + * Set captcha expiration + * + * @param int $expiration + * @return Zend_Captcha_Image + */ + public function setExpiration($expiration) + { + $this->_expiration = $expiration; + return $this; + } + + /** + * Set garbage collection frequency + * + * @param int $gcFreq + * @return Zend_Captcha_Image + */ + public function setGcFreq($gcFreq) + { + $this->_gcFreq = $gcFreq; + return $this; + } + + /** + * Set captcha font + * + * @param string $font + * @return Zend_Captcha_Image + */ + public function setFont($font) + { + $this->_font = $font; + return $this; + } + + /** + * Set captcha font size + * + * @param int $fsize + * @return Zend_Captcha_Image + */ + public function setFontSize($fsize) + { + $this->_fsize = $fsize; + return $this; + } + + /** + * Set captcha image height + * + * @param int $height + * @return Zend_Captcha_Image + */ + public function setHeight($height) + { + $this->_height = $height; + return $this; + } + + /** + * Set captcha image storage directory + * + * @param string $imgDir + * @return Zend_Captcha_Image + */ + public function setImgDir($imgDir) + { + $this->_imgDir = rtrim($imgDir, "/\\") . '/'; + return $this; + } + + /** + * Set captcha image base URL + * + * @param string $imgUrl + * @return Zend_Captcha_Image + */ + public function setImgUrl($imgUrl) + { + $this->_imgUrl = rtrim($imgUrl, "/\\") . '/'; + return $this; + } + + /** + * Set image alternative text + * + * @param string $imgAlt + * @return Zend_Captcha_Image + */ + public function setImgAlt ($imgAlt) + { + $this->_imgAlt = $imgAlt; + return $this; + } + + /** + * Set captch image filename suffix + * + * @param string $suffix + * @return Zend_Captcha_Image + */ + public function setSuffix($suffix) + { + $this->_suffix = $suffix; + return $this; + } + + /** + * Set captcha image width + * + * @param int $width + * @return Zend_Captcha_Image + */ + public function setWidth($width) + { + $this->_width = $width; + return $this; + } + + /** + * Generate random frequency + * + * @return float + */ + protected function _randomFreq() + { + return mt_rand(700000, 1000000) / 15000000; + } + + /** + * Generate random phase + * + * @return float + */ + protected function _randomPhase() + { + // random phase from 0 to pi + return mt_rand(0, 3141592) / 1000000; + } + + /** + * Generate random character size + * + * @return int + */ + protected function _randomSize() + { + return mt_rand(300, 700) / 100; + } + + /** + * Generate captcha + * + * @return string captcha ID + */ + public function generate() + { + $id = parent::generate(); + $tries = 5; + // If there's already such file, try creating a new ID + while($tries-- && file_exists($this->getImgDir() . $id . $this->getSuffix())) { + $id = $this->_generateRandomId(); + $this->_setId($id); + } + $this->_generateImage($id, $this->getWord()); + + if (mt_rand(1, $this->getGcFreq()) == 1) { + $this->_gc(); + } + return $id; + } + + /** + * Generate image captcha + * + * Override this function if you want different image generator + * Wave transform from http://www.captcha.ru/captchas/multiwave/ + * + * @param string $id Captcha ID + * @param string $word Captcha word + * @throws Zend_Captcha_Exception + */ + protected function _generateImage($id, $word) + { + if (!extension_loaded("gd")) { + throw new Zend_Captcha_Exception("Image CAPTCHA requires GD extension"); + } + + if (!function_exists("imagepng")) { + throw new Zend_Captcha_Exception("Image CAPTCHA requires PNG support"); + } + + if (!function_exists("imageftbbox")) { + throw new Zend_Captcha_Exception("Image CAPTCHA requires FT fonts support"); + } + + $font = $this->getFont(); + + if (empty($font)) { + throw new Zend_Captcha_Exception("Image CAPTCHA requires font"); + } + + $w = $this->getWidth(); + $h = $this->getHeight(); + $fsize = $this->getFontSize(); + + $img_file = $this->getImgDir() . $id . $this->getSuffix(); + if(empty($this->_startImage)) { + $img = imagecreatetruecolor($w, $h); + } else { + $img = imagecreatefrompng($this->_startImage); + if(!$img) { + throw new Zend_Captcha_Exception("Can not load start image"); + } + $w = imagesx($img); + $h = imagesy($img); + } + $text_color = imagecolorallocate($img, 0, 0, 0); + $bg_color = imagecolorallocate($img, 255, 255, 255); + imagefilledrectangle($img, 0, 0, $w-1, $h-1, $bg_color); + $textbox = imageftbbox($fsize, 0, $font, $word); + $x = ($w - ($textbox[2] - $textbox[0])) / 2; + $y = ($h - ($textbox[7] - $textbox[1])) / 2; + imagefttext($img, $fsize, 0, $x, $y, $text_color, $font, $word); + + // generate noise + for ($i=0; $i<$this->_dotNoiseLevel; $i++) { + imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color); + } + for($i=0; $i<$this->_lineNoiseLevel; $i++) { + imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color); + } + + // transformed image + $img2 = imagecreatetruecolor($w, $h); + $bg_color = imagecolorallocate($img2, 255, 255, 255); + imagefilledrectangle($img2, 0, 0, $w-1, $h-1, $bg_color); + // apply wave transforms + $freq1 = $this->_randomFreq(); + $freq2 = $this->_randomFreq(); + $freq3 = $this->_randomFreq(); + $freq4 = $this->_randomFreq(); + + $ph1 = $this->_randomPhase(); + $ph2 = $this->_randomPhase(); + $ph3 = $this->_randomPhase(); + $ph4 = $this->_randomPhase(); + + $szx = $this->_randomSize(); + $szy = $this->_randomSize(); + + for ($x = 0; $x < $w; $x++) { + for ($y = 0; $y < $h; $y++) { + $sx = $x + (sin($x*$freq1 + $ph1) + sin($y*$freq3 + $ph3)) * $szx; + $sy = $y + (sin($x*$freq2 + $ph2) + sin($y*$freq4 + $ph4)) * $szy; + + if ($sx < 0 || $sy < 0 || $sx >= $w - 1 || $sy >= $h - 1) { + continue; + } else { + $color = (imagecolorat($img, $sx, $sy) >> 16) & 0xFF; + $color_x = (imagecolorat($img, $sx + 1, $sy) >> 16) & 0xFF; + $color_y = (imagecolorat($img, $sx, $sy + 1) >> 16) & 0xFF; + $color_xy = (imagecolorat($img, $sx + 1, $sy + 1) >> 16) & 0xFF; + } + if ($color == 255 && $color_x == 255 && $color_y == 255 && $color_xy == 255) { + // ignore background + continue; + } elseif ($color == 0 && $color_x == 0 && $color_y == 0 && $color_xy == 0) { + // transfer inside of the image as-is + $newcolor = 0; + } else { + // do antialiasing for border items + $frac_x = $sx-floor($sx); + $frac_y = $sy-floor($sy); + $frac_x1 = 1-$frac_x; + $frac_y1 = 1-$frac_y; + + $newcolor = $color * $frac_x1 * $frac_y1 + + $color_x * $frac_x * $frac_y1 + + $color_y * $frac_x1 * $frac_y + + $color_xy * $frac_x * $frac_y; + } + imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newcolor, $newcolor, $newcolor)); + } + } + + // generate noise + for ($i=0; $i<$this->_dotNoiseLevel; $i++) { + imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color); + } + for ($i=0; $i<$this->_lineNoiseLevel; $i++) { + imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color); + } + + imagepng($img2, $img_file); + imagedestroy($img); + imagedestroy($img2); + } + + /** + * Remove old files from image directory + */ + protected function _gc() + { + $expire = time() - $this->getExpiration(); + $imgdir = $this->getImgDir(); + if(!$imgdir || strlen($imgdir) < 2) { + // safety guard + return; + } + $suffixLength = strlen($this->_suffix); + foreach (new DirectoryIterator($imgdir) as $file) { + if (!$file->isDot() && !$file->isDir()) { + if (file_exists($file->getPathname()) && $file->getMTime() < $expire) { + // only deletes files ending with $this->_suffix + if (substr($file->getFilename(), -($suffixLength)) == $this->_suffix) { + unlink($file->getPathname()); + } + } + } + } + } + + /** + * Display the captcha + * + * @param Zend_View_Interface $view + * @param mixed $element + * @return string + */ + public function render(Zend_View_Interface $view = null, $element = null) + { + $endTag = ' />'; + if (($view instanceof Zend_View_Abstract) && !$view->doctype()->isXhtml()) { + $endTag = '>'; + } + return '' . $this->getImgAlt()
+             . ' 'Missing captcha fields', + self::ERR_CAPTCHA => 'Failed to validate captcha', + self::BAD_CAPTCHA => 'Captcha value is wrong: %value%', + ); + + /** + * Retrieve ReCaptcha Private key + * + * @return string + */ + public function getPrivkey() + { + return $this->getService()->getPrivateKey(); + } + + /** + * Retrieve ReCaptcha Public key + * + * @return string + */ + public function getPubkey() + { + return $this->getService()->getPublicKey(); + } + + /** + * Set ReCaptcha Private key + * + * @param string $privkey + * @return Zend_Captcha_ReCaptcha + */ + public function setPrivkey($privkey) + { + $this->getService()->setPrivateKey($privkey); + return $this; + } + + /** + * Set ReCaptcha public key + * + * @param string $pubkey + * @return Zend_Captcha_ReCaptcha + */ + public function setPubkey($pubkey) + { + $this->getService()->setPublicKey($pubkey); + return $this; + } + + /** + * Constructor + * + * @param array|Zend_Config $options + */ + public function __construct($options = null) + { + $this->setService(new Zend_Service_ReCaptcha()); + $this->_serviceParams = $this->getService()->getParams(); + $this->_serviceOptions = $this->getService()->getOptions(); + + parent::__construct($options); + + if ($options instanceof Zend_Config) { + $options = $options->toArray(); + } + if (!empty($options)) { + $this->setOptions($options); + } + } + + /** + * Set service object + * + * @param Zend_Service_ReCaptcha $service + * @return Zend_Captcha_ReCaptcha + */ + public function setService(Zend_Service_ReCaptcha $service) + { + $this->_service = $service; + return $this; + } + + /** + * Retrieve ReCaptcha service object + * + * @return Zend_Service_ReCaptcha + */ + public function getService() + { + return $this->_service; + } + + /** + * Set option + * + * If option is a service parameter, proxies to the service. The same + * goes for any service options (distinct from service params) + * + * @param string $key + * @param mixed $value + * @return Zend_Captcha_ReCaptcha + */ + public function setOption($key, $value) + { + $service = $this->getService(); + if (isset($this->_serviceParams[$key])) { + $service->setParam($key, $value); + return $this; + } + if (isset($this->_serviceOptions[$key])) { + $service->setOption($key, $value); + return $this; + } + return parent::setOption($key, $value); + } + + /** + * Generate captcha + * + * @see Zend_Form_Captcha_Adapter::generate() + * @return string + */ + public function generate() + { + return ""; + } + + /** + * Validate captcha + * + * @see Zend_Validate_Interface::isValid() + * @param mixed $value + * @param array|null $context + * @return boolean + */ + public function isValid($value, $context = null) + { + if (!is_array($value) && !is_array($context)) { + $this->_error(self::MISSING_VALUE); + return false; + } + + if (!is_array($value) && is_array($context)) { + $value = $context; + } + + if (empty($value[$this->_CHALLENGE]) || empty($value[$this->_RESPONSE])) { + $this->_error(self::MISSING_VALUE); + return false; + } + + $service = $this->getService(); + + $res = $service->verify($value[$this->_CHALLENGE], $value[$this->_RESPONSE]); + + if (!$res) { + $this->_error(self::ERR_CAPTCHA); + return false; + } + + if (!$res->isValid()) { + $this->_error(self::BAD_CAPTCHA, $res->getErrorCode()); + $service->setParam('error', $res->getErrorCode()); + return false; + } + + return true; + } + + /** + * Render captcha + * + * @param Zend_View_Interface $view + * @param mixed $element + * @return string + */ + public function render(Zend_View_Interface $view = null, $element = null) + { + $name = null; + if ($element instanceof Zend_Form_Element) { + $name = $element->getBelongsTo(); + } + return $this->getService()->getHTML($name); + } + + /** + * Get captcha decorator + * + * @return string + */ + public function getDecorator() + { + return "Captcha_ReCaptcha"; + } +} diff --git a/library/vendor/Zend/Captcha/Word.php b/library/vendor/Zend/Captcha/Word.php new file mode 100644 index 000000000..e392ba1f1 --- /dev/null +++ b/library/vendor/Zend/Captcha/Word.php @@ -0,0 +1,417 @@ + 'Empty captcha value', + self::MISSING_ID => 'Captcha ID field is missing', + self::BAD_CAPTCHA => 'Captcha value is wrong', + ); + + /** + * Length of the word to generate + * + * @var integer + */ + protected $_wordlen = 8; + + /** + * Retrieve session class to utilize + * + * @return string + */ + public function getSessionClass() + { + return $this->_sessionClass; + } + + /** + * Set session class for persistence + * + * @param string $_sessionClass + * @return Zend_Captcha_Word + */ + public function setSessionClass($_sessionClass) + { + $this->_sessionClass = $_sessionClass; + return $this; + } + + /** + * Retrieve word length to use when genrating captcha + * + * @return integer + */ + public function getWordlen() + { + return $this->_wordlen; + } + + /** + * Set word length of captcha + * + * @param integer $wordlen + * @return Zend_Captcha_Word + */ + public function setWordlen($wordlen) + { + $this->_wordlen = $wordlen; + return $this; + } + + /** + * Retrieve captcha ID + * + * @return string + */ + public function getId () + { + if (null === $this->_id) { + $this->_setId($this->_generateRandomId()); + } + return $this->_id; + } + + /** + * Set captcha identifier + * + * @param string $id + * @return Zend_Captcha_Word + */ + protected function _setId ($id) + { + $this->_id = $id; + return $this; + } + + /** + * Set timeout for session token + * + * @param int $ttl + * @return Zend_Captcha_Word + */ + public function setTimeout($ttl) + { + $this->_timeout = (int) $ttl; + return $this; + } + + /** + * Get session token timeout + * + * @return int + */ + public function getTimeout() + { + return $this->_timeout; + } + + /** + * Sets if session should be preserved on generate() + * + * @param bool $keepSession Should session be kept on generate()? + * @return Zend_Captcha_Word + */ + public function setKeepSession($keepSession) + { + $this->_keepSession = $keepSession; + return $this; + } + + /** + * Numbers should be included in the pattern? + * + * @return bool + */ + public function getUseNumbers() + { + return $this->_useNumbers; + } + + /** + * Set if numbers should be included in the pattern + * + * @param bool $_useNumbers numbers should be included in the pattern? + * @return Zend_Captcha_Word + */ + public function setUseNumbers($_useNumbers) + { + $this->_useNumbers = $_useNumbers; + return $this; + } + + /** + * Get session object + * + * @return Zend_Session_Namespace + */ + public function getSession() + { + if (!isset($this->_session) || (null === $this->_session)) { + $id = $this->getId(); + if (!class_exists($this->_sessionClass)) { + Zend_Loader::loadClass($this->_sessionClass); + } + $this->_session = new $this->_sessionClass('Zend_Form_Captcha_' . $id); + $this->_session->setExpirationHops(1, null, true); + $this->_session->setExpirationSeconds($this->getTimeout()); + } + return $this->_session; + } + + /** + * Set session namespace object + * + * @param Zend_Session_Namespace $session + * @return Zend_Captcha_Word + */ + public function setSession(Zend_Session_Namespace $session) + { + $this->_session = $session; + if($session) { + $this->_keepSession = true; + } + return $this; + } + + /** + * Get captcha word + * + * @return string + */ + public function getWord() + { + if (empty($this->_word)) { + $session = $this->getSession(); + $this->_word = $session->word; + } + return $this->_word; + } + + /** + * Set captcha word + * + * @param string $word + * @return Zend_Captcha_Word + */ + protected function _setWord($word) + { + $session = $this->getSession(); + $session->word = $word; + $this->_word = $word; + return $this; + } + + /** + * Generate new random word + * + * @return string + */ + protected function _generateWord() + { + $word = ''; + $wordLen = $this->getWordLen(); + $vowels = $this->_useNumbers ? self::$VN : self::$V; + $consonants = $this->_useNumbers ? self::$CN : self::$C; + + for ($i=0; $i < $wordLen; $i = $i + 2) { + // generate word with mix of vowels and consonants + $consonant = $consonants[array_rand($consonants)]; + $vowel = $vowels[array_rand($vowels)]; + $word .= $consonant . $vowel; + } + + if (strlen($word) > $wordLen) { + $word = substr($word, 0, $wordLen); + } + + return $word; + } + + /** + * Generate new session ID and new word + * + * @return string session ID + */ + public function generate() + { + if(!$this->_keepSession) { + $this->_session = null; + } + $id = $this->_generateRandomId(); + $this->_setId($id); + $word = $this->_generateWord(); + $this->_setWord($word); + return $id; + } + + protected function _generateRandomId() + { + return md5(mt_rand(0, 1000) . microtime(true)); + } + + /** + * Validate the word + * + * @see Zend_Validate_Interface::isValid() + * @param mixed $value + * @param array|null $context + * @return boolean + */ + public function isValid($value, $context = null) + { + if (!is_array($value) && !is_array($context)) { + $this->_error(self::MISSING_VALUE); + return false; + } + if (!is_array($value) && is_array($context)) { + $value = $context; + } + + $name = $this->getName(); + + if (isset($value[$name])) { + $value = $value[$name]; + } + + if (!isset($value['input'])) { + $this->_error(self::MISSING_VALUE); + return false; + } + $input = strtolower($value['input']); + $this->_setValue($input); + + if (!isset($value['id'])) { + $this->_error(self::MISSING_ID); + return false; + } + + $this->_id = $value['id']; + if ($input !== $this->getWord()) { + $this->_error(self::BAD_CAPTCHA); + return false; + } + + return true; + } + + /** + * Get captcha decorator + * + * @return string + */ + public function getDecorator() + { + return "Captcha_Word"; + } +} diff --git a/library/vendor/Zend/Cloud/AbstractFactory.php b/library/vendor/Zend/Cloud/AbstractFactory.php deleted file mode 100644 index aaf02a01d..000000000 --- a/library/vendor/Zend/Cloud/AbstractFactory.php +++ /dev/null @@ -1,66 +0,0 @@ -toArray(); - } - - if (!isset($options[$adapterOption])) { - return null; - } - - $classname = $options[$adapterOption]; - unset($options[$adapterOption]); - if (!class_exists($classname)) { - Zend_Loader::loadClass($classname); - } - - return new $classname($options); - } -} diff --git a/library/vendor/Zend/Cloud/DocumentService/Adapter.php b/library/vendor/Zend/Cloud/DocumentService/Adapter.php deleted file mode 100644 index 756f662d0..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/Adapter.php +++ /dev/null @@ -1,155 +0,0 @@ -_documentClass = (string) $class; - return $this; - } - - /** - * Get the class for document objects - * - * @return string - */ - public function getDocumentClass() - { - return $this->_documentClass; - } - - /** - * Set the class for document set objects - * - * @param string $class - * @return Zend_Cloud_DocumentService_Adapter_AbstractAdapter - */ - public function setDocumentSetClass($class) - { - $this->_documentSetClass = (string) $class; - return $this; - } - - /** - * Get the class for document set objects - * - * @return string - */ - public function getDocumentSetClass() - { - return $this->_documentSetClass; - } - - /** - * Set the query class for query objects - * - * @param string $class - * @return Zend_Cloud_DocumentService_Adapter_AbstractAdapter - */ - public function setQueryClass($class) - { - $this->_queryClass = (string) $class; - return $this; - } - - /** - * Get the class for query objects - * - * @return string - */ - public function getQueryClass() - { - return $this->_queryClass; - } -} diff --git a/library/vendor/Zend/Cloud/DocumentService/Adapter/SimpleDb.php b/library/vendor/Zend/Cloud/DocumentService/Adapter/SimpleDb.php deleted file mode 100644 index af96c917e..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/Adapter/SimpleDb.php +++ /dev/null @@ -1,462 +0,0 @@ -toArray(); - } - - if (!is_array($options)) { - throw new Zend_Cloud_DocumentService_Exception('Invalid options provided to constructor'); - } - - $this->_simpleDb = new Zend_Service_Amazon_SimpleDb( - $options[self::AWS_ACCESS_KEY], $options[self::AWS_SECRET_KEY] - ); - - if (isset($options[self::HTTP_ADAPTER])) { - $this->_simpleDb->getHttpClient()->setAdapter($options[self::HTTP_ADAPTER]); - } - - if (isset($options[self::DOCUMENT_CLASS])) { - $this->setDocumentClass($options[self::DOCUMENT_CLASS]); - } - - if (isset($options[self::DOCUMENTSET_CLASS])) { - $this->setDocumentSetClass($options[self::DOCUMENTSET_CLASS]); - } - - if (isset($options[self::QUERY_CLASS])) { - $this->setQueryClass($options[self::QUERY_CLASS]); - } - } - - /** - * Create collection. - * - * @param string $name - * @param array $options - * @return void - */ - public function createCollection($name, $options = null) - { - try { - $this->_simpleDb->createDomain($name); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on domain creation: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Delete collection. - * - * @param string $name - * @param array $options - * @return void - */ - public function deleteCollection($name, $options = null) - { - try { - $this->_simpleDb->deleteDomain($name); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on collection deletion: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * List collections. - * - * @param array $options - * @return array - */ - public function listCollections($options = null) - { - try { - // TODO package this in Pages - $domains = $this->_simpleDb->listDomains()->getData(); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on collection deletion: '.$e->getMessage(), $e->getCode(), $e); - } - - return $domains; - } - - /** - * List documents - * - * Returns a key/value array of document names to document objects. - * - * @param string $collectionName Name of collection for which to list documents - * @param array|null $options - * @return Zend_Cloud_DocumentService_DocumentSet - */ - public function listDocuments($collectionName, array $options = null) - { - $query = $this->select('*')->from($collectionName); - $items = $this->query($collectionName, $query, $options); - return $items; - } - - /** - * Insert document - * - * @param string $collectionName Collection into which to insert document - * @param array|Zend_Cloud_DocumentService_Document $document - * @param array $options - * @return void - */ - public function insertDocument($collectionName, $document, $options = null) - { - if (is_array($document)) { - $document = $this->_getDocumentFromArray($document); - } - - if (!$document instanceof Zend_Cloud_DocumentService_Document) { - throw new Zend_Cloud_DocumentService_Exception('Invalid document supplied'); - } - - try { - $this->_simpleDb->putAttributes( - $collectionName, - $document->getID(), - $this->_makeAttributes($document->getID(), $document->getFields()) - ); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document insertion: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Replace an existing document with a new version - * - * @param string $collectionName - * @param array|Zend_Cloud_DocumentService_Document $document - * @param array $options - * @return void - */ - public function replaceDocument($collectionName, $document, $options = null) - { - if (is_array($document)) { - $document = $this->_getDocumentFromArray($document); - } - - if (!$document instanceof Zend_Cloud_DocumentService_Document) { - throw new Zend_Cloud_DocumentService_Exception('Invalid document supplied'); - } - - // Delete document first, then insert. PutAttributes always keeps any - // fields not referenced in the payload, but present in the document - $documentId = $document->getId(); - $fields = $document->getFields(); - $docClass = get_class($document); - $this->deleteDocument($collectionName, $document, $options); - - $document = new $docClass($fields, $documentId); - $this->insertDocument($collectionName, $document); - } - - /** - * Update document. The new document replaces the existing document. - * - * Option 'merge' specifies to add all attributes (if true) or - * specific attributes ("attr" => true) instead of replacing them. - * By default, attributes are replaced. - * - * @param string $collectionName - * @param mixed|Zend_Cloud_DocumentService_Document $documentId Document ID, adapter-dependent - * @param array|Zend_Cloud_DocumentService_Document $fieldset Set of fields to update - * @param array $options - * @return boolean - */ - public function updateDocument($collectionName, $documentId, $fieldset = null, $options = null) - { - if (null === $fieldset && $documentId instanceof Zend_Cloud_DocumentService_Document) { - $fieldset = $documentId->getFields(); - if (empty($documentId)) { - $documentId = $documentId->getId(); - } - } elseif ($fieldset instanceof Zend_Cloud_DocumentService_Document) { - if (empty($documentId)) { - $documentId = $fieldset->getId(); - } - $fieldset = $fieldset->getFields(); - } - - $replace = array(); - if (empty($options[self::MERGE_OPTION])) { - // no merge option - we replace all - foreach ($fieldset as $key => $value) { - $replace[$key] = true; - } - } elseif (is_array($options[self::MERGE_OPTION])) { - foreach ($fieldset as $key => $value) { - if (empty($options[self::MERGE_OPTION][$key])) { - // if there's merge key, we add it, otherwise we replace it - $replace[$key] = true; - } - } - } // otherwise $replace is empty - all is merged - - try { - $this->_simpleDb->putAttributes( - $collectionName, - $documentId, - $this->_makeAttributes($documentId, $fieldset), - $replace - ); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document update: '.$e->getMessage(), $e->getCode(), $e); - } - return true; - } - - /** - * Delete document. - * - * @param string $collectionName Collection from which to delete document - * @param mixed $document Document ID or Document object. - * @param array $options - * @return boolean - */ - public function deleteDocument($collectionName, $document, $options = null) - { - if ($document instanceof Zend_Cloud_DocumentService_Document) { - $document = $document->getId(); - } - try { - $this->_simpleDb->deleteAttributes($collectionName, $document); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document deletion: '.$e->getMessage(), $e->getCode(), $e); - } - return true; - } - - /** - * Fetch single document by ID - * - * @param string $collectionName Collection name - * @param mixed $documentId Document ID, adapter-dependent - * @param array $options - * @return Zend_Cloud_DocumentService_Document - */ - public function fetchDocument($collectionName, $documentId, $options = null) - { - try { - $attributes = $this->_simpleDb->getAttributes($collectionName, $documentId); - if ($attributes == false || count($attributes) == 0) { - return false; - } - return $this->_resolveAttributes($attributes, true); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on fetching document: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Query for documents stored in the document service. If a string is passed in - * $query, the query string will be passed directly to the service. - * - * @param string $collectionName Collection name - * @param string $query - * @param array $options - * @return array Zend_Cloud_DocumentService_DocumentSet - */ - public function query($collectionName, $query, $options = null) - { - $returnDocs = isset($options[self::RETURN_DOCUMENTS]) - ? (bool) $options[self::RETURN_DOCUMENTS] - : true; - - try { - if ($query instanceof Zend_Cloud_DocumentService_Adapter_SimpleDb_Query) { - $query = $query->assemble($collectionName); - } - $result = $this->_simpleDb->select($query); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document query: '.$e->getMessage(), $e->getCode(), $e); - } - - return $this->_getDocumentSetFromResultSet($result, $returnDocs); - } - - /** - * Create query statement - * - * @param string $fields - * @return Zend_Cloud_DocumentService_Adapter_SimpleDb_Query - */ - public function select($fields = null) - { - $queryClass = $this->getQueryClass(); - if (!class_exists($queryClass)) { - Zend_Loader::loadClass($queryClass); - } - - $query = new $queryClass($this); - $defaultClass = self::DEFAULT_QUERY_CLASS; - if (!$query instanceof $defaultClass) { - throw new Zend_Cloud_DocumentService_Exception('Query class must extend ' . self::DEFAULT_QUERY_CLASS); - } - - $query->select($fields); - return $query; - } - - /** - * Get the concrete service client - * - * @return Zend_Service_Amazon_SimpleDb - */ - public function getClient() - { - return $this->_simpleDb; - } - - /** - * Convert array of key-value pairs to array of Amazon attributes - * - * @param string $name - * @param array $attributes - * @return array - */ - protected function _makeAttributes($name, $attributes) - { - $result = array(); - foreach ($attributes as $key => $attr) { - $result[] = new Zend_Service_Amazon_SimpleDb_Attribute($name, $key, $attr); - } - return $result; - } - - /** - * Convert array of Amazon attributes to array of key-value pairs - * - * @param array $attributes - * @return array - */ - protected function _resolveAttributes($attributes, $returnDocument = false) - { - $result = array(); - foreach ($attributes as $attr) { - $value = $attr->getValues(); - if (count($value) == 0) { - $value = null; - } elseif (count($value) == 1) { - $value = $value[0]; - } - $result[$attr->getName()] = $value; - } - - // Return as document object? - if ($returnDocument) { - $documentClass = $this->getDocumentClass(); - return new $documentClass($result, $attr->getItemName()); - } - - return $result; - } - - /** - * Create suitable document from array of fields - * - * @param array $document - * @return Zend_Cloud_DocumentService_Document - */ - protected function _getDocumentFromArray($document) - { - if (!isset($document[Zend_Cloud_DocumentService_Document::KEY_FIELD])) { - if (isset($document[self::ITEM_NAME])) { - $key = $document[self::ITEM_NAME]; - unset($document[self::ITEM_NAME]); - } else { - throw new Zend_Cloud_DocumentService_Exception('Fields array should contain the key field '.Zend_Cloud_DocumentService_Document::KEY_FIELD); - } - } else { - $key = $document[Zend_Cloud_DocumentService_Document::KEY_FIELD]; - unset($document[Zend_Cloud_DocumentService_Document::KEY_FIELD]); - } - - $documentClass = $this->getDocumentClass(); - return new $documentClass($document, $key); - } - - /** - * Create a DocumentSet from a SimpleDb resultset - * - * @param Zend_Service_Amazon_SimpleDb_Page $resultSet - * @param bool $returnDocs - * @return Zend_Cloud_DocumentService_DocumentSet - */ - protected function _getDocumentSetFromResultSet(Zend_Service_Amazon_SimpleDb_Page $resultSet, $returnDocs = true) - { - $docs = array(); - foreach ($resultSet->getData() as $item) { - $docs[] = $this->_resolveAttributes($item, $returnDocs); - } - - $setClass = $this->getDocumentSetClass(); - return new $setClass($docs); - } -} diff --git a/library/vendor/Zend/Cloud/DocumentService/Adapter/SimpleDb/Query.php b/library/vendor/Zend/Cloud/DocumentService/Adapter/SimpleDb/Query.php deleted file mode 100644 index eadb0b877..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/Adapter/SimpleDb/Query.php +++ /dev/null @@ -1,173 +0,0 @@ -_adapter = $adapter; - if (null !== $collectionName) { - $this->from($collectionName); - } - } - - /** - * Get adapter - * - * @return Zend_Cloud_DocumentService_Adapter_SimpleDb - */ - public function getAdapter() - { - return $this->_adapter; - } - - /** - * Assemble the query into a format the adapter can utilize - * - * @var string $collectionName Name of collection from which to select - * @return string - */ - public function assemble($collectionName = null) - { - $adapter = $this->getAdapter()->getClient(); - $select = null; - $from = null; - $where = null; - $order = null; - $limit = null; - foreach ($this->getClauses() as $clause) { - list($name, $args) = $clause; - - switch ($name) { - case self::QUERY_SELECT: - $select = $args[0]; - break; - case self::QUERY_FROM: - if (null === $from) { - // Only allow setting FROM clause once - $from = $adapter->quoteName($args); - } - break; - case self::QUERY_WHERE: - $statement = $this->_parseWhere($args[0], $args[1]); - if (null === $where) { - $where = $statement; - } else { - $operator = empty($args[2]) ? 'AND' : $args[2]; - $where .= ' ' . $operator . ' ' . $statement; - } - break; - case self::QUERY_WHEREID: - $statement = $this->_parseWhere('ItemName() = ?', array($args)); - if (null === $where) { - $where = $statement; - } else { - $operator = empty($args[2]) ? 'AND' : $args[2]; - $where .= ' ' . $operator . ' ' . $statement; - } - break; - case self::QUERY_ORDER: - $order = $adapter->quoteName($args[0]); - if (isset($args[1])) { - $order .= ' ' . $args[1]; - } - break; - case self::QUERY_LIMIT: - $limit = $args; - break; - default: - // Ignore unknown clauses - break; - } - } - - if (empty($select)) { - $select = "*"; - } - if (empty($from)) { - if (null === $collectionName) { - throw new Zend_Cloud_DocumentService_Exception("Query requires a FROM clause"); - } - $from = $adapter->quoteName($collectionName); - } - $query = "select $select from $from"; - if (!empty($where)) { - $query .= " where $where"; - } - if (!empty($order)) { - $query .= " order by $order"; - } - if (!empty($limit)) { - $query .= " limit $limit"; - } - return $query; - } - - /** - * Parse a where statement into service-specific language - * - * @todo Ensure this fulfills the entire SimpleDB query specification for WHERE - * @param string $where - * @param array $args - * @return string - */ - protected function _parseWhere($where, $args) - { - if (!is_array($args)) { - $args = (array) $args; - } - $adapter = $this->getAdapter()->getClient(); - $i = 0; - while (false !== ($pos = strpos($where, '?'))) { - $where = substr_replace($where, $adapter->quote($args[$i]), $pos); - ++$i; - } - if (('(' != $where[0]) || (')' != $where[strlen($where) - 1])) { - $where = '(' . $where . ')'; - } - return $where; - } - } diff --git a/library/vendor/Zend/Cloud/DocumentService/Adapter/WindowsAzure.php b/library/vendor/Zend/Cloud/DocumentService/Adapter/WindowsAzure.php deleted file mode 100644 index ae8577e19..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/Adapter/WindowsAzure.php +++ /dev/null @@ -1,622 +0,0 @@ -toArray(); - } - - if (empty($options)) { - $options = array(); - } - - if (!is_array($options)) { - throw new Zend_Cloud_DocumentService_Exception('Invalid options provided'); - } - - if (isset($options[self::DOCUMENT_CLASS])) { - $this->setDocumentClass($options[self::DOCUMENT_CLASS]); - } - - if (isset($options[self::DOCUMENTSET_CLASS])) { - $this->setDocumentSetClass($options[self::DOCUMENTSET_CLASS]); - } - - if (isset($options[self::QUERY_CLASS])) { - $this->setQueryClass($options[self::QUERY_CLASS]); - } - - // Build Zend_Service_WindowsAzure_Storage_Blob instance - if (!isset($options[self::HOST])) { - $host = self::DEFAULT_HOST; - } else { - $host = $options[self::HOST]; - } - - if (! isset($options[self::ACCOUNT_NAME])) { - throw new Zend_Cloud_DocumentService_Exception('No Windows Azure account name provided.'); - } - - if (! isset($options[self::ACCOUNT_KEY])) { - throw new Zend_Cloud_DocumentService_Exception('No Windows Azure account key provided.'); - } - - // TODO: support $usePathStyleUri and $retryPolicy - try { - $this->_storageClient = new Zend_Service_WindowsAzure_Storage_Table( - $host, $options[self::ACCOUNT_NAME], $options[self::ACCOUNT_KEY]); - // Parse other options - if (! empty($options[self::PROXY_HOST])) { - $proxyHost = $options[self::PROXY_HOST]; - $proxyPort = isset($options[self::PROXY_PORT]) ? $options[self::PROXY_PORT] : 8080; - $proxyCredentials = isset($options[self::PROXY_CREDENTIALS]) ? $options[self::PROXY_CREDENTIALS] : ''; - $this->_storageClient->setProxy(true, $proxyHost, $proxyPort, $proxyCredentials); - } - if (isset($options[self::HTTP_ADAPTER])) { - $this->_storageClient->setHttpClientChannel($options[self::HTTP_ADAPTER]); - } - } catch(Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document service creation: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Set the default partition key - * - * @param string $key - * @return Zend_Cloud_DocumentService_Adapter_WindowsAzure - */ - public function setDefaultPartitionKey($key) - { - $this->_validateKey($key); - $this->_defaultPartitionKey = $key; - return $this; - } - - /** - * Retrieve default partition key - * - * @return null|string - */ - public function getDefaultPartitionKey() - { - return $this->_defaultPartitionKey; - } - - /** - * Create collection. - * - * @param string $name - * @param array $options - * @return boolean - */ - public function createCollection($name, $options = null) - { - if (!preg_match('/^[A-Za-z][A-Za-z0-9]{2,}$/', $name)) { - throw new Zend_Cloud_DocumentService_Exception('Invalid collection name; Windows Azure collection names must consist of alphanumeric characters only, and be at least 3 characters long'); - } - try { - $this->_storageClient->createTable($name); - } catch(Zend_Service_WindowsAzure_Exception $e) { - if (strpos($e->getMessage(), "table specified already exists") === false) { - throw new Zend_Cloud_DocumentService_Exception('Error on collection creation: '.$e->getMessage(), $e->getCode(), $e); - } - } - return true; - } - - /** - * Delete collection. - * - * @param string $name - * @param array $options - * @return boolean - */ - public function deleteCollection($name, $options = null) - { - try { - $this->_storageClient->deleteTable($name); - } catch(Zend_Service_WindowsAzure_Exception $e) { - if (strpos($e->getMessage(), "does not exist") === false) { - throw new Zend_Cloud_DocumentService_Exception('Error on collection deletion: '.$e->getMessage(), $e->getCode(), $e); - } - } - return true; - } - - /** - * List collections. - * - * @param array $options - * @return array - */ - public function listCollections($options = null) - { - try { - $tables = $this->_storageClient->listTables(); - $restables = array(); - foreach ($tables as $table) { - $restables[] = $table->name; - } - return $restables; - } catch(Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on collection list: '.$e->getMessage(), $e->getCode(), $e); - } - - return $tables; - } - - /** - * Create suitable document from array of fields - * - * @param array $document - * @param null|string $collectionName Collection to which this document belongs - * @return Zend_Cloud_DocumentService_Document - */ - protected function _getDocumentFromArray($document, $collectionName = null) - { - $key = null; - if (!isset($document[Zend_Cloud_DocumentService_Document::KEY_FIELD])) { - if (isset($document[self::ROW_KEY])) { - $rowKey = $document[self::ROW_KEY]; - unset($document[self::ROW_KEY]); - if (isset($document[self::PARTITION_KEY])) { - $key = array($document[self::PARTITION_KEY], $rowKey); - unset($document[self::PARTITION_KEY]); - } elseif (null !== ($partitionKey = $this->getDefaultPartitionKey())) { - $key = array($partitionKey, $rowKey); - } elseif (null !== $collectionName) { - $key = array($collectionName, $rowKey); - } - } - } else { - $key = $document[Zend_Cloud_DocumentService_Document::KEY_FIELD]; - unset($document[Zend_Cloud_DocumentService_Document::KEY_FIELD]); - } - - $documentClass = $this->getDocumentClass(); - return new $documentClass($document, $key); - } - - /** - * List all documents in a collection - * - * @param string $collectionName - * @param null|array $options - * @return Zend_Cloud_DocumentService_DocumentSet - */ - public function listDocuments($collectionName, array $options = null) - { - $select = $this->select()->from($collectionName); - return $this->query($collectionName, $select); - } - - /** - * Insert document - * - * @param array|Zend_Cloud_DocumentService_Document $document - * @param array $options - * @return boolean - */ - public function insertDocument($collectionName, $document, $options = null) - { - if (is_array($document)) { - $document = $this->_getDocumentFromArray($document, $collectionName); - } - - if (!$document instanceof Zend_Cloud_DocumentService_Document) { - throw new Zend_Cloud_DocumentService_Exception('Invalid document supplied'); - } - - $key = $this->_validateDocumentId($document->getId(), $collectionName); - $document->setId($key); - - $this->_validateCompositeKey($key); - $this->_validateFields($document); - try { - - $entity = new Zend_Service_WindowsAzure_Storage_DynamicTableEntity($key[0], $key[1]); - $entity->setAzureValues($document->getFields(), true); - $this->_storageClient->insertEntity($collectionName, $entity); - } catch(Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document insertion: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Replace document. - * - * The new document replaces the existing document. - * - * @param Zend_Cloud_DocumentService_Document $document - * @param array $options - * @return boolean - */ - public function replaceDocument($collectionName, $document, $options = null) - { - if (is_array($document)) { - $document = $this->_getDocumentFromArray($document, $collectionName); - } - - if (!$document instanceof Zend_Cloud_DocumentService_Document) { - throw new Zend_Cloud_DocumentService_Exception('Invalid document supplied'); - } - - $key = $this->_validateDocumentId($document->getId(), $collectionName); - $this->_validateFields($document); - try { - $entity = new Zend_Service_WindowsAzure_Storage_DynamicTableEntity($key[0], $key[1]); - $entity->setAzureValues($document->getFields(), true); - if (isset($options[self::VERIFY_ETAG])) { - $entity->setEtag($options[self::VERIFY_ETAG]); - } - - $this->_storageClient->updateEntity($collectionName, $entity, isset($options[self::VERIFY_ETAG])); - } catch(Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document replace: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Update document. - * - * The new document is merged the existing document. - * - * @param string $collectionName - * @param mixed|Zend_Cloud_DocumentService_Document $documentId Document identifier or document contaiing updates - * @param null|array|Zend_Cloud_DocumentService_Document Fields to update (or new fields)) - * @param array $options - * @return boolean - */ - public function updateDocument($collectionName, $documentId, $fieldset = null, $options = null) - { - if (null === $fieldset && $documentId instanceof Zend_Cloud_DocumentService_Document) { - $fieldset = $documentId->getFields(); - $documentId = $documentId->getId(); - } elseif ($fieldset instanceof Zend_Cloud_DocumentService_Document) { - if ($documentId == null) { - $documentId = $fieldset->getId(); - } - $fieldset = $fieldset->getFields(); - } - - $this->_validateCompositeKey($documentId, $collectionName); - $this->_validateFields($fieldset); - try { - $entity = new Zend_Service_WindowsAzure_Storage_DynamicTableEntity($documentId[0], $documentId[1]); - - // Ensure timestamp is set correctly - if (isset($fieldset[self::TIMESTAMP_KEY])) { - $entity->setTimestamp($fieldset[self::TIMESTAMP_KEY]); - unset($fieldset[self::TIMESTAMP_KEY]); - } - - $entity->setAzureValues($fieldset, true); - if (isset($options[self::VERIFY_ETAG])) { - $entity->setEtag($options[self::VERIFY_ETAG]); - } - - $this->_storageClient->mergeEntity($collectionName, $entity, isset($options[self::VERIFY_ETAG])); - } catch(Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document update: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Delete document. - * - * @param mixed $document Document ID or Document object. - * @param array $options - * @return void - */ - public function deleteDocument($collectionName, $documentId, $options = null) - { - if ($documentId instanceof Zend_Cloud_DocumentService_Document) { - $documentId = $documentId->getId(); - } - - $documentId = $this->_validateDocumentId($documentId, $collectionName); - - try { - $entity = new Zend_Service_WindowsAzure_Storage_DynamicTableEntity($documentId[0], $documentId[1]); - if (isset($options[self::VERIFY_ETAG])) { - $entity->setEtag($options[self::VERIFY_ETAG]); - } - $this->_storageClient->deleteEntity($collectionName, $entity, isset($options[self::VERIFY_ETAG])); - } catch(Zend_Service_WindowsAzure_Exception $e) { - if (strpos($e->getMessage(), "does not exist") === false) { - throw new Zend_Cloud_DocumentService_Exception('Error on document deletion: '.$e->getMessage(), $e->getCode(), $e); - } - } - } - - /** - * Fetch single document by ID - * - * @param string $collectionName Collection name - * @param mixed $documentId Document ID, adapter-dependent - * @param array $options - * @return Zend_Cloud_DocumentService_Document - */ - public function fetchDocument($collectionName, $documentId, $options = null) - { - $documentId = $this->_validateDocumentId($documentId, $collectionName); - try { - $entity = $this->_storageClient->retrieveEntityById($collectionName, $documentId[0], $documentId[1]); - $documentClass = $this->getDocumentClass(); - return new $documentClass($this->_resolveAttributes($entity), array($entity->getPartitionKey(), $entity->getRowKey())); - } catch (Zend_Service_WindowsAzure_Exception $e) { - if (strpos($e->getMessage(), "does not exist") !== false) { - return false; - } - throw new Zend_Cloud_DocumentService_Exception('Error on document fetch: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Query for documents stored in the document service. If a string is passed in - * $query, the query string will be passed directly to the service. - * - * @param string $collectionName Collection name - * @param string|Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query $query - * @param array $options - * @return array Zend_Cloud_DocumentService_DocumentSet - */ - public function query($collectionName, $query, $options = null) - { - try { - if ($query instanceof Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query) { - $entities = $this->_storageClient->retrieveEntities($query->assemble()); - } else { - $entities = $this->_storageClient->retrieveEntities($collectionName, $query); - } - - $documentClass = $this->getDocumentClass(); - $resultSet = array(); - foreach ($entities as $entity) { - $resultSet[] = new $documentClass( - $this->_resolveAttributes($entity), - array($entity->getPartitionKey(), $entity->getRowKey()) - ); - } - } catch(Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_DocumentService_Exception('Error on document query: '.$e->getMessage(), $e->getCode(), $e); - } - - $setClass = $this->getDocumentSetClass(); - return new $setClass($resultSet); - } - - /** - * Create query statement - * - * @return Zend_Cloud_DocumentService_Query - */ - public function select($fields = null) - { - $queryClass = $this->getQueryClass(); - if (!class_exists($queryClass)) { - Zend_Loader::loadClass($queryClass); - } - - $query = new $queryClass(); - $defaultClass = self::DEFAULT_QUERY_CLASS; - if (!$query instanceof $defaultClass) { - throw new Zend_Cloud_DocumentService_Exception('Query class must extend ' . self::DEFAULT_QUERY_CLASS); - } - - $query->select($fields); - return $query; - } - - /** - * Get the concrete service client - * - * @return Zend_Service_WindowsAzure_Storage_Table - */ - public function getClient() - { - return $this->_storageClient; - } - - /** - * Resolve table values to attributes - * - * @param Zend_Service_WindowsAzure_Storage_TableEntity $entity - * @return array - */ - protected function _resolveAttributes(Zend_Service_WindowsAzure_Storage_TableEntity $entity) - { - $result = array(); - foreach ($entity->getAzureValues() as $attr) { - $result[$attr->Name] = $attr->Value; - } - return $result; - } - - - /** - * Validate a partition or row key - * - * @param string $key - * @return void - * @throws Zend_Cloud_DocumentService_Exception - */ - protected function _validateKey($key) - { - if (preg_match('@[/#?' . preg_quote('\\') . ']@', $key)) { - throw new Zend_Cloud_DocumentService_Exception('Invalid partition or row key provided; must not contain /, \\, #, or ? characters'); - } - } - - /** - * Validate a composite key - * - * @param array $key - * @return throws Zend_Cloud_DocumentService_Exception - */ - protected function _validateCompositeKey(array $key) - { - if (2 != count($key)) { - throw new Zend_Cloud_DocumentService_Exception('Invalid document key provided; must contain exactly two elements: a PartitionKey and a RowKey'); - } - foreach ($key as $k) { - $this->_validateKey($k); - } - } - - /** - * Validate a document identifier - * - * If the identifier is an array containing a valid partition and row key, - * returns it. If the identifier is a string: - * - if a default partition key is present, it creates an identifier using - * that and the provided document ID - * - if a collection name is provided, it will use that for the partition key - * - otherwise, it's invalid - * - * @param array|string $documentId - * @param null|string $collectionName - * @return array - * @throws Zend_Cloud_DocumentService_Exception - */ - protected function _validateDocumentId($documentId, $collectionName = false) - { - if (is_array($documentId)) { - $this->_validateCompositeKey($documentId); - return $documentId; - } - if (!is_string($documentId)) { - throw new Zend_Cloud_DocumentService_Exception('Invalid document identifier; must be a string or an array'); - } - - $this->_validateKey($documentId); - - if (null !== ($partitionKey = $this->getDefaultPartitionKey())) { - return array($partitionKey, $documentId); - } - if (null !== $collectionName) { - return array($collectionName, $documentId); - } - throw new Zend_Cloud_DocumentService_Exception('Cannot determine partition name; invalid document identifier'); - } - - /** - * Validate a document's fields for well-formedness - * - * Since Azure uses Atom, and fieldnames are included as part of XML - * element tag names, the field names must be valid XML names. - * - * @param Zend_Cloud_DocumentService_Document|array $document - * @return void - * @throws Zend_Cloud_DocumentService_Exception - */ - public function _validateFields($document) - { - if ($document instanceof Zend_Cloud_DocumentService_Document) { - $document = $document->getFields(); - } elseif (!is_array($document)) { - throw new Zend_Cloud_DocumentService_Exception('Cannot inspect fields; invalid type provided'); - } - - foreach (array_keys($document) as $key) { - $this->_validateFieldKey($key); - } - } - - /** - * Validate an individual field name for well-formedness - * - * Since Azure uses Atom, and fieldnames are included as part of XML - * element tag names, the field names must be valid XML names. - * - * While we could potentially normalize names, this could also lead to - * conflict with other field names -- which we should avoid. As such, - * invalid field names will raise an exception. - * - * @param string $key - * @return void - * @throws Zend_Cloud_DocumentService_Exception - */ - public function _validateFieldKey($key) - { - if (!preg_match('/^[_A-Za-z][-._A-Za-z0-9]*$/', $key)) { - throw new Zend_Cloud_DocumentService_Exception('Field keys must conform to XML names (^[_A-Za-z][-._A-Za-z0-9]*$); key "' . $key . '" does not match'); - } - } -} diff --git a/library/vendor/Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php b/library/vendor/Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php deleted file mode 100644 index aefefb73d..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php +++ /dev/null @@ -1,167 +0,0 @@ -_azureSelect = $select; - } - - /** - * SELECT clause (fields to be selected) - * - * Does nothing for Azure. - * - * @param string $select - * @return Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query - */ - public function select($select) - { - return $this; - } - - /** - * FROM clause (table name) - * - * @param string $from - * @return Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query - */ - public function from($from) - { - $this->_azureSelect->from($from); - return $this; - } - - /** - * WHERE clause (conditions to be used) - * - * @param string $where - * @param mixed $value Value or array of values to be inserted instead of ? - * @param string $op Operation to use to join where clauses (AND/OR) - * @return Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query - */ - public function where($where, $value = null, $op = 'and') - { - if (!empty($value) && !is_array($value)) { - // fix buglet in Azure - numeric values are quoted unless passed as an array - $value = array($value); - } - $this->_azureSelect->where($where, $value, $op); - return $this; - } - - /** - * WHERE clause for item ID - * - * This one should be used when fetching specific rows since some adapters - * have special syntax for primary keys - * - * @param array $value Row ID for the document (PartitionKey, RowKey) - * @return Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query - */ - public function whereId($value) - { - if (!is_array($value)) { - throw new Zend_Cloud_DocumentService_Exception('Invalid document key'); - } - $this->_azureSelect->wherePartitionKey($value[0])->whereRowKey($value[1]); - return $this; - } - - /** - * LIMIT clause (how many rows to return) - * - * @param int $limit - * @return Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query - */ - public function limit($limit) - { - $this->_azureSelect->top($limit); - return $this; - } - - /** - * ORDER BY clause (sorting) - * - * @todo Azure service doesn't seem to support this yet; emulate? - * @param string $sort Column to sort by - * @param string $direction Direction - asc/desc - * @return Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query - * @throws Zend_Cloud_OperationNotAvailableException - */ - public function order($sort, $direction = 'asc') - { - throw new Zend_Cloud_OperationNotAvailableException('No support for sorting for Azure yet'); - } - - /** - * Get Azure select query - * - * @return Zend_Service_WindowsAzure_Storage_TableEntityQuery - */ - public function getAzureSelect() - { - return $this->_azureSelect; - } - - /** - * Assemble query - * - * Simply return the WindowsAzure table entity query object - * - * @return Zend_Service_WindowsAzure_Storage_TableEntityQuery - */ - public function assemble() - { - return $this->getAzureSelect(); - } -} diff --git a/library/vendor/Zend/Cloud/DocumentService/Document.php b/library/vendor/Zend/Cloud/DocumentService/Document.php deleted file mode 100644 index 559d9f10f..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/Document.php +++ /dev/null @@ -1,246 +0,0 @@ -_fields = $fields; - $this->setId($id); - } - - /** - * Set document identifier - * - * @param mixed $id - * @return Zend_Cloud_DocumentService_Document - */ - public function setId($id) - { - $this->_id = $id; - return $this; - } - - /** - * Get ID name. - * - * @return string - */ - public function getId() - { - return $this->_id; - } - - /** - * Get fields as array. - * - * @return array - */ - public function getFields() - { - return $this->_fields; - } - - /** - * Get field by name. - * - * @param string $name - * @return mixed - */ - public function getField($name) - { - if (isset($this->_fields[$name])) { - return $this->_fields[$name]; - } - return null; - } - - /** - * Set field by name. - * - * @param string $name - * @param mixed $value - * @return Zend_Cloud_DocumentService_Document - */ - public function setField($name, $value) - { - $this->_fields[$name] = $value; - return $this; - } - - /** - * Overloading: get value - * - * @param string $name - * @return mixed - */ - public function __get($name) - { - return $this->getField($name); - } - - /** - * Overloading: set field - * - * @param string $name - * @param mixed $value - * @return void - */ - public function __set($name, $value) - { - $this->setField($name, $value); - } - - /** - * ArrayAccess: does field exist? - * - * @param string $name - * @return bool - */ - public function offsetExists($name) - { - return isset($this->_fields[$name]); - } - - /** - * ArrayAccess: get field by name - * - * @param string $name - * @return mixed - */ - public function offsetGet($name) - { - return $this->getField($name); - } - - /** - * ArrayAccess: set field to value - * - * @param string $name - * @param mixed $value - * @return void - */ - public function offsetSet($name, $value) - { - $this->setField($name, $value); - } - - /** - * ArrayAccess: remove field from document - * - * @param string $name - * @return void - */ - public function offsetUnset($name) - { - if ($this->offsetExists($name)) { - unset($this->_fields[$name]); - } - } - - /** - * Overloading: retrieve and set fields by name - * - * @param string $name - * @param mixed $args - * @return mixed - */ - public function __call($name, $args) - { - $prefix = substr($name, 0, 3); - if ($prefix == 'get') { - // Get value - $option = substr($name, 3); - return $this->getField($option); - } elseif ($prefix == 'set') { - // set value - $option = substr($name, 3); - return $this->setField($option, $args[0]); - } - - throw new Zend_Cloud_OperationNotAvailableException("Unknown operation $name"); - } - - /** - * Countable: return count of fields in document - * - * @return int - */ - public function count() - { - return count($this->_fields); - } - - /** - * IteratorAggregate: return iterator for iterating over fields - * - * @return Iterator - */ - public function getIterator() - { - return new ArrayIterator($this->_fields); - } -} diff --git a/library/vendor/Zend/Cloud/DocumentService/DocumentSet.php b/library/vendor/Zend/Cloud/DocumentService/DocumentSet.php deleted file mode 100644 index 1bf4dfbcc..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/DocumentSet.php +++ /dev/null @@ -1,68 +0,0 @@ -_documentCount = count($documents); - $this->_documents = new ArrayIterator($documents); - } - - /** - * Countable: number of documents in set - * - * @return int - */ - public function count() - { - return $this->_documentCount; - } - - /** - * IteratorAggregate: retrieve iterator - * - * @return Traversable - */ - public function getIterator() - { - return $this->_documents; - } -} diff --git a/library/vendor/Zend/Cloud/DocumentService/Exception.php b/library/vendor/Zend/Cloud/DocumentService/Exception.php deleted file mode 100644 index 3d170d250..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/Exception.php +++ /dev/null @@ -1,37 +0,0 @@ -foo('bar') - * but concrete adapters should be able to recognise it - * - * The call will be iterpreted as clause 'foo' with argument 'bar' - * - * @param string $name Clause/method name - * @param mixed $args - * @return Zend_Cloud_DocumentService_Query - */ - public function __call($name, $args) - { - $this->_clauses[] = array(strtolower($name), $args); - return $this; - } - - /** - * SELECT clause (fields to be selected) - * - * @param null|string|array $select - * @return Zend_Cloud_DocumentService_Query - */ - public function select($select) - { - if (empty($select)) { - return $this; - } - if (!is_string($select) && !is_array($select)) { - throw new Zend_Cloud_DocumentService_Exception("SELECT argument must be a string or an array of strings"); - } - $this->_clauses[] = array(self::QUERY_SELECT, $select); - return $this; - } - - /** - * FROM clause - * - * @param string $name Field names - * @return Zend_Cloud_DocumentService_Query - */ - public function from($name) - { - if(!is_string($name)) { - throw new Zend_Cloud_DocumentService_Exception("FROM argument must be a string"); - } - $this->_clauses[] = array(self::QUERY_FROM, $name); - return $this; - } - - /** - * WHERE query - * - * @param string $cond Condition - * @param array $args Arguments to substitute instead of ?'s in condition - * @param string $op relation to other clauses - and/or - * @return Zend_Cloud_DocumentService_Query - */ - public function where($cond, $value = null, $op = 'and') - { - if (!is_string($cond)) { - throw new Zend_Cloud_DocumentService_Exception("WHERE argument must be a string"); - } - $this->_clauses[] = array(self::QUERY_WHERE, array($cond, $value, $op)); - return $this; - } - - /** - * Select record or fields by ID - * - * @param string|int $value Identifier to select by - * @return Zend_Cloud_DocumentService_Query - */ - public function whereId($value) - { - if (!is_scalar($value)) { - throw new Zend_Cloud_DocumentService_Exception("WHEREID argument must be a scalar"); - } - $this->_clauses[] = array(self::QUERY_WHEREID, $value); - return $this; - } - - /** - * LIMIT clause (how many items to return) - * - * @param int $limit - * @return Zend_Cloud_DocumentService_Query - */ - public function limit($limit) - { - if ($limit != (int) $limit) { - throw new Zend_Cloud_DocumentService_Exception("LIMIT argument must be an integer"); - } - $this->_clauses[] = array(self::QUERY_LIMIT, $limit); - return $this; - } - - /** - * ORDER clause; field or fields to sort by, and direction to sort - * - * @param string|int|array $sort - * @param string $direction - * @return Zend_Cloud_DocumentService_Query - */ - public function order($sort, $direction = 'asc') - { - $this->_clauses[] = array(self::QUERY_ORDER, array($sort, $direction)); - return $this; - } - - /** - * "Assemble" the query - * - * Simply returns the clauses present. - * - * @return array - */ - public function assemble() - { - return $this->getClauses(); - } - - /** - * Return query clauses as an array - * - * @return array Clauses in the query - */ - public function getClauses() - { - return $this->_clauses; - } -} diff --git a/library/vendor/Zend/Cloud/DocumentService/QueryAdapter.php b/library/vendor/Zend/Cloud/DocumentService/QueryAdapter.php deleted file mode 100644 index 54cf4d18f..000000000 --- a/library/vendor/Zend/Cloud/DocumentService/QueryAdapter.php +++ /dev/null @@ -1,102 +0,0 @@ -adapterResult; - } - - /** - * Wait for status $status with a timeout of $timeout seconds - * - * @param string $id - * @param string $status - * @param integer $timeout - * @return boolean - */ - public function waitStatusInstance($id, $status, $timeout = self::TIMEOUT_STATUS_CHANGE) - { - if (empty($id) || empty($status)) { - return false; - } - - $num = 0; - while (($num<$timeout) && ($this->statusInstance($id) != $status)) { - sleep(self::TIME_STEP_STATUS_CHANGE); - $num += self::TIME_STEP_STATUS_CHANGE; - } - return ($num < $timeout); - } - - /** - * Run arbitrary shell script on an instance - * - * @param string $id - * @param array $param - * @param string|array $cmd - * @return string|array - */ - public function deployInstance($id, $params, $cmd) - { - if (!function_exists("ssh2_connect")) { - throw new Zend_Cloud_Infrastructure_Exception('Deployment requires the PHP "SSH" extension (ext/ssh2)'); - } - - if (empty($id)) { - throw new Zend_Cloud_Infrastructure_Exception('You must specify the instance where to deploy'); - } - - if (empty($cmd)) { - throw new Zend_Cloud_Infrastructure_Exception('You must specify the shell commands to run on the instance'); - } - - if (empty($params) - || empty($params[Zend_Cloud_Infrastructure_Instance::SSH_USERNAME]) - || (empty($params[Zend_Cloud_Infrastructure_Instance::SSH_PASSWORD]) - && empty($params[Zend_Cloud_Infrastructure_Instance::SSH_KEY])) - ) { - throw new Zend_Cloud_Infrastructure_Exception('You must specify the params for the SSH connection'); - } - - $host = $this->publicDnsInstance($id); - if (empty($host)) { - throw new Zend_Cloud_Infrastructure_Exception(sprintf( - 'The instance identified by "%s" does not exist', - $id - )); - } - - $conn = ssh2_connect($host); - if (!ssh2_auth_password($conn, $params[Zend_Cloud_Infrastructure_Instance::SSH_USERNAME], - $params[Zend_Cloud_Infrastructure_Instance::SSH_PASSWORD])) { - throw new Zend_Cloud_Infrastructure_Exception('SSH authentication failed'); - } - - if (is_array($cmd)) { - $result = array(); - foreach ($cmd as $command) { - $stream = ssh2_exec($conn, $command); - $errorStream = ssh2_fetch_stream($stream, SSH2_STREAM_STDERR); - - stream_set_blocking($errorStream, true); - stream_set_blocking($stream, true); - - $output = stream_get_contents($stream); - $error = stream_get_contents($errorStream); - - if (empty($error)) { - $result[$command] = $output; - } else { - $result[$command] = $error; - } - } - } else { - $stream = ssh2_exec($conn, $cmd); - $result = stream_set_blocking($stream, true); - $errorStream = ssh2_fetch_stream($stream, SSH2_STREAM_STDERR); - - stream_set_blocking($errorStream, true); - stream_set_blocking($stream, true); - - $output = stream_get_contents($stream); - $error = stream_get_contents($errorStream); - - if (empty($error)) { - $result = $output; - } else { - $result = $error; - } - } - return $result; - } -} diff --git a/library/vendor/Zend/Cloud/Infrastructure/Adapter/Ec2.php b/library/vendor/Zend/Cloud/Infrastructure/Adapter/Ec2.php deleted file mode 100644 index 3088a4c72..000000000 --- a/library/vendor/Zend/Cloud/Infrastructure/Adapter/Ec2.php +++ /dev/null @@ -1,479 +0,0 @@ - Zend_Cloud_Infrastructure_Instance::STATUS_RUNNING, - 'terminated' => Zend_Cloud_Infrastructure_Instance::STATUS_TERMINATED, - 'pending' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'shutting-down' => Zend_Cloud_Infrastructure_Instance::STATUS_SHUTTING_DOWN, - 'stopping' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'stopped' => Zend_Cloud_Infrastructure_Instance::STATUS_STOPPED, - 'rebooting' => Zend_Cloud_Infrastructure_Instance::STATUS_REBOOTING, - ); - - /** - * Map monitor metrics between Infrastructure and EC2 - * - * @var array - */ - protected $mapMetrics= array ( - Zend_Cloud_Infrastructure_Instance::MONITOR_CPU => 'CPUUtilization', - Zend_Cloud_Infrastructure_Instance::MONITOR_DISK_READ => 'DiskReadBytes', - Zend_Cloud_Infrastructure_Instance::MONITOR_DISK_WRITE => 'DiskWriteBytes', - Zend_Cloud_Infrastructure_Instance::MONITOR_NETWORK_IN => 'NetworkIn', - Zend_Cloud_Infrastructure_Instance::MONITOR_NETWORK_OUT => 'NetworkOut', - ); - - /** - * Constructor - * - * @param array|Zend_Config $options - * @return void - */ - public function __construct($options = array()) - { - if (is_object($options)) { - if (method_exists($options, 'toArray')) { - $options= $options->toArray(); - } elseif ($options instanceof Traversable) { - $options = iterator_to_array($options); - } - } - - if (empty($options) || !is_array($options)) { - throw new Zend_Cloud_Infrastructure_Exception('Invalid options provided'); - } - - if (!isset($options[self::AWS_ACCESS_KEY]) - || !isset($options[self::AWS_SECRET_KEY]) - ) { - throw new Zend_Cloud_Infrastructure_Exception('AWS keys not specified!'); - } - - $this->accessKey = $options[self::AWS_ACCESS_KEY]; - $this->accessSecret = $options[self::AWS_SECRET_KEY]; - $this->region = ''; - - if (isset($options[self::AWS_REGION])) { - $this->region= $options[self::AWS_REGION]; - } - - try { - $this->ec2 = new Zend_Service_Amazon_Ec2_Instance($options[self::AWS_ACCESS_KEY], $options[self::AWS_SECRET_KEY], $this->region); - } catch (Exception $e) { - throw new Zend_Cloud_Infrastructure_Exception('Error on create: ' . $e->getMessage(), $e->getCode(), $e); - } - - if (isset($options[self::HTTP_ADAPTER])) { - $this->ec2->getHttpClient()->setAdapter($options[self::HTTP_ADAPTER]); - } - } - - /** - * Convert the attributes of EC2 into attributes of Infrastructure - * - * @param array $attr - * @return array|boolean - */ - private function convertAttributes($attr) - { - $result = array(); - if (!empty($attr) && is_array($attr)) { - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_ID] = $attr['instanceId']; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STATUS] = $this->mapStatus[$attr['instanceState']['name']]; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_IMAGEID] = $attr['imageId']; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_ZONE] = $attr['availabilityZone']; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_LAUNCHTIME] = $attr['launchTime']; - - switch ($attr['instanceType']) { - case Zend_Service_Amazon_Ec2_Instance::MICRO: - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_CPU] = '1 virtual core'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = '613MB'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = '0GB'; - break; - case Zend_Service_Amazon_Ec2_Instance::SMALL: - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_CPU] = '1 virtual core'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = '1.7GB'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = '160GB'; - break; - case Zend_Service_Amazon_Ec2_Instance::LARGE: - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_CPU] = '2 virtual core'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = '7.5GB'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = '850GB'; - break; - case Zend_Service_Amazon_Ec2_Instance::XLARGE: - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_CPU] = '4 virtual core'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = '15GB'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = '1690GB'; - break; - case Zend_Service_Amazon_Ec2_Instance::HCPU_MEDIUM: - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_CPU] = '2 virtual core'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = '1.7GB'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = '350GB'; - break; - case Zend_Service_Amazon_Ec2_Instance::HCPU_XLARGE: - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_CPU] = '8 virtual core'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = '7GB'; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = '1690GB'; - break; - } - } - return $result; - } - - /** - * Return a list of the available instancies - * - * @return Zend_Cloud_Infrastructure_InstanceList - */ - public function listInstances() - { - $this->adapterResult = $this->ec2->describe(); - - $result = array(); - foreach ($this->adapterResult['instances'] as $instance) { - $result[]= $this->convertAttributes($instance); - } - return new Zend_Cloud_Infrastructure_InstanceList($this, $result); - } - - /** - * Return the status of an instance - * - * @param string - * @return string|boolean - */ - public function statusInstance($id) - { - $this->adapterResult = $this->ec2->describe($id); - if (empty($this->adapterResult['instances'])) { - return false; - } - $result = $this->adapterResult['instances'][0]; - return $this->mapStatus[$result['instanceState']['name']]; - } - - /** - * Return the public DNS name of the instance - * - * @param string $id - * @return string|boolean - */ - public function publicDnsInstance($id) - { - $this->adapterResult = $this->ec2->describe($id); - if (empty($this->adapterResult['instances'])) { - return false; - } - $result = $this->adapterResult['instances'][0]; - return $result['dnsName']; - } - - /** - * Reboot an instance - * - * @param string $id - * @return boolean - */ - public function rebootInstance($id) - { - $this->adapterResult= $this->ec2->reboot($id); - return $this->adapterResult; - } - - /** - * Create a new instance - * - * @param string $name - * @param array $options - * @return Instance|boolean - */ - public function createInstance($name, $options) - { - // @todo instance's name management? - $this->adapterResult = $this->ec2->run($options); - if (empty($this->adapterResult['instances'])) { - return false; - } - $this->error= false; - return new Zend_Cloud_Infrastructure_Instance($this, $this->convertAttributes($this->adapterResult['instances'][0])); - } - - /** - * Stop an instance - * - * @param string $id - * @return boolean - */ - public function stopInstance($id) - { - throw new Zend_Cloud_Infrastructure_Exception('The stopInstance method is not implemented in the adapter'); - } - - /** - * Start an instance - * - * @param string $id - * @return boolean - */ - public function startInstance($id) - { - throw new Zend_Cloud_Infrastructure_Exception('The startInstance method is not implemented in the adapter'); - } - - /** - * Destroy an instance - * - * @param string $id - * @return boolean - */ - public function destroyInstance($id) - { - $this->adapterResult = $this->ec2->terminate($id); - return (!empty($this->adapterResult)); - } - - /** - * Return a list of all the available instance images - * - * @return ImageList - */ - public function imagesInstance() - { - if (!isset($this->ec2Image)) { - $this->ec2Image = new Zend_Service_Amazon_Ec2_Image($this->accessKey, $this->accessSecret, $this->region); - } - - $this->adapterResult = $this->ec2Image->describe(); - - $images = array(); - - foreach ($this->adapterResult as $result) { - switch (strtolower($result['platform'])) { - case 'windows' : - $platform = Zend_Cloud_Infrastructure_Image::IMAGE_WINDOWS; - break; - default: - $platform = Zend_Cloud_Infrastructure_Image::IMAGE_LINUX; - break; - } - - $images[]= array ( - Zend_Cloud_Infrastructure_Image::IMAGE_ID => $result['imageId'], - Zend_Cloud_Infrastructure_Image::IMAGE_NAME => '', - Zend_Cloud_Infrastructure_Image::IMAGE_DESCRIPTION => $result['imageLocation'], - Zend_Cloud_Infrastructure_Image::IMAGE_OWNERID => $result['imageOwnerId'], - Zend_Cloud_Infrastructure_Image::IMAGE_ARCHITECTURE => $result['architecture'], - Zend_Cloud_Infrastructure_Image::IMAGE_PLATFORM => $platform, - ); - } - return new Zend_Cloud_Infrastructure_ImageList($images,$this->ec2Image); - } - - /** - * Return all the available zones - * - * @return array - */ - public function zonesInstance() - { - if (!isset($this->ec2Zone)) { - $this->ec2Zone = new Zend_Service_Amazon_Ec2_AvailabilityZones($this->accessKey,$this->accessSecret,$this->region); - } - $this->adapterResult = $this->ec2Zone->describe(); - - $zones = array(); - foreach ($this->adapterResult as $zone) { - if (strtolower($zone['zoneState']) === 'available') { - $zones[] = array ( - Zend_Cloud_Infrastructure_Instance::INSTANCE_ZONE => $zone['zoneName'], - ); - } - } - return $zones; - } - - /** - * Return the system information about the $metric of an instance - * - * @param string $id - * @param string $metric - * @param null|array $options - * @return array - */ - public function monitorInstance($id, $metric, $options = null) - { - if (empty($id) || empty($metric)) { - return false; - } - - if (!in_array($metric,$this->validMetrics)) { - throw new Zend_Cloud_Infrastructure_Exception(sprintf( - 'The metric "%s" is not valid', - $metric - )); - } - - if (!empty($options) && !is_array($options)) { - throw new Zend_Cloud_Infrastructure_Exception('The options must be an array'); - } - - if (!empty($options) - && (empty($options[Zend_Cloud_Infrastructure_Instance::MONITOR_START_TIME]) - || empty($options[Zend_Cloud_Infrastructure_Instance::MONITOR_END_TIME])) - ) { - throw new Zend_Cloud_Infrastructure_Exception(sprintf( - 'The options array must contain: "%s" and "%s"', - $options[Zend_Cloud_Infrastructure_Instance::MONITOR_START_TIME], - $options[Zend_Cloud_Infrastructure_Instance::MONITOR_END_TIME] - )); - } - - if (!isset($this->ec2Monitor)) { - $this->ec2Monitor = new Zend_Service_Amazon_Ec2_CloudWatch($this->accessKey, $this->accessSecret, $this->region); - } - - $param = array( - 'MeasureName' => $this->mapMetrics[$metric], - 'Statistics' => array('Average'), - 'Dimensions' => array('InstanceId' => $id), - ); - - if (!empty($options)) { - $param['StartTime'] = $options[Zend_Cloud_Infrastructure_Instance::MONITOR_START_TIME]; - $param['EndTime'] = $options[Zend_Cloud_Infrastructure_Instance::MONITOR_END_TIME]; - } - - $this->adapterResult = $this->ec2Monitor->getMetricStatistics($param); - - $monitor = array(); - $num = 0; - $average = 0; - - if (!empty($this->adapterResult['datapoints'])) { - foreach ($this->adapterResult['datapoints'] as $result) { - $monitor['series'][] = array ( - 'timestamp' => $result['Timestamp'], - 'value' => $result['Average'], - ); - $average += $result['Average']; - $num++; - } - } - - if ($num > 0) { - $monitor['average'] = $average / $num; - } - - return $monitor; - } - - /** - * Get the adapter - * - * @return Zend_Service_Amazon_Ec2_Instance - */ - public function getAdapter() - { - return $this->ec2; - } - - /** - * Get last HTTP request - * - * @return string - */ - public function getLastHttpRequest() - { - return $this->ec2->getHttpClient()->getLastRequest(); - } - - /** - * Get the last HTTP response - * - * @return Zend_Http_Response - */ - public function getLastHttpResponse() - { - return $this->ec2->getHttpClient()->getLastResponse(); - } -} diff --git a/library/vendor/Zend/Cloud/Infrastructure/Adapter/Rackspace.php b/library/vendor/Zend/Cloud/Infrastructure/Adapter/Rackspace.php deleted file mode 100644 index 2386a4503..000000000 --- a/library/vendor/Zend/Cloud/Infrastructure/Adapter/Rackspace.php +++ /dev/null @@ -1,462 +0,0 @@ - Zend_Cloud_Infrastructure_Instance::STATUS_RUNNING, - 'SUSPENDED' => Zend_Cloud_Infrastructure_Instance::STATUS_STOPPED, - 'BUILD' => Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, - 'REBUILD' => Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, - 'QUEUE_RESIZE' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'PREP_RESIZE' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'RESIZE' => Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, - 'VERIFY_RESIZE' => Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, - 'PASSWORD' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'RESCUE' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'REBOOT' => Zend_Cloud_Infrastructure_Instance::STATUS_REBOOTING, - 'HARD_REBOOT' => Zend_Cloud_Infrastructure_Instance::STATUS_REBOOTING, - 'SHARE_IP' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'SHARE_IP_NO_CONFIG' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'DELETE_IP' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, - 'UNKNOWN' => Zend_Cloud_Infrastructure_Instance::STATUS_PENDING - ); - /** - * Constructor - * - * @param array|Zend_Config $options - * @return void - */ - public function __construct($options = array()) - { - if (is_object($options)) { - if (method_exists($options, 'toArray')) { - $options= $options->toArray(); - } elseif ($options instanceof Traversable) { - $options = iterator_to_array($options); - } - } - - if (empty($options) || !is_array($options)) { - throw new Zend_Cloud_Infrastructure_Exception('Invalid options provided'); - } - - if (!isset($options[self::RACKSPACE_USER])) { - throw new Zend_Cloud_Infrastructure_Exception('Rackspace access user not specified!'); - } - - if (!isset($options[self::RACKSPACE_KEY])) { - throw new Zend_Cloud_Infrastructure_Exception('Rackspace access key not specified!'); - } - - $this->accessUser = $options[self::RACKSPACE_USER]; - $this->accessKey = $options[self::RACKSPACE_KEY]; - - if (isset($options[self::RACKSPACE_REGION])) { - switch ($options[self::RACKSPACE_REGION]) { - case self::RACKSPACE_ZONE_UK: - $this->region= Zend_Service_Rackspace_Servers::UK_AUTH_URL; - break; - case self::RACKSPACE_ZONE_USA: - $this->region = Zend_Service_Rackspace_Servers::US_AUTH_URL; - break; - default: - throw new Zend_Cloud_Infrastructure_Exception('The region is not valid'); - } - } else { - $this->region = Zend_Service_Rackspace_Servers::US_AUTH_URL; - } - - try { - $this->rackspace = new Zend_Service_Rackspace_Servers($this->accessUser,$this->accessKey, $this->region); - } catch (Exception $e) { - throw new Zend_Cloud_Infrastructure_Exception('Error on create: ' . $e->getMessage(), $e->getCode(), $e); - } - - if (isset($options[self::HTTP_ADAPTER])) { - $this->rackspace->getHttpClient()->setAdapter($options[self::HTTP_ADAPTER]); - } - - } - /** - * Convert the attributes of Rackspace server into attributes of Infrastructure - * - * @param array $attr - * @return array|boolean - */ - protected function convertAttributes($attr) - { - $result = array(); - if (!empty($attr) && is_array($attr)) { - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_ID] = $attr['id']; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_NAME] = $attr['name']; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STATUS] = $this->mapStatus[$attr['status']]; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_IMAGEID] = $attr['imageId']; - if ($this->region==Zend_Service_Rackspace_Servers::US_AUTH_URL) { - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_ZONE] = self::RACKSPACE_ZONE_USA; - } else { - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_ZONE] = self::RACKSPACE_ZONE_UK; - } - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = $this->flavors[$attr['flavorId']]['ram']; - $result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = $this->flavors[$attr['flavorId']]['disk']; - } - return $result; - } - /** - * Return a list of the available instancies - * - * @return InstanceList|boolean - */ - public function listInstances() - { - $this->adapterResult = $this->rackspace->listServers(true); - if ($this->adapterResult===false) { - return false; - } - $array= $this->adapterResult->toArray(); - $result = array(); - foreach ($array as $instance) { - $result[]= $this->convertAttributes($instance); - } - return new Zend_Cloud_Infrastructure_InstanceList($this, $result); - } - /** - * Return the status of an instance - * - * @param string - * @return string|boolean - */ - public function statusInstance($id) - { - $this->adapterResult = $this->rackspace->getServer($id); - if ($this->adapterResult===false) { - return false; - } - $array= $this->adapterResult->toArray(); - return $this->mapStatus[$array['status']]; - } - /** - * Return the public DNS name/Ip address of the instance - * - * @param string $id - * @return string|boolean - */ - public function publicDnsInstance($id) - { - $this->adapterResult = $this->rackspace->getServerPublicIp($id); - if (empty($this->adapterResult)) { - return false; - } - return $this->adapterResult[0]; - } - /** - * Reboot an instance - * - * @param string $id - * @return boolean - */ - public function rebootInstance($id) - { - return $this->rackspace->rebootServer($id,true); - } - /** - * Create a new instance - * - * @param string $name - * @param array $options - * @return Instance|boolean - */ - public function createInstance($name, $options) - { - if (empty($name)) { - throw new Zend_Cloud_Infrastructure_Exception('You must specify the name of the instance'); - } - if (empty($options) || !is_array($options)) { - throw new Zend_Cloud_Infrastructure_Exception('The options must be an array'); - } - // @todo create an generic abstract definition for an instance? - $metadata= array(); - if (isset($options['metadata'])) { - $metadata= $options['metadata']; - unset($options['metadata']); - } - $files= array(); - if (isset($options['files'])) { - $files= $options['files']; - unset($options['files']); - } - $options['name']= $name; - $this->adapterResult = $this->rackspace->createServer($options,$metadata,$files); - if ($this->adapterResult===false) { - return false; - } - return new Zend_Cloud_Infrastructure_Instance($this, $this->convertAttributes($this->adapterResult->toArray())); - } - /** - * Stop an instance - * - * @param string $id - * @return boolean - */ - public function stopInstance($id) - { - throw new Zend_Cloud_Infrastructure_Exception('The stopInstance method is not implemented in the adapter'); - } - - /** - * Start an instance - * - * @param string $id - * @return boolean - */ - public function startInstance($id) - { - throw new Zend_Cloud_Infrastructure_Exception('The startInstance method is not implemented in the adapter'); - } - - /** - * Destroy an instance - * - * @param string $id - * @return boolean - */ - public function destroyInstance($id) - { - $this->adapterResult= $this->rackspace->deleteServer($id); - return $this->adapterResult; - } - /** - * Return a list of all the available instance images - * - * @return ImageList|boolean - */ - public function imagesInstance() - { - $this->adapterResult = $this->rackspace->listImages(true); - if ($this->adapterResult===false) { - return false; - } - - $images= $this->adapterResult->toArray(); - $result= array(); - - foreach ($images as $image) { - if (strtolower($image['status'])==='active') { - if (strpos($image['name'],'Windows')!==false) { - $platform = Zend_Cloud_Infrastructure_Image::IMAGE_WINDOWS; - } else { - $platform = Zend_Cloud_Infrastructure_Image::IMAGE_LINUX; - } - if (strpos($image['name'],'x64')!==false) { - $arch = Zend_Cloud_Infrastructure_Image::ARCH_64BIT; - } else { - $arch = Zend_Cloud_Infrastructure_Image::ARCH_32BIT; - } - $result[]= array ( - Zend_Cloud_Infrastructure_Image::IMAGE_ID => $image['id'], - Zend_Cloud_Infrastructure_Image::IMAGE_NAME => $image['name'], - Zend_Cloud_Infrastructure_Image::IMAGE_DESCRIPTION => $image['name'], - Zend_Cloud_Infrastructure_Image::IMAGE_ARCHITECTURE => $arch, - Zend_Cloud_Infrastructure_Image::IMAGE_PLATFORM => $platform, - ); - } - } - return new Zend_Cloud_Infrastructure_ImageList($result,$this->adapterResult); - } - /** - * Return all the available zones - * - * @return array - */ - public function zonesInstance() - { - return array(self::RACKSPACE_ZONE_USA,self::RACKSPACE_ZONE_UK); - } - /** - * Return the system information about the $metric of an instance - * NOTE: it works only for Linux servers - * - * @param string $id - * @param string $metric - * @param null|array $options - * @return array|boolean - */ - public function monitorInstance($id, $metric, $options = null) - { - if (!function_exists("ssh2_connect")) { - throw new Zend_Cloud_Infrastructure_Exception('Monitor requires the PHP "SSH" extension (ext/ssh2)'); - } - if (empty($id)) { - throw new Zend_Cloud_Infrastructure_Exception('You must specify the id of the instance to monitor'); - } - if (empty($metric)) { - throw new Zend_Cloud_Infrastructure_Exception('You must specify the metric to monitor'); - } - if (!in_array($metric,$this->validMetrics)) { - throw new Zend_Cloud_Infrastructure_Exception(sprintf('The metric "%s" is not valid', $metric)); - } - if (!empty($options) && !is_array($options)) { - throw new Zend_Cloud_Infrastructure_Exception('The options must be an array'); - } - - switch ($metric) { - case Zend_Cloud_Infrastructure_Instance::MONITOR_CPU: - $cmd= 'top -b -n '.self::MONITOR_CPU_SAMPLES.' | grep \'Cpu\''; - break; - case Zend_Cloud_Infrastructure_Instance::MONITOR_RAM: - $cmd= 'top -b -n 1 | grep \'Mem\''; - break; - case Zend_Cloud_Infrastructure_Instance::MONITOR_DISK: - $cmd= 'df --total | grep total'; - break; - } - if (empty($cmd)) { - throw new Zend_Cloud_Infrastructure_Exception('The metric specified is not supported by the adapter'); - } - - $params= array( - Zend_Cloud_Infrastructure_Instance::SSH_USERNAME => $options['username'], - Zend_Cloud_Infrastructure_Instance::SSH_PASSWORD => $options['password'] - ); - $exec_time= time(); - $result= $this->deployInstance($id,$params,$cmd); - - if (empty($result)) { - return false; - } - - $monitor = array(); - $num = 0; - $average = 0; - - $outputs= explode("\n",$result); - foreach ($outputs as $output) { - if (!empty($output)) { - switch ($metric) { - case Zend_Cloud_Infrastructure_Instance::MONITOR_CPU: - if (preg_match('/(\d+\.\d)%us/', $output,$match)) { - $usage = (float) $match[1]; - } - break; - case Zend_Cloud_Infrastructure_Instance::MONITOR_RAM: - if (preg_match('/(\d+)k total/', $output,$match)) { - $total = (integer) $match[1]; - } - if (preg_match('/(\d+)k used/', $output,$match)) { - $used = (integer) $match[1]; - } - if ($total>0) { - $usage= (float) $used/$total; - } - break; - case Zend_Cloud_Infrastructure_Instance::MONITOR_DISK: - if (preg_match('/(\d+)%/', $output,$match)) { - $usage = (float) $match[1]; - } - break; - } - - $monitor['series'][] = array ( - 'timestamp' => $exec_time, - 'value' => number_format($usage,2).'%' - ); - - $average += $usage; - $exec_time+= 60; // seconds - $num++; - } - } - - if ($num>0) { - $monitor['average'] = number_format($average/$num,2).'%'; - } - return $monitor; - } - /** - * Get the adapter - * - * @return Zend_Service_Rackspace_Servers - */ - public function getAdapter() - { - return $this->rackspace; - } - /** - * Get last HTTP request - * - * @return string - */ - public function getLastHttpRequest() - { - return $this->rackspace->getHttpClient()->getLastRequest(); - } - /** - * Get the last HTTP response - * - * @return Zend_Http_Response - */ - public function getLastHttpResponse() - { - return $this->rackspace->getHttpClient()->getLastResponse(); - } -} diff --git a/library/vendor/Zend/Cloud/Infrastructure/Exception.php b/library/vendor/Zend/Cloud/Infrastructure/Exception.php deleted file mode 100644 index 1b251fb0e..000000000 --- a/library/vendor/Zend/Cloud/Infrastructure/Exception.php +++ /dev/null @@ -1,24 +0,0 @@ -toArray(); - } elseif ($data instanceof Traversable) { - $data = iterator_to_array($data); - } - } - - if (empty($data) || !is_array($data)) { - throw new Zend_Cloud_Infrastructure_Exception('You must pass an array of parameters'); - } - - foreach ($this->attributeRequired as $key) { - if (empty($data[$key])) { - throw new Zend_Cloud_Infrastructure_Exception(sprintf( - 'The param "%s" is a required parameter for class %s', - $key, - __CLASS__ - )); - } - } - - $this->attributes = $data; - $this->adapter = $adapter; - } - - /** - * Get Attribute with a specific key - * - * @param array $data - * @return misc|boolean - */ - public function getAttribute($key) - { - if (!empty($this->attributes[$key])) { - return $this->attributes[$key]; - } - return false; - } - - /** - * Get all the attributes - * - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Get the image ID - * - * @return string - */ - public function getId() - { - return $this->attributes[self::IMAGE_ID]; - } - - /** - * Get the Owner ID - * - * @return string - */ - public function getOwnerId() - { - return $this->attributes[self::IMAGE_OWNERID]; - } - - /** - * Get the name - * - * @return string - */ - public function getName() - { - return $this->attributes[self::IMAGE_NAME]; - } - - /** - * Get the description - * - * @return string - */ - public function getDescription() - { - return $this->attributes[self::IMAGE_DESCRIPTION]; - } - - /** - * Get the platform - * - * @return string - */ - public function getPlatform() - { - return $this->attributes[self::IMAGE_PLATFORM]; - } - - /** - * Get the architecture - * - * @return string - */ - public function getArchitecture() - { - return $this->attributes[self::IMAGE_ARCHITECTURE]; - } -} diff --git a/library/vendor/Zend/Cloud/Infrastructure/ImageList.php b/library/vendor/Zend/Cloud/Infrastructure/ImageList.php deleted file mode 100644 index c80c2c29a..000000000 --- a/library/vendor/Zend/Cloud/Infrastructure/ImageList.php +++ /dev/null @@ -1,213 +0,0 @@ -adapter = $adapter; - $this->constructFromArray($images); - } - - /** - * Transforms the Array to array of Instances - * - * @param array $list - * @return void - */ - protected function constructFromArray(array $list) - { - foreach ($list as $image) { - $this->addImage(new Zend_Cloud_Infrastructure_Image($image, $this->adapter)); - } - } - - /** - * Add an image - * - * @param Image - * @return ImageList - */ - protected function addImage(Zend_Cloud_Infrastructure_Image $image) - { - $this->images[] = $image; - return $this; - } - - /** - * Return number of images - * - * Implement Countable::count() - * - * @return int - */ - public function count() - { - return count($this->images); - } - - /** - * Return the current element - * - * Implement Iterator::current() - * - * @return Image - */ - public function current() - { - return $this->images[$this->iteratorKey]; - } - - /** - * Return the key of the current element - * - * Implement Iterator::key() - * - * @return int - */ - public function key() - { - return $this->iteratorKey; - } - - /** - * Move forward to next element - * - * Implement Iterator::next() - * - * @return void - */ - public function next() - { - $this->iteratorKey++; - } - - /** - * Rewind the Iterator to the first element - * - * Implement Iterator::rewind() - * - * @return void - */ - public function rewind() - { - $this->iteratorKey = 0; - } - - /** - * Check if there is a current element after calls to rewind() or next() - * - * Implement Iterator::valid() - * - * @return bool - */ - public function valid() - { - $numItems = $this->count(); - if ($numItems > 0 && $this->iteratorKey < $numItems) { - return true; - } - return false; - } - - /** - * Whether the offset exists - * - * Implement ArrayAccess::offsetExists() - * - * @param int $offset - * @return bool - */ - public function offsetExists($offset) - { - return ($offset < $this->count()); - } - - /** - * Return value at given offset - * - * Implement ArrayAccess::offsetGet() - * - * @param int $offset - * @throws Zend_Cloud_Infrastructure_Exception - * @return Image - */ - public function offsetGet($offset) - { - if (!$this->offsetExists($offset)) { - throw new Zend_Cloud_Infrastructure_Exception('Illegal index'); - } - return $this->images[$offset]; - } - - /** - * Throws exception because all values are read-only - * - * Implement ArrayAccess::offsetSet() - * - * @param int $offset - * @param string $value - * @throws Zend_Cloud_Infrastructure_Exception - */ - public function offsetSet($offset, $value) - { - throw new Zend_Cloud_Infrastructure_Exception('You are trying to set read-only property'); - } - - /** - * Throws exception because all values are read-only - * - * Implement ArrayAccess::offsetUnset() - * - * @param int $offset - * @throws Zend_Cloud_Infrastructure_Exception - */ - public function offsetUnset($offset) - { - throw new Zend_Cloud_Infrastructure_Exception('You are trying to unset read-only property'); - } -} diff --git a/library/vendor/Zend/Cloud/Infrastructure/Instance.php b/library/vendor/Zend/Cloud/Infrastructure/Instance.php deleted file mode 100644 index 3a1caaa48..000000000 --- a/library/vendor/Zend/Cloud/Infrastructure/Instance.php +++ /dev/null @@ -1,317 +0,0 @@ -toArray(); - } elseif ($data instanceof Traversable) { - $data = iterator_to_array($data); - } - } - - if (empty($data) || !is_array($data)) { - throw new Zend_Cloud_Infrastructure_Exception("You must pass an array of parameters"); - } - - foreach ($this->attributeRequired as $key) { - if (empty($data[$key])) { - throw new Zend_Cloud_Infrastructure_Exception(sprintf( - 'The param "%s" is a required param for %s', - $key, - __CLASS__ - )); - } - } - - $this->adapter = $adapter; - $this->attributes = $data; - } - - /** - * Get Attribute with a specific key - * - * @param array $data - * @return misc|false - */ - public function getAttribute($key) - { - if (!empty($this->attributes[$key])) { - return $this->attributes[$key]; - } - return false; - } - - /** - * Get all the attributes - * - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Get the instance's id - * - * @return string - */ - public function getId() - { - return $this->attributes[self::INSTANCE_ID]; - } - - /** - * Get the instance's image id - * - * @return string - */ - public function getImageId() - { - return $this->attributes[self::INSTANCE_IMAGEID]; - } - - /** - * Get the instance's name - * - * @return string - */ - public function getName() - { - return $this->attributes[self::INSTANCE_NAME]; - } - - /** - * Get the status of the instance - * - * @return string|boolean - */ - public function getStatus() - { - return $this->adapter->statusInstance($this->attributes[self::INSTANCE_ID]); - } - - /** - * Wait for status $status with a timeout of $timeout seconds - * - * @param string $status - * @param integer $timeout - * @return boolean - */ - public function waitStatus($status, $timeout = Adapter::TIMEOUT_STATUS_CHANGE) - { - return $this->adapter->waitStatusInstance($this->attributes[self::INSTANCE_ID], $status, $timeout); - } - - /** - * Get the public DNS of the instance - * - * @return string - */ - public function getPublicDns() - { - if (!isset($this->attributes[self::INSTANCE_PUBLICDNS])) { - $this->attributes[self::INSTANCE_PUBLICDNS] = $this->adapter->publicDnsInstance($this->attributes[self::INSTANCE_ID]); - } - return $this->attributes[self::INSTANCE_PUBLICDNS]; - } - - /** - * Get the instance's CPU - * - * @return string - */ - public function getCpu() - { - return $this->attributes[self::INSTANCE_CPU]; - } - - /** - * Get the instance's RAM size - * - * @return string - */ - public function getRamSize() - { - return $this->attributes[self::INSTANCE_RAM]; - } - - /** - * Get the instance's storage size - * - * @return string - */ - public function getStorageSize() - { - return $this->attributes[self::INSTANCE_STORAGE]; - } - - /** - * Get the instance's zone - * - * @return string - */ - public function getZone() - { - return $this->attributes[self::INSTANCE_ZONE]; - } - - /** - * Get the instance's launch time - * - * @return string - */ - public function getLaunchTime() - { - return $this->attributes[self::INSTANCE_LAUNCHTIME]; - } - - /** - * Reboot the instance - * - * @return boolean - */ - public function reboot() - { - return $this->adapter->rebootInstance($this->attributes[self::INSTANCE_ID]); - } - - /** - * Stop the instance - * - * @return boolean - */ - public function stop() - { - return $this->adapter->stopInstance($this->attributes[self::INSTANCE_ID]); - } - - /** - * Start the instance - * - * @return boolean - */ - public function start() - { - return $this->adapter->startInstance($this->attributes[self::INSTANCE_ID]); - } - - /** - * Destroy the instance - * - * @return boolean - */ - public function destroy() - { - return $this->adapter->destroyInstance($this->attributes[self::INSTANCE_ID]); - } - - /** - * Return the system informations about the $metric of an instance - * - * @param string $metric - * @param null|array $options - * @return array|boolean - */ - public function monitor($metric, $options = null) - { - return $this->adapter->monitorInstance($this->attributes[self::INSTANCE_ID], $metric, $options); - } - - /** - * Run arbitrary shell script on the instance - * - * @param array $param - * @param string|array $cmd - * @return string|array - */ - public function deploy($params, $cmd) - { - return $this->adapter->deployInstance($this->attributes[self::INSTANCE_ID], $params, $cmd); - } -} diff --git a/library/vendor/Zend/Cloud/Infrastructure/InstanceList.php b/library/vendor/Zend/Cloud/Infrastructure/InstanceList.php deleted file mode 100644 index 40edf0635..000000000 --- a/library/vendor/Zend/Cloud/Infrastructure/InstanceList.php +++ /dev/null @@ -1,213 +0,0 @@ -adapter = $adapter; - $this->constructFromArray($instances); - } - - /** - * Transforms the Array to array of Instances - * - * @param array $list - * @return void - */ - protected function constructFromArray(array $list) - { - foreach ($list as $instance) { - $this->addInstance(new Zend_Cloud_Infrastructure_Instance($this->adapter,$instance)); - } - } - - /** - * Add an instance - * - * @param Instance - * @return InstanceList - */ - protected function addInstance(Zend_Cloud_Infrastructure_Instance $instance) - { - $this->instances[] = $instance; - return $this; - } - - /** - * Return number of instances - * - * Implement Countable::count() - * - * @return int - */ - public function count() - { - return count($this->instances); - } - - /** - * Return the current element - * - * Implement Iterator::current() - * - * @return Instance - */ - public function current() - { - return $this->instances[$this->iteratorKey]; - } - - /** - * Return the key of the current element - * - * Implement Iterator::key() - * - * @return int - */ - public function key() - { - return $this->iteratorKey; - } - - /** - * Move forward to next element - * - * Implement Iterator::next() - * - * @return void - */ - public function next() - { - $this->iteratorKey++; - } - - /** - * Rewind the Iterator to the first element - * - * Implement Iterator::rewind() - * - * @return void - */ - public function rewind() - { - $this->iteratorKey = 0; - } - - /** - * Check if there is a current element after calls to rewind() or next() - * - * Implement Iterator::valid() - * - * @return bool - */ - public function valid() - { - $numItems = $this->count(); - if ($numItems > 0 && $this->iteratorKey < $numItems) { - return true; - } - return false; - } - - /** - * Whether the offset exists - * - * Implement ArrayAccess::offsetExists() - * - * @param int $offset - * @return bool - */ - public function offsetExists($offset) - { - return ($offset < $this->count()); - } - - /** - * Return value at given offset - * - * Implement ArrayAccess::offsetGet() - * - * @param int $offset - * @return Instance - * @throws Zend_Cloud_Infrastructure_Exception - */ - public function offsetGet($offset) - { - if (!$this->offsetExists($offset)) { - throw new Zend_Cloud_Infrastructure_Exception('Illegal index'); - } - return $this->instances[$offset]; - } - - /** - * Throws exception because all values are read-only - * - * Implement ArrayAccess::offsetSet() - * - * @param int $offset - * @param string $value - * @throws Zend_Cloud_Infrastructure_Exception - */ - public function offsetSet($offset, $value) - { - throw new Zend_Cloud_Infrastructure_Exception('You are trying to set read-only property'); - } - - /** - * Throws exception because all values are read-only - * - * Implement ArrayAccess::offsetUnset() - * - * @param int $offset - * @throws Zend_Cloud_Infrastructure_Exception - */ - public function offsetUnset($offset) - { - throw new Zend_Cloud_Infrastructure_Exception('You are trying to unset read-only property'); - } -} diff --git a/library/vendor/Zend/Cloud/QueueService/Adapter.php b/library/vendor/Zend/Cloud/QueueService/Adapter.php deleted file mode 100644 index 4629dafe4..000000000 --- a/library/vendor/Zend/Cloud/QueueService/Adapter.php +++ /dev/null @@ -1,146 +0,0 @@ -_messageClass = (string) $class; - return $this; - } - - /** - * Get class to use for message objects - * - * @return string - */ - public function getMessageClass() - { - return $this->_messageClass; - } - - /** - * Set class to use for message collection objects - * - * @param string $class - * @return Zend_Cloud_QueueService_Adapter_AbstractAdapter - */ - public function setMessageSetClass($class) - { - $this->_messageSetClass = (string) $class; - return $this; - } - - /** - * Get class to use for message collection objects - * - * @return string - */ - public function getMessageSetClass() - { - return $this->_messageSetClass; - } -} diff --git a/library/vendor/Zend/Cloud/QueueService/Adapter/Sqs.php b/library/vendor/Zend/Cloud/QueueService/Adapter/Sqs.php deleted file mode 100644 index df778ade2..000000000 --- a/library/vendor/Zend/Cloud/QueueService/Adapter/Sqs.php +++ /dev/null @@ -1,273 +0,0 @@ -toArray(); - } - - if (!is_array($options)) { - throw new Zend_Cloud_QueueService_Exception('Invalid options provided'); - } - - if (isset($options[self::MESSAGE_CLASS])) { - $this->setMessageClass($options[self::MESSAGE_CLASS]); - } - - if (isset($options[self::MESSAGESET_CLASS])) { - $this->setMessageSetClass($options[self::MESSAGESET_CLASS]); - } - - try { - $this->_sqs = new Zend_Service_Amazon_Sqs( - $options[self::AWS_ACCESS_KEY], $options[self::AWS_SECRET_KEY] - ); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on create: '.$e->getMessage(), $e->getCode(), $e); - } - - if(isset($options[self::HTTP_ADAPTER])) { - $this->_sqs->getHttpClient()->setAdapter($options[self::HTTP_ADAPTER]); - } - } - - /** - * Create a queue. Returns the ID of the created queue (typically the URL). - * It may take some time to create the queue. Check your vendor's - * documentation for details. - * - * @param string $name - * @param array $options - * @return string Queue ID (typically URL) - */ - public function createQueue($name, $options = null) - { - try { - return $this->_sqs->create($name, $options[self::CREATE_TIMEOUT]); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on queue creation: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Delete a queue. All messages in the queue will also be deleted. - * - * @param string $queueId - * @param array $options - * @return boolean true if successful, false otherwise - */ - public function deleteQueue($queueId, $options = null) -{ - try { - return $this->_sqs->delete($queueId); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on queue deletion: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * List all queues. - * - * @param array $options - * @return array Queue IDs - */ - public function listQueues($options = null) - { - try { - return $this->_sqs->getQueues(); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on listing queues: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Get a key/value array of metadata for the given queue. - * - * @param string $queueId - * @param array $options - * @return array - */ - public function fetchQueueMetadata($queueId, $options = null) - { - try { - // TODO: ZF-9050 Fix the SQS client library in trunk to return all attribute values - $attributes = $this->_sqs->getAttribute($queueId, 'All'); - if(is_array($attributes)) { - return $attributes; - } else { - return array('All' => $this->_sqs->getAttribute($queueId, 'All')); - } - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on fetching queue metadata: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Store a key/value array of metadata for the specified queue. - * WARNING: This operation overwrites any metadata that is located at - * $destinationPath. Some adapters may not support this method. - * - * @param array $metadata - * @param string $queueId - * @param array $options - * @return void - */ - public function storeQueueMetadata($queueId, $metadata, $options = null) - { - // TODO Add support for SetQueueAttributes to client library - throw new Zend_Cloud_OperationNotAvailableException('Amazon SQS doesn\'t currently support storing metadata'); - } - - /** - * Send a message to the specified queue. - * - * @param string $message - * @param string $queueId - * @param array $options - * @return string Message ID - */ - public function sendMessage($queueId, $message, $options = null) - { - try { - return $this->_sqs->send($queueId, $message); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on sending message: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Recieve at most $max messages from the specified queue and return the - * message IDs for messages recieved. - * - * @param string $queueId - * @param int $max - * @param array $options - * @return array - */ - public function receiveMessages($queueId, $max = 1, $options = null) - { - try { - return $this->_makeMessages($this->_sqs->receive($queueId, $max, $options[self::VISIBILITY_TIMEOUT])); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on recieving messages: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Create Zend_Cloud_QueueService_Message array for - * Sqs messages. - * - * @param array $messages - * @return Zend_Cloud_QueueService_Message[] - */ - protected function _makeMessages($messages) - { - $messageClass = $this->getMessageClass(); - $setClass = $this->getMessageSetClass(); - $result = array(); - foreach($messages as $message) { - $result[] = new $messageClass($message['body'], $message); - } - return new $setClass($result); - } - - /** - * Delete the specified message from the specified queue. - * - * @param string $queueId - * @param Zend_Cloud_QueueService_Message $message - * @param array $options - * @return void - */ - public function deleteMessage($queueId, $message, $options = null) - { - try { - if($message instanceof Zend_Cloud_QueueService_Message) { - $message = $message->getMessage(); - } - $messageId = $message['handle']; - return $this->_sqs->deleteMessage($queueId, $messageId); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on deleting a message: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Peek at the messages from the specified queue without removing them. - * - * @param string $queueId - * @param int $num How many messages - * @param array $options - * @return Zend_Cloud_QueueService_Message[] - */ - public function peekMessages($queueId, $num = 1, $options = null) - { - try { - return $this->_makeMessages($this->_sqs->receive($queueId, $num, 0)); - } catch(Zend_Service_Amazon_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on peeking messages: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Get SQS implementation - * @return Zend_Service_Amazon_Sqs - */ - public function getClient() - { - return $this->_sqs; - } -} diff --git a/library/vendor/Zend/Cloud/QueueService/Adapter/WindowsAzure.php b/library/vendor/Zend/Cloud/QueueService/Adapter/WindowsAzure.php deleted file mode 100644 index 0c3919f73..000000000 --- a/library/vendor/Zend/Cloud/QueueService/Adapter/WindowsAzure.php +++ /dev/null @@ -1,340 +0,0 @@ -toArray(); - } - - if (!is_array($options)) { - throw new Zend_Cloud_QueueService_Exception('Invalid options provided'); - } - - if (isset($options[self::MESSAGE_CLASS])) { - $this->setMessageClass($options[self::MESSAGE_CLASS]); - } - - if (isset($options[self::MESSAGESET_CLASS])) { - $this->setMessageSetClass($options[self::MESSAGESET_CLASS]); - } - - // Build Zend_Service_WindowsAzure_Storage_Blob instance - if (!isset($options[self::HOST])) { - $host = self::DEFAULT_HOST; - } else { - $host = $options[self::HOST]; - } - if (! isset($options[self::ACCOUNT_NAME])) { - throw new Zend_Cloud_Storage_Exception('No Windows Azure account name provided.'); - } - if (! isset($options[self::ACCOUNT_KEY])) { - throw new Zend_Cloud_Storage_Exception('No Windows Azure account key provided.'); - } - try { - // TODO: support $usePathStyleUri and $retryPolicy - $this->_storageClient = new Zend_Service_WindowsAzure_Storage_Queue( - $host, $options[self::ACCOUNT_NAME], $options[self::ACCOUNT_KEY]); - // Parse other options - if (! empty($options[self::PROXY_HOST])) { - $proxyHost = $options[self::PROXY_HOST]; - $proxyPort = isset($options[self::PROXY_PORT]) ? $options[self::PROXY_PORT] : 8080; - $proxyCredentials = isset($options[self::PROXY_CREDENTIALS]) ? $options[self::PROXY_CREDENTIALS] : ''; - $this->_storageClient->setProxy(true, $proxyHost, $proxyPort, $proxyCredentials); - } - if (isset($options[self::HTTP_ADAPTER])) { - $this->_storageClient->setHttpClientChannel($httpAdapter); - } - } catch(Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on create: '.$e->getMessage(), $e->getCode(), $e); - } - - } - - /** - * Create a queue. Returns the ID of the created queue (typically the URL). - * It may take some time to create the queue. Check your vendor's - * documentation for details. - * - * @param string $name - * @param array $options - * @return string Queue ID (typically URL) - */ - public function createQueue($name, $options = null) - { - try { - $queue = $this->_storageClient->createQueue($name, $options); - return $queue->Name; - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on queue creation: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Delete a queue. All messages in the queue will also be deleted. - * - * @param string $queueId - * @param array $options - * @return boolean true if successful, false otherwise - */ - public function deleteQueue($queueId, $options = null) - { - try { - if ($queueId instanceof Zend_Service_WindowsAzure_Storage_QueueInstance) { - $queueId = $queueId->Name; - } - return $this->_storageClient->deleteQueue($queueId); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on queue deletion: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * List all queues. - * - * @param array $options - * @return array Queue IDs - */ - public function listQueues($options = null) - { - $prefix = $maxResults = null; - if (is_array($options)) { - isset($options[self::LIST_PREFIX]) ? $prefix = $options[self::LIST_PREFIX] : null; - isset($options[self::LIST_MAX_RESULTS]) ? $maxResults = $options[self::LIST_MAX_RESULTS] : null; - } - try { - $queues = $this->_storageClient->listQueues($prefix, $maxResults); - $result = array(); - foreach ($queues as $queue) { - $result[] = $queue->Name; - } - return $result; - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on listing queues: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Get a key/value array of metadata for the given queue. - * - * @param string $queueId - * @param array $options - * @return array - */ - public function fetchQueueMetadata($queueId, $options = null) - { - try { - if ($queueId instanceof Zend_Service_WindowsAzure_Storage_QueueInstance) { - $queueId = $queueId->Name; - } - return $this->_storageClient->getQueueMetadata($queueId); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on fetching queue metadata: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Store a key/value array of metadata for the specified queue. - * WARNING: This operation overwrites any metadata that is located at - * $destinationPath. Some adapters may not support this method. - * - * @param string $queueId - * @param array $metadata - * @param array $options - * @return void - */ - public function storeQueueMetadata($queueId, $metadata, $options = null) - { - try { - if ($queueId instanceof Zend_Service_WindowsAzure_Storage_QueueInstance) { - $queueId = $queueId->Name; - } - return $this->_storageClient->setQueueMetadata($queueId, $metadata); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on setting queue metadata: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Send a message to the specified queue. - * - * @param string $queueId - * @param string $message - * @param array $options - * @return string Message ID - */ - public function sendMessage($queueId, $message, $options = null) - { - try { - if ($queueId instanceof Zend_Service_WindowsAzure_Storage_QueueInstance) { - $queueId = $queueId->Name; - } - return $this->_storageClient->putMessage( - $queueId, $message, $options[self::MESSAGE_TTL] - ); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on sending message: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Recieve at most $max messages from the specified queue and return the - * message IDs for messages recieved. - * - * @param string $queueId - * @param int $max - * @param array $options - * @return Zend_Cloud_QueueService_Message[] - */ - public function receiveMessages($queueId, $max = 1, $options = null) - { - try { - if ($queueId instanceof Zend_Service_WindowsAzure_Storage_QueueInstance) { - $queueId = $queueId->Name; - } - if (isset($options[self::VISIBILITY_TIMEOUT])) { - $visibility = $options[self::VISIBILITY_TIMEOUT]; - } else { - $visibility = self::DEFAULT_TIMEOUT; - } - return $this->_makeMessages($this->_storageClient->getMessages($queueId, $max, $visibility, false)); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on recieving messages: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Create Zend_Cloud_QueueService_Message array for - * Azure messages. - * - * @param array $messages - * @return Zend_Cloud_QueueService_Message[] - */ - protected function _makeMessages($messages) - { - $messageClass = $this->getMessageClass(); - $setClass = $this->getMessageSetClass(); - $result = array(); - foreach ($messages as $message) { - $result[] = new $messageClass($message->MessageText, $message); - } - return new $setClass($result); - } - - /** - * Delete the specified message from the specified queue. - * - * @param string $queueId - * @param Zend_Cloud_QueueService_Message $message Message ID or message - * @param array $options - * @return void - */ - public function deleteMessage($queueId, $message, $options = null) - { - try { - if ($queueId instanceof Zend_Service_WindowsAzure_Storage_QueueInstance) { - $queueId = $queueId->Name; - } - if ($message instanceof Zend_Cloud_QueueService_Message) { - $message = $message->getMessage(); - } - if ($message instanceof Zend_Service_WindowsAzure_Storage_QueueMessage) { - return $this->_storageClient->deleteMessage($queueId, $message); - } else { - throw new Zend_Cloud_QueueService_Exception('Cannot delete the message: message object required'); - } - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on deleting a message: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Peek at the messages from the specified queue without removing them. - * - * @param string $queueId - * @param int $num How many messages - * @param array $options - * @return Zend_Cloud_QueueService_Message[] - */ - public function peekMessages($queueId, $num = 1, $options = null) - { - try { - if ($queueId instanceof Zend_Service_WindowsAzure_Storage_QueueInstance) { - $queueId = $queueId->Name; - } - return $this->_makeMessages($this->_storageClient->peekMessages($queueId, $num)); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on peeking messages: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Get Azure implementation - * @return Zend_Service_Azure_Storage_Queue - */ - public function getClient() - { - return $this->_storageClient; - } -} diff --git a/library/vendor/Zend/Cloud/QueueService/Adapter/ZendQueue.php b/library/vendor/Zend/Cloud/QueueService/Adapter/ZendQueue.php deleted file mode 100644 index d2b94784d..000000000 --- a/library/vendor/Zend/Cloud/QueueService/Adapter/ZendQueue.php +++ /dev/null @@ -1,297 +0,0 @@ -toArray(); - } - - if (!is_array($options)) { - throw new Zend_Cloud_QueueService_Exception('Invalid options provided'); - } - - if (isset($options[self::MESSAGE_CLASS])) { - $this->setMessageClass($options[self::MESSAGE_CLASS]); - } - - if (isset($options[self::MESSAGESET_CLASS])) { - $this->setMessageSetClass($options[self::MESSAGESET_CLASS]); - } - - // Build Zend_Service_WindowsAzure_Storage_Blob instance - if (!isset($options[self::ADAPTER])) { - throw new Zend_Cloud_QueueService_Exception('No Zend_Queue adapter provided'); - } else { - $adapter = $options[self::ADAPTER]; - unset($options[self::ADAPTER]); - } - try { - $this->_queue = new Zend_Queue($adapter, $options); - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on create: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Create a queue. Returns the ID of the created queue (typically the URL). - * It may take some time to create the queue. Check your vendor's - * documentation for details. - * - * @param string $name - * @param array $options - * @return string Queue ID (typically URL) - */ - public function createQueue($name, $options = null) - { - try { - $this->_queues[$name] = $this->_queue->createQueue($name, isset($options[Zend_Queue::TIMEOUT])?$options[Zend_Queue::TIMEOUT]:null); - return $name; - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on queue creation: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Delete a queue. All messages in the queue will also be deleted. - * - * @param string $queueId - * @param array $options - * @return boolean true if successful, false otherwise - */ - public function deleteQueue($queueId, $options = null) - { - if (!isset($this->_queues[$queueId])) { - return false; - } - try { - if ($this->_queues[$queueId]->deleteQueue()) { - unset($this->_queues[$queueId]); - return true; - } - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on queue deletion: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * List all queues. - * - * @param array $options - * @return array Queue IDs - */ - public function listQueues($options = null) - { - try { - return $this->_queue->getQueues(); - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on listing queues: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Get a key/value array of metadata for the given queue. - * - * @param string $queueId - * @param array $options - * @return array - */ - public function fetchQueueMetadata($queueId, $options = null) - { - if (!isset($this->_queues[$queueId])) { - return false; - } - try { - return $this->_queues[$queueId]->getOptions(); - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on fetching queue metadata: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Store a key/value array of metadata for the specified queue. - * WARNING: This operation overwrites any metadata that is located at - * $destinationPath. Some adapters may not support this method. - * - * @param string $queueId - * @param array $metadata - * @param array $options - * @return void - */ - public function storeQueueMetadata($queueId, $metadata, $options = null) - { - if (!isset($this->_queues[$queueId])) { - throw new Zend_Cloud_QueueService_Exception("No such queue: $queueId"); - } - try { - return $this->_queues[$queueId]->setOptions($metadata); - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on setting queue metadata: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Send a message to the specified queue. - * - * @param string $queueId - * @param string $message - * @param array $options - * @return string Message ID - */ - public function sendMessage($queueId, $message, $options = null) - { - if (!isset($this->_queues[$queueId])) { - throw new Zend_Cloud_QueueService_Exception("No such queue: $queueId"); - } - try { - return $this->_queues[$queueId]->send($message); - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on sending message: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Recieve at most $max messages from the specified queue and return the - * message IDs for messages recieved. - * - * @param string $queueId - * @param int $max - * @param array $options - * @return array - */ - public function receiveMessages($queueId, $max = 1, $options = null) - { - if (!isset($this->_queues[$queueId])) { - throw new Zend_Cloud_QueueService_Exception("No such queue: $queueId"); - } - try { - $res = $this->_queues[$queueId]->receive($max, isset($options[Zend_Queue::TIMEOUT])?$options[Zend_Queue::TIMEOUT]:null); - if ($res instanceof Iterator) { - return $this->_makeMessages($res); - } else { - return $this->_makeMessages(array($res)); - } - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on recieving messages: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Create Zend_Cloud_QueueService_Message array for - * Azure messages. - * - * @param array $messages - * @return Zend_Cloud_QueueService_Message[] - */ - protected function _makeMessages($messages) - { - $messageClass = $this->getMessageClass(); - $setClass = $this->getMessageSetClass(); - $result = array(); - foreach ($messages as $message) { - $result[] = new $messageClass($message->body, $message); - } - return new $setClass($result); - } - - /** - * Delete the specified message from the specified queue. - * - * @param string $queueId - * @param Zend_Cloud_QueueService_Message $message Message ID or message - * @param array $options - * @return void - */ - public function deleteMessage($queueId, $message, $options = null) - { - if (!isset($this->_queues[$queueId])) { - throw new Zend_Cloud_QueueService_Exception("No such queue: $queueId"); - } - try { - if ($message instanceof Zend_Cloud_QueueService_Message) { - $message = $message->getMessage(); - } - if (!($message instanceof Zend_Queue_Message)) { - throw new Zend_Cloud_QueueService_Exception('Cannot delete the message: Zend_Queue_Message object required'); - } - - return $this->_queues[$queueId]->deleteMessage($message); - } catch (Zend_Queue_Exception $e) { - throw new Zend_Cloud_QueueService_Exception('Error on deleting a message: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Peek at the messages from the specified queue without removing them. - * - * @param string $queueId - * @param int $num How many messages - * @param array $options - * @return Zend_Cloud_QueueService_Message[] - */ - public function peekMessages($queueId, $num = 1, $options = null) - { - throw new Zend_Cloud_OperationNotAvailableException('ZendQueue doesn\'t currently support message peeking'); - } - - /** - * Get Azure implementation - * @return Zend_Queue - */ - public function getClient() - { - return $this->_queue; - } -} diff --git a/library/vendor/Zend/Cloud/QueueService/Factory.php b/library/vendor/Zend/Cloud/QueueService/Factory.php deleted file mode 100644 index 255032b0e..000000000 --- a/library/vendor/Zend/Cloud/QueueService/Factory.php +++ /dev/null @@ -1,68 +0,0 @@ -_body = $body; - $this->_clientMessage = $message; - } - - /** - * Get the message body - * @return string - */ - public function getBody() - { - return $this->_body; - } - - /** - * Get the original adapter-specific message - */ - public function getMessage() - { - return $this->_clientMessage; - } -} diff --git a/library/vendor/Zend/Cloud/QueueService/MessageSet.php b/library/vendor/Zend/Cloud/QueueService/MessageSet.php deleted file mode 100644 index 20765b3d9..000000000 --- a/library/vendor/Zend/Cloud/QueueService/MessageSet.php +++ /dev/null @@ -1,68 +0,0 @@ -_messageCount = count($messages); - $this->_messages = new ArrayIterator($messages); - } - - /** - * Countable: number of messages in collection - * - * @return int - */ - public function count() - { - return $this->_messageCount; - } - - /** - * IteratorAggregate: return iterable object - * - * @return Traversable - */ - public function getIterator() - { - return $this->_messages; - } -} diff --git a/library/vendor/Zend/Cloud/StorageService/Adapter.php b/library/vendor/Zend/Cloud/StorageService/Adapter.php deleted file mode 100644 index c64cca3c7..000000000 --- a/library/vendor/Zend/Cloud/StorageService/Adapter.php +++ /dev/null @@ -1,145 +0,0 @@ -toArray(); - } - - if (!is_array($options)) { - throw new Zend_Cloud_StorageService_Exception('Invalid options provided'); - } - - if (isset($options[self::LOCAL_DIRECTORY])) { - $this->_directory = $options[self::LOCAL_DIRECTORY]; - } else { - $this->_directory = realpath(sys_get_temp_dir()); - } - } - - /** - * Get an item from the storage service. - * - * TODO: Support streaming - * - * @param string $path - * @param array $options - * @return false|string - */ - public function fetchItem($path, $options = array()) - { - $filepath = $this->_getFullPath($path); - $path = realpath($filepath); - - if (!$path || !file_exists($path)) { - return false; - } - - return file_get_contents($path); - } - - /** - * Store an item in the storage service. - * - * WARNING: This operation overwrites any item that is located at - * $destinationPath. - * - * @TODO Support streams - * - * @param string $destinationPath - * @param mixed $data - * @param array $options - * @return void - */ - public function storeItem($destinationPath, $data, $options = array()) - { - $path = $this->_getFullPath($destinationPath); - file_put_contents($path, $data); - chmod($path, 0777); - } - - /** - * Delete an item in the storage service. - * - * @param string $path - * @param array $options - * @return void - */ - public function deleteItem($path, $options = array()) - { - if (!isset($path)) { - return; - } - - $filepath = $this->_getFullPath($path); - if (file_exists($filepath)) { - unlink($filepath); - } - } - - /** - * Copy an item in the storage service to a given path. - * - * WARNING: This operation is *very* expensive for services that do not - * support copying an item natively. - * - * @TODO Support streams for those services that don't support natively - * - * @param string $sourcePath - * @param string $destination path - * @param array $options - * @return void - */ - public function copyItem($sourcePath, $destinationPath, $options = array()) - { - copy($this->_getFullPath($sourcePath), $this->_getFullPath($destinationPath)); - } - - /** - * Move an item in the storage service to a given path. - * - * WARNING: This operation is *very* expensive for services that do not - * support moving an item natively. - * - * @TODO Support streams for those services that don't support natively - * - * @param string $sourcePath - * @param string $destination path - * @param array $options - * @return void - */ - public function moveItem($sourcePath, $destinationPath, $options = array()) - { - rename($this->_getFullPath($sourcePath), $this->_getFullPath($destinationPath)); - } - - /** - * Rename an item in the storage service to a given name. - * - * - * @param string $path - * @param string $name - * @param array $options - * @return void - */ - public function renameItem($path, $name, $options = null) - { - rename( - $this->_getFullPath($path), - dirname($this->_getFullPath($path)) . DIRECTORY_SEPARATOR . $name - ); - } - - /** - * List items in the given directory in the storage service - * - * The $path must be a directory - * - * - * @param string $path Must be a directory - * @param array $options - * @return array A list of item names - */ - public function listItems($path, $options = null) - { - $listing = scandir($this->_getFullPath($path)); - - // Remove the hidden navigation directories - $listing = array_diff($listing, array('.', '..')); - - return $listing; - } - - /** - * Get a key/value array of metadata for the given path. - * - * @param string $path - * @param array $options - * @return array - */ - public function fetchMetadata($path, $options = array()) - { - $fullPath = $this->_getFullPath($path); - $metadata = null; - if (file_exists($fullPath)) { - $metadata = stat(realpath($fullPath)); - } - - return isset($metadata) ? $metadata : false; - } - - /** - * Store a key/value array of metadata at the given path. - * WARNING: This operation overwrites any metadata that is located at - * $destinationPath. - * - * @param string $destinationPath - * @param array $options - * @return void - */ - public function storeMetadata($destinationPath, $metadata, $options = array()) - { - throw new Zend_Cloud_OperationNotAvailableException('Storing metadata not implemented'); - } - - /** - * Delete a key/value array of metadata at the given path. - * - * @param string $path - * @param array $options - * @return void - */ - public function deleteMetadata($path) - { - throw new Zend_Cloud_OperationNotAvailableException('Deleting metadata not implemented'); - } - - /** - * Return the full path for the file. - * - * @param string $path - * @return string - */ - private function _getFullPath($path) - { - return $this->_directory . DIRECTORY_SEPARATOR . $path; - } - - /** - * Get the concrete client. - * @return strings - */ - public function getClient() - { - return $this->_directory; - } -} diff --git a/library/vendor/Zend/Cloud/StorageService/Adapter/Rackspace.php b/library/vendor/Zend/Cloud/StorageService/Adapter/Rackspace.php deleted file mode 100644 index c1cc8e7a2..000000000 --- a/library/vendor/Zend/Cloud/StorageService/Adapter/Rackspace.php +++ /dev/null @@ -1,327 +0,0 @@ -toArray(); - } - - if (!is_array($options) || empty($options)) { - throw new Zend_Cloud_StorageService_Exception('Invalid options provided'); - } - - try { - $this->_rackspace = new Zend_Service_Rackspace_Files($options[self::USER], $options[self::API_KEY]); - } catch (Zend_Service_Rackspace_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on create: '.$e->getMessage(), $e->getCode(), $e); - } - - if (isset($options[self::HTTP_ADAPTER])) { - $this->_rackspace->getHttpClient()->setAdapter($options[self::HTTP_ADAPTER]); - } - if (!empty($options[self::REMOTE_CONTAINER])) { - $this->_container = $options[self::REMOTE_CONTAINER]; - } - } - - /** - * Get an item from the storage service. - * - * @param string $path - * @param array $options - * @return mixed - */ - public function fetchItem($path, $options = null) - { - $item = $this->_rackspace->getObject($this->_container,$path, $options); - if (!$this->_rackspace->isSuccessful() && ($this->_rackspace->getErrorCode()!='404')) { - throw new Zend_Cloud_StorageService_Exception('Error on fetch: '.$this->_rackspace->getErrorMsg()); - } - if (!empty($item)) { - return $item->getContent(); - } else { - return false; - } - } - - /** - * Store an item in the storage service. - * - * @param string $destinationPath - * @param mixed $data - * @param array $options - * @return void - */ - public function storeItem($destinationPath, $data, $options = null) - { - $this->_rackspace->storeObject($this->_container,$destinationPath,$data,$options); - if (!$this->_rackspace->isSuccessful()) { - throw new Zend_Cloud_StorageService_Exception('Error on store: '.$this->_rackspace->getErrorMsg()); - } - } - - /** - * Delete an item in the storage service. - * - * @param string $path - * @param array $options - * @return void - */ - public function deleteItem($path, $options = null) - { - $this->_rackspace->deleteObject($this->_container,$path); - if (!$this->_rackspace->isSuccessful()) { - throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$this->_rackspace->getErrorMsg()); - } - } - - /** - * Copy an item in the storage service to a given path. - * - * @param string $sourcePath - * @param string $destination path - * @param array $options - * @return void - */ - public function copyItem($sourcePath, $destinationPath, $options = null) - { - $this->_rackspace->copyObject($this->_container,$sourcePath,$this->_container,$destinationPath,$options); - if (!$this->_rackspace->isSuccessful()) { - throw new Zend_Cloud_StorageService_Exception('Error on copy: '.$this->_rackspace->getErrorMsg()); - } - } - - /** - * Move an item in the storage service to a given path. - * WARNING: This operation is *very* expensive for services that do not - * support moving an item natively. - * - * @param string $sourcePath - * @param string $destination path - * @param array $options - * @return void - */ - public function moveItem($sourcePath, $destinationPath, $options = null) - { - try { - $this->copyItem($sourcePath, $destinationPath, $options); - } catch (Zend_Service_Rackspace_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on move: '.$e->getMessage()); - } - try { - $this->deleteItem($sourcePath); - } catch (Zend_Service_Rackspace_Exception $e) { - $this->deleteItem($destinationPath); - throw new Zend_Cloud_StorageService_Exception('Error on move: '.$e->getMessage()); - } - } - - /** - * Rename an item in the storage service to a given name. - * - * @param string $path - * @param string $name - * @param array $options - * @return void - */ - public function renameItem($path, $name, $options = null) - { - throw new Zend_Cloud_OperationNotAvailableException('Renaming not implemented'); - } - - /** - * Get a key/value array of metadata for the given path. - * - * @param string $path - * @param array $options - * @return array An associative array of key/value pairs specifying the metadata for this object. - * If no metadata exists, an empty array is returned. - */ - public function fetchMetadata($path, $options = null) - { - $result = $this->_rackspace->getMetadataObject($this->_container,$path); - if (!$this->_rackspace->isSuccessful()) { - throw new Zend_Cloud_StorageService_Exception('Error on fetch metadata: '.$this->_rackspace->getErrorMsg()); - } - $metadata = array(); - if (isset($result['metadata'])) { - $metadata = $result['metadata']; - } - // delete the self::DELETE_METADATA_KEY - this is a trick to remove all - // the metadata information of an object (see deleteMetadata). - // Rackspace doesn't have an API to remove the metadata of an object - unset($metadata[self::DELETE_METADATA_KEY]); - return $metadata; - } - - /** - * Store a key/value array of metadata at the given path. - * WARNING: This operation overwrites any metadata that is located at - * $destinationPath. - * - * @param string $destinationPath - * @param array $metadata associative array specifying the key/value pairs for the metadata. - * @param array $options - * @return void - */ - public function storeMetadata($destinationPath, $metadata, $options = null) - { - $this->_rackspace->setMetadataObject($this->_container, $destinationPath, $metadata); - if (!$this->_rackspace->isSuccessful()) { - throw new Zend_Cloud_StorageService_Exception('Error on store metadata: '.$this->_rackspace->getErrorMsg()); - } - } - - /** - * Delete a key/value array of metadata at the given path. - * - * @param string $path - * @param array $metadata - An associative array specifying the key/value pairs for the metadata - * to be deleted. If null, all metadata associated with the object will - * be deleted. - * @param array $options - * @return void - */ - public function deleteMetadata($path, $metadata = null, $options = null) - { - if (empty($metadata)) { - $newMetadata = array(self::DELETE_METADATA_KEY => true); - try { - $this->storeMetadata($path, $newMetadata); - } catch (Zend_Service_Rackspace_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on delete metadata: '.$e->getMessage()); - } - } else { - try { - $oldMetadata = $this->fetchMetadata($path); - } catch (Zend_Service_Rackspace_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on delete metadata: '.$e->getMessage()); - } - $newMetadata = array_diff_assoc($oldMetadata, $metadata); - try { - $this->storeMetadata($path, $newMetadata); - } catch (Zend_Service_Rackspace_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on delete metadata: '.$e->getMessage()); - } - } - } - - /* - * Recursively traverse all the folders and build an array that contains - * the path names for each folder. - * - * @param string $path folder path to get the list of folders from. - * @param array& $resultArray reference to the array that contains the path names - * for each folder. - * @return void - */ - private function getAllFolders($path, &$resultArray) - { - if (!empty($path)) { - $options = array ( - 'prefix' => $path - ); - } - $files = $this->_rackspace->getObjects($this->_container,$options); - if (!$this->_rackspace->isSuccessful()) { - throw new Zend_Cloud_StorageService_Exception('Error on get all folders: '.$this->_rackspace->getErrorMsg()); - } - $resultArray = array(); - foreach ($files as $file) { - $resultArray[dirname($file->getName())] = true; - } - $resultArray = array_keys($resultArray); - } - - /** - * Return an array of the items contained in the given path. The items - * returned are the files or objects that in the specified path. - * - * @param string $path - * @param array $options - * @return array - */ - public function listItems($path, $options = null) - { - if (!empty($path)) { - $options = array ( - 'prefix' => $path - ); - } - - $files = $this->_rackspace->getObjects($this->_container,$options); - if (!$this->_rackspace->isSuccessful()) { - throw new Zend_Cloud_StorageService_Exception('Error on list items: '.$this->_rackspace->getErrorMsg()); - } - $resultArray = array(); - if (!empty($files)) { - foreach ($files as $file) { - $resultArray[] = $file->getName(); - } - } - return $resultArray; - } - - /** - * Get the concrete client. - * - * @return Zend_Service_Rackspace_File - */ - public function getClient() - { - return $this->_rackspace; - } -} diff --git a/library/vendor/Zend/Cloud/StorageService/Adapter/S3.php b/library/vendor/Zend/Cloud/StorageService/Adapter/S3.php deleted file mode 100644 index 1b394792a..000000000 --- a/library/vendor/Zend/Cloud/StorageService/Adapter/S3.php +++ /dev/null @@ -1,324 +0,0 @@ -toArray(); - } - - if (!is_array($options)) { - throw new Zend_Cloud_StorageService_Exception('Invalid options provided'); - } - - if (!isset($options[self::AWS_ACCESS_KEY]) || !isset($options[self::AWS_SECRET_KEY])) { - throw new Zend_Cloud_StorageService_Exception('AWS keys not specified!'); - } - - try { - $this->_s3 = new Zend_Service_Amazon_S3($options[self::AWS_ACCESS_KEY], - $options[self::AWS_SECRET_KEY]); - } catch (Zend_Service_Amazon_S3_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on create: '.$e->getMessage(), $e->getCode(), $e); - } - - if (isset($options[self::HTTP_ADAPTER])) { - $this->_s3->getHttpClient()->setAdapter($options[self::HTTP_ADAPTER]); - } - - if (isset($options[self::BUCKET_NAME])) { - $this->_defaultBucketName = $options[self::BUCKET_NAME]; - } - - if (isset($options[self::BUCKET_AS_DOMAIN])) { - $this->_defaultBucketAsDomain = $options[self::BUCKET_AS_DOMAIN]; - } - } - - /** - * Get an item from the storage service. - * - * @TODO Support streams - * - * @param string $path - * @param array $options - * @return string - */ - public function fetchItem($path, $options = array()) - { - $fullPath = $this->_getFullPath($path, $options); - try { - if (!empty($options[self::FETCH_STREAM])) { - return $this->_s3->getObjectStream($fullPath, $options[self::FETCH_STREAM]); - } else { - return $this->_s3->getObject($fullPath); - } - } catch (Zend_Service_Amazon_S3_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on fetch: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Store an item in the storage service. - * - * WARNING: This operation overwrites any item that is located at - * $destinationPath. - * - * @TODO Support streams - * - * @param string $destinationPath - * @param string|resource $data - * @param array $options - * @return void - */ - public function storeItem($destinationPath, $data, $options = array()) - { - try { - $fullPath = $this->_getFullPath($destinationPath, $options); - return $this->_s3->putObject( - $fullPath, - $data, - empty($options[self::METADATA]) ? null : $options[self::METADATA] - ); - } catch (Zend_Service_Amazon_S3_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on store: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Delete an item in the storage service. - * - * @param string $path - * @param array $options - * @return void - */ - public function deleteItem($path, $options = array()) - { - try { - $this->_s3->removeObject($this->_getFullPath($path, $options)); - } catch (Zend_Service_Amazon_S3_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Copy an item in the storage service to a given path. - * - * WARNING: This operation is *very* expensive for services that do not - * support copying an item natively. - * - * @TODO Support streams for those services that don't support natively - * - * @param string $sourcePath - * @param string $destination path - * @param array $options - * @return void - */ - public function copyItem($sourcePath, $destinationPath, $options = array()) - { - try { - $fullSourcePath = $this->_getFullPath($sourcePath, $options); - $fullDestPath = $this->_getFullPath($destinationPath, $options); - return $this->_s3->copyObject( - $fullSourcePath, - $fullDestPath, - empty($options[self::METADATA]) ? null : $options[self::METADATA] - ); - - } catch (Zend_Service_Amazon_S3_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on copy: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Move an item in the storage service to a given path. - * - * @TODO Support streams for those services that don't support natively - * - * @param string $sourcePath - * @param string $destination path - * @param array $options - * @return void - */ - public function moveItem($sourcePath, $destinationPath, $options = array()) - { - try { - $fullSourcePath = $this->_getFullPath($sourcePath, $options); - $fullDestPath = $this->_getFullPath($destinationPath, $options); - return $this->_s3->moveObject( - $fullSourcePath, - $fullDestPath, - empty($options[self::METADATA]) ? null : $options[self::METADATA] - ); - } catch (Zend_Service_Amazon_S3_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on move: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Rename an item in the storage service to a given name. - * - * - * @param string $path - * @param string $name - * @param array $options - * @return void - */ - public function renameItem($path, $name, $options = null) - { - throw new Zend_Cloud_OperationNotAvailableException('Rename not implemented'); - } - - /** - * List items in the given directory in the storage service - * - * The $path must be a directory - * - * - * @param string $path Must be a directory - * @param array $options - * @return array A list of item names - */ - public function listItems($path, $options = null) - { - try { - // TODO Support 'prefix' parameter for Zend_Service_Amazon_S3::getObjectsByBucket() - return $this->_s3->getObjectsByBucket($this->_defaultBucketName); - } catch (Zend_Service_Amazon_S3_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on list: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Get a key/value array of metadata for the given path. - * - * @param string $path - * @param array $options - * @return array - */ - public function fetchMetadata($path, $options = array()) - { - try { - return $this->_s3->getInfo($this->_getFullPath($path, $options)); - } catch (Zend_Service_Amazon_S3_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on fetch: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Store a key/value array of metadata at the given path. - * WARNING: This operation overwrites any metadata that is located at - * $destinationPath. - * - * @param string $destinationPath - * @param array $options - * @return void - */ - public function storeMetadata($destinationPath, $metadata, $options = array()) - { - throw new Zend_Cloud_OperationNotAvailableException('Storing separate metadata is not supported, use storeItem() with \'metadata\' option key'); - } - - /** - * Delete a key/value array of metadata at the given path. - * - * @param string $path - * @param array $options - * @return void - */ - public function deleteMetadata($path) - { - throw new Zend_Cloud_OperationNotAvailableException('Deleting metadata not supported'); - } - - /** - * Get full path, including bucket, for an object - * - * @param string $path - * @param array $options - * @return void - */ - protected function _getFullPath($path, $options) - { - if (isset($options[self::BUCKET_NAME])) { - $bucket = $options[self::BUCKET_NAME]; - } else if (isset($this->_defaultBucketName)) { - $bucket = $this->_defaultBucketName; - } else { - throw new Zend_Cloud_StorageService_Exception('Bucket name must be specified for S3 adapter.'); - } - - if (isset($options[self::BUCKET_AS_DOMAIN])) { - // TODO: support bucket domain names - throw new Zend_Cloud_StorageService_Exception('The S3 adapter does not currently support buckets in domain names.'); - } - - return trim($bucket) . '/' . trim($path); - } - - /** - * Get the concrete client. - * @return Zend_Service_Amazon_S3 - */ - public function getClient() - { - return $this->_s3; - } -} diff --git a/library/vendor/Zend/Cloud/StorageService/Adapter/WindowsAzure.php b/library/vendor/Zend/Cloud/StorageService/Adapter/WindowsAzure.php deleted file mode 100644 index 734439f20..000000000 --- a/library/vendor/Zend/Cloud/StorageService/Adapter/WindowsAzure.php +++ /dev/null @@ -1,440 +0,0 @@ -toArray(); - } - - if (!is_array($options)) { - throw new Zend_Cloud_StorageService_Exception('Invalid options provided'); - } - - // Build Zend_Service_WindowsAzure_Storage_Blob instance - if (!isset($options[self::HOST])) { - $host = self::DEFAULT_HOST; - } else { - $host = $options[self::HOST]; - } - - if (!isset($options[self::ACCOUNT_NAME])) { - throw new Zend_Cloud_StorageService_Exception('No Windows Azure account name provided.'); - } - if (!isset($options[self::ACCOUNT_KEY])) { - throw new Zend_Cloud_StorageService_Exception('No Windows Azure account key provided.'); - } - - $this->_storageClient = new Zend_Service_WindowsAzure_Storage_Blob($host, - $options[self::ACCOUNT_NAME], $options[self::ACCOUNT_KEY]); - - // Parse other options - if (!empty($options[self::PROXY_HOST])) { - $proxyHost = $options[self::PROXY_HOST]; - $proxyPort = isset($options[self::PROXY_PORT]) ? $options[self::PROXY_PORT] : 8080; - $proxyCredentials = isset($options[self::PROXY_CREDENTIALS]) ? $options[self::PROXY_CREDENTIALS] : ''; - - $this->_storageClient->setProxy(true, $proxyHost, $proxyPort, $proxyCredentials); - } - - if (isset($options[self::HTTP_ADAPTER])) { - $this->_storageClient->setHttpClientChannel($options[self::HTTP_ADAPTER]); - } - - // Set container - $this->_container = $options[self::CONTAINER]; - - // Make sure the container exists - if (!$this->_storageClient->containerExists($this->_container)) { - $this->_storageClient->createContainer($this->_container); - } - } - - /** - * Get an item from the storage service. - * - * @param string $path - * @param array $options - * @return mixed - */ - public function fetchItem($path, $options = null) - { - // Options - $returnType = self::RETURN_STRING; - $returnPath = tempnam('', 'azr'); - $openMode = 'r'; - - // Parse options - if (is_array($options)) { - if (isset($options[self::RETURN_TYPE])) { - $returnType = $options[self::RETURN_TYPE]; - } - - if (isset($options[self::RETURN_PATHNAME])) { - $returnPath = $options[self::RETURN_PATHNAME]; - } - - if (isset($options[self::RETURN_OPENMODE])) { - $openMode = $options[self::RETURN_OPENMODE]; - } - } - - // Fetch the blob - try { - $this->_storageClient->getBlob( - $this->_container, - $path, - $returnPath - ); - } catch (Zend_Service_WindowsAzure_Exception $e) { - if (strpos($e->getMessage(), "does not exist") !== false) { - return false; - } - throw new Zend_Cloud_StorageService_Exception('Error on fetch: '.$e->getMessage(), $e->getCode(), $e); - } - - // Return value - if ($returnType == self::RETURN_PATH) { - return $returnPath; - } - if ($returnType == self::RETURN_STRING) { - return file_get_contents($returnPath); - } - if ($returnType == self::RETURN_STREAM) { - return fopen($returnPath, $openMode); - } - } - - /** - * Store an item in the storage service. - * WARNING: This operation overwrites any item that is located at - * $destinationPath. - * @param string $destinationPath - * @param mixed $data - * @param array $options - * @return boolean - */ - public function storeItem($destinationPath, $data, $options = null) - { - // Create a temporary file that will be uploaded - $temporaryFilePath = ''; - $removeTemporaryFilePath = false; - - if (is_resource($data)) { - $temporaryFilePath = tempnam('', 'azr'); - $fpDestination = fopen($temporaryFilePath, 'w'); - - $fpSource = $data; - rewind($fpSource); - while (!feof($fpSource)) { - fwrite($fpDestination, fread($fpSource, 8192)); - } - - fclose($fpDestination); - - $removeTemporaryFilePath = true; - } elseif (file_exists($data)) { - $temporaryFilePath = $data; - $removeTemporaryFilePath = false; - } else { - $temporaryFilePath = tempnam('', 'azr'); - file_put_contents($temporaryFilePath, $data); - $removeTemporaryFilePath = true; - } - - try { - // Upload data - $this->_storageClient->putBlob( - $this->_container, - $destinationPath, - $temporaryFilePath - ); - } catch(Zend_Service_WindowsAzure_Exception $e) { - @unlink($temporaryFilePath); - throw new Zend_Cloud_StorageService_Exception('Error on store: '.$e->getMessage(), $e->getCode(), $e); - } - if ($removeTemporaryFilePath) { - @unlink($temporaryFilePath); - } - } - - /** - * Delete an item in the storage service. - * - * @param string $path - * @param array $options - * @return void - */ - public function deleteItem($path, $options = null) - { - try { - $this->_storageClient->deleteBlob( - $this->_container, - $path - ); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Copy an item in the storage service to a given path. - * - * @param string $sourcePath - * @param string $destinationPath - * @param array $options - * @return void - */ - public function copyItem($sourcePath, $destinationPath, $options = null) - { - try { - $this->_storageClient->copyBlob( - $this->_container, - $sourcePath, - $this->_container, - $destinationPath - ); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on copy: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Move an item in the storage service to a given path. - * - * @param string $sourcePath - * @param string $destinationPath - * @param array $options - * @return void - */ - public function moveItem($sourcePath, $destinationPath, $options = null) - { - try { - $this->_storageClient->copyBlob( - $this->_container, - $sourcePath, - $this->_container, - $destinationPath - ); - - $this->_storageClient->deleteBlob( - $this->_container, - $sourcePath - ); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on move: '.$e->getMessage(), $e->getCode(), $e); - } - - } - - /** - * Rename an item in the storage service to a given name. - * - * - * @param string $path - * @param string $name - * @param array $options - * @return void - */ - public function renameItem($path, $name, $options = null) - { - return $this->moveItem($path, $name, $options); - } - - /** - * List items in the given directory in the storage service - * - * The $path must be a directory - * - * - * @param string $path Must be a directory - * @param array $options - * @return array A list of item names - */ - public function listItems($path, $options = null) - { - // Options - $returnType = self::RETURN_NAMES; // 1: return list of paths, 2: return raw output from underlying provider - - // Parse options - if (is_array($options)&& isset($options[self::RETURN_TYPE])) { - $returnType = $options[self::RETURN_TYPE]; - } - - try { - // Fetch list - $blobList = $this->_storageClient->listBlobs( - $this->_container, - $path - ); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on list: '.$e->getMessage(), $e->getCode(), $e); - } - - // Return - if ($returnType == self::RETURN_LIST) { - return $blobList; - } - - $returnValue = array(); - foreach ($blobList as $blob) { - $returnValue[] = $blob->Name; - } - - return $returnValue; - } - - /** - * Get a key/value array of metadata for the given path. - * - * @param string $path - * @param array $options - * @return array - */ - public function fetchMetadata($path, $options = null) - { - try { - return $this->_storageClient->getBlobMetaData( - $this->_container, - $path - ); - } catch (Zend_Service_WindowsAzure_Exception $e) { - if (strpos($e->getMessage(), "could not be accessed") !== false) { - return false; - } - throw new Zend_Cloud_StorageService_Exception('Error on fetch: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Store a key/value array of metadata at the given path. - * WARNING: This operation overwrites any metadata that is located at - * $destinationPath. - * - * @param string $destinationPath - * @param array $options - * @return void - */ - public function storeMetadata($destinationPath, $metadata, $options = null) - { - try { - $this->_storageClient->setBlobMetadata($this->_container, $destinationPath, $metadata); - } catch (Zend_Service_WindowsAzure_Exception $e) { - if (strpos($e->getMessage(), "could not be accessed") === false) { - throw new Zend_Cloud_StorageService_Exception('Error on store metadata: '.$e->getMessage(), $e->getCode(), $e); - } - } - } - - /** - * Delete a key/value array of metadata at the given path. - * - * @param string $path - * @param array $options - * @return void - */ - public function deleteMetadata($path, $options = null) - { - try { - $this->_storageClient->setBlobMetadata($this->_container, $destinationPath, array()); - } catch (Zend_Service_WindowsAzure_Exception $e) { - if (strpos($e->getMessage(), "could not be accessed") === false) { - throw new Zend_Cloud_StorageService_Exception('Error on delete metadata: '.$e->getMessage(), $e->getCode(), $e); - } - } - } - - /** - * Delete container - * - * @return void - */ - public function deleteContainer() - { - try { - $this->_storageClient->deleteContainer($this->_container); - } catch (Zend_Service_WindowsAzure_Exception $e) { - throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$e->getMessage(), $e->getCode(), $e); - } - } - - /** - * Get the concrete adapter. - * @return Zend_Service_Azure_Storage_Blob - */ - public function getClient() - { - return $this->_storageClient; - } -} diff --git a/library/vendor/Zend/Cloud/StorageService/Factory.php b/library/vendor/Zend/Cloud/StorageService/Factory.php deleted file mode 100644 index cf7aa6aa6..000000000 --- a/library/vendor/Zend/Cloud/StorageService/Factory.php +++ /dev/null @@ -1,67 +0,0 @@ -_init(); - if ($options != null) { - // use Zend_Config objects if provided - if ($options instanceof Zend_Config) { - $options = $options->toArray(); - } - // pass arrays to setOptions - if (is_array($options)) { - $this->setOptions($options); - } - } - $this->_prepare(); - } - - /** - * setConfig() - * - * @param Zend_Config $config - * @return Zend_CodeGenerator_Abstract - */ - public function setConfig(Zend_Config $config) - { - $this->setOptions($config->toArray()); - return $this; - } - - /** - * setOptions() - * - * @param array $options - * @return Zend_CodeGenerator_Abstract - */ - public function setOptions(Array $options) - { - foreach ($options as $optionName => $optionValue) { - $methodName = 'set' . $optionName; - if (method_exists($this, $methodName)) { - $this->{$methodName}($optionValue); - } - } - return $this; - } - - /** - * setSourceContent() - * - * @param string $sourceContent - */ - public function setSourceContent($sourceContent) - { - $this->_sourceContent = $sourceContent; - return; - } - - /** - * getSourceContent() - * - * @return string - */ - public function getSourceContent() - { - return $this->_sourceContent; - } - - /** - * _init() - this is called before the constuctor - * - */ - protected function _init() - { - - } - - /** - * _prepare() - this is called at construction completion - * - */ - protected function _prepare() - { - - } - - /** - * generate() - must be implemented by the child - * - */ - abstract public function generate(); - - /** - * __toString() - casting to a string will in turn call generate() - * - * @return string - */ - final public function __toString() - { - return $this->generate(); - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Abstract.php b/library/vendor/Zend/CodeGenerator/Php/Abstract.php deleted file mode 100644 index dc1fbbc14..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Abstract.php +++ /dev/null @@ -1,96 +0,0 @@ -_isSourceDirty = ($isSourceDirty) ? true : false; - return $this; - } - - /** - * isSourceDirty() - * - * @return bool - */ - public function isSourceDirty() - { - return $this->_isSourceDirty; - } - - /** - * setIndentation() - * - * @param string|int $indentation - * @return Zend_CodeGenerator_Php_Abstract - */ - public function setIndentation($indentation) - { - $this->_indentation = $indentation; - return $this; - } - - /** - * getIndentation() - * - * @return string|int - */ - public function getIndentation() - { - return $this->_indentation; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Class.php b/library/vendor/Zend/CodeGenerator/Php/Class.php deleted file mode 100644 index 58bd6f8fa..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Class.php +++ /dev/null @@ -1,605 +0,0 @@ -setSourceContent($class->getSourceContent()); - $class->setSourceDirty(false); - - if ($reflectionClass->getDocComment() != '') { - $class->setDocblock(Zend_CodeGenerator_Php_Docblock::fromReflection($reflectionClass->getDocblock())); - } - - $class->setAbstract($reflectionClass->isAbstract()); - $class->setName($reflectionClass->getName()); - - if ($parentClass = $reflectionClass->getParentClass()) { - $class->setExtendedClass($parentClass->getName()); - $interfaces = array_diff($reflectionClass->getInterfaces(), $parentClass->getInterfaces()); - } else { - $interfaces = $reflectionClass->getInterfaces(); - } - - $interfaceNames = array(); - foreach($interfaces AS $interface) { - $interfaceNames[] = $interface->getName(); - } - - $class->setImplementedInterfaces($interfaceNames); - - $properties = array(); - foreach ($reflectionClass->getProperties() as $reflectionProperty) { - if ($reflectionProperty->getDeclaringClass()->getName() == $class->getName()) { - $properties[] = Zend_CodeGenerator_Php_Property::fromReflection($reflectionProperty); - } - } - $class->setProperties($properties); - - $methods = array(); - foreach ($reflectionClass->getMethods() as $reflectionMethod) { - if ($reflectionMethod->getDeclaringClass()->getName() == $class->getName()) { - $methods[] = Zend_CodeGenerator_Php_Method::fromReflection($reflectionMethod); - } - } - $class->setMethods($methods); - - return $class; - } - - /** - * setDocblock() Set the docblock - * - * @param Zend_CodeGenerator_Php_Docblock|array|string $docblock - * @return Zend_CodeGenerator_Php_File - */ - public function setDocblock($docblock) - { - if (is_string($docblock)) { - $docblock = array('shortDescription' => $docblock); - } - - if (is_array($docblock)) { - $docblock = new Zend_CodeGenerator_Php_Docblock($docblock); - } elseif ((!is_null($docblock)) && (!$docblock instanceof Zend_CodeGenerator_Php_Docblock)) { - throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock'); - } - - $this->_docblock = $docblock; - return $this; - } - - /** - * getDocblock() - * - * @return Zend_CodeGenerator_Php_Docblock - */ - public function getDocblock() - { - return $this->_docblock; - } - - /** - * setName() - * - * @param string $name - * @return Zend_CodeGenerator_Php_Class - */ - public function setName($name) - { - $this->_name = $name; - return $this; - } - - /** - * getName() - * - * @return string - */ - public function getName() - { - return $this->_name; - } - - /** - * setAbstract() - * - * @param bool $isAbstract - * @return Zend_CodeGenerator_Php_Class - */ - public function setAbstract($isAbstract) - { - $this->_isAbstract = ($isAbstract) ? true : false; - return $this; - } - - /** - * isAbstract() - * - * @return bool - */ - public function isAbstract() - { - return $this->_isAbstract; - } - - /** - * setExtendedClass() - * - * @param string $extendedClass - * @return Zend_CodeGenerator_Php_Class - */ - public function setExtendedClass($extendedClass) - { - $this->_extendedClass = $extendedClass; - return $this; - } - - /** - * getExtendedClass() - * - * @return string - */ - public function getExtendedClass() - { - return $this->_extendedClass; - } - - /** - * setImplementedInterfaces() - * - * @param array $implementedInterfaces - * @return Zend_CodeGenerator_Php_Class - */ - public function setImplementedInterfaces(Array $implementedInterfaces) - { - $this->_implementedInterfaces = $implementedInterfaces; - return $this; - } - - /** - * getImplementedInterfaces - * - * @return array - */ - public function getImplementedInterfaces() - { - return $this->_implementedInterfaces; - } - - /** - * setProperties() - * - * @param array $properties - * @return Zend_CodeGenerator_Php_Class - */ - public function setProperties(Array $properties) - { - foreach ($properties as $property) { - $this->setProperty($property); - } - - return $this; - } - - /** - * setConstants() - * - * @param array $constants - * @return Zend_CodeGenerator_Php_Class - */ - public function setConstants(Array $constants) - { - foreach ($constants as $const) { - $this->setConstant($const); - } - - return $this; - } - - /** - * setProperty() - * - * @param array|Zend_CodeGenerator_Php_Property $property - * @return Zend_CodeGenerator_Php_Class - */ - public function setProperty($property) - { - if (is_array($property)) { - $property = new Zend_CodeGenerator_Php_Property($property); - $propertyName = $property->getName(); - } elseif ($property instanceof Zend_CodeGenerator_Php_Property) { - $propertyName = $property->getName(); - } else { - throw new Zend_CodeGenerator_Php_Exception('setProperty() expects either an array of property options or an instance of Zend_CodeGenerator_Php_Property'); - } - - if ($property->isConst()) { - return $this->setConstant($property); - } - if (isset($this->_properties[$propertyName])) { - throw new Zend_CodeGenerator_Php_Exception('A property by name ' . $propertyName . ' already exists in this class.'); - } - - $this->_properties[$propertyName] = $property; - return $this; - } - - /** - * setConstant() - * - * @param array|Zend_CodeGenerator_Php_Property $const - * @return Zend_CodeGenerator_Php_Class - */ - public function setConstant($const) - { - if (is_array($const)) { - $const = new Zend_CodeGenerator_Php_Property($const); - $constName = $const->getName(); - } elseif ($const instanceof Zend_CodeGenerator_Php_Property) { - $constName = $const->getName(); - } else { - throw new Zend_CodeGenerator_Php_Exception('setConstant() expects either an array of property options or an instance of Zend_CodeGenerator_Php_Property'); - } - - if (!$const->isConst()) { - throw new Zend_CodeGenerator_Php_Exception('setProperty() expects argument to define a constant'); - } - if (isset($this->_constants[$constName])) { - throw new Zend_CodeGenerator_Php_Exception('A constant by name ' . $constName . ' already exists in this class.'); - } - - $this->_constants[$constName] = $const; - return $this; - } - - /** - * getProperties() - * - * @return array - */ - public function getProperties() - { - return $this->_properties; - } - - /** - * getConstants() - * - * @return array - */ - public function getConstants() - { - return $this->_constants; - } - - /** - * getProperty() - * - * @param string $propertyName - * @return Zend_CodeGenerator_Php_Property - */ - public function getProperty($propertyName) - { - foreach ($this->_properties as $property) { - if ($property->getName() == $propertyName) { - return $property; - } - } - return false; - } - - /** - * getConstant() - * - * @param string $constName - * @return Zend_CodeGenerator_Php_Property - */ - public function getConstant($constName) - { - foreach ($this->_constants as $const) { - if ($const->getName() == $constName) { - return $const; - } - } - return false; - } - - /** - * hasProperty() - * - * @param string $propertyName - * @return bool - */ - public function hasProperty($propertyName) - { - return isset($this->_properties[$propertyName]); - } - - /** - * hasConstant() - * - * @param string $constName - * @return bool - */ - public function hasConstant($constName) - { - return isset($this->_constants[$constName]); - } - - /** - * setMethods() - * - * @param array $methods - * @return Zend_CodeGenerator_Php_Class - */ - public function setMethods(Array $methods) - { - foreach ($methods as $method) { - $this->setMethod($method); - } - return $this; - } - - /** - * setMethod() - * - * @param array|Zend_CodeGenerator_Php_Method $method - * @return Zend_CodeGenerator_Php_Class - */ - public function setMethod($method) - { - if (is_array($method)) { - $method = new Zend_CodeGenerator_Php_Method($method); - $methodName = $method->getName(); - } elseif ($method instanceof Zend_CodeGenerator_Php_Method) { - $methodName = $method->getName(); - } else { - throw new Zend_CodeGenerator_Php_Exception('setMethod() expects either an array of method options or an instance of Zend_CodeGenerator_Php_Method'); - } - - if (isset($this->_methods[$methodName])) { - throw new Zend_CodeGenerator_Php_Exception('A method by name ' . $methodName . ' already exists in this class.'); - } - - $this->_methods[$methodName] = $method; - return $this; - } - - /** - * getMethods() - * - * @return array - */ - public function getMethods() - { - return $this->_methods; - } - - /** - * getMethod() - * - * @param string $methodName - * @return Zend_CodeGenerator_Php_Method - */ - public function getMethod($methodName) - { - foreach ($this->_methods as $method) { - if ($method->getName() == $methodName) { - return $method; - } - } - return false; - } - - /** - * hasMethod() - * - * @param string $methodName - * @return bool - */ - public function hasMethod($methodName) - { - return isset($this->_methods[$methodName]); - } - - /** - * isSourceDirty() - * - * @return bool - */ - public function isSourceDirty() - { - if (($docblock = $this->getDocblock()) && $docblock->isSourceDirty()) { - return true; - } - - foreach ($this->_properties as $property) { - if ($property->isSourceDirty()) { - return true; - } - } - - foreach ($this->_constants as $constant) { - if ($constant->isSourceDirty()) { - return true; - } - } - - foreach ($this->_methods as $method) { - if ($method->isSourceDirty()) { - return true; - } - } - - return parent::isSourceDirty(); - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - if (!$this->isSourceDirty()) { - return $this->getSourceContent(); - } - - $output = ''; - - if (null !== ($docblock = $this->getDocblock())) { - $docblock->setIndentation(''); - $output .= $docblock->generate(); - } - - if ($this->isAbstract()) { - $output .= 'abstract '; - } - - $output .= 'class ' . $this->getName(); - - if ( !empty( $this->_extendedClass) ) { - $output .= ' extends ' . $this->_extendedClass; - } - - $implemented = $this->getImplementedInterfaces(); - if (!empty($implemented)) { - $output .= ' implements ' . implode(', ', $implemented); - } - - $output .= self::LINE_FEED . '{' . self::LINE_FEED . self::LINE_FEED; - - $constants = $this->getConstants(); - if (!empty($constants)) { - foreach ($constants as $const) { - $output .= $const->generate() . self::LINE_FEED . self::LINE_FEED; - } - } - - $properties = $this->getProperties(); - if (!empty($properties)) { - foreach ($properties as $property) { - $output .= $property->generate() . self::LINE_FEED . self::LINE_FEED; - } - } - - $methods = $this->getMethods(); - if (!empty($methods)) { - foreach ($methods as $method) { - $output .= $method->generate() . self::LINE_FEED; - } - } - - $output .= self::LINE_FEED . '}' . self::LINE_FEED; - - return $output; - } - - /** - * _init() - is called at construction time - * - */ - protected function _init() - { - $this->_properties = new Zend_CodeGenerator_Php_Member_Container(Zend_CodeGenerator_Php_Member_Container::TYPE_PROPERTY); - $this->_constants = new Zend_CodeGenerator_Php_Member_Container(Zend_CodeGenerator_Php_Member_Container::TYPE_PROPERTY); - $this->_methods = new Zend_CodeGenerator_Php_Member_Container(Zend_CodeGenerator_Php_Member_Container::TYPE_METHOD); - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Docblock.php b/library/vendor/Zend/CodeGenerator/Php/Docblock.php deleted file mode 100644 index a65253fba..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Docblock.php +++ /dev/null @@ -1,224 +0,0 @@ -setSourceContent($reflectionDocblock->getContents()); - $docblock->setSourceDirty(false); - - $docblock->setShortDescription($reflectionDocblock->getShortDescription()); - $docblock->setLongDescription($reflectionDocblock->getLongDescription()); - - foreach ($reflectionDocblock->getTags() as $tag) { - $docblock->setTag(Zend_CodeGenerator_Php_Docblock_Tag::fromReflection($tag)); - } - - return $docblock; - } - - /** - * setShortDescription() - * - * @param string $shortDescription - * @return Zend_CodeGenerator_Php_Docblock - */ - public function setShortDescription($shortDescription) - { - $this->_shortDescription = $shortDescription; - return $this; - } - - /** - * getShortDescription() - * - * @return string - */ - public function getShortDescription() - { - return $this->_shortDescription; - } - - /** - * setLongDescription() - * - * @param string $longDescription - * @return Zend_CodeGenerator_Php_Docblock - */ - public function setLongDescription($longDescription) - { - $this->_longDescription = $longDescription; - return $this; - } - - /** - * getLongDescription() - * - * @return string - */ - public function getLongDescription() - { - return $this->_longDescription; - } - - /** - * setTags() - * - * @param array $tags - * @return Zend_CodeGenerator_Php_Docblock - */ - public function setTags(Array $tags) - { - foreach ($tags as $tag) { - $this->setTag($tag); - } - - return $this; - } - - /** - * setTag() - * - * @param array|Zend_CodeGenerator_Php_Docblock_Tag $tag - * @return Zend_CodeGenerator_Php_Docblock - */ - public function setTag($tag) - { - if (is_array($tag)) { - $tag = new Zend_CodeGenerator_Php_Docblock_Tag($tag); - } elseif (!$tag instanceof Zend_CodeGenerator_Php_Docblock_Tag) { - throw new Zend_CodeGenerator_Php_Exception( - 'setTag() expects either an array of method options or an ' - . 'instance of Zend_CodeGenerator_Php_Docblock_Tag' - ); - } - - $this->_tags[] = $tag; - return $this; - } - - /** - * getTags - * - * @return array Array of Zend_CodeGenerator_Php_Docblock_Tag - */ - public function getTags() - { - return $this->_tags; - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - if (!$this->isSourceDirty()) { - return $this->_docCommentize($this->getSourceContent()); - } - - $output = ''; - if (null !== ($sd = $this->getShortDescription())) { - $output .= $sd . self::LINE_FEED . self::LINE_FEED; - } - if (null !== ($ld = $this->getLongDescription())) { - $output .= $ld . self::LINE_FEED . self::LINE_FEED; - } - - foreach ($this->getTags() as $tag) { - $output .= $tag->generate() . self::LINE_FEED; - } - - return $this->_docCommentize(trim($output)); - } - - /** - * _docCommentize() - * - * @param string $content - * @return string - */ - protected function _docCommentize($content) - { - $indent = $this->getIndentation(); - $output = $indent . '/**' . self::LINE_FEED; - $content = wordwrap($content, 80, self::LINE_FEED); - $lines = explode(self::LINE_FEED, $content); - - foreach ($lines as $line) { - $output .= $indent . ' *'; - if ($line) { - $output .= " $line"; - } - $output .= self::LINE_FEED; - } - - $output = rtrim($output, ' *' . self::LINE_FEED) . self::LINE_FEED; - - $output .= $indent . ' */' . self::LINE_FEED; - return $output; - } -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag.php b/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag.php deleted file mode 100644 index a05d97d5a..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag.php +++ /dev/null @@ -1,176 +0,0 @@ -getName(); - - $codeGenDocblockTag = self::factory($tagName); - - // transport any properties via accessors and mutators from reflection to codegen object - $reflectionClass = new ReflectionClass($reflectionTag); - foreach ($reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - if (substr($method->getName(), 0, 3) == 'get') { - $propertyName = substr($method->getName(), 3); - if (method_exists($codeGenDocblockTag, 'set' . $propertyName)) { - $codeGenDocblockTag->{'set' . $propertyName}($reflectionTag->{'get' . $propertyName}()); - } - } - } - - return $codeGenDocblockTag; - } - - /** - * setPluginLoader() - * - * @param Zend_Loader_PluginLoader $pluginLoader - */ - public static function setPluginLoader(Zend_Loader_PluginLoader $pluginLoader) - { - self::$_pluginLoader = $pluginLoader; - return; - } - - /** - * getPluginLoader() - * - * @return Zend_Loader_PluginLoader - */ - public static function getPluginLoader() - { - if (self::$_pluginLoader == null) { - self::setPluginLoader(new Zend_Loader_PluginLoader(array( - 'Zend_CodeGenerator_Php_Docblock_Tag' => dirname(__FILE__) . '/Tag/')) - ); - } - - return self::$_pluginLoader; - } - - public static function factory($tagName) - { - $pluginLoader = self::getPluginLoader(); - - try { - $tagClass = $pluginLoader->load($tagName); - } catch (Zend_Loader_Exception $exception) { - $tagClass = 'Zend_CodeGenerator_Php_Docblock_Tag'; - } - - $tag = new $tagClass(array('name' => $tagName)); - return $tag; - } - - /** - * setName() - * - * @param string $name - * @return Zend_CodeGenerator_Php_Docblock_Tag - */ - public function setName($name) - { - $this->_name = ltrim($name, '@'); - return $this; - } - - /** - * getName() - * - * @return string - */ - public function getName() - { - return $this->_name; - } - - /** - * setDescription() - * - * @param string $description - * @return Zend_CodeGenerator_Php_Docblock_Tag - */ - public function setDescription($description) - { - $this->_description = $description; - return $this; - } - - /** - * getDescription() - * - * @return string - */ - public function getDescription() - { - return $this->_description; - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - $tag = '@' . $this->_name; - if ($this->_description) { - $tag .= ' ' . $this->_description; - } - return $tag; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/License.php b/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/License.php deleted file mode 100644 index 0cb4ad062..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/License.php +++ /dev/null @@ -1,97 +0,0 @@ -setName('license'); - $returnTag->setUrl($reflectionTagLicense->getUrl()); - $returnTag->setDescription($reflectionTagLicense->getDescription()); - - return $returnTag; - } - - /** - * setUrl() - * - * @param string $url - * @return Zend_CodeGenerator_Php_Docblock_Tag_License - */ - public function setUrl($url) - { - $this->_url = $url; - return $this; - } - - /** - * getUrl() - * - * @return string - */ - public function getUrl() - { - return $this->_url; - } - - - /** - * generate() - * - * @return string - */ - public function generate() - { - $output = '@license ' . $this->_url . ' ' . $this->_description . self::LINE_FEED; - return $output; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/Param.php b/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/Param.php deleted file mode 100644 index d479f550c..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/Param.php +++ /dev/null @@ -1,127 +0,0 @@ -setName('param'); - $paramTag->setDatatype($reflectionTagParam->getType()); // @todo rename - $paramTag->setParamName($reflectionTagParam->getVariableName()); - $paramTag->setDescription($reflectionTagParam->getDescription()); - - return $paramTag; - } - - /** - * setDatatype() - * - * @param string $datatype - * @return Zend_CodeGenerator_Php_Docblock_Tag_Param - */ - public function setDatatype($datatype) - { - $this->_datatype = $datatype; - return $this; - } - - /** - * getDatatype - * - * @return string - */ - public function getDatatype() - { - return $this->_datatype; - } - - /** - * setParamName() - * - * @param string $paramName - * @return Zend_CodeGenerator_Php_Docblock_Tag_Param - */ - public function setParamName($paramName) - { - $this->_paramName = $paramName; - return $this; - } - - /** - * getParamName() - * - * @return string - */ - public function getParamName() - { - return $this->_paramName; - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - $output = '@param ' - . (($this->_datatype != null) ? $this->_datatype : 'unknown') - . (($this->_paramName != null) ? ' $' . $this->_paramName : '') - . (($this->_description != null) ? ' ' . $this->_description : ''); - return $output; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/Return.php b/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/Return.php deleted file mode 100644 index 04eba0bda..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Docblock/Tag/Return.php +++ /dev/null @@ -1,97 +0,0 @@ -setName('return'); - $returnTag->setDatatype($reflectionTagReturn->getType()); // @todo rename - $returnTag->setDescription($reflectionTagReturn->getDescription()); - - return $returnTag; - } - - /** - * setDatatype() - * - * @param string $datatype - * @return Zend_CodeGenerator_Php_Docblock_Tag_Return - */ - public function setDatatype($datatype) - { - $this->_datatype = $datatype; - return $this; - } - - /** - * getDatatype() - * - * @return string - */ - public function getDatatype() - { - return $this->_datatype; - } - - - /** - * generate() - * - * @return string - */ - public function generate() - { - $output = '@return ' . $this->_datatype . ' ' . $this->_description; - return $output; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/File.php b/library/vendor/Zend/CodeGenerator/Php/File.php deleted file mode 100644 index 7f79bc622..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/File.php +++ /dev/null @@ -1,460 +0,0 @@ -getFilename(); - } - - if ($fileName == '') { - throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); - } - - // cannot use realpath since the file might not exist, but we do need to have the index - // in the same DIRECTORY_SEPARATOR that realpath would use: - $fileName = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $fileName); - - self::$_fileCodeGenerators[$fileName] = $fileCodeGenerator; - - } - - /** - * fromReflectedFileName() - use this if you intend on generating code generation objects based on the same file. - * This will keep previous changes to the file in tact during the same PHP process - * - * @param string $filePath - * @param bool $usePreviousCodeGeneratorIfItExists - * @param bool $includeIfNotAlreadyIncluded - * @return Zend_CodeGenerator_Php_File - */ - public static function fromReflectedFileName($filePath, $usePreviousCodeGeneratorIfItExists = true, $includeIfNotAlreadyIncluded = true) - { - $realpath = realpath($filePath); - - if ($realpath === false) { - if ( ($realpath = Zend_Reflection_File::findRealpathInIncludePath($filePath)) === false) { - throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.'); - } - } - - if ($usePreviousCodeGeneratorIfItExists && isset(self::$_fileCodeGenerators[$realpath])) { - return self::$_fileCodeGenerators[$realpath]; - } - - if ($includeIfNotAlreadyIncluded && !in_array($realpath, get_included_files())) { - include $realpath; - } - - $codeGenerator = self::fromReflection(($fileReflector = new Zend_Reflection_File($realpath))); - - if (!isset(self::$_fileCodeGenerators[$fileReflector->getFileName()])) { - self::$_fileCodeGenerators[$fileReflector->getFileName()] = $codeGenerator; - } - - return $codeGenerator; - } - - /** - * fromReflection() - * - * @param Zend_Reflection_File $reflectionFile - * @return Zend_CodeGenerator_Php_File - */ - public static function fromReflection(Zend_Reflection_File $reflectionFile) - { - $file = new self(); - - $file->setSourceContent($reflectionFile->getContents()); - $file->setSourceDirty(false); - - $body = $reflectionFile->getContents(); - - // @todo this whole area needs to be reworked with respect to how body lines are processed - foreach ($reflectionFile->getClasses() as $class) { - $file->setClass(Zend_CodeGenerator_Php_Class::fromReflection($class)); - $classStartLine = $class->getStartLine(true); - $classEndLine = $class->getEndLine(); - - $bodyLines = explode("\n", $body); - $bodyReturn = array(); - for ($lineNum = 1; $lineNum <= count($bodyLines); $lineNum++) { - if ($lineNum == $classStartLine) { - $bodyReturn[] = str_replace('?', $class->getName(), self::$_markerClass); //'/* Zend_CodeGenerator_Php_File-ClassMarker: {' . $class->getName() . '} */'; - $lineNum = $classEndLine; - } else { - $bodyReturn[] = $bodyLines[$lineNum - 1]; // adjust for index -> line conversion - } - } - $body = implode("\n", $bodyReturn); - unset($bodyLines, $bodyReturn, $classStartLine, $classEndLine); - } - - if (($reflectionFile->getDocComment() != '')) { - $docblock = $reflectionFile->getDocblock(); - $file->setDocblock(Zend_CodeGenerator_Php_Docblock::fromReflection($docblock)); - - $bodyLines = explode("\n", $body); - $bodyReturn = array(); - for ($lineNum = 1; $lineNum <= count($bodyLines); $lineNum++) { - if ($lineNum == $docblock->getStartLine()) { - $bodyReturn[] = str_replace('?', $class->getName(), self::$_markerDocblock); //'/* Zend_CodeGenerator_Php_File-ClassMarker: {' . $class->getName() . '} */'; - $lineNum = $docblock->getEndLine(); - } else { - $bodyReturn[] = $bodyLines[$lineNum - 1]; // adjust for index -> line conversion - } - } - $body = implode("\n", $bodyReturn); - unset($bodyLines, $bodyReturn, $classStartLine, $classEndLine); - } - - $file->setBody($body); - - return $file; - } - - /** - * setDocblock() Set the docblock - * - * @param Zend_CodeGenerator_Php_Docblock|array|string $docblock - * @return Zend_CodeGenerator_Php_File - */ - public function setDocblock($docblock) - { - if (is_string($docblock)) { - $docblock = array('shortDescription' => $docblock); - } - - if (is_array($docblock)) { - $docblock = new Zend_CodeGenerator_Php_Docblock($docblock); - } elseif (!$docblock instanceof Zend_CodeGenerator_Php_Docblock) { - throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock'); - } - - $this->_docblock = $docblock; - return $this; - } - - /** - * Get docblock - * - * @return Zend_CodeGenerator_Php_Docblock - */ - public function getDocblock() - { - return $this->_docblock; - } - - /** - * setRequiredFiles - * - * @param array $requiredFiles - * @return Zend_CodeGenerator_Php_File - */ - public function setRequiredFiles($requiredFiles) - { - $this->_requiredFiles = $requiredFiles; - return $this; - } - - /** - * getRequiredFiles() - * - * @return array - */ - public function getRequiredFiles() - { - return $this->_requiredFiles; - } - - /** - * setClasses() - * - * @param array $classes - * @return Zend_CodeGenerator_Php_File - */ - public function setClasses(Array $classes) - { - foreach ($classes as $class) { - $this->setClass($class); - } - return $this; - } - - /** - * getClass() - * - * @param string $name - * @return Zend_CodeGenerator_Php_Class - */ - public function getClass($name = null) - { - if ($name == null) { - reset($this->_classes); - return current($this->_classes); - } - - return $this->_classes[$name]; - } - - /** - * setClass() - * - * @param Zend_CodeGenerator_Php_Class|array $class - * @return Zend_CodeGenerator_Php_File - */ - public function setClass($class) - { - if (is_array($class)) { - $class = new Zend_CodeGenerator_Php_Class($class); - $className = $class->getName(); - } elseif ($class instanceof Zend_CodeGenerator_Php_Class) { - $className = $class->getName(); - } else { - throw new Zend_CodeGenerator_Php_Exception('Expecting either an array or an instance of Zend_CodeGenerator_Php_Class'); - } - - // @todo check for dup here - - $this->_classes[$className] = $class; - return $this; - } - - /** - * setFilename() - * - * @param string $filename - * @return Zend_CodeGenerator_Php_File - */ - public function setFilename($filename) - { - $this->_filename = $filename; - return $this; - } - - /** - * getFilename() - * - * @return string - */ - public function getFilename() - { - return $this->_filename; - } - - /** - * getClasses() - * - * @return array Array of Zend_CodeGenerator_Php_Class - */ - public function getClasses() - { - return $this->_classes; - } - - /** - * setBody() - * - * @param string $body - * @return Zend_CodeGenerator_Php_File - */ - public function setBody($body) - { - $this->_body = $body; - return $this; - } - - /** - * getBody() - * - * @return string - */ - public function getBody() - { - return $this->_body; - } - - /** - * isSourceDirty() - * - * @return bool - */ - public function isSourceDirty() - { - if (($docblock = $this->getDocblock()) && $docblock->isSourceDirty()) { - return true; - } - - foreach ($this->_classes as $class) { - if ($class->isSourceDirty()) { - return true; - } - } - - return parent::isSourceDirty(); - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - if ($this->isSourceDirty() === false) { - return $this->_sourceContent; - } - - $output = ''; - - // start with the body (if there), or open tag - if (preg_match('#(?:\s*)<\?php#', $this->getBody()) == false) { - $output = 'getBody(); - if (preg_match('#/\* Zend_CodeGenerator_Php_File-(.*?)Marker#', $body)) { - $output .= $body; - $body = ''; - } - - // Add file docblock, if any - if (null !== ($docblock = $this->getDocblock())) { - $docblock->setIndentation(''); - $regex = preg_quote(self::$_markerDocblock, '#'); - if (preg_match('#'.$regex.'#', $output)) { - $output = preg_replace('#'.$regex.'#', $docblock->generate(), $output, 1); - } else { - $output .= $docblock->generate() . self::LINE_FEED; - } - } - - // newline - $output .= self::LINE_FEED; - - // process required files - // @todo marker replacement for required files - $requiredFiles = $this->getRequiredFiles(); - if (!empty($requiredFiles)) { - foreach ($requiredFiles as $requiredFile) { - } - - $output .= self::LINE_FEED; - } - - // process classes - $classes = $this->getClasses(); - if (!empty($classes)) { - foreach ($classes as $class) { - if($this->getDocblock() == $class->getDocblock()) { - $class->setDocblock(null); - } - $regex = str_replace('?', $class->getName(), self::$_markerClass); - $regex = preg_quote($regex, '#'); - if (preg_match('#'.$regex.'#', $output)) { - $output = preg_replace('#'.$regex.'#', $class->generate(), $output, 1); - } else { - $output .= $class->generate() . self::LINE_FEED; - } - } - - } - - if (!empty($body)) { - - // add an extra space betwee clsses and - if (!empty($classes)) { - $output .= self::LINE_FEED; - } - - $output .= $body; - } - - return $output; - } - - public function write() - { - if ($this->_filename == '' || !is_writable(dirname($this->_filename))) { - throw new Zend_CodeGenerator_Php_Exception('This code generator object is not writable.'); - } - file_put_contents($this->_filename, $this->generate()); - return $this; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Member/Abstract.php b/library/vendor/Zend/CodeGenerator/Php/Member/Abstract.php deleted file mode 100644 index 4006e7151..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Member/Abstract.php +++ /dev/null @@ -1,219 +0,0 @@ - $docblock); - } - - if (is_array($docblock)) { - $docblock = new Zend_CodeGenerator_Php_Docblock($docblock); - } elseif (!$docblock instanceof Zend_CodeGenerator_Php_Docblock) { - throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock'); - } - - $this->_docblock = $docblock; - return $this; - } - - /** - * getDocblock() - * - * @return Zend_CodeGenerator_Php_Docblock - */ - public function getDocblock() - { - return $this->_docblock; - } - - /** - * setAbstract() - * - * @param bool $isAbstract - * @return Zend_CodeGenerator_Php_Member_Abstract - */ - public function setAbstract($isAbstract) - { - $this->_isAbstract = ($isAbstract) ? true : false; - return $this; - } - - /** - * isAbstract() - * - * @return bool - */ - public function isAbstract() - { - return $this->_isAbstract; - } - - /** - * setFinal() - * - * @param bool $isFinal - * @return Zend_CodeGenerator_Php_Member_Abstract - */ - public function setFinal($isFinal) - { - $this->_isFinal = ($isFinal) ? true : false; - return $this; - } - - /** - * isFinal() - * - * @return bool - */ - public function isFinal() - { - return $this->_isFinal; - } - - /** - * setStatic() - * - * @param bool $isStatic - * @return Zend_CodeGenerator_Php_Member_Abstract - */ - public function setStatic($isStatic) - { - $this->_isStatic = ($isStatic) ? true : false; - return $this; - } - - /** - * isStatic() - * - * @return bool - */ - public function isStatic() - { - return $this->_isStatic; - } - - /** - * setVisitibility() - * - * @param const $visibility - * @return Zend_CodeGenerator_Php_Member_Abstract - */ - public function setVisibility($visibility) - { - $this->_visibility = $visibility; - return $this; - } - - /** - * getVisibility() - * - * @return const - */ - public function getVisibility() - { - return $this->_visibility; - } - - /** - * setName() - * - * @param string $name - * @return Zend_CodeGenerator_Php_Member_Abstract - */ - public function setName($name) - { - $this->_name = $name; - return $this; - } - - /** - * getName() - * - * @return string - */ - public function getName() - { - return $this->_name; - } -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Method.php b/library/vendor/Zend/CodeGenerator/Php/Method.php deleted file mode 100644 index b8a0aa7c7..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Method.php +++ /dev/null @@ -1,232 +0,0 @@ -setSourceContent($reflectionMethod->getContents(false)); - $method->setSourceDirty(false); - - if ($reflectionMethod->getDocComment() != '') { - $method->setDocblock(Zend_CodeGenerator_Php_Docblock::fromReflection($reflectionMethod->getDocblock())); - } - - $method->setFinal($reflectionMethod->isFinal()); - - if ($reflectionMethod->isPrivate()) { - $method->setVisibility(self::VISIBILITY_PRIVATE); - } elseif ($reflectionMethod->isProtected()) { - $method->setVisibility(self::VISIBILITY_PROTECTED); - } else { - $method->setVisibility(self::VISIBILITY_PUBLIC); - } - - $method->setStatic($reflectionMethod->isStatic()); - - $method->setName($reflectionMethod->getName()); - - foreach ($reflectionMethod->getParameters() as $reflectionParameter) { - $method->setParameter(Zend_CodeGenerator_Php_Parameter::fromReflection($reflectionParameter)); - } - - $method->setBody($reflectionMethod->getBody()); - - return $method; - } - - /** - * setFinal() - * - * @param bool $isFinal - */ - public function setFinal($isFinal) - { - $this->_isFinal = ($isFinal) ? true : false; - } - - /** - * setParameters() - * - * @param array $parameters - * @return Zend_CodeGenerator_Php_Method - */ - public function setParameters(Array $parameters) - { - foreach ($parameters as $parameter) { - $this->setParameter($parameter); - } - return $this; - } - - /** - * setParameter() - * - * @param Zend_CodeGenerator_Php_Parameter|array $parameter - * @return Zend_CodeGenerator_Php_Method - */ - public function setParameter($parameter) - { - if (is_array($parameter)) { - $parameter = new Zend_CodeGenerator_Php_Parameter($parameter); - $parameterName = $parameter->getName(); - } elseif ($parameter instanceof Zend_CodeGenerator_Php_Parameter) { - $parameterName = $parameter->getName(); - } else { - throw new Zend_CodeGenerator_Php_Exception('setParameter() expects either an array of method options or an instance of Zend_CodeGenerator_Php_Parameter'); - } - - $this->_parameters[$parameterName] = $parameter; - return $this; - } - - /** - * getParameters() - * - * @return array Array of Zend_CodeGenerator_Php_Parameter - */ - public function getParameters() - { - return $this->_parameters; - } - - /** - * setBody() - * - * @param string $body - * @return Zend_CodeGenerator_Php_Method - */ - public function setBody($body) - { - $this->_body = $body; - return $this; - } - - /** - * getBody() - * - * @return string - */ - public function getBody() - { - return $this->_body; - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - $output = ''; - - $indent = $this->getIndentation(); - - if (($docblock = $this->getDocblock()) !== null) { - $docblock->setIndentation($indent); - $output .= $docblock->generate(); - } - - $output .= $indent; - - if ($this->isAbstract()) { - $output .= 'abstract '; - } else { - $output .= (($this->isFinal()) ? 'final ' : ''); - } - - $output .= $this->getVisibility() - . (($this->isStatic()) ? ' static' : '') - . ' function ' . $this->getName() . '('; - - $parameters = $this->getParameters(); - if (!empty($parameters)) { - foreach ($parameters as $parameter) { - $parameterOuput[] = $parameter->generate(); - } - - $output .= implode(', ', $parameterOuput); - } - - $output .= ')' . self::LINE_FEED . $indent . '{' . self::LINE_FEED; - - if ($this->_body && $this->isSourceDirty()) { - $output .= ' ' - . str_replace(self::LINE_FEED, self::LINE_FEED . $indent . $indent, trim($this->_body)) - . self::LINE_FEED; - } elseif ($this->_body) { - $output .= $this->_body . self::LINE_FEED; - } - - $output .= $indent . '}' . self::LINE_FEED; - - return $output; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Parameter.php b/library/vendor/Zend/CodeGenerator/Php/Parameter.php deleted file mode 100644 index 20d3ecb1f..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Parameter.php +++ /dev/null @@ -1,248 +0,0 @@ -setName($reflectionParameter->getName()); - - if($reflectionParameter->isArray()) { - $param->setType('array'); - } else { - $typeClass = $reflectionParameter->getClass(); - if($typeClass !== null) { - $param->setType($typeClass->getName()); - } - } - - $param->setPosition($reflectionParameter->getPosition()); - - if($reflectionParameter->isOptional()) { - $param->setDefaultValue($reflectionParameter->getDefaultValue()); - } - $param->setPassedByReference($reflectionParameter->isPassedByReference()); - - return $param; - } - - /** - * setType() - * - * @param string $type - * @return Zend_CodeGenerator_Php_Parameter - */ - public function setType($type) - { - $this->_type = $type; - return $this; - } - - /** - * getType() - * - * @return string - */ - public function getType() - { - return $this->_type; - } - - /** - * setName() - * - * @param string $name - * @return Zend_CodeGenerator_Php_Parameter - */ - public function setName($name) - { - $this->_name = $name; - return $this; - } - - /** - * getName() - * - * @return string - */ - public function getName() - { - return $this->_name; - } - - /** - * Set the default value of the parameter. - * - * Certain variables are difficult to expres - * - * @param null|bool|string|int|float|Zend_CodeGenerator_Php_Parameter_DefaultValue $defaultValue - * @return Zend_CodeGenerator_Php_Parameter - */ - public function setDefaultValue($defaultValue) - { - if($defaultValue === null) { - $this->_defaultValue = new Zend_CodeGenerator_Php_Parameter_DefaultValue("null"); - } else if(is_array($defaultValue)) { - $defaultValue = str_replace(array("\r", "\n"), "", var_export($defaultValue, true)); - $this->_defaultValue = new Zend_CodeGenerator_Php_Parameter_DefaultValue($defaultValue); - } else if(is_bool($defaultValue)) { - if($defaultValue == true) { - $this->_defaultValue = new Zend_CodeGenerator_Php_Parameter_DefaultValue("true"); - } else { - $this->_defaultValue = new Zend_CodeGenerator_Php_Parameter_DefaultValue("false"); - } - } else { - $this->_defaultValue = $defaultValue; - } - return $this; - } - - /** - * getDefaultValue() - * - * @return string - */ - public function getDefaultValue() - { - return $this->_defaultValue; - } - - /** - * setPosition() - * - * @param int $position - * @return Zend_CodeGenerator_Php_Parameter - */ - public function setPosition($position) - { - $this->_position = $position; - return $this; - } - - /** - * getPosition() - * - * @return int - */ - public function getPosition() - { - return $this->_position; - } - - /** - * @return bool - */ - public function getPassedByReference() - { - return $this->_passedByReference; - } - - /** - * @param bool $passedByReference - * @return Zend_CodeGenerator_Php_Parameter - */ - public function setPassedByReference($passedByReference) - { - $this->_passedByReference = $passedByReference; - return $this; - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - $output = ''; - - if ($this->_type) { - $output .= $this->_type . ' '; - } - - if($this->_passedByReference === true) { - $output .= '&'; - } - - $output .= '$' . $this->_name; - - if ($this->_defaultValue !== null) { - $output .= ' = '; - if (is_string($this->_defaultValue)) { - $output .= '\'' . $this->_defaultValue . '\''; - } else if($this->_defaultValue instanceof Zend_CodeGenerator_Php_Parameter_DefaultValue) { - $output .= (string)$this->_defaultValue; - } else { - $output .= $this->_defaultValue; - } - } - - return $output; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Parameter/DefaultValue.php b/library/vendor/Zend/CodeGenerator/Php/Parameter/DefaultValue.php deleted file mode 100644 index 03085c6fa..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Parameter/DefaultValue.php +++ /dev/null @@ -1,59 +0,0 @@ -_defaultValue = $defaultValue; - } - - public function __toString() - { - return $this->_defaultValue; - } -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Property.php b/library/vendor/Zend/CodeGenerator/Php/Property.php deleted file mode 100644 index 98aa53903..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Property.php +++ /dev/null @@ -1,176 +0,0 @@ -setName($reflectionProperty->getName()); - - $allDefaultProperties = $reflectionProperty->getDeclaringClass()->getDefaultProperties(); - - $property->setDefaultValue($allDefaultProperties[$reflectionProperty->getName()]); - - if ($reflectionProperty->getDocComment() != '') { - $property->setDocblock(Zend_CodeGenerator_Php_Docblock::fromReflection($reflectionProperty->getDocComment())); - } - - if ($reflectionProperty->isStatic()) { - $property->setStatic(true); - } - - if ($reflectionProperty->isPrivate()) { - $property->setVisibility(self::VISIBILITY_PRIVATE); - } elseif ($reflectionProperty->isProtected()) { - $property->setVisibility(self::VISIBILITY_PROTECTED); - } else { - $property->setVisibility(self::VISIBILITY_PUBLIC); - } - - $property->setSourceDirty(false); - - return $property; - } - - /** - * setConst() - * - * @param bool $const - * @return Zend_CodeGenerator_Php_Property - */ - public function setConst($const) - { - $this->_isConst = $const; - return $this; - } - - /** - * isConst() - * - * @return bool - */ - public function isConst() - { - return ($this->_isConst) ? true : false; - } - - /** - * setDefaultValue() - * - * @param Zend_CodeGenerator_Php_Property_DefaultValue|string|array $defaultValue - * @return Zend_CodeGenerator_Php_Property - */ - public function setDefaultValue($defaultValue) - { - // if it looks like - if (is_array($defaultValue) - && array_key_exists('value', $defaultValue) - && array_key_exists('type', $defaultValue)) { - $defaultValue = new Zend_CodeGenerator_Php_Property_DefaultValue($defaultValue); - } - - if (!($defaultValue instanceof Zend_CodeGenerator_Php_Property_DefaultValue)) { - $defaultValue = new Zend_CodeGenerator_Php_Property_DefaultValue(array('value' => $defaultValue)); - } - - $this->_defaultValue = $defaultValue; - return $this; - } - - /** - * getDefaultValue() - * - * @return Zend_CodeGenerator_Php_Property_DefaultValue - */ - public function getDefaultValue() - { - return $this->_defaultValue; - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - $name = $this->getName(); - $defaultValue = $this->getDefaultValue(); - - $output = ''; - - if (($docblock = $this->getDocblock()) !== null) { - $docblock->setIndentation(' '); - $output .= $docblock->generate(); - } - - if ($this->isConst()) { - if ($defaultValue != null && !$defaultValue->isValidConstantType()) { - throw new Zend_CodeGenerator_Php_Exception('The property ' . $this->_name . ' is said to be ' - . 'constant but does not have a valid constant value.'); - } - $output .= $this->_indentation . 'const ' . $name . ' = ' - . (($defaultValue !== null) ? $defaultValue->generate() : 'null;'); - } else { - $output .= $this->_indentation - . $this->getVisibility() - . (($this->isStatic()) ? ' static' : '') - . ' $' . $name . ' = ' - . (($defaultValue !== null) ? $defaultValue->generate() : 'null;'); - } - return $output; - } - -} diff --git a/library/vendor/Zend/CodeGenerator/Php/Property/DefaultValue.php b/library/vendor/Zend/CodeGenerator/Php/Property/DefaultValue.php deleted file mode 100644 index 84881e187..000000000 --- a/library/vendor/Zend/CodeGenerator/Php/Property/DefaultValue.php +++ /dev/null @@ -1,323 +0,0 @@ -getConstants(); - unset($reflect); - } - } - - /** - * isValidConstantType() - * - * @return bool - */ - public function isValidConstantType() - { - if ($this->_type == self::TYPE_AUTO) { - $type = $this->_getAutoDeterminedType($this->_value); - } else { - $type = $this->_type; - } - - // valid types for constants - $scalarTypes = array( - self::TYPE_BOOLEAN, - self::TYPE_BOOL, - self::TYPE_NUMBER, - self::TYPE_INTEGER, - self::TYPE_INT, - self::TYPE_FLOAT, - self::TYPE_DOUBLE, - self::TYPE_STRING, - self::TYPE_CONSTANT, - self::TYPE_NULL - ); - - return in_array($type, $scalarTypes); - } - - /** - * setValue() - * - * @param mixed $value - * @return Zend_CodeGenerator_Php_Property_DefaultValue - */ - public function setValue($value) - { - $this->_value = $value; - return $this; - } - - /** - * getValue() - * - * @return mixed - */ - public function getValue() - { - return $this->_value; - } - - /** - * setType() - * - * @param string $type - * @return Zend_CodeGenerator_Php_Property_DefaultValue - */ - public function setType($type) - { - $this->_type = $type; - return $this; - } - - /** - * getType() - * - * @return string - */ - public function getType() - { - return $this->_type; - } - - /** - * setArrayDepth() - * - * @param int $arrayDepth - * @return Zend_CodeGenerator_Php_Property_DefaultValue - */ - public function setArrayDepth($arrayDepth) - { - $this->_arrayDepth = $arrayDepth; - return $this; - } - - /** - * getArrayDepth() - * - * @return int - */ - public function getArrayDepth() - { - return $this->_arrayDepth; - } - - /** - * _getValidatedType() - * - * @param string $type - * @return string - */ - protected function _getValidatedType($type) - { - if (($constName = array_search($type, self::$_constants)) !== false) { - return $type; - } - - return self::TYPE_AUTO; - } - - /** - * _getAutoDeterminedType() - * - * @param mixed $value - * @return string - */ - public function _getAutoDeterminedType($value) - { - switch (gettype($value)) { - case 'boolean': - return self::TYPE_BOOLEAN; - case 'integer': - return self::TYPE_INT; - case 'string': - return self::TYPE_STRING; - case 'double': - case 'float': - case 'integer': - return self::TYPE_NUMBER; - case 'array': - return self::TYPE_ARRAY; - case 'NULL': - return self::TYPE_NULL; - case 'object': - case 'resource': - case 'unknown type': - default: - return self::TYPE_OTHER; - } - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - $type = $this->_type; - - if ($type != self::TYPE_AUTO) { - $type = $this->_getValidatedType($type); - } - - $value = $this->_value; - - if ($type == self::TYPE_AUTO) { - $type = $this->_getAutoDeterminedType($value); - - if ($type == self::TYPE_ARRAY) { - $rii = new RecursiveIteratorIterator( - $it = new RecursiveArrayIterator($value), - RecursiveIteratorIterator::SELF_FIRST - ); - foreach ($rii as $curKey => $curValue) { - if (!$curValue instanceof Zend_CodeGenerator_Php_Property_DefaultValue) { - $curValue = new self(array('value' => $curValue)); - $rii->getSubIterator()->offsetSet($curKey, $curValue); - } - $curValue->setArrayDepth($rii->getDepth()); - } - $value = $rii->getSubIterator()->getArrayCopy(); - } - - } - - $output = ''; - - switch ($type) { - case self::TYPE_BOOLEAN: - case self::TYPE_BOOL: - $output .= ( $value ? 'true' : 'false' ); - break; - case self::TYPE_STRING: - $output .= "'" . addcslashes($value, "'") . "'"; - break; - case self::TYPE_NULL: - $output .= 'null'; - break; - case self::TYPE_NUMBER: - case self::TYPE_INTEGER: - case self::TYPE_INT: - case self::TYPE_FLOAT: - case self::TYPE_DOUBLE: - case self::TYPE_CONSTANT: - $output .= $value; - break; - case self::TYPE_ARRAY: - $output .= 'array('; - $curArrayMultiblock = false; - if (count($value) > 1) { - $curArrayMultiblock = true; - $output .= PHP_EOL . str_repeat($this->_indentation, $this->_arrayDepth+1); - } - $outputParts = array(); - $noKeyIndex = 0; - foreach ($value as $n => $v) { - $v->setArrayDepth($this->_arrayDepth + 1); - $partV = $v->generate(); - $partV = substr($partV, 0, strlen($partV)-1); - if ($n === $noKeyIndex) { - $outputParts[] = $partV; - $noKeyIndex++; - } else { - $outputParts[] = (is_int($n) ? $n : "'" . addcslashes($n, "'") . "'") . ' => ' . $partV; - } - - } - $output .= implode(',' . PHP_EOL . str_repeat($this->_indentation, $this->_arrayDepth+1), $outputParts); - if ($curArrayMultiblock == true) { - $output .= PHP_EOL . str_repeat($this->_indentation, $this->_arrayDepth+1); - } - $output .= ')'; - break; - case self::TYPE_OTHER: - default: - throw new Zend_CodeGenerator_Php_Exception( - "Type '".get_class($value)."' is unknown or cannot be used as property default value." - ); - } - - $output .= ';'; - - return $output; - } -} diff --git a/library/vendor/Zend/Config.php b/library/vendor/Zend/Config.php index 199dcbe31..59c32656d 100644 --- a/library/vendor/Zend/Config.php +++ b/library/vendor/Zend/Config.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Config implements Countable, Iterator diff --git a/library/vendor/Zend/Config/Exception.php b/library/vendor/Zend/Config/Exception.php index 28e6ff964..abffe5bf8 100644 --- a/library/vendor/Zend/Config/Exception.php +++ b/library/vendor/Zend/Config/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Config_Exception extends Zend_Exception {} diff --git a/library/vendor/Zend/Config/Ini.php b/library/vendor/Zend/Config/Ini.php index 065a25788..55ca56f3d 100644 --- a/library/vendor/Zend/Config/Ini.php +++ b/library/vendor/Zend/Config/Ini.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Config_Ini extends Zend_Config diff --git a/library/vendor/Zend/Config/Writer.php b/library/vendor/Zend/Config/Writer.php index 6bbf4c6d4..8c255b3c8 100644 --- a/library/vendor/Zend/Config/Writer.php +++ b/library/vendor/Zend/Config/Writer.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Config_Writer diff --git a/library/vendor/Zend/Config/Writer/Array.php b/library/vendor/Zend/Config/Writer/Array.php index 7e497f5ad..f7cd50296 100644 --- a/library/vendor/Zend/Config/Writer/Array.php +++ b/library/vendor/Zend/Config/Writer/Array.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Config_Writer_Array extends Zend_Config_Writer_FileAbstract diff --git a/library/vendor/Zend/Config/Writer/FileAbstract.php b/library/vendor/Zend/Config/Writer/FileAbstract.php index f304ccbbb..242b49df3 100644 --- a/library/vendor/Zend/Config/Writer/FileAbstract.php +++ b/library/vendor/Zend/Config/Writer/FileAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Config * @package Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_package - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Config/Writer/Ini.php b/library/vendor/Zend/Config/Writer/Ini.php index e270039ec..67aaf8941 100644 --- a/library/vendor/Zend/Config/Writer/Ini.php +++ b/library/vendor/Zend/Config/Writer/Ini.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Config_Writer_Ini extends Zend_Config_Writer_FileAbstract diff --git a/library/vendor/Zend/Config/Writer/Xml.php b/library/vendor/Zend/Config/Writer/Xml.php index 7ef7bf4e2..b128f25ae 100644 --- a/library/vendor/Zend/Config/Writer/Xml.php +++ b/library/vendor/Zend/Config/Writer/Xml.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ /** * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Config_Writer_Xml extends Zend_Config_Writer_FileAbstract diff --git a/library/vendor/Zend/Config/Xml.php b/library/vendor/Zend/Config/Xml.php index 116ba3fd1..845eafc70 100644 --- a/library/vendor/Zend/Config/Xml.php +++ b/library/vendor/Zend/Config/Xml.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Config_Xml extends Zend_Config diff --git a/library/vendor/Zend/Config/Yaml.php b/library/vendor/Zend/Config/Yaml.php index 9f4dd6bf5..7ea0218dd 100644 --- a/library/vendor/Zend/Config/Yaml.php +++ b/library/vendor/Zend/Config/Yaml.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Config - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Config_Yaml extends Zend_Config diff --git a/library/vendor/Zend/Console/Getopt.php b/library/vendor/Zend/Console/Getopt.php index 84f8f746d..7d10e642f 100644 --- a/library/vendor/Zend/Console/Getopt.php +++ b/library/vendor/Zend/Console/Getopt.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_Console_Getopt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -80,7 +80,7 @@ * * @category Zend * @package Zend_Console_Getopt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version Release: @package_version@ * @since Class available since Release 0.6.0 @@ -726,6 +726,27 @@ class Zend_Console_Getopt return $this; } + /** + * @throws Zend_Console_Getopt_Exception + */ + public function checkRequiredArguments() + { + foreach ($this->_rules as $name => $rule) { + if ($rule['param'] === 'required') { + $defined = false; + foreach ($rule['alias'] as $alias) { + $defined = $defined === true ? true : array_key_exists($alias, $this->_options); + } + if ($defined === false) { + throw new Zend_Console_Getopt_Exception( + 'Option "$alias" requires a parameter.', + $this->getUsageMessage() + ); + } + } + } + } + /** * Parse command-line arguments for a single long option. * A long option is preceded by a double '--' character. @@ -783,7 +804,7 @@ class Zend_Console_Getopt $realFlag = $this->_ruleMap[$flag]; switch ($this->_rules[$realFlag]['param']) { case 'required': - if (count($argv) > 0) { + if (count($argv) > 0 && substr($argv[0], 0, 1) != '-') { $param = array_shift($argv); $this->_checkParameterType($realFlag, $param); } else { diff --git a/library/vendor/Zend/Console/Getopt/Exception.php b/library/vendor/Zend/Console/Getopt/Exception.php index 4ceeb6628..cb3ebf2be 100644 --- a/library/vendor/Zend/Console/Getopt/Exception.php +++ b/library/vendor/Zend/Console/Getopt/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Console_Getopt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Console_Getopt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Console_Getopt_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Controller/Action.php b/library/vendor/Zend/Controller/Action.php index 7b78901a8..35c450a95 100644 --- a/library/vendor/Zend/Controller/Action.php +++ b/library/vendor/Zend/Controller/Action.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ /** * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Action implements Zend_Controller_Action_Interface diff --git a/library/vendor/Zend/Controller/Action/Exception.php b/library/vendor/Zend/Controller/Action/Exception.php index 538cf1021..1c3438dbc 100644 --- a/library/vendor/Zend/Controller/Action/Exception.php +++ b/library/vendor/Zend/Controller/Action/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Exception extends Zend_Controller_Exception diff --git a/library/vendor/Zend/Controller/Action/Helper/Abstract.php b/library/vendor/Zend/Controller/Action/Helper/Abstract.php index 9ca227709..e630be3d1 100644 --- a/library/vendor/Zend/Controller/Action/Helper/Abstract.php +++ b/library/vendor/Zend/Controller/Action/Helper/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Action_Helper_Abstract diff --git a/library/vendor/Zend/Controller/Action/Helper/ActionStack.php b/library/vendor/Zend/Controller/Action/Helper/ActionStack.php index 9c38f8cff..30fb6338b 100644 --- a/library/vendor/Zend/Controller/Action/Helper/ActionStack.php +++ b/library/vendor/Zend/Controller/Action/Helper/ActionStack.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_ActionStack extends Zend_Controller_Action_Helper_Abstract diff --git a/library/vendor/Zend/Controller/Action/Helper/AjaxContext.php b/library/vendor/Zend/Controller/Action/Helper/AjaxContext.php index 42233cf44..3074a40c4 100644 --- a/library/vendor/Zend/Controller/Action/Helper/AjaxContext.php +++ b/library/vendor/Zend/Controller/Action/Helper/AjaxContext.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_AjaxContext extends Zend_Controller_Action_Helper_ContextSwitch diff --git a/library/vendor/Zend/Controller/Action/Helper/AutoComplete/Abstract.php b/library/vendor/Zend/Controller/Action/Helper/AutoComplete/Abstract.php index 7664379bf..7cd4ad04d 100644 --- a/library/vendor/Zend/Controller/Action/Helper/AutoComplete/Abstract.php +++ b/library/vendor/Zend/Controller/Action/Helper/AutoComplete/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Action_Helper_AutoComplete_Abstract extends Zend_Controller_Action_Helper_Abstract diff --git a/library/vendor/Zend/Controller/Action/Helper/AutoCompleteDojo.php b/library/vendor/Zend/Controller/Action/Helper/AutoCompleteDojo.php index 17f8844b3..31fd33d6a 100644 --- a/library/vendor/Zend/Controller/Action/Helper/AutoCompleteDojo.php +++ b/library/vendor/Zend/Controller/Action/Helper/AutoCompleteDojo.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_AutoCompleteDojo extends Zend_Controller_Action_Helper_AutoComplete_Abstract diff --git a/library/vendor/Zend/Controller/Action/Helper/AutoCompleteScriptaculous.php b/library/vendor/Zend/Controller/Action/Helper/AutoCompleteScriptaculous.php index d7b25fc10..fe443e20b 100644 --- a/library/vendor/Zend/Controller/Action/Helper/AutoCompleteScriptaculous.php +++ b/library/vendor/Zend/Controller/Action/Helper/AutoCompleteScriptaculous.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_AutoCompleteScriptaculous extends Zend_Controller_Action_Helper_AutoComplete_Abstract diff --git a/library/vendor/Zend/Controller/Action/Helper/Cache.php b/library/vendor/Zend/Controller/Action/Helper/Cache.php index fecd0080b..32afc776b 100644 --- a/library/vendor/Zend/Controller/Action/Helper/Cache.php +++ b/library/vendor/Zend/Controller/Action/Helper/Cache.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ /** * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_Cache diff --git a/library/vendor/Zend/Controller/Action/Helper/ContextSwitch.php b/library/vendor/Zend/Controller/Action/Helper/ContextSwitch.php index 576f98e07..6caeec935 100644 --- a/library/vendor/Zend/Controller/Action/Helper/ContextSwitch.php +++ b/library/vendor/Zend/Controller/Action/Helper/ContextSwitch.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_ContextSwitch extends Zend_Controller_Action_Helper_Abstract diff --git a/library/vendor/Zend/Controller/Action/Helper/FlashMessenger.php b/library/vendor/Zend/Controller/Action/Helper/FlashMessenger.php index a630f2873..07414c9c6 100644 --- a/library/vendor/Zend/Controller/Action/Helper/FlashMessenger.php +++ b/library/vendor/Zend/Controller/Action/Helper/FlashMessenger.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Controller/Action/Helper/Json.php b/library/vendor/Zend/Controller/Action/Helper/Json.php index 32f5da930..5b77f12d0 100644 --- a/library/vendor/Zend/Controller/Action/Helper/Json.php +++ b/library/vendor/Zend/Controller/Action/Helper/Json.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_Json extends Zend_Controller_Action_Helper_Abstract diff --git a/library/vendor/Zend/Controller/Action/Helper/Redirector.php b/library/vendor/Zend/Controller/Action/Helper/Redirector.php index 1a3c6d78f..8ff7c3e35 100644 --- a/library/vendor/Zend/Controller/Action/Helper/Redirector.php +++ b/library/vendor/Zend/Controller/Action/Helper/Redirector.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_Helper_Abstract @@ -404,7 +404,7 @@ class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_He /** * Redirect to a route-based URL * - * Uses route's assemble method tobuild the URL; route is specified by $name; + * Uses route's assemble method to build the URL; route is specified by $name; * default route is used if none provided. * * @param array $urlOptions Array of key/value pairs used to assemble URL @@ -425,7 +425,7 @@ class Zend_Controller_Action_Helper_Redirector extends Zend_Controller_Action_He /** * Redirect to a route-based URL, and immediately exit * - * Uses route's assemble method tobuild the URL; route is specified by $name; + * Uses route's assemble method to build the URL; route is specified by $name; * default route is used if none provided. * * @param array $urlOptions Array of key/value pairs used to assemble URL diff --git a/library/vendor/Zend/Controller/Action/Helper/Url.php b/library/vendor/Zend/Controller/Action/Helper/Url.php index c6aafe0c9..f98bfa5a8 100644 --- a/library/vendor/Zend/Controller/Action/Helper/Url.php +++ b/library/vendor/Zend/Controller/Action/Helper/Url.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_Url extends Zend_Controller_Action_Helper_Abstract diff --git a/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php b/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php index 0e3fc3237..948ecc462 100644 --- a/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php +++ b/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -66,7 +66,7 @@ * @uses Zend_Controller_Action_Helper_Abstract * @package Zend_Controller * @subpackage Zend_Controller_Action_Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Action_Helper_Abstract @@ -834,9 +834,20 @@ class Zend_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Action_ $inflector = $this->getInflector(); $request = $this->getRequest(); $dispatcher = $this->getFrontController()->getDispatcher(); - $module = $dispatcher->formatModuleName($request->getModuleName()); - $controller = $request->getControllerName(); - $action = $dispatcher->formatActionName($request->getActionName()); + + // Format module name + $module = $dispatcher->formatModuleName($request->getModuleName()); + + // Format controller name + $filter = new Zend_Filter_Word_CamelCaseToDash(); + $controller = $filter->filter($request->getControllerName()); + $controller = $dispatcher->formatControllerName($controller); + if ('Controller' == substr($controller, -10)) { + $controller = substr($controller, 0, -10); + } + + // Format action name + $action = $dispatcher->formatActionName($request->getActionName()); $params = compact('module', 'controller', 'action'); foreach ($vars as $key => $value) { diff --git a/library/vendor/Zend/Controller/Action/HelperBroker.php b/library/vendor/Zend/Controller/Action/HelperBroker.php index 40fabe372..ff94dca7f 100644 --- a/library/vendor/Zend/Controller/Action/HelperBroker.php +++ b/library/vendor/Zend/Controller/Action/HelperBroker.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_HelperBroker diff --git a/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php b/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php index 7f7f6bc15..8f5193f21 100644 --- a/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php +++ b/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Action_HelperBroker_PriorityStack implements IteratorAggregate, ArrayAccess, Countable diff --git a/library/vendor/Zend/Controller/Action/Interface.php b/library/vendor/Zend/Controller/Action/Interface.php index a69cfaca3..db354637a 100644 --- a/library/vendor/Zend/Controller/Action/Interface.php +++ b/library/vendor/Zend/Controller/Action/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Controller_Action_Interface diff --git a/library/vendor/Zend/Controller/Dispatcher/Abstract.php b/library/vendor/Zend/Controller/Dispatcher/Abstract.php index ac9108f18..7c87289f9 100644 --- a/library/vendor/Zend/Controller/Dispatcher/Abstract.php +++ b/library/vendor/Zend/Controller/Dispatcher/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Dispatcher - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Controller * @subpackage Dispatcher - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Dispatcher_Abstract implements Zend_Controller_Dispatcher_Interface diff --git a/library/vendor/Zend/Controller/Dispatcher/Exception.php b/library/vendor/Zend/Controller/Dispatcher/Exception.php index 88fec2f5b..298dfdbf8 100644 --- a/library/vendor/Zend/Controller/Dispatcher/Exception.php +++ b/library/vendor/Zend/Controller/Dispatcher/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Dispatcher - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Controller * @subpackage Dispatcher - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Dispatcher_Exception extends Zend_Controller_Exception diff --git a/library/vendor/Zend/Controller/Dispatcher/Interface.php b/library/vendor/Zend/Controller/Dispatcher/Interface.php index cd70607f1..1f18df7c9 100644 --- a/library/vendor/Zend/Controller/Dispatcher/Interface.php +++ b/library/vendor/Zend/Controller/Dispatcher/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Dispatcher - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ /** * @package Zend_Controller * @subpackage Dispatcher - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Controller_Dispatcher_Interface diff --git a/library/vendor/Zend/Controller/Dispatcher/Standard.php b/library/vendor/Zend/Controller/Dispatcher/Standard.php index f84301a8e..d9449c4ce 100644 --- a/library/vendor/Zend/Controller/Dispatcher/Standard.php +++ b/library/vendor/Zend/Controller/Dispatcher/Standard.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Dispatcher - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Controller * @subpackage Dispatcher - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Dispatcher_Standard extends Zend_Controller_Dispatcher_Abstract diff --git a/library/vendor/Zend/Controller/Exception.php b/library/vendor/Zend/Controller/Exception.php index 181e2d583..861289f9d 100644 --- a/library/vendor/Zend/Controller/Exception.php +++ b/library/vendor/Zend/Controller/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Controller/Front.php b/library/vendor/Zend/Controller/Front.php index 30ca8488e..e5bb40a0b 100644 --- a/library/vendor/Zend/Controller/Front.php +++ b/library/vendor/Zend/Controller/Front.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ /** * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Front diff --git a/library/vendor/Zend/Controller/Plugin/Abstract.php b/library/vendor/Zend/Controller/Plugin/Abstract.php index 71ca167e9..7e590b7ee 100644 --- a/library/vendor/Zend/Controller/Plugin/Abstract.php +++ b/library/vendor/Zend/Controller/Plugin/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Plugin_Abstract diff --git a/library/vendor/Zend/Controller/Plugin/ActionStack.php b/library/vendor/Zend/Controller/Plugin/ActionStack.php index 1d1df1cd9..c654a6c77 100644 --- a/library/vendor/Zend/Controller/Plugin/ActionStack.php +++ b/library/vendor/Zend/Controller/Plugin/ActionStack.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Controller/Plugin/Broker.php b/library/vendor/Zend/Controller/Plugin/Broker.php index 64bbdae3d..eec98091e 100644 --- a/library/vendor/Zend/Controller/Plugin/Broker.php +++ b/library/vendor/Zend/Controller/Plugin/Broker.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Plugin_Broker extends Zend_Controller_Plugin_Abstract diff --git a/library/vendor/Zend/Controller/Plugin/ErrorHandler.php b/library/vendor/Zend/Controller/Plugin/ErrorHandler.php index 9f850d3e2..cd0e4f751 100644 --- a/library/vendor/Zend/Controller/Plugin/ErrorHandler.php +++ b/library/vendor/Zend/Controller/Plugin/ErrorHandler.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Controller/Plugin/PutHandler.php b/library/vendor/Zend/Controller/Plugin/PutHandler.php index 8bda14094..3bf7a67fc 100644 --- a/library/vendor/Zend/Controller/Plugin/PutHandler.php +++ b/library/vendor/Zend/Controller/Plugin/PutHandler.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * * @package Zend_Controller * @subpackage Zend_Controller_Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Plugin_PutHandler extends Zend_Controller_Plugin_Abstract diff --git a/library/vendor/Zend/Controller/Request/Abstract.php b/library/vendor/Zend/Controller/Request/Abstract.php index 68a8bd73a..d57238f46 100644 --- a/library/vendor/Zend/Controller/Request/Abstract.php +++ b/library/vendor/Zend/Controller/Request/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Request_Abstract diff --git a/library/vendor/Zend/Controller/Request/Apache404.php b/library/vendor/Zend/Controller/Request/Apache404.php index f2015da04..87d1d838c 100644 --- a/library/vendor/Zend/Controller/Request/Apache404.php +++ b/library/vendor/Zend/Controller/Request/Apache404.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Controller/Request/Exception.php b/library/vendor/Zend/Controller/Request/Exception.php index 9cbbdf693..89e8856f4 100644 --- a/library/vendor/Zend/Controller/Request/Exception.php +++ b/library/vendor/Zend/Controller/Request/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Request - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Controller * @subpackage Request - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Request_Exception extends Zend_Controller_Exception diff --git a/library/vendor/Zend/Controller/Request/Http.php b/library/vendor/Zend/Controller/Request/Http.php index 81f4122b7..de61e3666 100644 --- a/library/vendor/Zend/Controller/Request/Http.php +++ b/library/vendor/Zend/Controller/Request/Http.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -911,6 +911,20 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract return false; } + /** + * Was the request made by PATCH? + * + * @return boolean + */ + public function isPatch() + { + if ('PATCH' == $this->getMethod()) { + return true; + } + + return false; + } + /** * Is the request a Javascript XMLHttpRequest? * @@ -979,8 +993,18 @@ class Zend_Controller_Request_Http extends Zend_Controller_Request_Abstract } // Try to get it from the $_SERVER array first - $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header)); - if (isset($_SERVER[$temp])) { + $temp = strtoupper(str_replace('-', '_', $header)); + if (isset($_SERVER['HTTP_' . $temp])) { + return $_SERVER['HTTP_' . $temp]; + } + + /* + * Try to get it from the $_SERVER array on POST request or CGI environment + * @see https://www.ietf.org/rfc/rfc3875 (4.1.2. and 4.1.3.) + */ + if (isset($_SERVER[$temp]) + && in_array($temp, array('CONTENT_TYPE', 'CONTENT_LENGTH')) + ) { return $_SERVER[$temp]; } diff --git a/library/vendor/Zend/Controller/Request/HttpTestCase.php b/library/vendor/Zend/Controller/Request/HttpTestCase.php index a95e4598e..414c95ebd 100644 --- a/library/vendor/Zend/Controller/Request/HttpTestCase.php +++ b/library/vendor/Zend/Controller/Request/HttpTestCase.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -61,6 +61,7 @@ class Zend_Controller_Request_HttpTestCase extends Zend_Controller_Request_Http 'GET', 'HEAD', 'OPTIONS', + 'PATCH', 'POST', 'PUT', ); diff --git a/library/vendor/Zend/Controller/Request/Simple.php b/library/vendor/Zend/Controller/Request/Simple.php index bc61cbfad..f8041075b 100644 --- a/library/vendor/Zend/Controller/Request/Simple.php +++ b/library/vendor/Zend/Controller/Request/Simple.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Request - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Controller * @subpackage Request - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Request_Simple extends Zend_Controller_Request_Abstract diff --git a/library/vendor/Zend/Controller/Response/Abstract.php b/library/vendor/Zend/Controller/Response/Abstract.php index c6df02321..06496948c 100644 --- a/library/vendor/Zend/Controller/Response/Abstract.php +++ b/library/vendor/Zend/Controller/Response/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * * @package Zend_Controller * @subpackage Response - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Response_Abstract diff --git a/library/vendor/Zend/Controller/Response/Cli.php b/library/vendor/Zend/Controller/Response/Cli.php index 5a2fab4e5..5177d56f7 100644 --- a/library/vendor/Zend/Controller/Response/Cli.php +++ b/library/vendor/Zend/Controller/Response/Cli.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @uses Zend_Controller_Response_Abstract * @package Zend_Controller * @subpackage Response - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Response_Cli extends Zend_Controller_Response_Abstract diff --git a/library/vendor/Zend/Controller/Response/Exception.php b/library/vendor/Zend/Controller/Response/Exception.php index 9f1d424ce..8750ef336 100644 --- a/library/vendor/Zend/Controller/Response/Exception.php +++ b/library/vendor/Zend/Controller/Response/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Request - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @package Zend_Controller * @subpackage Response - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Response_Exception extends Zend_Controller_Exception diff --git a/library/vendor/Zend/Controller/Response/Http.php b/library/vendor/Zend/Controller/Response/Http.php index 3c888e9e7..e7656c0cb 100644 --- a/library/vendor/Zend/Controller/Response/Http.php +++ b/library/vendor/Zend/Controller/Response/Http.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Controller/Response/HttpTestCase.php b/library/vendor/Zend/Controller/Response/HttpTestCase.php index bd6f1226a..f115af951 100644 --- a/library/vendor/Zend/Controller/Response/HttpTestCase.php +++ b/library/vendor/Zend/Controller/Response/HttpTestCase.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Controller/Router/Abstract.php b/library/vendor/Zend/Controller/Router/Abstract.php index 19681ce12..7709cafb3 100644 --- a/library/vendor/Zend/Controller/Router/Abstract.php +++ b/library/vendor/Zend/Controller/Router/Abstract.php @@ -15,12 +15,11 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ - /** Zend_Controller_Router_Interface */ /** @@ -30,7 +29,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router_Interface @@ -39,9 +38,10 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router * URI delimiter */ const URI_DELIMITER = '/'; - + /** * Front controller instance + * * @var Zend_Controller_Front */ protected $_frontController; @@ -49,6 +49,7 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router /** * Array of invocation parameters to use when instantiating action * controllers + * * @var array */ protected $_invokeParams = array(); @@ -57,7 +58,6 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router * Constructor * * @param array $params - * @return void */ public function __construct(array $params = array()) { @@ -68,13 +68,14 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router * Add or modify a parameter to use when instantiating an action controller * * @param string $name - * @param mixed $value - * @return Zend_Controller_Router + * @param mixed $value + * @return Zend_Controller_Router_Abstract */ public function setParam($name, $value) { - $name = (string) $name; + $name = (string)$name; $this->_invokeParams[$name] = $value; + return $this; } @@ -82,11 +83,12 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router * Set parameters to pass to action controller constructors * * @param array $params - * @return Zend_Controller_Router + * @return Zend_Controller_Router_Abstract */ public function setParams(array $params) { $this->_invokeParams = array_merge($this->_invokeParams, $params); + return $this; } @@ -98,7 +100,7 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router */ public function getParam($name) { - if(isset($this->_invokeParams[$name])) { + if (isset($this->_invokeParams[$name])) { return $this->_invokeParams[$name]; } @@ -123,7 +125,7 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router * each. * * @param null|string|array single key or array of keys for params to clear - * @return Zend_Controller_Router + * @return Zend_Controller_Router_Abstract */ public function clearParams($name = null) { @@ -155,6 +157,7 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router } $this->_frontController = Zend_Controller_Front::getInstance(); + return $this->_frontController; } @@ -167,7 +170,7 @@ abstract class Zend_Controller_Router_Abstract implements Zend_Controller_Router public function setFrontController(Zend_Controller_Front $controller) { $this->_frontController = $controller; + return $this; } - } diff --git a/library/vendor/Zend/Controller/Router/Exception.php b/library/vendor/Zend/Controller/Router/Exception.php index cb11aa430..8bdb7ff42 100644 --- a/library/vendor/Zend/Controller/Router/Exception.php +++ b/library/vendor/Zend/Controller/Router/Exception.php @@ -15,21 +15,20 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ - /** Zend_Controller_Exception */ - /** * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Router_Exception extends Zend_Controller_Exception -{} +{ +} diff --git a/library/vendor/Zend/Controller/Router/Interface.php b/library/vendor/Zend/Controller/Router/Interface.php index 8d6a98e58..920286d94 100644 --- a/library/vendor/Zend/Controller/Router/Interface.php +++ b/library/vendor/Zend/Controller/Router/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Controller_Router_Interface @@ -54,9 +54,9 @@ interface Zend_Controller_Router_Interface * Encode tells to url encode resulting path parts. * * @param array $userParams Options passed by a user used to override parameters - * @param mixed $name The name of a Route to use - * @param bool $reset Whether to reset to the route defaults ignoring URL params - * @param bool $encode Tells to encode URL parts on output + * @param mixed $name The name of a Route to use + * @param bool $reset Whether to reset to the route defaults ignoring URL params + * @param bool $encode Tells to encode URL parts on output * @throws Zend_Controller_Router_Exception * @return string Resulting URL path */ @@ -81,7 +81,7 @@ interface Zend_Controller_Router_Interface * Add or modify a parameter with which to instantiate any helper objects * * @param string $name - * @param mixed $param + * @param mixed $value * @return Zend_Controller_Router_Interface */ public function setParam($name, $value); @@ -120,5 +120,4 @@ interface Zend_Controller_Router_Interface * @return Zend_Controller_Router_Interface */ public function clearParams($name = null); - } diff --git a/library/vendor/Zend/Controller/Router/Rewrite.php b/library/vendor/Zend/Controller/Router/Rewrite.php index cdd3add72..bfc397291 100644 --- a/library/vendor/Zend/Controller/Router/Rewrite.php +++ b/library/vendor/Zend/Controller/Router/Rewrite.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @see http://manuals.rubyonrails.com/read/chapter/65 */ @@ -53,7 +53,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract /** * Currently matched route * - * @var Zend_Controller_Router_Route_Interface + * @var string */ protected $_currentRoute = null; @@ -88,7 +88,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract { if (!$this->hasRoute('default')) { $dispatcher = $this->getFrontController()->getDispatcher(); - $request = $this->getFrontController()->getRequest(); + $request = $this->getFrontController()->getRequest(); $compat = new Zend_Controller_Router_Route_Module(array(), $dispatcher, $request); @@ -103,8 +103,8 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * * If route contains method setRequest(), it is initialized with a request object * - * @param string $name Name of the route - * @param Zend_Controller_Router_Route_Interface $route Instance of the route + * @param string $name Name of the route + * @param Zend_Controller_Router_Route_Interface $route Instance of the route * @return Zend_Controller_Router_Rewrite */ public function addRoute($name, Zend_Controller_Router_Route_Interface $route) @@ -124,7 +124,8 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * @param array $routes Array of routes with names as keys and routes as values * @return Zend_Controller_Router_Rewrite */ - public function addRoutes($routes) { + public function addRoutes($routes) + { foreach ($routes as $name => $route) { $this->addRoute($name, $route); } @@ -209,7 +210,12 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract Zend_Loader::loadClass($class); } - $route = call_user_func(array($class, 'getInstance'), $info); + $route = call_user_func( + array( + $class, + 'getInstance' + ), $info + ); if (isset($info->abstract) && $info->abstract && method_exists($route, 'isAbstract')) { $route->isAbstract(true); @@ -226,9 +232,11 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * @param Zend_Config $childRoutesInfo * @return void */ - protected function _addChainRoutesFromConfig($name, - Zend_Controller_Router_Route_Interface $route, - Zend_Config $childRoutesInfo) + protected function _addChainRoutesFromConfig( + $name, + Zend_Controller_Router_Route_Interface $route, + Zend_Config $childRoutesInfo + ) { foreach ($childRoutesInfo as $childRouteName => $childRouteInfo) { if (is_string($childRouteInfo)) { @@ -276,7 +284,6 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract /** * Remove all standard default routes * - * @param Zend_Controller_Router_Route_Interface Route * @return Zend_Controller_Router_Rewrite */ public function removeDefaultRoutes() @@ -324,6 +331,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract if (!isset($this->_currentRoute)) { throw new Zend_Controller_Router_Exception("Current route is not defined"); } + return $this->getRoute($this->_currentRoute); } @@ -331,13 +339,14 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * Retrieve a name of currently matched route * * @throws Zend_Controller_Router_Exception - * @return Zend_Controller_Router_Route_Interface Route object + * @return string Route name */ public function getCurrentRouteName() { if (!isset($this->_currentRoute)) { throw new Zend_Controller_Router_Exception("Current route is not defined"); } + return $this->_currentRoute; } @@ -355,13 +364,16 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * Find a matching route to the current PATH_INFO and inject * returning values to the Request object. * + * @param Zend_Controller_Request_Abstract $request * @throws Zend_Controller_Router_Exception * @return Zend_Controller_Request_Abstract Request object */ public function route(Zend_Controller_Request_Abstract $request) { if (!$request instanceof Zend_Controller_Request_Http) { - throw new Zend_Controller_Router_Exception('Zend_Controller_Router_Rewrite requires a Zend_Controller_Request_Http-based request object'); + throw new Zend_Controller_Router_Exception( + 'Zend_Controller_Router_Rewrite requires a Zend_Controller_Request_Http-based request object' + ); } if ($this->_useDefaultRoutes) { @@ -392,21 +404,28 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract } } - if (!$routeMatched) { - throw new Zend_Controller_Router_Exception('No route matched the request', 404); - } + if (!$routeMatched) { + throw new Zend_Controller_Router_Exception('No route matched the request', 404); + } - if($this->_useCurrentParamsAsGlobal) { + if ($this->_useCurrentParamsAsGlobal) { $params = $request->getParams(); - foreach($params as $param => $value) { + foreach ($params as $param => $value) { $this->setGlobalParam($param, $value); } } return $request; - } + /** + * Sets parameters for request object + * + * Module name, controller name and action name + * + * @param Zend_Controller_Request_Abstract $request + * @param array $params + */ protected function _setRequestParams($request, $params) { foreach ($params as $param => $value) { @@ -422,7 +441,6 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract if ($param === $request->getActionKey()) { $request->setActionName($value); } - } } @@ -430,9 +448,9 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * Generates a URL path that can be used in URL creation, redirection, etc. * * @param array $userParams Options passed by a user used to override parameters - * @param mixed $name The name of a Route to use - * @param bool $reset Whether to reset to the route defaults ignoring URL params - * @param bool $encode Tells to encode URL parts on output + * @param mixed $name The name of a Route to use + * @param bool $reset Whether to reset to the route defaults ignoring URL params + * @param bool $encode Tells to encode URL parts on output * @throws Zend_Controller_Router_Exception * @return string Resulting absolute URL path */ @@ -441,7 +459,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract if (!is_array($userParams)) { throw new Zend_Controller_Router_Exception('userParams must be an array'); } - + if ($name == null) { try { $name = $this->getCurrentRouteName(); @@ -467,7 +485,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * Set a global parameter * * @param string $name - * @param mixed $value + * @param mixed $value * @return Zend_Controller_Router_Rewrite */ public function setGlobalParam($name, $value) @@ -483,7 +501,8 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * @param string $separator The separator to use * @return Zend_Controller_Router_Rewrite */ - public function setChainNameSeparator($separator) { + public function setChainNameSeparator($separator) + { $this->_chainNameSeparator = $separator; return $this; @@ -494,7 +513,8 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * * @return string */ - public function getChainNameSeparator() { + public function getChainNameSeparator() + { return $this->_chainNameSeparator; } @@ -502,19 +522,20 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract * Determines/returns whether to use the request parameters as global parameters. * * @param boolean|null $use - * Null/unset when you want to retrieve the current state. - * True when request parameters should be global, false otherwise + * Null/unset when you want to retrieve the current state. + * True when request parameters should be global, false otherwise * @return boolean|Zend_Controller_Router_Rewrite * Returns a boolean if first param isn't set, returns an * instance of Zend_Controller_Router_Rewrite otherwise. * */ - public function useRequestParametersAsGlobal($use = null) { - if($use === null) { + public function useRequestParametersAsGlobal($use = null) + { + if ($use === null) { return $this->_useCurrentParamsAsGlobal; } - $this->_useCurrentParamsAsGlobal = (bool) $use; + $this->_useCurrentParamsAsGlobal = (bool)$use; return $this; } diff --git a/library/vendor/Zend/Controller/Router/Route.php b/library/vendor/Zend/Controller/Router/Route.php index 602077e1a..d7db76155 100644 --- a/library/vendor/Zend/Controller/Router/Route.php +++ b/library/vendor/Zend/Controller/Router/Route.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,12 +27,13 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @see http://manuals.rubyonrails.com/read/chapter/65 */ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract { + /** * Default translator * @@ -76,12 +77,16 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract protected $_translatable = array(); protected $_urlVariable = ':'; + protected $_urlDelimiter = self::URI_DELIMITER; + protected $_regexDelimiter = '#'; + protected $_defaultRegex = null; /** * Holds names of all route's pattern variable names. Array index holds a position in URL. + * * @var array */ protected $_variables = array(); @@ -90,12 +95,14 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract * Holds Route patterns for all URL parts. In case of a variable it stores it's regex * requirement or null. In case of a static part, it holds only it's direct value. * In case of a wildcard, it stores an asterisk (*) + * * @var array */ protected $_parts = array(); /** * Holds user submitted default values for route's variables. Name and value pairs. + * * @var array */ protected $_defaults = array(); @@ -103,6 +110,7 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract /** * Holds user submitted regular expression patterns for route's variables' values. * Name and value pairs. + * * @var array */ protected $_requirements = array(); @@ -110,6 +118,7 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract /** * Associative array filled on match() that holds matched path values * for given variable names. + * * @var array */ protected $_values = array(); @@ -117,6 +126,7 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract /** * Associative array filled on match() that holds wildcard variable * names and values. + * * @var array */ protected $_wildcardData = array(); @@ -124,11 +134,13 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract /** * Helper var that holds a count of route pattern's static parts * for validation + * * @var int */ protected $_staticCount = 0; - public function getVersion() { + public function getVersion() + { return 1; } @@ -136,11 +148,13 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract * Instantiates route based on passed Zend_Config structure * * @param Zend_Config $config Configuration object + * @return Zend_Controller_Router_Route */ public static function getInstance(Zend_Config $config) { $reqs = ($config->reqs instanceof Zend_Config) ? $config->reqs->toArray() : array(); $defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array(); + return new self($config->route, $defs, $reqs); } @@ -149,16 +163,19 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract * to a corresponding atomic parts. These parts are assigned * a position which is later used for matching and preparing values. * - * @param string $route Map used to match with later submitted URL path - * @param array $defaults Defaults for map variables with keys as variable names - * @param array $reqs Regular expression requirements for variables (keys as variable names) + * @param string $route Map used to match with later submitted URL path + * @param array $defaults Defaults for map variables with keys as variable names + * @param array $reqs Regular expression requirements for variables (keys as variable names) * @param Zend_Translate $translator Translator to use for this instance + * @param mixed|null $locale */ - public function __construct($route, $defaults = array(), $reqs = array(), Zend_Translate $translator = null, $locale = null) + public function __construct( + $route, $defaults = array(), $reqs = array(), Zend_Translate $translator = null, $locale = null + ) { $route = trim($route, $this->_urlDelimiter); - $this->_defaults = (array) $defaults; - $this->_requirements = (array) $reqs; + $this->_defaults = (array)$defaults; + $this->_requirements = (array)$reqs; $this->_translator = $translator; $this->_locale = $locale; @@ -198,7 +215,9 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract * Matches a user submitted path with parts defined by a map. Assigns and * returns an array of variables on a successful match. * - * @param string $path Path used to match against this routing map + * @param string $path Path used to match against this routing map + * @param boolean $partial + * @throws Zend_Controller_Router_Exception * @return array|false An array of assigned values or a false on a mismatch */ public function match($path, $partial = false) @@ -233,10 +252,12 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract // If it's a wildcard, get the rest of URL as wildcard data and stop matching if ($this->_parts[$pos] == '*') { $count = count($path); - for($i = $pos; $i < $count; $i+=2) { + for ($i = $pos; $i < $count; $i += 2) { $var = urldecode($path[$i]); - if (!isset($this->_wildcardData[$var]) && !isset($this->_defaults[$var]) && !isset($values[$var])) { - $this->_wildcardData[$var] = (isset($path[$i+1])) ? urldecode($path[$i+1]) : null; + if (!isset($this->_wildcardData[$var]) && !isset($this->_defaults[$var]) + && !isset($values[$var]) + ) { + $this->_wildcardData[$var] = (isset($path[$i + 1])) ? urldecode($path[$i + 1]) : null; } } @@ -249,7 +270,11 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract // Translate value if required $part = $this->_parts[$pos]; - if ($this->_isTranslated && (substr($part, 0, 1) === '@' && substr($part, 1, 1) !== '@' && $name === null) || $name !== null && in_array($name, $this->_translatable)) { + if ($this->_isTranslated + && (substr($part, 0, 1) === '@' && substr($part, 1, 1) !== '@' + && $name === null) + || $name !== null && in_array($name, $this->_translatable) + ) { if (substr($part, 0, 1) === '@') { $part = substr($part, 1); } @@ -269,7 +294,11 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract } // If it's a variable with requirement, match a regex. If not - everything matches - if ($part !== null && !preg_match($this->_regexDelimiter . '^' . $part . '$' . $this->_regexDelimiter . 'iu', $pathPart)) { + if ($part !== null + && !preg_match( + $this->_regexDelimiter . '^' . $part . '$' . $this->_regexDelimiter . 'iu', $pathPart + ) + ) { return false; } @@ -304,14 +333,16 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract $this->_values = $values; return $return; - } /** * Assembles user submitted parameters forming a URL path defined by this route * - * @param array $data An array of variable and value pairs used as parameters + * @param array $data An array of variable and value pairs used as parameters * @param boolean $reset Whether or not to set route defaults with those provided in $data + * @param boolean $encode + * @param boolean $partial + * @throws Zend_Controller_Router_Exception * @return string Route path with user submitted parameters */ public function assemble($data = array(), $reset = false, $encode = false, $partial = false) @@ -372,13 +403,15 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract $url[$key] = $part; } } else { - if (!$reset) $data += $this->_wildcardData; + if (!$reset) { + $data += $this->_wildcardData; + } $defaults = $this->getDefaults(); foreach ($data as $var => $value) { if ($value !== null && (!isset($defaults[$var]) || $value != $defaults[$var])) { $url[$key++] = $var; $url[$key++] = $value; - $flag = true; + $flag = true; } } } @@ -392,20 +425,23 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract if (isset($this->_variables[$key])) { $defaultValue = $this->getDefault($this->_variables[$key]); - if ($this->_isTranslated && $defaultValue !== null && isset($this->_translatable[$this->_variables[$key]])) { + if ($this->_isTranslated && $defaultValue !== null + && isset($this->_translatable[$this->_variables[$key]]) + ) { $defaultValue = $translator->translate($defaultValue, $locale); } } if ($flag || $value !== $defaultValue || $partial) { - if ($encode) $value = urlencode($value); + if ($encode) { + $value = urlencode($value); + } $return = $this->_urlDelimiter . $value . $return; - $flag = true; + $flag = true; } } return trim($return, $this->_urlDelimiter); - } /** @@ -414,10 +450,12 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract * @param string $name Array key of the parameter * @return string Previously set default */ - public function getDefault($name) { + public function getDefault($name) + { if (isset($this->_defaults[$name])) { return $this->_defaults[$name]; } + return null; } @@ -426,7 +464,8 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract * * @return array Route defaults */ - public function getDefaults() { + public function getDefaults() + { return $this->_defaults; } @@ -482,17 +521,19 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract { if ($this->_translator !== null) { return $this->_translator; - } else if (($translator = self::getDefaultTranslator()) !== null) { - return $translator; } else { - try { - $translator = Zend_Registry::get('Zend_Translate'); - } catch (Zend_Exception $e) { - $translator = null; - } - - if ($translator instanceof Zend_Translate) { + if (($translator = self::getDefaultTranslator()) !== null) { return $translator; + } else { + try { + $translator = Zend_Registry::get('Zend_Translate'); + } catch (Zend_Exception $e) { + $translator = null; + } + + if ($translator instanceof Zend_Translate) { + return $translator; + } } } @@ -540,17 +581,19 @@ class Zend_Controller_Router_Route extends Zend_Controller_Router_Route_Abstract { if ($this->_locale !== null) { return $this->_locale; - } else if (($locale = self::getDefaultLocale()) !== null) { - return $locale; } else { - try { - $locale = Zend_Registry::get('Zend_Locale'); - } catch (Zend_Exception $e) { - $locale = null; - } - - if ($locale !== null) { + if (($locale = self::getDefaultLocale()) !== null) { return $locale; + } else { + try { + $locale = Zend_Registry::get('Zend_Locale'); + } catch (Zend_Exception $e) { + $locale = null; + } + + if ($locale !== null) { + return $locale; + } } } diff --git a/library/vendor/Zend/Controller/Router/Route/Abstract.php b/library/vendor/Zend/Controller/Router/Route/Abstract.php index f5dde64f8..7ec1e303d 100644 --- a/library/vendor/Zend/Controller/Router/Route/Abstract.php +++ b/library/vendor/Zend/Controller/Router/Route/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Controller_Router_Route_Abstract implements Zend_Controller_Router_Route_Interface @@ -40,7 +40,7 @@ abstract class Zend_Controller_Router_Route_Abstract implements Zend_Controller_ * URI delimiter */ const URI_DELIMITER = '/'; - + /** * Wether this route is abstract or not * @@ -116,5 +116,4 @@ abstract class Zend_Controller_Router_Route_Abstract implements Zend_Controller_ return $chain; } - } diff --git a/library/vendor/Zend/Controller/Router/Route/Chain.php b/library/vendor/Zend/Controller/Router/Route/Chain.php index cb115ab06..a4414bd88 100644 --- a/library/vendor/Zend/Controller/Router/Route/Chain.php +++ b/library/vendor/Zend/Controller/Router/Route/Chain.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,12 +27,24 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Abstract { + + /** + * Routes + * + * @var array + */ protected $_routes = array(); + + /** + * Separators + * + * @var array + */ protected $_separators = array(); /** @@ -44,6 +56,7 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab public static function getInstance(Zend_Config $config) { $defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array(); + return new self($config->route, $defs); } @@ -60,7 +73,6 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab $this->_separators[] = $separator; return $this; - } /** @@ -73,10 +85,10 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab */ public function match($request, $partial = null) { + $rawPath = $request->getPathInfo(); $path = trim($request->getPathInfo(), self::URI_DELIMITER); $subPath = $path; $values = array(); - $numRoutes = count($this->_routes); $matchedPath = null; foreach ($this->_routes as $key => $route) { @@ -88,12 +100,12 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab $separator = substr($subPath, 0, strlen($this->_separators[$key])); if ($separator !== $this->_separators[$key]) { + $request->setPathInfo($rawPath); return false; } $subPath = substr($subPath, strlen($separator)); } - // TODO: Should be an interface method. Hack for 1.0 BC if (!method_exists($route, 'getVersion') || $route->getVersion() == 1) { $match = $subPath; @@ -102,16 +114,17 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab $match = $request; } - $res = $route->match($match, true, ($key == $numRoutes - 1)); + $res = $route->match($match, true); + if ($res === false) { + $request->setPathInfo($rawPath); return false; } $matchedPath = $route->getMatchedPath(); if ($matchedPath !== null) { - $subPath = substr($subPath, strlen($matchedPath)); - $separator = substr($subPath, 0, strlen($this->_separators[$key])); + $subPath = substr($subPath, strlen($matchedPath)); } $values = $res + $values; @@ -174,7 +187,7 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab } } } - + /** * Return a single parameter of route's defaults * diff --git a/library/vendor/Zend/Controller/Router/Route/Hostname.php b/library/vendor/Zend/Controller/Router/Route/Hostname.php index 2884bc27f..b2be1c18d 100644 --- a/library/vendor/Zend/Controller/Router/Route/Hostname.php +++ b/library/vendor/Zend/Controller/Router/Route/Hostname.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,19 +27,37 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @see http://manuals.rubyonrails.com/read/chapter/65 */ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route_Abstract { - protected $_hostVariable = ':'; + /** + * Host variable + * + * @var string + */ + protected $_hostVariable = ':'; + + /** + * Regex delimiter + * + * @var string + */ protected $_regexDelimiter = '#'; - protected $_defaultRegex = null; + + /** + * Default regex string + * + * @var string|null + */ + protected $_defaultRegex = null; /** * Holds names of all route's pattern variable names. Array index holds a position in host. + * * @var array */ protected $_variables = array(); @@ -47,12 +65,14 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route /** * Holds Route patterns for all host parts. In case of a variable it stores it's regex * requirement or null. In case of a static part, it holds only it's direct value. + * * @var array */ protected $_parts = array(); /** * Holds user submitted default values for route's variables. Name and value pairs. + * * @var array */ protected $_defaults = array(); @@ -60,12 +80,14 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route /** * Holds user submitted regular expression patterns for route's variables' values. * Name and value pairs. + * * @var array */ protected $_requirements = array(); /** * Default scheme + * * @var string */ protected $_scheme = null; @@ -73,6 +95,7 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route /** * Associative array filled on match() that holds matched path values * for given variable names. + * * @var array */ protected $_values = array(); @@ -87,6 +110,7 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route /** * Helper var that holds a count of route pattern's static parts * for validation + * * @var int */ private $_staticCount = 0; @@ -95,7 +119,6 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route * Set the request object * * @param Zend_Controller_Request_Abstract|null $request - * @return void */ public function setRequest(Zend_Controller_Request_Abstract $request = null) { @@ -120,12 +143,14 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route * Instantiates route based on passed Zend_Config structure * * @param Zend_Config $config Configuration object + * @return Zend_Controller_Router_Route_Hostname */ public static function getInstance(Zend_Config $config) { $reqs = ($config->reqs instanceof Zend_Config) ? $config->reqs->toArray() : array(); $defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array(); $scheme = (isset($config->scheme)) ? $config->scheme : null; + return new self($config->route, $defs, $reqs, $scheme); } @@ -134,9 +159,9 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route * to a corresponding atomic parts. These parts are assigned * a position which is later used for matching and preparing values. * - * @param string $route Map used to match with later submitted hostname + * @param string $route Map used to match with later submitted hostname * @param array $defaults Defaults for map variables with keys as variable names - * @param array $reqs Regular expression requirements for variables (keys as variable names) + * @param array $reqs Regular expression requirements for variables (keys as variable names) * @param string $scheme */ public function __construct($route, $defaults = array(), $reqs = array(), $scheme = null) @@ -149,8 +174,8 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route if ($route != '') { foreach (explode('.', $route) as $pos => $part) { if (substr($part, 0, 1) == $this->_hostVariable) { - $name = substr($part, 1); - $this->_parts[$pos] = (isset($reqs[$name]) ? $reqs[$name] : $this->_defaultRegex); + $name = substr($part, 1); + $this->_parts[$pos] = (isset($reqs[$name]) ? $reqs[$name] : $this->_defaultRegex); $this->_variables[$pos] = $name; } else { $this->_parts[$pos] = $part; @@ -185,7 +210,7 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route } $hostStaticCount = 0; - $values = array(); + $values = array(); $host = trim($host, '.'); @@ -198,7 +223,7 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route return false; } - $name = isset($this->_variables[$pos]) ? $this->_variables[$pos] : null; + $name = isset($this->_variables[$pos]) ? $this->_variables[$pos] : null; $hostPart = urldecode($hostPart); // If it's a static part, match directly @@ -207,7 +232,12 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route } // If it's a variable with requirement, match a regex. If not - everything matches - if ($this->_parts[$pos] !== null && !preg_match($this->_regexDelimiter . '^' . $this->_parts[$pos] . '$' . $this->_regexDelimiter . 'iu', $hostPart)) { + if ($this->_parts[$pos] !== null + && !preg_match( + $this->_regexDelimiter . '^' . $this->_parts[$pos] . '$' . $this->_regexDelimiter . 'iu', + $hostPart + ) + ) { return false; } @@ -237,14 +267,16 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route $this->_values = $values; return $return; - } /** * Assembles user submitted parameters forming a hostname defined by this route * - * @param array $data An array of variable and value pairs used as parameters + * @param array $data An array of variable and value pairs used as parameters * @param boolean $reset Whether or not to set route defaults with those provided in $data + * @param boolean $encode + * @param boolean $partial + * @throws Zend_Controller_Router_Exception * @return string Route path with user submitted parameters */ public function assemble($data = array(), $reset = false, $encode = false, $partial = false) @@ -279,10 +311,14 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route $return = ''; foreach (array_reverse($host, true) as $key => $value) { - if ($flag || !isset($this->_variables[$key]) || $value !== $this->getDefault($this->_variables[$key]) || $partial) { - if ($encode) $value = urlencode($value); + if ($flag || !isset($this->_variables[$key]) || $value !== $this->getDefault($this->_variables[$key]) + || $partial + ) { + if ($encode) { + $value = urlencode($value); + } $return = '.' . $value . $return; - $flag = true; + $flag = true; } } @@ -299,7 +335,7 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route } } - $url = $scheme . '://' . $url; + $url = $scheme . '://' . $url; return $url; } @@ -310,10 +346,12 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route * @param string $name Array key of the parameter * @return string Previously set default */ - public function getDefault($name) { + public function getDefault($name) + { if (isset($this->_defaults[$name])) { return $this->_defaults[$name]; } + return null; } @@ -322,7 +360,8 @@ class Zend_Controller_Router_Route_Hostname extends Zend_Controller_Router_Route * * @return array Route defaults */ - public function getDefaults() { + public function getDefaults() + { return $this->_defaults; } diff --git a/library/vendor/Zend/Controller/Router/Route/Interface.php b/library/vendor/Zend/Controller/Router/Route/Interface.php index cc2117fed..6a14f9d84 100644 --- a/library/vendor/Zend/Controller/Router/Route/Interface.php +++ b/library/vendor/Zend/Controller/Router/Route/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,12 +25,14 @@ /** * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -interface Zend_Controller_Router_Route_Interface { +interface Zend_Controller_Router_Route_Interface +{ public function match($path); - public function assemble($data = array(), $reset = false, $encode = false); - public static function getInstance(Zend_Config $config); -} + public function assemble($data = array(), $reset = false, $encode = false); + + public static function getInstance(Zend_Config $config); +} \ No newline at end of file diff --git a/library/vendor/Zend/Controller/Router/Route/Module.php b/library/vendor/Zend/Controller/Router/Route/Module.php index 3ae0dec02..222749567 100644 --- a/library/vendor/Zend/Controller/Router/Route/Module.php +++ b/library/vendor/Zend/Controller/Router/Route/Module.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,24 +29,40 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @see http://manuals.rubyonrails.com/read/chapter/65 */ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_Abstract { + /** * Default values for the route (ie. module, controller, action, params) + * * @var array */ protected $_defaults; - protected $_values = array(); + /** + * Default values for the route (ie. module, controller, action, params) + * + * @var array + */ + protected $_values = array(); + + /** + * @var boolean + */ protected $_moduleValid = false; - protected $_keysSet = false; + + /** + * @var boolean + */ + protected $_keysSet = false; /**#@+ * Array keys to use for module, controller, and action. Should be taken out of request. + * * @var string */ protected $_moduleKey = 'module'; @@ -64,12 +80,21 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A */ protected $_request; - public function getVersion() { + /** + * Get the version of the route + * + * @return int + */ + public function getVersion() + { return 1; } /** * Instantiates route based on passed Zend_Config structure + * + * @param Zend_Config $config + * @return Zend_Controller_Router_Route_Module */ public static function getInstance(Zend_Config $config) { @@ -85,13 +110,15 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A /** * Constructor * - * @param array $defaults Defaults for map variables with keys as variable names + * @param array $defaults Defaults for map variables with keys as variable names * @param Zend_Controller_Dispatcher_Interface $dispatcher Dispatcher object - * @param Zend_Controller_Request_Abstract $request Request object + * @param Zend_Controller_Request_Abstract $request Request object */ - public function __construct(array $defaults = array(), - Zend_Controller_Dispatcher_Interface $dispatcher = null, - Zend_Controller_Request_Abstract $request = null) + public function __construct( + array $defaults = array(), + Zend_Controller_Dispatcher_Interface $dispatcher = null, + Zend_Controller_Request_Abstract $request = null + ) { $this->_defaults = $defaults; @@ -136,7 +163,8 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A * setControllerName(), and setActionName() accessors to set those values. * Always returns the values as an array. * - * @param string $path Path used to match against this routing map + * @param string $path Path used to match against this routing map + * @param boolean $partial * @return array An array of assigned values or a false on a mismatch */ public function match($path, $partial = false) @@ -157,7 +185,7 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A if ($this->_dispatcher && $this->_dispatcher->isValidModule($path[0])) { $values[$this->_moduleKey] = array_shift($path); - $this->_moduleValid = true; + $this->_moduleValid = true; } if (count($path) && !empty($path[0])) { @@ -170,9 +198,9 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A if ($numSegs = count($path)) { for ($i = 0; $i < $numSegs; $i = $i + 2) { - $key = urldecode($path[$i]); - $val = isset($path[$i + 1]) ? urldecode($path[$i + 1]) : null; - $params[$key] = (isset($params[$key]) ? (array_merge((array) $params[$key], array($val))): $val); + $key = urldecode($path[$i]); + $val = isset($path[$i + 1]) ? urldecode($path[$i + 1]) : null; + $params[$key] = (isset($params[$key]) ? (array_merge((array)$params[$key], array($val))) : $val); } } } @@ -189,8 +217,10 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A /** * Assembles user submitted parameters forming a URL path defined by this route * - * @param array $data An array of variable and value pairs used as parameters - * @param bool $reset Weither to reset the current params + * @param array $data An array of variable and value pairs used as parameters + * @param boolean $reset Weither to reset the current params + * @param boolean $encode + * @param boolean $partial * @return string Route path with user submitted parameters */ public function assemble($data = array(), $reset = false, $encode = true, $partial = false) @@ -235,24 +265,32 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A $url .= self::URI_DELIMITER . $arrayValue; } } else { - if ($encode) $value = urlencode($value); + if ($encode) { + $value = urlencode($value); + } $url .= self::URI_DELIMITER . $key; $url .= self::URI_DELIMITER . $value; } } if (!empty($url) || $action !== $this->_defaults[$this->_actionKey]) { - if ($encode) $action = urlencode($action); + if ($encode) { + $action = urlencode($action); + } $url = self::URI_DELIMITER . $action . $url; } if (!empty($url) || $controller !== $this->_defaults[$this->_controllerKey]) { - if ($encode) $controller = urlencode($controller); + if ($encode) { + $controller = urlencode($controller); + } $url = self::URI_DELIMITER . $controller . $url; } if (isset($module)) { - if ($encode) $module = urlencode($module); + if ($encode) { + $module = urlencode($module); + } $url = self::URI_DELIMITER . $module . $url; } @@ -265,7 +303,8 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A * @param string $name Array key of the parameter * @return string Previously set default */ - public function getDefault($name) { + public function getDefault($name) + { if (isset($this->_defaults[$name])) { return $this->_defaults[$name]; } @@ -276,8 +315,8 @@ class Zend_Controller_Router_Route_Module extends Zend_Controller_Router_Route_A * * @return array Route defaults */ - public function getDefaults() { + public function getDefaults() + { return $this->_defaults; } - } diff --git a/library/vendor/Zend/Controller/Router/Route/Regex.php b/library/vendor/Zend/Controller/Router/Route/Regex.php index ec3dfcee9..8dea1c06c 100644 --- a/library/vendor/Zend/Controller/Router/Route/Regex.php +++ b/library/vendor/Zend/Controller/Router/Route/Regex.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,30 +27,70 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Abstract { + + /** + * Regex string + * + * @var string|null + */ protected $_regex = null; + + /** + * Default values for the route (ie. module, controller, action, params) + * + * @var array + */ protected $_defaults = array(); + + /** + * Reverse + * + * @var string|null + */ protected $_reverse = null; + + /** + * Map + * + * @var array + */ protected $_map = array(); + + /** + * Values + * + * @var array + */ protected $_values = array(); /** * Instantiates route based on passed Zend_Config structure * * @param Zend_Config $config Configuration object + * @return Zend_Controller_Router_Route_Regex */ public static function getInstance(Zend_Config $config) { - $defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array(); - $map = ($config->map instanceof Zend_Config) ? $config->map->toArray() : array(); + $defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array(); + $map = ($config->map instanceof Zend_Config) ? $config->map->toArray() : array(); $reverse = (isset($config->reverse)) ? $config->reverse : null; + return new self($config->route, $defs, $map, $reverse); } + /** + * Constructor + * + * @param $route + * @param array $defaults + * @param array $map + * @param null $reverse + */ public function __construct($route, $defaults = array(), $map = array(), $reverse = null) { $this->_regex = $route; @@ -59,7 +99,13 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab $this->_reverse = $reverse; } - public function getVersion() { + /** + * Get the version of the route + * + * @return int + */ + public function getVersion() + { return 1; } @@ -73,7 +119,7 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab public function match($path, $partial = false) { if (!$partial) { - $path = trim(urldecode($path), self::URI_DELIMITER); + $path = trim(urldecode($path), self::URI_DELIMITER); $regex = '#^' . $this->_regex . '$#i'; } else { $regex = '#^' . $this->_regex . '#i'; @@ -114,7 +160,7 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab * indexed numerically then every associative key will be stripped. Vice versa if reversed * is set to true. * - * @param array $values Indexed or associative array of values to map + * @param array $values Indexed or associative array of values to map * @param boolean $reversed False means translation of index to association. True means reverse. * @param boolean $preserve Should wrong type of keys be preserved or stripped. * @return array An array of mapped values @@ -158,7 +204,11 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab /** * Assembles a URL path defined by this route * - * @param array $data An array of name (or index) and value pairs used as parameters + * @param array $data An array of name (or index) and value pairs used as parameters + * @param boolean $reset + * @param boolean $encode + * @param boolean $partial + * @throws Zend_Controller_Router_Exception * @return string Route path with user submitted parameters */ public function assemble($data = array(), $reset = false, $encode = false, $partial = false) @@ -167,13 +217,13 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab throw new Zend_Controller_Router_Exception('Cannot assemble. Reversed route is not specified.'); } - $defaultValuesMapped = $this->_getMappedValues($this->_defaults, true, false); - $matchedValuesMapped = $this->_getMappedValues($this->_values, true, false); - $dataValuesMapped = $this->_getMappedValues($data, true, false); + $defaultValuesMapped = $this->_getMappedValues($this->_defaults, true, false); + $matchedValuesMapped = $this->_getMappedValues($this->_values, true, false); + $dataValuesMapped = $this->_getMappedValues($data, true, false); // handle resets, if so requested (By null value) to do so if (($resetKeys = array_search(null, $dataValuesMapped, true)) !== false) { - foreach ((array) $resetKeys as $resetKey) { + foreach ((array)$resetKeys as $resetKey) { if (isset($matchedValuesMapped[$resetKey])) { unset($matchedValuesMapped[$resetKey]); unset($dataValuesMapped[$resetKey]); @@ -201,7 +251,6 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab } return $return; - } /** @@ -210,7 +259,8 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab * @param string $name Array key of the parameter * @return string Previously set default */ - public function getDefault($name) { + public function getDefault($name) + { if (isset($this->_defaults[$name])) { return $this->_defaults[$name]; } @@ -221,7 +271,8 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab * * @return array Route defaults */ - public function getDefaults() { + public function getDefaults() + { return $this->_defaults; } @@ -259,8 +310,7 @@ class Zend_Controller_Router_Route_Regex extends Zend_Controller_Router_Route_Ab foreach ($array2 as $array2Index => $array2Value) { $returnArray[$array2Index] = $array2Value; } + return $returnArray; } - - } diff --git a/library/vendor/Zend/Controller/Router/Route/Static.php b/library/vendor/Zend/Controller/Router/Route/Static.php index 1bab7252e..86363dad2 100644 --- a/library/vendor/Zend/Controller/Router/Route/Static.php +++ b/library/vendor/Zend/Controller/Router/Route/Static.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,16 +29,33 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Router_Route_Static extends Zend_Controller_Router_Route_Abstract { + /** + * Route + * + * @var string|null + */ protected $_route = null; + + /** + * Default values for the route (ie. module, controller, action, params) + * + * @var array + */ protected $_defaults = array(); - public function getVersion() { + /** + * Get the version of the route + * + * @return int + */ + public function getVersion() + { return 1; } @@ -46,22 +63,24 @@ class Zend_Controller_Router_Route_Static extends Zend_Controller_Router_Route_A * Instantiates route based on passed Zend_Config structure * * @param Zend_Config $config Configuration object + * @return Zend_Controller_Router_Route_Static */ public static function getInstance(Zend_Config $config) { $defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array(); + return new self($config->route, $defs); } /** * Prepares the route for mapping. * - * @param string $route Map used to match with later submitted URL path - * @param array $defaults Defaults for map variables with keys as variable names + * @param string $route Map used to match with later submitted URL path + * @param array $defaults Defaults for map variables with keys as variable names */ public function __construct($route, $defaults = array()) { - $this->_route = trim($route, self::URI_DELIMITER); + $this->_route = trim($route, self::URI_DELIMITER); $this->_defaults = (array) $defaults; } @@ -79,6 +98,7 @@ class Zend_Controller_Router_Route_Static extends Zend_Controller_Router_Route_A || (substr($path, 0, strlen($this->_route)) === $this->_route) ) { $this->setMatchedPath($this->_route); + return $this->_defaults; } } else { @@ -107,10 +127,12 @@ class Zend_Controller_Router_Route_Static extends Zend_Controller_Router_Route_A * @param string $name Array key of the parameter * @return string Previously set default */ - public function getDefault($name) { + public function getDefault($name) + { if (isset($this->_defaults[$name])) { return $this->_defaults[$name]; } + return null; } @@ -119,8 +141,8 @@ class Zend_Controller_Router_Route_Static extends Zend_Controller_Router_Route_A * * @return array Route defaults */ - public function getDefaults() { + public function getDefaults() + { return $this->_defaults; } - } diff --git a/library/vendor/Zend/Crypt.php b/library/vendor/Zend/Crypt.php index 6ad56b7d6..391a5fa87 100644 --- a/library/vendor/Zend/Crypt.php +++ b/library/vendor/Zend/Crypt.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt diff --git a/library/vendor/Zend/Crypt/DiffieHellman.php b/library/vendor/Zend/Crypt/DiffieHellman.php index 3c53c68e7..851f87154 100644 --- a/library/vendor/Zend/Crypt/DiffieHellman.php +++ b/library/vendor/Zend/Crypt/DiffieHellman.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage DiffieHellman - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_DiffieHellman diff --git a/library/vendor/Zend/Crypt/DiffieHellman/Exception.php b/library/vendor/Zend/Crypt/DiffieHellman/Exception.php index 1a9f4a524..7a84526b5 100644 --- a/library/vendor/Zend/Crypt/DiffieHellman/Exception.php +++ b/library/vendor/Zend/Crypt/DiffieHellman/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage DiffieHellman - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_DiffieHellman_Exception extends Zend_Crypt_Exception diff --git a/library/vendor/Zend/Crypt/Exception.php b/library/vendor/Zend/Crypt/Exception.php index 5a5c8624d..826f9f130 100644 --- a/library/vendor/Zend/Crypt/Exception.php +++ b/library/vendor/Zend/Crypt/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Crypt/Hmac.php b/library/vendor/Zend/Crypt/Hmac.php index 9d9ecea47..bd8814dc4 100644 --- a/library/vendor/Zend/Crypt/Hmac.php +++ b/library/vendor/Zend/Crypt/Hmac.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Hmac - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @todo Check if mhash() is a required alternative (will be PECL-only soon) * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Hmac extends Zend_Crypt diff --git a/library/vendor/Zend/Crypt/Hmac/Exception.php b/library/vendor/Zend/Crypt/Hmac/Exception.php index a3d2efcbd..9f266e0eb 100644 --- a/library/vendor/Zend/Crypt/Hmac/Exception.php +++ b/library/vendor/Zend/Crypt/Hmac/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Hmac - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Hmac_Exception extends Zend_Crypt_Exception diff --git a/library/vendor/Zend/Crypt/Math.php b/library/vendor/Zend/Crypt/Math.php index 783e48242..3632ce07d 100644 --- a/library/vendor/Zend/Crypt/Math.php +++ b/library/vendor/Zend/Crypt/Math.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Math - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Math extends Zend_Crypt_Math_BigInteger diff --git a/library/vendor/Zend/Crypt/Math/BigInteger.php b/library/vendor/Zend/Crypt/Math/BigInteger.php index 9af7f1822..1117df765 100644 --- a/library/vendor/Zend/Crypt/Math/BigInteger.php +++ b/library/vendor/Zend/Crypt/Math/BigInteger.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Math - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Math_BigInteger diff --git a/library/vendor/Zend/Crypt/Math/BigInteger/Bcmath.php b/library/vendor/Zend/Crypt/Math/BigInteger/Bcmath.php index 2d6def83c..2fb4a67cc 100644 --- a/library/vendor/Zend/Crypt/Math/BigInteger/Bcmath.php +++ b/library/vendor/Zend/Crypt/Math/BigInteger/Bcmath.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Math - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Math_BigInteger_Bcmath implements Zend_Crypt_Math_BigInteger_Interface diff --git a/library/vendor/Zend/Crypt/Math/BigInteger/Exception.php b/library/vendor/Zend/Crypt/Math/BigInteger/Exception.php index f5db754a8..c1c865db8 100644 --- a/library/vendor/Zend/Crypt/Math/BigInteger/Exception.php +++ b/library/vendor/Zend/Crypt/Math/BigInteger/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Math - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Math_BigInteger_Exception extends Zend_Crypt_Math_Exception diff --git a/library/vendor/Zend/Crypt/Math/BigInteger/Gmp.php b/library/vendor/Zend/Crypt/Math/BigInteger/Gmp.php index 4d7488f6a..1912be7e6 100644 --- a/library/vendor/Zend/Crypt/Math/BigInteger/Gmp.php +++ b/library/vendor/Zend/Crypt/Math/BigInteger/Gmp.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Math - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Math_BigInteger_Gmp implements Zend_Crypt_Math_BigInteger_Interface diff --git a/library/vendor/Zend/Crypt/Math/BigInteger/Interface.php b/library/vendor/Zend/Crypt/Math/BigInteger/Interface.php index 02a830eb7..9fa92815e 100644 --- a/library/vendor/Zend/Crypt/Math/BigInteger/Interface.php +++ b/library/vendor/Zend/Crypt/Math/BigInteger/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Math - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Crypt_Math_BigInteger_Interface diff --git a/library/vendor/Zend/Crypt/Math/Exception.php b/library/vendor/Zend/Crypt/Math/Exception.php index 1ec8a7a79..066da033d 100644 --- a/library/vendor/Zend/Crypt/Math/Exception.php +++ b/library/vendor/Zend/Crypt/Math/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Math - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Math_Exception extends Zend_Crypt_Exception diff --git a/library/vendor/Zend/Crypt/Rsa.php b/library/vendor/Zend/Crypt/Rsa.php index 1eb9d7c6a..2523bbf8d 100644 --- a/library/vendor/Zend/Crypt/Rsa.php +++ b/library/vendor/Zend/Crypt/Rsa.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Rsa - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Rsa diff --git a/library/vendor/Zend/Crypt/Rsa/Exception.php b/library/vendor/Zend/Crypt/Rsa/Exception.php index a0f1fbb03..3b3944f3b 100644 --- a/library/vendor/Zend/Crypt/Rsa/Exception.php +++ b/library/vendor/Zend/Crypt/Rsa/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Math - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Rsa_Exception extends Zend_Crypt_Exception diff --git a/library/vendor/Zend/Crypt/Rsa/Key.php b/library/vendor/Zend/Crypt/Rsa/Key.php index f558ff637..cfd9d15fd 100644 --- a/library/vendor/Zend/Crypt/Rsa/Key.php +++ b/library/vendor/Zend/Crypt/Rsa/Key.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Rsa - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Rsa_Key implements Countable diff --git a/library/vendor/Zend/Crypt/Rsa/Key/Private.php b/library/vendor/Zend/Crypt/Rsa/Key/Private.php index 47b7a8773..b736b58a4 100644 --- a/library/vendor/Zend/Crypt/Rsa/Key/Private.php +++ b/library/vendor/Zend/Crypt/Rsa/Key/Private.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Rsa - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Rsa_Key_Private extends Zend_Crypt_Rsa_Key diff --git a/library/vendor/Zend/Crypt/Rsa/Key/Public.php b/library/vendor/Zend/Crypt/Rsa/Key/Public.php index 439787a07..85b2eb642 100644 --- a/library/vendor/Zend/Crypt/Rsa/Key/Public.php +++ b/library/vendor/Zend/Crypt/Rsa/Key/Public.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Crypt * @subpackage Rsa - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Crypt_Rsa_Key_Public extends Zend_Crypt_Rsa_Key diff --git a/library/vendor/Zend/Currency.php b/library/vendor/Zend/Currency.php index 15f26a70c..25d12dce1 100644 --- a/library/vendor/Zend/Currency.php +++ b/library/vendor/Zend/Currency.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Currency - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Currency - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Currency diff --git a/library/vendor/Zend/Currency/CurrencyInterface.php b/library/vendor/Zend/Currency/CurrencyInterface.php index 9d14e266c..8e828864b 100644 --- a/library/vendor/Zend/Currency/CurrencyInterface.php +++ b/library/vendor/Zend/Currency/CurrencyInterface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Currency - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Currency - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Currency_CurrencyInterface diff --git a/library/vendor/Zend/Currency/Exception.php b/library/vendor/Zend/Currency/Exception.php index 0694646e0..75d48dab5 100644 --- a/library/vendor/Zend/Currency/Exception.php +++ b/library/vendor/Zend/Currency/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Currency - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Currency - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Currency_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Date.php b/library/vendor/Zend/Date.php index b21a6c5ed..6223f36a0 100644 --- a/library/vendor/Zend/Date.php +++ b/library/vendor/Zend/Date.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Date - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Date - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Date extends Zend_Date_DateObject @@ -343,7 +343,7 @@ class Zend_Date extends Zend_Date_DateObject * Sets a new timestamp * * @param integer|string|array|Zend_Date $timestamp Timestamp to set - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setTimestamp($timestamp) @@ -355,7 +355,7 @@ class Zend_Date extends Zend_Date_DateObject * Adds a timestamp * * @param integer|string|array|Zend_Date $timestamp Timestamp to add - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addTimestamp($timestamp) @@ -367,7 +367,7 @@ class Zend_Date extends Zend_Date_DateObject * Subtracts a timestamp * * @param integer|string|array|Zend_Date $timestamp Timestamp to sub - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subTimestamp($timestamp) @@ -1051,7 +1051,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $date Date or datepart to set * @param string $part OPTIONAL Part of the date to set, if null the timestamp is set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function set($date, $part = null, $locale = null) @@ -1079,7 +1079,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $date Date or datepart to add * @param string $part OPTIONAL Part of the date to add, if null the timestamp is added * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function add($date, $part = self::TIMESTAMP, $locale = null) @@ -1102,7 +1102,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $date Date or datepart to subtract * @param string $part OPTIONAL Part of the date to sub, if null the timestamp is subtracted * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function sub($date, $part = self::TIMESTAMP, $locale = null) @@ -2017,9 +2017,18 @@ class Zend_Date extends Zend_Date_DateObject } // (T)hh:mm:ss preg_match('/[T,\s]{0,1}(\d{2}):(\d{2}):(\d{2})/', $tmpdate, $timematch); + // (T)hhmmss if (empty($timematch)) { preg_match('/[T,\s]{0,1}(\d{2})(\d{2})(\d{2})/', $tmpdate, $timematch); } + // (T)hh:mm + if (empty($timematch)) { + preg_match('/[T,\s]{0,1}(\d{2}):(\d{2})/', $tmpdate, $timematch); + } + // (T)hhmm + if (empty($timematch)) { + preg_match('/[T,\s]{0,1}(\d{2})(\d{2})/', $tmpdate, $timematch); + } if (empty($datematch) and empty($timematch)) { throw new Zend_Date_Exception("unsupported ISO8601 format ($date)", 0, null, $date); } @@ -2042,6 +2051,9 @@ class Zend_Date extends Zend_Date_DateObject $timematch[2] = 0; $timematch[3] = 0; } + if (!isset($timematch[3])) { + $timematch[3] = 0; + } if (($calc == 'set') || ($calc == 'cmp')) { --$datematch[2]; @@ -2756,7 +2768,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $time Time to set * @param string $format OPTIONAL Timeformat for parsing input * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setTime($time, $format = null, $locale = null) @@ -2774,7 +2786,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $time Time to add * @param string $format OPTIONAL Timeformat for parsing input * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addTime($time, $format = null, $locale = null) @@ -2792,7 +2804,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $time Time to sub * @param string $format OPTIONAL Timeformat for parsing input * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid inteface + * @return Zend_Date Provides a fluent inteface * @throws Zend_Date_Exception */ public function subTime($time, $format = null, $locale = null) @@ -2915,7 +2927,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $date Date to set * @param string $format OPTIONAL Date format for parsing * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setDate($date, $format = null, $locale = null) @@ -2933,7 +2945,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $date Date to add * @param string $format OPTIONAL Date format for parsing input * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addDate($date, $format = null, $locale = null) @@ -2952,7 +2964,7 @@ class Zend_Date extends Zend_Date_DateObject * @param string|integer|array|Zend_Date $date Date to sub * @param string $format OPTIONAL Date format for parsing input * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subDate($date, $format = null, $locale = null) @@ -3003,7 +3015,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|Zend_Date $date ISO Date to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setIso($date, $locale = null) @@ -3020,7 +3032,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|Zend_Date $date ISO Date to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addIso($date, $locale = null) @@ -3037,7 +3049,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|Zend_Date $date ISO Date to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subIso($date, $locale = null) @@ -3090,7 +3102,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|Zend_Date $date RFC 822 to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setArpa($date, $locale = null) @@ -3108,7 +3120,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|Zend_Date $date RFC 822 Date to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addArpa($date, $locale = null) @@ -3126,7 +3138,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|Zend_Date $date RFC 822 Date to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subArpa($date, $locale = null) @@ -3470,7 +3482,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $year Year to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setYear($year, $locale = null) @@ -3489,7 +3501,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $year Year to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addYear($year, $locale = null) @@ -3508,7 +3520,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $year Year to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subYear($year, $locale = null) @@ -3629,7 +3641,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $month Month to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setMonth($month, $locale = null) @@ -3648,7 +3660,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $month Month to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addMonth($month, $locale = null) @@ -3667,7 +3679,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $month Month to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subMonth($month, $locale = null) @@ -3771,7 +3783,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $day Day to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setDay($day, $locale = null) @@ -3789,7 +3801,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $day Day to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addDay($day, $locale = null) @@ -3807,7 +3819,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $day Day to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subDay($day, $locale = null) @@ -3917,7 +3929,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $weekday Weekday to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setWeekday($weekday, $locale = null) @@ -3937,7 +3949,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $weekday Weekday to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addWeekday($weekday, $locale = null) @@ -3957,7 +3969,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $weekday Weekday to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subWeekday($weekday, $locale = null) @@ -4009,7 +4021,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $day Day of Year to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setDayOfYear($day, $locale = null) @@ -4026,7 +4038,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $day Day of Year to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addDayOfYear($day, $locale = null) @@ -4043,7 +4055,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $day Day of Year to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subDayOfYear($day, $locale = null) @@ -4089,7 +4101,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $hour Hour to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setHour($hour, $locale = null) @@ -4106,7 +4118,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $hour Hour to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addHour($hour, $locale = null) @@ -4123,7 +4135,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $hour Hour to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subHour($hour, $locale = null) @@ -4175,7 +4187,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $minute Minute to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setMinute($minute, $locale = null) @@ -4192,7 +4204,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $minute Minute to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addMinute($minute, $locale = null) @@ -4209,7 +4221,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $minute Minute to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subMinute($minute, $locale = null) @@ -4261,7 +4273,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $second Second to set * @param string|Zend_Locale $locale (Optional) Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setSecond($second, $locale = null) @@ -4278,7 +4290,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $second Second to add * @param string|Zend_Locale $locale (Optional) Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addSecond($second, $locale = null) @@ -4295,7 +4307,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $second Second to sub * @param string|Zend_Locale $locale (Optional) Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subSecond($second, $locale = null) @@ -4336,7 +4348,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param integer $precision Precision for the fractional datepart 3 = milliseconds * @throws Zend_Date_Exception - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface */ public function setFractionalPrecision($precision) { @@ -4372,7 +4384,7 @@ class Zend_Date extends Zend_Date_DateObject * @param integer|Zend_Date $milli (Optional) Millisecond to set, when null the actual millisecond is set * @param integer $precision (Optional) Fraction precision of the given milliseconds * @throws Zend_Date_Exception - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface */ public function setMilliSecond($milli = null, $precision = null) { @@ -4403,7 +4415,7 @@ class Zend_Date extends Zend_Date_DateObject * @param integer|Zend_Date $milli (Optional) Millisecond to add, when null the actual millisecond is added * @param integer $precision (Optional) Fractional precision for the given milliseconds * @throws Zend_Date_Exception - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface */ public function addMilliSecond($milli = null, $precision = null) { @@ -4466,7 +4478,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param integer|Zend_Date $milli (Optional) Millisecond to sub, when null the actual millisecond is subtracted * @param integer $precision (Optional) Fractional precision for the given milliseconds - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface */ public function subMilliSecond($milli = null, $precision = null) { @@ -4545,7 +4557,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $week Week to set * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function setWeek($week, $locale = null) @@ -4560,7 +4572,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $week Week to add * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function addWeek($week, $locale = null) @@ -4575,7 +4587,7 @@ class Zend_Date extends Zend_Date_DateObject * * @param string|integer|array|Zend_Date $week Week to sub * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input - * @return Zend_Date Provides fluid interface + * @return Zend_Date Provides a fluent interface * @throws Zend_Date_Exception */ public function subWeek($week, $locale = null) diff --git a/library/vendor/Zend/Date/Cities.php b/library/vendor/Zend/Date/Cities.php index b5e737eb7..7b5f59a2e 100644 --- a/library/vendor/Zend/Date/Cities.php +++ b/library/vendor/Zend/Date/Cities.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Date - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Date * @subpackage Zend_Date_Cities - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Date_Cities diff --git a/library/vendor/Zend/Date/DateObject.php b/library/vendor/Zend/Date/DateObject.php index 984d11fb2..5c01d1544 100644 --- a/library/vendor/Zend/Date/DateObject.php +++ b/library/vendor/Zend/Date/DateObject.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Date - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * @category Zend * @package Zend_Date * @subpackage Zend_Date_DateObject - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Date_DateObject { @@ -317,7 +317,7 @@ abstract class Zend_Date_DateObject { // standard). However, this is not desired, so replacing // all occurrences of "o" not preceded by a backslash // with "Y" - $format = preg_replace('/(?quote($value, $type), $text); } else { - while ($count > 0) { - if (strpos($text, '?') !== false) { - $text = substr_replace($text, $this->quote($value, $type), strpos($text, '?'), 1); - } - --$count; - } - return $text; + return implode($this->quote($value, $type), explode('?', $text, $count + 1)); } } diff --git a/library/vendor/Zend/Db/Adapter/Db2.php b/library/vendor/Zend/Db/Adapter/Db2.php new file mode 100644 index 000000000..28793d100 --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Db2.php @@ -0,0 +1,827 @@ + (string) Connect to the database as this username. + * password => (string) Password associated with the username. + * host => (string) What host to connect to (default 127.0.0.1) + * dbname => (string) The name of the database to user + * protocol => (string) Protocol to use, defaults to "TCPIP" + * port => (integer) Port number to use for TCP/IP if protocol is "TCPIP" + * persistent => (boolean) Set TRUE to use a persistent connection (db2_pconnect) + * os => (string) This should be set to 'i5' if the db is on an os400/i5 + * schema => (string) The default schema the connection should use + * + * @var array + */ + protected $_config = array( + 'dbname' => null, + 'username' => null, + 'password' => null, + 'host' => 'localhost', + 'port' => '50000', + 'protocol' => 'TCPIP', + 'persistent' => false, + 'os' => null, + 'schema' => null + ); + + /** + * Execution mode + * + * @var int execution flag (DB2_AUTOCOMMIT_ON or DB2_AUTOCOMMIT_OFF) + */ + protected $_execute_mode = DB2_AUTOCOMMIT_ON; + + /** + * Default class name for a DB statement. + * + * @var string + */ + protected $_defaultStmtClass = 'Zend_Db_Statement_Db2'; + protected $_isI5 = false; + + /** + * Keys are UPPERCASE SQL datatypes or the constants + * Zend_Db::INT_TYPE, Zend_Db::BIGINT_TYPE, or Zend_Db::FLOAT_TYPE. + * + * Values are: + * 0 = 32-bit integer + * 1 = 64-bit integer + * 2 = float or decimal + * + * @var array Associative array of datatypes to values 0, 1, or 2. + */ + protected $_numericDataTypes = array( + Zend_Db::INT_TYPE => Zend_Db::INT_TYPE, + Zend_Db::BIGINT_TYPE => Zend_Db::BIGINT_TYPE, + Zend_Db::FLOAT_TYPE => Zend_Db::FLOAT_TYPE, + 'INTEGER' => Zend_Db::INT_TYPE, + 'SMALLINT' => Zend_Db::INT_TYPE, + 'BIGINT' => Zend_Db::BIGINT_TYPE, + 'DECIMAL' => Zend_Db::FLOAT_TYPE, + 'NUMERIC' => Zend_Db::FLOAT_TYPE + ); + + /** + * Creates a connection resource. + * + * @return void + */ + protected function _connect() + { + if (is_resource($this->_connection)) { + // connection already exists + return; + } + + if (!extension_loaded('ibm_db2')) { + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception('The IBM DB2 extension is required for this adapter but the extension is not loaded'); + } + + $this->_determineI5(); + if ($this->_config['persistent']) { + // use persistent connection + $conn_func_name = 'db2_pconnect'; + } else { + // use "normal" connection + $conn_func_name = 'db2_connect'; + } + + if (!isset($this->_config['driver_options']['autocommit'])) { + // set execution mode + $this->_config['driver_options']['autocommit'] = &$this->_execute_mode; + } + + if (isset($this->_config['options'][Zend_Db::CASE_FOLDING])) { + $caseAttrMap = array( + Zend_Db::CASE_NATURAL => DB2_CASE_NATURAL, + Zend_Db::CASE_UPPER => DB2_CASE_UPPER, + Zend_Db::CASE_LOWER => DB2_CASE_LOWER + ); + $this->_config['driver_options']['DB2_ATTR_CASE'] = $caseAttrMap[$this->_config['options'][Zend_Db::CASE_FOLDING]]; + } + + if ($this->_isI5 && isset($this->_config['driver_options']['i5_naming'])) { + if ($this->_config['driver_options']['i5_naming']) { + $this->_config['driver_options']['i5_naming'] = DB2_I5_NAMING_ON; + } else { + $this->_config['driver_options']['i5_naming'] = DB2_I5_NAMING_OFF; + } + } + + if ($this->_config['host'] !== 'localhost' && !$this->_isI5) { + // if the host isn't localhost, use extended connection params + $dbname = 'DRIVER={IBM DB2 ODBC DRIVER}' . + ';DATABASE=' . $this->_config['dbname'] . + ';HOSTNAME=' . $this->_config['host'] . + ';PORT=' . $this->_config['port'] . + ';PROTOCOL=' . $this->_config['protocol'] . + ';UID=' . $this->_config['username'] . + ';PWD=' . $this->_config['password'] .';'; + $this->_connection = $conn_func_name( + $dbname, + null, + null, + $this->_config['driver_options'] + ); + } else { + // host is localhost, so use standard connection params + $this->_connection = $conn_func_name( + $this->_config['dbname'], + $this->_config['username'], + $this->_config['password'], + $this->_config['driver_options'] + ); + } + + // check the connection + if (!$this->_connection) { + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception(db2_conn_errormsg(), db2_conn_error()); + } + } + + /** + * Test if a connection is active + * + * @return boolean + */ + public function isConnected() + { + return ((bool) (is_resource($this->_connection) + && get_resource_type($this->_connection) == 'DB2 Connection')); + } + + /** + * Force the connection to close. + * + * @return void + */ + public function closeConnection() + { + if ($this->isConnected()) { + db2_close($this->_connection); + } + $this->_connection = null; + } + + /** + * Returns an SQL statement for preparation. + * + * @param string $sql The SQL statement with placeholders. + * @return Zend_Db_Statement_Db2 + */ + public function prepare($sql) + { + $this->_connect(); + $stmtClass = $this->_defaultStmtClass; + if (!class_exists($stmtClass)) { + Zend_Loader::loadClass($stmtClass); + } + $stmt = new $stmtClass($this, $sql); + $stmt->setFetchMode($this->_fetchMode); + return $stmt; + } + + /** + * Gets the execution mode + * + * @return int the execution mode (DB2_AUTOCOMMIT_ON or DB2_AUTOCOMMIT_OFF) + */ + public function _getExecuteMode() + { + return $this->_execute_mode; + } + + /** + * @param integer $mode + * @return void + */ + public function _setExecuteMode($mode) + { + switch ($mode) { + case DB2_AUTOCOMMIT_OFF: + case DB2_AUTOCOMMIT_ON: + $this->_execute_mode = $mode; + db2_autocommit($this->_connection, $mode); + break; + default: + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception("execution mode not supported"); + break; + } + } + + /** + * Quote a raw string. + * + * @param string $value Raw string + * @return string Quoted string + */ + protected function _quote($value) + { + if (is_int($value) || is_float($value)) { + return $value; + } + /** + * Use db2_escape_string() if it is present in the IBM DB2 extension. + * But some supported versions of PHP do not include this function, + * so fall back to default quoting in the parent class. + */ + if (function_exists('db2_escape_string')) { + return "'" . db2_escape_string($value) . "'"; + } + return parent::_quote($value); + } + + /** + * @return string + */ + public function getQuoteIdentifierSymbol() + { + $this->_connect(); + $info = db2_server_info($this->_connection); + if ($info) { + $identQuote = $info->IDENTIFIER_QUOTE_CHAR; + } else { + // db2_server_info() does not return result on some i5 OS version + if ($this->_isI5) { + $identQuote ="'"; + } + } + return $identQuote; + } + + /** + * Returns a list of the tables in the database. + * @param string $schema OPTIONAL + * @return array + */ + public function listTables($schema = null) + { + $this->_connect(); + + if ($schema === null && $this->_config['schema'] != null) { + $schema = $this->_config['schema']; + } + + $tables = array(); + + if (!$this->_isI5) { + if ($schema) { + $stmt = db2_tables($this->_connection, null, $schema); + } else { + $stmt = db2_tables($this->_connection); + } + while ($row = db2_fetch_assoc($stmt)) { + $tables[] = $row['TABLE_NAME']; + } + } else { + $tables = $this->_i5listTables($schema); + } + + return $tables; + } + + + /** + * Returns the column descriptions for a table. + * + * The return value is an associative array keyed by the column name, + * as returned by the RDBMS. + * + * The value of each array element is an associative array + * with the following keys: + * + * SCHEMA_NAME => string; name of database or schema + * TABLE_NAME => string; + * COLUMN_NAME => string; column name + * COLUMN_POSITION => number; ordinal position of column in table + * DATA_TYPE => string; SQL datatype name of column + * DEFAULT => string; default expression of column, null if none + * NULLABLE => boolean; true if column can have nulls + * LENGTH => number; length of CHAR/VARCHAR + * SCALE => number; scale of NUMERIC/DECIMAL + * PRECISION => number; precision of NUMERIC/DECIMAL + * UNSIGNED => boolean; unsigned property of an integer type + * DB2 not supports UNSIGNED integer. + * PRIMARY => boolean; true if column is part of the primary key + * PRIMARY_POSITION => integer; position of column in primary key + * IDENTITY => integer; true if column is auto-generated with unique values + * + * @param string $tableName + * @param string $schemaName OPTIONAL + * @return array + */ + public function describeTable($tableName, $schemaName = null) + { + // Ensure the connection is made so that _isI5 is set + $this->_connect(); + + if ($schemaName === null && $this->_config['schema'] != null) { + $schemaName = $this->_config['schema']; + } + + if (!$this->_isI5) { + + $sql = "SELECT DISTINCT c.tabschema, c.tabname, c.colname, c.colno, + c.typename, c.default, c.nulls, c.length, c.scale, + c.identity, tc.type AS tabconsttype, k.colseq + FROM syscat.columns c + LEFT JOIN (syscat.keycoluse k JOIN syscat.tabconst tc + ON (k.tabschema = tc.tabschema + AND k.tabname = tc.tabname + AND tc.type = 'P')) + ON (c.tabschema = k.tabschema + AND c.tabname = k.tabname + AND c.colname = k.colname) + WHERE " + . $this->quoteInto('UPPER(c.tabname) = UPPER(?)', $tableName); + + if ($schemaName) { + $sql .= $this->quoteInto(' AND UPPER(c.tabschema) = UPPER(?)', $schemaName); + } + + $sql .= " ORDER BY c.colno"; + + } else { + + // DB2 On I5 specific query + $sql = "SELECT DISTINCT C.TABLE_SCHEMA, C.TABLE_NAME, C.COLUMN_NAME, C.ORDINAL_POSITION, + C.DATA_TYPE, C.COLUMN_DEFAULT, C.NULLS ,C.LENGTH, C.SCALE, LEFT(C.IDENTITY,1), + LEFT(tc.TYPE, 1) AS tabconsttype, k.COLSEQ + FROM QSYS2.SYSCOLUMNS C + LEFT JOIN (QSYS2.syskeycst k JOIN QSYS2.SYSCST tc + ON (k.TABLE_SCHEMA = tc.TABLE_SCHEMA + AND k.TABLE_NAME = tc.TABLE_NAME + AND LEFT(tc.type,1) = 'P')) + ON (C.TABLE_SCHEMA = k.TABLE_SCHEMA + AND C.TABLE_NAME = k.TABLE_NAME + AND C.COLUMN_NAME = k.COLUMN_NAME) + WHERE " + . $this->quoteInto('UPPER(C.TABLE_NAME) = UPPER(?)', $tableName); + + if ($schemaName) { + $sql .= $this->quoteInto(' AND UPPER(C.TABLE_SCHEMA) = UPPER(?)', $schemaName); + } + + $sql .= " ORDER BY C.ORDINAL_POSITION FOR FETCH ONLY"; + } + + $desc = array(); + $stmt = $this->query($sql); + + /** + * To avoid case issues, fetch using FETCH_NUM + */ + $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); + + /** + * The ordering of columns is defined by the query so we can map + * to variables to improve readability + */ + $tabschema = 0; + $tabname = 1; + $colname = 2; + $colno = 3; + $typename = 4; + $default = 5; + $nulls = 6; + $length = 7; + $scale = 8; + $identityCol = 9; + $tabconstType = 10; + $colseq = 11; + + foreach ($result as $key => $row) { + list ($primary, $primaryPosition, $identity) = array(false, null, false); + if ($row[$tabconstType] == 'P') { + $primary = true; + $primaryPosition = $row[$colseq]; + } + /** + * In IBM DB2, an column can be IDENTITY + * even if it is not part of the PRIMARY KEY. + */ + if ($row[$identityCol] == 'Y') { + $identity = true; + } + + // only colname needs to be case adjusted + $desc[$this->foldCase($row[$colname])] = array( + 'SCHEMA_NAME' => $this->foldCase($row[$tabschema]), + 'TABLE_NAME' => $this->foldCase($row[$tabname]), + 'COLUMN_NAME' => $this->foldCase($row[$colname]), + 'COLUMN_POSITION' => (!$this->_isI5) ? $row[$colno]+1 : $row[$colno], + 'DATA_TYPE' => $row[$typename], + 'DEFAULT' => $row[$default], + 'NULLABLE' => (bool) ($row[$nulls] == 'Y'), + 'LENGTH' => $row[$length], + 'SCALE' => $row[$scale], + 'PRECISION' => ($row[$typename] == 'DECIMAL' ? $row[$length] : 0), + 'UNSIGNED' => false, + 'PRIMARY' => $primary, + 'PRIMARY_POSITION' => $primaryPosition, + 'IDENTITY' => $identity + ); + } + + return $desc; + } + + /** + * Return the most recent value from the specified sequence in the database. + * This is supported only on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null. + * + * @param string $sequenceName + * @return string + */ + public function lastSequenceId($sequenceName) + { + $this->_connect(); + + if (!$this->_isI5) { + $quotedSequenceName = $this->quoteIdentifier($sequenceName, true); + $sql = 'SELECT PREVVAL FOR ' . $quotedSequenceName . ' AS VAL FROM SYSIBM.SYSDUMMY1'; + } else { + $quotedSequenceName = $sequenceName; + $sql = 'SELECT PREVVAL FOR ' . $this->quoteIdentifier($sequenceName, true) . ' AS VAL FROM QSYS2.QSQPTABL'; + } + + $value = $this->fetchOne($sql); + return (string) $value; + } + + /** + * Generate a new value from the specified sequence in the database, and return it. + * This is supported only on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null. + * + * @param string $sequenceName + * @return string + */ + public function nextSequenceId($sequenceName) + { + $this->_connect(); + $sql = 'SELECT NEXTVAL FOR '.$this->quoteIdentifier($sequenceName, true).' AS VAL FROM SYSIBM.SYSDUMMY1'; + $value = $this->fetchOne($sql); + return (string) $value; + } + + /** + * Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column. + * + * As a convention, on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence + * from the arguments and returns the last id generated by that sequence. + * On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method + * returns the last value generated for such a column, and the table name + * argument is disregarded. + * + * The IDENTITY_VAL_LOCAL() function gives the last generated identity value + * in the current process, even if it was for a GENERATED column. + * + * @param string $tableName OPTIONAL + * @param string $primaryKey OPTIONAL + * @param string $idType OPTIONAL used for i5 platform to define sequence/idenity unique value + * @return string + */ + + public function lastInsertId($tableName = null, $primaryKey = null, $idType = null) + { + $this->_connect(); + + if ($this->_isI5) { + return (string) $this->_i5LastInsertId($tableName, $idType); + } + + if ($tableName !== null) { + $sequenceName = $tableName; + if ($primaryKey) { + $sequenceName .= "_$primaryKey"; + } + $sequenceName .= '_seq'; + return $this->lastSequenceId($sequenceName); + } + + $sql = 'SELECT IDENTITY_VAL_LOCAL() AS VAL FROM SYSIBM.SYSDUMMY1'; + $value = $this->fetchOne($sql); + return (string) $value; + } + + /** + * Begin a transaction. + * + * @return void + */ + protected function _beginTransaction() + { + $this->_setExecuteMode(DB2_AUTOCOMMIT_OFF); + } + + /** + * Commit a transaction. + * + * @return void + */ + protected function _commit() + { + if (!db2_commit($this->_connection)) { + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception( + db2_conn_errormsg($this->_connection), + db2_conn_error($this->_connection)); + } + + $this->_setExecuteMode(DB2_AUTOCOMMIT_ON); + } + + /** + * Rollback a transaction. + * + * @return void + */ + protected function _rollBack() + { + if (!db2_rollback($this->_connection)) { + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception( + db2_conn_errormsg($this->_connection), + db2_conn_error($this->_connection)); + } + $this->_setExecuteMode(DB2_AUTOCOMMIT_ON); + } + + /** + * Set the fetch mode. + * + * @param integer $mode + * @return void + * @throws Zend_Db_Adapter_Db2_Exception + */ + public function setFetchMode($mode) + { + switch ($mode) { + case Zend_Db::FETCH_NUM: // seq array + case Zend_Db::FETCH_ASSOC: // assoc array + case Zend_Db::FETCH_BOTH: // seq+assoc array + case Zend_Db::FETCH_OBJ: // object + $this->_fetchMode = $mode; + break; + case Zend_Db::FETCH_BOUND: // bound to PHP variable + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception('FETCH_BOUND is not supported yet'); + break; + default: + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception("Invalid fetch mode '$mode' specified"); + break; + } + } + + /** + * Adds an adapter-specific LIMIT clause to the SELECT statement. + * + * @param string $sql + * @param integer $count + * @param integer $offset OPTIONAL + * @return string + */ + public function limit($sql, $count, $offset = 0) + { + $count = intval($count); + if ($count <= 0) { + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception("LIMIT argument count=$count is not valid"); + } + + $offset = intval($offset); + if ($offset < 0) { + /** + * @see Zend_Db_Adapter_Db2_Exception + */ + throw new Zend_Db_Adapter_Db2_Exception("LIMIT argument offset=$offset is not valid"); + } + + if ($offset == 0) { + $limit_sql = $sql . " FETCH FIRST $count ROWS ONLY"; + return $limit_sql; + } + + /** + * DB2 does not implement the LIMIT clause as some RDBMS do. + * We have to simulate it with subqueries and ROWNUM. + * Unfortunately because we use the column wildcard "*", + * this puts an extra column into the query result set. + */ + $limit_sql = "SELECT z2.* + FROM ( + SELECT ROW_NUMBER() OVER() AS \"ZEND_DB_ROWNUM\", z1.* + FROM ( + " . $sql . " + ) z1 + ) z2 + WHERE z2.zend_db_rownum BETWEEN " . ($offset+1) . " AND " . ($offset+$count); + return $limit_sql; + } + + /** + * Check if the adapter supports real SQL parameters. + * + * @param string $type 'positional' or 'named' + * @return bool + */ + public function supportsParameters($type) + { + if ($type == 'positional') { + return true; + } + + // if its 'named' or anything else + return false; + } + + /** + * Retrieve server version in PHP style + * + * @return string + */ + public function getServerVersion() + { + $this->_connect(); + $server_info = db2_server_info($this->_connection); + if ($server_info !== false) { + $version = $server_info->DBMS_VER; + if ($this->_isI5) { + $version = (int) substr($version, 0, 2) . '.' . (int) substr($version, 2, 2) . '.' . (int) substr($version, 4); + } + return $version; + } else { + return null; + } + } + + /** + * Return whether or not this is running on i5 + * + * @return bool + */ + public function isI5() + { + if ($this->_isI5 === null) { + $this->_determineI5(); + } + + return (bool) $this->_isI5; + } + + /** + * Check the connection parameters according to verify + * type of used OS + * + * @return void + */ + protected function _determineI5() + { + // first us the compiled flag. + $this->_isI5 = (php_uname('s') == 'OS400') ? true : false; + + // if this is set, then us it + if (isset($this->_config['os'])){ + if (strtolower($this->_config['os']) === 'i5') { + $this->_isI5 = true; + } else { + // any other value passed in, its null + $this->_isI5 = false; + } + } + + } + + /** + * Db2 On I5 specific method + * + * Returns a list of the tables in the database . + * Used only for DB2/400. + * + * @return array + */ + protected function _i5listTables($schema = null) + { + //list of i5 libraries. + $tables = array(); + if ($schema) { + $tablesStatement = db2_tables($this->_connection, null, $schema); + while ($rowTables = db2_fetch_assoc($tablesStatement) ) { + if ($rowTables['TABLE_NAME'] !== null) { + $tables[] = $rowTables['TABLE_NAME']; + } + } + } else { + $schemaStatement = db2_tables($this->_connection); + while ($schema = db2_fetch_assoc($schemaStatement)) { + if ($schema['TABLE_SCHEM'] !== null) { + // list of the tables which belongs to the selected library + $tablesStatement = db2_tables($this->_connection, NULL, $schema['TABLE_SCHEM']); + if (is_resource($tablesStatement)) { + while ($rowTables = db2_fetch_assoc($tablesStatement) ) { + if ($rowTables['TABLE_NAME'] !== null) { + $tables[] = $rowTables['TABLE_NAME']; + } + } + } + } + } + } + + return $tables; + } + + protected function _i5LastInsertId($objectName = null, $idType = null) + { + + if ($objectName === null) { + $sql = 'SELECT IDENTITY_VAL_LOCAL() AS VAL FROM QSYS2.QSQPTABL'; + $value = $this->fetchOne($sql); + return $value; + } + + if (strtoupper($idType) === 'S'){ + //check i5_lib option + $sequenceName = $objectName; + return $this->lastSequenceId($sequenceName); + } + + //returns last identity value for the specified table + //if (strtoupper($idType) === 'I') { + $tableName = $objectName; + return $this->fetchOne('SELECT IDENTITY_VAL_LOCAL() from ' . $this->quoteIdentifier($tableName)); + } + +} + + diff --git a/library/vendor/Zend/Amf/Auth/Abstract.php b/library/vendor/Zend/Db/Adapter/Db2/Exception.php similarity index 55% rename from library/vendor/Zend/Amf/Auth/Abstract.php rename to library/vendor/Zend/Db/Adapter/Db2/Exception.php index 8d8c4a4b0..d12dc48e6 100644 --- a/library/vendor/Zend/Amf/Auth/Abstract.php +++ b/library/vendor/Zend/Db/Adapter/Db2/Exception.php @@ -13,29 +13,32 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Amf - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Db + * @subpackage Adapter + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ -/** @see Zend_Auth_Adapter_Interface */ +/** + * Zend_Db_Adapter_Exception + */ /** - * Base abstract class for AMF authentication implementation + * Zend_Db_Adapter_Db2_Exception * - * @package Zend_Amf - * @subpackage Auth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Db + * @subpackage Adapter + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -abstract class Zend_Amf_Auth_Abstract implements Zend_Auth_Adapter_Interface +class Zend_Db_Adapter_Db2_Exception extends Zend_Db_Adapter_Exception { - protected $_username; - protected $_password; + protected $code = '00000'; + protected $message = 'unknown exception'; - public function setCredentials($username, $password) { - $this->_username = $username; - $this->_password = $password; - } + function __construct($message = 'unknown exception', $code = '00000', Exception $e = null) + { + parent::__construct($message, $code, $e); + } } diff --git a/library/vendor/Zend/Db/Adapter/Exception.php b/library/vendor/Zend/Db/Adapter/Exception.php index f59c46df0..c302bc7fb 100644 --- a/library/vendor/Zend/Db/Adapter/Exception.php +++ b/library/vendor/Zend/Db/Adapter/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Adapter_Exception extends Zend_Db_Exception diff --git a/library/vendor/Zend/Db/Adapter/Mysqli.php b/library/vendor/Zend/Db/Adapter/Mysqli.php new file mode 100644 index 000000000..087d3ac16 --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Mysqli.php @@ -0,0 +1,543 @@ + Zend_Db::INT_TYPE, + Zend_Db::BIGINT_TYPE => Zend_Db::BIGINT_TYPE, + Zend_Db::FLOAT_TYPE => Zend_Db::FLOAT_TYPE, + 'INT' => Zend_Db::INT_TYPE, + 'INTEGER' => Zend_Db::INT_TYPE, + 'MEDIUMINT' => Zend_Db::INT_TYPE, + 'SMALLINT' => Zend_Db::INT_TYPE, + 'TINYINT' => Zend_Db::INT_TYPE, + 'BIGINT' => Zend_Db::BIGINT_TYPE, + 'SERIAL' => Zend_Db::BIGINT_TYPE, + 'DEC' => Zend_Db::FLOAT_TYPE, + 'DECIMAL' => Zend_Db::FLOAT_TYPE, + 'DOUBLE' => Zend_Db::FLOAT_TYPE, + 'DOUBLE PRECISION' => Zend_Db::FLOAT_TYPE, + 'FIXED' => Zend_Db::FLOAT_TYPE, + 'FLOAT' => Zend_Db::FLOAT_TYPE + ); + + /** + * @var Zend_Db_Statement_Mysqli + */ + protected $_stmt = null; + + /** + * Default class name for a DB statement. + * + * @var string + */ + protected $_defaultStmtClass = 'Zend_Db_Statement_Mysqli'; + + /** + * Quote a raw string. + * + * @param mixed $value Raw string + * + * @return string Quoted string + */ + protected function _quote($value) + { + if (is_int($value) || is_float($value)) { + return $value; + } + $this->_connect(); + return "'" . $this->_connection->real_escape_string($value) . "'"; + } + + /** + * Returns the symbol the adapter uses for delimiting identifiers. + * + * @return string + */ + public function getQuoteIdentifierSymbol() + { + return "`"; + } + + /** + * Returns a list of the tables in the database. + * + * @return array + */ + public function listTables() + { + $result = array(); + // Use mysqli extension API, because SHOW doesn't work + // well as a prepared statement on MySQL 4.1. + $sql = 'SHOW TABLES'; + if ($queryResult = $this->getConnection()->query($sql)) { + while ($row = $queryResult->fetch_row()) { + $result[] = $row[0]; + } + $queryResult->close(); + } else { + /** + * @see Zend_Db_Adapter_Mysqli_Exception + */ + throw new Zend_Db_Adapter_Mysqli_Exception($this->getConnection()->error); + } + return $result; + } + + /** + * Returns the column descriptions for a table. + * + * The return value is an associative array keyed by the column name, + * as returned by the RDBMS. + * + * The value of each array element is an associative array + * with the following keys: + * + * SCHEMA_NAME => string; name of database or schema + * TABLE_NAME => string; + * COLUMN_NAME => string; column name + * COLUMN_POSITION => number; ordinal position of column in table + * DATA_TYPE => string; SQL datatype name of column + * DEFAULT => string; default expression of column, null if none + * NULLABLE => boolean; true if column can have nulls + * LENGTH => number; length of CHAR/VARCHAR + * SCALE => number; scale of NUMERIC/DECIMAL + * PRECISION => number; precision of NUMERIC/DECIMAL + * UNSIGNED => boolean; unsigned property of an integer type + * PRIMARY => boolean; true if column is part of the primary key + * PRIMARY_POSITION => integer; position of column in primary key + * IDENTITY => integer; true if column is auto-generated with unique values + * + * @param string $tableName + * @param string $schemaName OPTIONAL + * @return array + */ + public function describeTable($tableName, $schemaName = null) + { + /** + * @todo use INFORMATION_SCHEMA someday when + * MySQL's implementation isn't too slow. + */ + + if ($schemaName) { + $sql = 'DESCRIBE ' . $this->quoteIdentifier("$schemaName.$tableName", true); + } else { + $sql = 'DESCRIBE ' . $this->quoteIdentifier($tableName, true); + } + + /** + * Use mysqli extension API, because DESCRIBE doesn't work + * well as a prepared statement on MySQL 4.1. + */ + if ($queryResult = $this->getConnection()->query($sql)) { + while ($row = $queryResult->fetch_assoc()) { + $result[] = $row; + } + $queryResult->close(); + } else { + /** + * @see Zend_Db_Adapter_Mysqli_Exception + */ + throw new Zend_Db_Adapter_Mysqli_Exception($this->getConnection()->error); + } + + $desc = array(); + + $row_defaults = array( + 'Length' => null, + 'Scale' => null, + 'Precision' => null, + 'Unsigned' => null, + 'Primary' => false, + 'PrimaryPosition' => null, + 'Identity' => false + ); + $i = 1; + $p = 1; + foreach ($result as $key => $row) { + $row = array_merge($row_defaults, $row); + if (preg_match('/unsigned/', $row['Type'])) { + $row['Unsigned'] = true; + } + if (preg_match('/^((?:var)?char)\((\d+)\)/', $row['Type'], $matches)) { + $row['Type'] = $matches[1]; + $row['Length'] = $matches[2]; + } else if (preg_match('/^decimal\((\d+),(\d+)\)/', $row['Type'], $matches)) { + $row['Type'] = 'decimal'; + $row['Precision'] = $matches[1]; + $row['Scale'] = $matches[2]; + } else if (preg_match('/^float\((\d+),(\d+)\)/', $row['Type'], $matches)) { + $row['Type'] = 'float'; + $row['Precision'] = $matches[1]; + $row['Scale'] = $matches[2]; + } else if (preg_match('/^((?:big|medium|small|tiny)?int)\((\d+)\)/', $row['Type'], $matches)) { + $row['Type'] = $matches[1]; + /** + * The optional argument of a MySQL int type is not precision + * or length; it is only a hint for display width. + */ + } + if (strtoupper($row['Key']) == 'PRI') { + $row['Primary'] = true; + $row['PrimaryPosition'] = $p; + if ($row['Extra'] == 'auto_increment') { + $row['Identity'] = true; + } else { + $row['Identity'] = false; + } + ++$p; + } + $desc[$this->foldCase($row['Field'])] = array( + 'SCHEMA_NAME' => null, // @todo + 'TABLE_NAME' => $this->foldCase($tableName), + 'COLUMN_NAME' => $this->foldCase($row['Field']), + 'COLUMN_POSITION' => $i, + 'DATA_TYPE' => $row['Type'], + 'DEFAULT' => $row['Default'], + 'NULLABLE' => (bool) ($row['Null'] == 'YES'), + 'LENGTH' => $row['Length'], + 'SCALE' => $row['Scale'], + 'PRECISION' => $row['Precision'], + 'UNSIGNED' => $row['Unsigned'], + 'PRIMARY' => $row['Primary'], + 'PRIMARY_POSITION' => $row['PrimaryPosition'], + 'IDENTITY' => $row['Identity'] + ); + ++$i; + } + return $desc; + } + + /** + * Creates a connection to the database. + * + * @return void + * @throws Zend_Db_Adapter_Mysqli_Exception + */ + protected function _connect() + { + if ($this->_connection) { + return; + } + + if (!extension_loaded('mysqli')) { + /** + * @see Zend_Db_Adapter_Mysqli_Exception + */ + throw new Zend_Db_Adapter_Mysqli_Exception('The Mysqli extension is required for this adapter but the extension is not loaded'); + } + + if (isset($this->_config['port'])) { + $port = (integer) $this->_config['port']; + } else { + $port = null; + } + + if (isset($this->_config['socket'])) { + $socket = $this->_config['socket']; + } else { + $socket = null; + } + + $this->_connection = mysqli_init(); + + if(!empty($this->_config['driver_options'])) { + foreach($this->_config['driver_options'] as $option=>$value) { + if(is_string($option)) { + // Suppress warnings here + // Ignore it if it's not a valid constant + $option = @constant(strtoupper($option)); + if($option === null) + continue; + } + mysqli_options($this->_connection, $option, $value); + } + } + + // Suppress connection warnings here. + // Throw an exception instead. + $_isConnected = @mysqli_real_connect( + $this->_connection, + $this->_config['host'], + $this->_config['username'], + $this->_config['password'], + $this->_config['dbname'], + $port, + $socket + ); + + if ($_isConnected === false || mysqli_connect_errno()) { + + $this->closeConnection(); + /** + * @see Zend_Db_Adapter_Mysqli_Exception + */ + throw new Zend_Db_Adapter_Mysqli_Exception(mysqli_connect_error()); + } + + if (!empty($this->_config['charset'])) { + mysqli_set_charset($this->_connection, $this->_config['charset']); + } + } + + /** + * Test if a connection is active + * + * @return boolean + */ + public function isConnected() + { + return ((bool) ($this->_connection instanceof mysqli)); + } + + /** + * Force the connection to close. + * + * @return void + */ + public function closeConnection() + { + if ($this->isConnected()) { + $this->_connection->close(); + } + $this->_connection = null; + } + + /** + * Prepare a statement and return a PDOStatement-like object. + * + * @param string $sql SQL query + * @return Zend_Db_Statement_Mysqli + */ + public function prepare($sql) + { + $this->_connect(); + if ($this->_stmt) { + $this->_stmt->close(); + } + $stmtClass = $this->_defaultStmtClass; + if (!class_exists($stmtClass)) { + Zend_Loader::loadClass($stmtClass); + } + $stmt = new $stmtClass($this, $sql); + if ($stmt === false) { + return false; + } + $stmt->setFetchMode($this->_fetchMode); + $this->_stmt = $stmt; + return $stmt; + } + + /** + * Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column. + * + * As a convention, on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence + * from the arguments and returns the last id generated by that sequence. + * On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method + * returns the last value generated for such a column, and the table name + * argument is disregarded. + * + * MySQL does not support sequences, so $tableName and $primaryKey are ignored. + * + * @param string $tableName OPTIONAL Name of table. + * @param string $primaryKey OPTIONAL Name of primary key column. + * @return string + * @todo Return value should be int? + */ + public function lastInsertId($tableName = null, $primaryKey = null) + { + $mysqli = $this->_connection; + return (string) $mysqli->insert_id; + } + + /** + * Begin a transaction. + * + * @return void + */ + protected function _beginTransaction() + { + $this->_connect(); + $this->_connection->autocommit(false); + } + + /** + * Commit a transaction. + * + * @return void + */ + protected function _commit() + { + $this->_connect(); + $this->_connection->commit(); + $this->_connection->autocommit(true); + } + + /** + * Roll-back a transaction. + * + * @return void + */ + protected function _rollBack() + { + $this->_connect(); + $this->_connection->rollback(); + $this->_connection->autocommit(true); + } + + /** + * Set the fetch mode. + * + * @param int $mode + * @return void + * @throws Zend_Db_Adapter_Mysqli_Exception + */ + public function setFetchMode($mode) + { + switch ($mode) { + case Zend_Db::FETCH_LAZY: + case Zend_Db::FETCH_ASSOC: + case Zend_Db::FETCH_NUM: + case Zend_Db::FETCH_BOTH: + case Zend_Db::FETCH_NAMED: + case Zend_Db::FETCH_OBJ: + $this->_fetchMode = $mode; + break; + case Zend_Db::FETCH_BOUND: // bound to PHP variable + /** + * @see Zend_Db_Adapter_Mysqli_Exception + */ + throw new Zend_Db_Adapter_Mysqli_Exception('FETCH_BOUND is not supported yet'); + break; + default: + /** + * @see Zend_Db_Adapter_Mysqli_Exception + */ + throw new Zend_Db_Adapter_Mysqli_Exception("Invalid fetch mode '$mode' specified"); + } + } + + /** + * Adds an adapter-specific LIMIT clause to the SELECT statement. + * + * @param string $sql + * @param int $count + * @param int $offset OPTIONAL + * @return string + */ + public function limit($sql, $count, $offset = 0) + { + $count = intval($count); + if ($count <= 0) { + /** + * @see Zend_Db_Adapter_Mysqli_Exception + */ + throw new Zend_Db_Adapter_Mysqli_Exception("LIMIT argument count=$count is not valid"); + } + + $offset = intval($offset); + if ($offset < 0) { + /** + * @see Zend_Db_Adapter_Mysqli_Exception + */ + throw new Zend_Db_Adapter_Mysqli_Exception("LIMIT argument offset=$offset is not valid"); + } + + $sql .= " LIMIT $count"; + if ($offset > 0) { + $sql .= " OFFSET $offset"; + } + + return $sql; + } + + /** + * Check if the adapter supports real SQL parameters. + * + * @param string $type 'positional' or 'named' + * @return bool + */ + public function supportsParameters($type) + { + switch ($type) { + case 'positional': + return true; + case 'named': + default: + return false; + } + } + + /** + * Retrieve server version in PHP style + * + *@return string + */ + public function getServerVersion() + { + $this->_connect(); + $version = $this->_connection->server_version; + $major = (int) ($version / 10000); + $minor = (int) ($version % 10000 / 100); + $revision = (int) ($version % 100); + return $major . '.' . $minor . '.' . $revision; + } +} diff --git a/library/vendor/Zend/Db/Adapter/Mysqli/Exception.php b/library/vendor/Zend/Db/Adapter/Mysqli/Exception.php new file mode 100644 index 000000000..9c94adcc9 --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Mysqli/Exception.php @@ -0,0 +1,39 @@ + (string) Connect to the database as this username. + * password => (string) Password associated with the username. + * dbname => Either the name of the local Oracle instance, or the + * name of the entry in tnsnames.ora to which you want to connect. + * persistent => (boolean) Set TRUE to use a persistent connection + * @var array + */ + protected $_config = array( + 'dbname' => null, + 'username' => null, + 'password' => null, + 'persistent' => false + ); + + /** + * Keys are UPPERCASE SQL datatypes or the constants + * Zend_Db::INT_TYPE, Zend_Db::BIGINT_TYPE, or Zend_Db::FLOAT_TYPE. + * + * Values are: + * 0 = 32-bit integer + * 1 = 64-bit integer + * 2 = float or decimal + * + * @var array Associative array of datatypes to values 0, 1, or 2. + */ + protected $_numericDataTypes = array( + Zend_Db::INT_TYPE => Zend_Db::INT_TYPE, + Zend_Db::BIGINT_TYPE => Zend_Db::BIGINT_TYPE, + Zend_Db::FLOAT_TYPE => Zend_Db::FLOAT_TYPE, + 'BINARY_DOUBLE' => Zend_Db::FLOAT_TYPE, + 'BINARY_FLOAT' => Zend_Db::FLOAT_TYPE, + 'NUMBER' => Zend_Db::FLOAT_TYPE, + ); + + /** + * @var integer + */ + protected $_execute_mode = null; + + /** + * Default class name for a DB statement. + * + * @var string + */ + protected $_defaultStmtClass = 'Zend_Db_Statement_Oracle'; + + /** + * Check if LOB field are returned as string + * instead of OCI-Lob object + * + * @var boolean + */ + protected $_lobAsString = null; + + /** + * Creates a connection resource. + * + * @return void + * @throws Zend_Db_Adapter_Oracle_Exception + */ + protected function _connect() + { + if (is_resource($this->_connection)) { + // connection already exists + return; + } + + if (!extension_loaded('oci8')) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception('The OCI8 extension is required for this adapter but the extension is not loaded'); + } + + $this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS); + + $connectionFuncName = ($this->_config['persistent'] == true) ? 'oci_pconnect' : 'oci_connect'; + + $this->_connection = @$connectionFuncName( + $this->_config['username'], + $this->_config['password'], + $this->_config['dbname'], + $this->_config['charset']); + + // check the connection + if (!$this->_connection) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception(oci_error()); + } + } + + /** + * Test if a connection is active + * + * @return boolean + */ + public function isConnected() + { + return ((bool) (is_resource($this->_connection) + && (get_resource_type($this->_connection) == 'oci8 connection' + || get_resource_type($this->_connection) == 'oci8 persistent connection'))); + } + + /** + * Force the connection to close. + * + * @return void + */ + public function closeConnection() + { + if ($this->isConnected()) { + oci_close($this->_connection); + } + $this->_connection = null; + } + + /** + * Activate/deactivate return of LOB as string + * + * @param string $lob_as_string + * @return Zend_Db_Adapter_Oracle + */ + public function setLobAsString($lobAsString) + { + $this->_lobAsString = (bool) $lobAsString; + return $this; + } + + /** + * Return whether or not LOB are returned as string + * + * @return boolean + */ + public function getLobAsString() + { + if ($this->_lobAsString === null) { + // if never set by user, we use driver option if it exists otherwise false + if (isset($this->_config['driver_options']) && + isset($this->_config['driver_options']['lob_as_string'])) { + $this->_lobAsString = (bool) $this->_config['driver_options']['lob_as_string']; + } else { + $this->_lobAsString = false; + } + } + return $this->_lobAsString; + } + + /** + * Returns an SQL statement for preparation. + * + * @param string $sql The SQL statement with placeholders. + * @return Zend_Db_Statement_Oracle + */ + public function prepare($sql) + { + $this->_connect(); + $stmtClass = $this->_defaultStmtClass; + if (!class_exists($stmtClass)) { + Zend_Loader::loadClass($stmtClass); + } + $stmt = new $stmtClass($this, $sql); + if ($stmt instanceof Zend_Db_Statement_Oracle) { + $stmt->setLobAsString($this->getLobAsString()); + } + $stmt->setFetchMode($this->_fetchMode); + return $stmt; + } + + /** + * Quote a raw string. + * + * @param string $value Raw string + * @return string Quoted string + */ + protected function _quote($value) + { + if (is_int($value) || is_float($value)) { + return $value; + } + $value = str_replace("'", "''", $value); + return "'" . addcslashes($value, "\000\n\r\\\032") . "'"; + } + + /** + * Quote a table identifier and alias. + * + * @param string|array|Zend_Db_Expr $ident The identifier or expression. + * @param string $alias An alias for the table. + * @param boolean $auto If true, heed the AUTO_QUOTE_IDENTIFIERS config option. + * @return string The quoted identifier and alias. + */ + public function quoteTableAs($ident, $alias = null, $auto = false) + { + // Oracle doesn't allow the 'AS' keyword between the table identifier/expression and alias. + return $this->_quoteIdentifierAs($ident, $alias, $auto, ' '); + } + + /** + * Return the most recent value from the specified sequence in the database. + * This is supported only on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null. + * + * @param string $sequenceName + * @return string + */ + public function lastSequenceId($sequenceName) + { + $this->_connect(); + $sql = 'SELECT '.$this->quoteIdentifier($sequenceName, true).'.CURRVAL FROM dual'; + $value = $this->fetchOne($sql); + return $value; + } + + /** + * Generate a new value from the specified sequence in the database, and return it. + * This is supported only on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null. + * + * @param string $sequenceName + * @return string + */ + public function nextSequenceId($sequenceName) + { + $this->_connect(); + $sql = 'SELECT '.$this->quoteIdentifier($sequenceName, true).'.NEXTVAL FROM dual'; + $value = $this->fetchOne($sql); + return $value; + } + + /** + * Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column. + * + * As a convention, on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence + * from the arguments and returns the last id generated by that sequence. + * On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method + * returns the last value generated for such a column, and the table name + * argument is disregarded. + * + * Oracle does not support IDENTITY columns, so if the sequence is not + * specified, this method returns null. + * + * @param string $tableName OPTIONAL Name of table. + * @param string $primaryKey OPTIONAL Name of primary key column. + * @return string + */ + public function lastInsertId($tableName = null, $primaryKey = null) + { + if ($tableName !== null) { + $sequenceName = $tableName; + if ($primaryKey) { + $sequenceName .= "_$primaryKey"; + } + $sequenceName .= '_seq'; + return $this->lastSequenceId($sequenceName); + } + + // No support for IDENTITY columns; return null + return null; + } + + /** + * Returns a list of the tables in the database. + * + * @return array + */ + public function listTables() + { + $this->_connect(); + $data = $this->fetchCol('SELECT table_name FROM all_tables'); + return $data; + } + + /** + * Returns the column descriptions for a table. + * + * The return value is an associative array keyed by the column name, + * as returned by the RDBMS. + * + * The value of each array element is an associative array + * with the following keys: + * + * SCHEMA_NAME => string; name of schema + * TABLE_NAME => string; + * COLUMN_NAME => string; column name + * COLUMN_POSITION => number; ordinal position of column in table + * DATA_TYPE => string; SQL datatype name of column + * DEFAULT => string; default expression of column, null if none + * NULLABLE => boolean; true if column can have nulls + * LENGTH => number; length of CHAR/VARCHAR + * SCALE => number; scale of NUMERIC/DECIMAL + * PRECISION => number; precision of NUMERIC/DECIMAL + * UNSIGNED => boolean; unsigned property of an integer type + * PRIMARY => boolean; true if column is part of the primary key + * PRIMARY_POSITION => integer; position of column in primary key + * IDENTITY => integer; true if column is auto-generated with unique values + * + * @todo Discover integer unsigned property. + * + * @param string $tableName + * @param string $schemaName OPTIONAL + * @return array + */ + public function describeTable($tableName, $schemaName = null) + { + $version = $this->getServerVersion(); + if (($version === null) || version_compare($version, '9.0.0', '>=')) { + $sql = "SELECT TC.TABLE_NAME, TC.OWNER, TC.COLUMN_NAME, TC.DATA_TYPE, + TC.DATA_DEFAULT, TC.NULLABLE, TC.COLUMN_ID, TC.DATA_LENGTH, + TC.DATA_SCALE, TC.DATA_PRECISION, C.CONSTRAINT_TYPE, CC.POSITION + FROM ALL_TAB_COLUMNS TC + LEFT JOIN (ALL_CONS_COLUMNS CC JOIN ALL_CONSTRAINTS C + ON (CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME AND CC.TABLE_NAME = C.TABLE_NAME AND CC.OWNER = C.OWNER AND C.CONSTRAINT_TYPE = 'P')) + ON TC.TABLE_NAME = CC.TABLE_NAME AND TC.COLUMN_NAME = CC.COLUMN_NAME + WHERE UPPER(TC.TABLE_NAME) = UPPER(:TBNAME)"; + $bind[':TBNAME'] = $tableName; + if ($schemaName) { + $sql .= ' AND UPPER(TC.OWNER) = UPPER(:SCNAME)'; + $bind[':SCNAME'] = $schemaName; + } + $sql .= ' ORDER BY TC.COLUMN_ID'; + } else { + $subSql="SELECT AC.OWNER, AC.TABLE_NAME, ACC.COLUMN_NAME, AC.CONSTRAINT_TYPE, ACC.POSITION + from ALL_CONSTRAINTS AC, ALL_CONS_COLUMNS ACC + WHERE ACC.CONSTRAINT_NAME = AC.CONSTRAINT_NAME + AND ACC.TABLE_NAME = AC.TABLE_NAME + AND ACC.OWNER = AC.OWNER + AND AC.CONSTRAINT_TYPE = 'P' + AND UPPER(AC.TABLE_NAME) = UPPER(:TBNAME)"; + $bind[':TBNAME'] = $tableName; + if ($schemaName) { + $subSql .= ' AND UPPER(ACC.OWNER) = UPPER(:SCNAME)'; + $bind[':SCNAME'] = $schemaName; + } + $sql="SELECT TC.TABLE_NAME, TC.OWNER, TC.COLUMN_NAME, TC.DATA_TYPE, + TC.DATA_DEFAULT, TC.NULLABLE, TC.COLUMN_ID, TC.DATA_LENGTH, + TC.DATA_SCALE, TC.DATA_PRECISION, CC.CONSTRAINT_TYPE, CC.POSITION + FROM ALL_TAB_COLUMNS TC, ($subSql) CC + WHERE UPPER(TC.TABLE_NAME) = UPPER(:TBNAME) + AND TC.OWNER = CC.OWNER(+) AND TC.TABLE_NAME = CC.TABLE_NAME(+) AND TC.COLUMN_NAME = CC.COLUMN_NAME(+)"; + if ($schemaName) { + $sql .= ' AND UPPER(TC.OWNER) = UPPER(:SCNAME)'; + } + $sql .= ' ORDER BY TC.COLUMN_ID'; + } + + $stmt = $this->query($sql, $bind); + + /** + * Use FETCH_NUM so we are not dependent on the CASE attribute of the PDO connection + */ + $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); + + $table_name = 0; + $owner = 1; + $column_name = 2; + $data_type = 3; + $data_default = 4; + $nullable = 5; + $column_id = 6; + $data_length = 7; + $data_scale = 8; + $data_precision = 9; + $constraint_type = 10; + $position = 11; + + $desc = array(); + foreach ($result as $key => $row) { + list ($primary, $primaryPosition, $identity) = array(false, null, false); + if ($row[$constraint_type] == 'P') { + $primary = true; + $primaryPosition = $row[$position]; + /** + * Oracle does not support auto-increment keys. + */ + $identity = false; + } + $desc[$this->foldCase($row[$column_name])] = array( + 'SCHEMA_NAME' => $this->foldCase($row[$owner]), + 'TABLE_NAME' => $this->foldCase($row[$table_name]), + 'COLUMN_NAME' => $this->foldCase($row[$column_name]), + 'COLUMN_POSITION' => $row[$column_id], + 'DATA_TYPE' => $row[$data_type], + 'DEFAULT' => $row[$data_default], + 'NULLABLE' => (bool) ($row[$nullable] == 'Y'), + 'LENGTH' => $row[$data_length], + 'SCALE' => $row[$data_scale], + 'PRECISION' => $row[$data_precision], + 'UNSIGNED' => null, // @todo + 'PRIMARY' => $primary, + 'PRIMARY_POSITION' => $primaryPosition, + 'IDENTITY' => $identity + ); + } + return $desc; + } + + /** + * Leave autocommit mode and begin a transaction. + * + * @return void + */ + protected function _beginTransaction() + { + $this->_setExecuteMode(OCI_DEFAULT); + } + + /** + * Commit a transaction and return to autocommit mode. + * + * @return void + * @throws Zend_Db_Adapter_Oracle_Exception + */ + protected function _commit() + { + if (!oci_commit($this->_connection)) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception(oci_error($this->_connection)); + } + $this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS); + } + + /** + * Roll back a transaction and return to autocommit mode. + * + * @return void + * @throws Zend_Db_Adapter_Oracle_Exception + */ + protected function _rollBack() + { + if (!oci_rollback($this->_connection)) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception(oci_error($this->_connection)); + } + $this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS); + } + + /** + * Set the fetch mode. + * + * @todo Support FETCH_CLASS and FETCH_INTO. + * + * @param integer $mode A fetch mode. + * @return void + * @throws Zend_Db_Adapter_Oracle_Exception + */ + public function setFetchMode($mode) + { + switch ($mode) { + case Zend_Db::FETCH_NUM: // seq array + case Zend_Db::FETCH_ASSOC: // assoc array + case Zend_Db::FETCH_BOTH: // seq+assoc array + case Zend_Db::FETCH_OBJ: // object + $this->_fetchMode = $mode; + break; + case Zend_Db::FETCH_BOUND: // bound to PHP variable + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception('FETCH_BOUND is not supported yet'); + break; + default: + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception("Invalid fetch mode '$mode' specified"); + break; + } + } + + /** + * Adds an adapter-specific LIMIT clause to the SELECT statement. + * + * @param string $sql + * @param integer $count + * @param integer $offset OPTIONAL + * @return string + * @throws Zend_Db_Adapter_Oracle_Exception + */ + public function limit($sql, $count, $offset = 0) + { + $count = intval($count); + if ($count <= 0) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception("LIMIT argument count=$count is not valid"); + } + + $offset = intval($offset); + if ($offset < 0) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception("LIMIT argument offset=$offset is not valid"); + } + + /** + * Oracle does not implement the LIMIT clause as some RDBMS do. + * We have to simulate it with subqueries and ROWNUM. + * Unfortunately because we use the column wildcard "*", + * this puts an extra column into the query result set. + */ + $limit_sql = "SELECT z2.* + FROM ( + SELECT z1.*, ROWNUM AS \"zend_db_rownum\" + FROM ( + " . $sql . " + ) z1 + ) z2 + WHERE z2.\"zend_db_rownum\" BETWEEN " . ($offset+1) . " AND " . ($offset+$count); + return $limit_sql; + } + + /** + * @param integer $mode + * @throws Zend_Db_Adapter_Oracle_Exception + */ + private function _setExecuteMode($mode) + { + switch($mode) { + case OCI_COMMIT_ON_SUCCESS: + case OCI_DEFAULT: + case OCI_DESCRIBE_ONLY: + $this->_execute_mode = $mode; + break; + default: + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Adapter_Oracle_Exception("Invalid execution mode '$mode' specified"); + break; + } + } + + /** + * @return int + */ + public function _getExecuteMode() + { + return $this->_execute_mode; + } + + /** + * Check if the adapter supports real SQL parameters. + * + * @param string $type 'positional' or 'named' + * @return bool + */ + public function supportsParameters($type) + { + switch ($type) { + case 'named': + return true; + case 'positional': + default: + return false; + } + } + + /** + * Retrieve server version in PHP style + * + * @return string + */ + public function getServerVersion() + { + $this->_connect(); + $version = oci_server_version($this->_connection); + if ($version !== false) { + $matches = null; + if (preg_match('/((?:[0-9]{1,2}\.){1,3}[0-9]{1,2})/', $version, $matches)) { + return $matches[1]; + } else { + return null; + } + } else { + return null; + } + } +} diff --git a/library/vendor/Zend/Db/Adapter/Oracle/Exception.php b/library/vendor/Zend/Db/Adapter/Oracle/Exception.php new file mode 100644 index 000000000..6b7d91471 --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Oracle/Exception.php @@ -0,0 +1,59 @@ +message = $error['code'] .' '. $error['message']; + } else { + $this->message = $error['code'] .' '. $error['message']." " + . substr($error['sqltext'], 0, $error['offset']) + . "*" + . substr($error['sqltext'], $error['offset']); + } + $this->code = $error['code']; + } else if (is_string($error)) { + $this->message = $error; + } + if (!$this->code && $code) { + $this->code = $code; + } + } +} diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php b/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php index 50991e96c..ba27b9ee7 100644 --- a/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php +++ b/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -37,7 +37,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Ibm.php b/library/vendor/Zend/Db/Adapter/Pdo/Ibm.php new file mode 100644 index 000000000..cfb11a35f --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Pdo/Ibm.php @@ -0,0 +1,354 @@ + Zend_Db::INT_TYPE, + Zend_Db::BIGINT_TYPE => Zend_Db::BIGINT_TYPE, + Zend_Db::FLOAT_TYPE => Zend_Db::FLOAT_TYPE, + 'INTEGER' => Zend_Db::INT_TYPE, + 'SMALLINT' => Zend_Db::INT_TYPE, + 'BIGINT' => Zend_Db::BIGINT_TYPE, + 'DECIMAL' => Zend_Db::FLOAT_TYPE, + 'DEC' => Zend_Db::FLOAT_TYPE, + 'REAL' => Zend_Db::FLOAT_TYPE, + 'NUMERIC' => Zend_Db::FLOAT_TYPE, + 'DOUBLE PRECISION' => Zend_Db::FLOAT_TYPE, + 'FLOAT' => Zend_Db::FLOAT_TYPE + ); + + /** + * Creates a PDO object and connects to the database. + * + * The IBM data server is set. + * Current options are DB2 or IDS + * @todo also differentiate between z/OS and i/5 + * + * @return void + * @throws Zend_Db_Adapter_Exception + */ + public function _connect() + { + if ($this->_connection) { + return; + } + parent::_connect(); + + $this->getConnection()->setAttribute(Zend_Db::ATTR_STRINGIFY_FETCHES, true); + + try { + if ($this->_serverType === null) { + $server = substr($this->getConnection()->getAttribute(PDO::ATTR_SERVER_INFO), 0, 3); + + switch ($server) { + case 'DB2': + $this->_serverType = new Zend_Db_Adapter_Pdo_Ibm_Db2($this); + + // Add DB2-specific numeric types + $this->_numericDataTypes['DECFLOAT'] = Zend_Db::FLOAT_TYPE; + $this->_numericDataTypes['DOUBLE'] = Zend_Db::FLOAT_TYPE; + $this->_numericDataTypes['NUM'] = Zend_Db::FLOAT_TYPE; + + break; + case 'IDS': + $this->_serverType = new Zend_Db_Adapter_Pdo_Ibm_Ids($this); + + // Add IDS-specific numeric types + $this->_numericDataTypes['SERIAL'] = Zend_Db::INT_TYPE; + $this->_numericDataTypes['SERIAL8'] = Zend_Db::BIGINT_TYPE; + $this->_numericDataTypes['INT8'] = Zend_Db::BIGINT_TYPE; + $this->_numericDataTypes['SMALLFLOAT'] = Zend_Db::FLOAT_TYPE; + $this->_numericDataTypes['MONEY'] = Zend_Db::FLOAT_TYPE; + + break; + } + } + } catch (PDOException $e) { + /** @see Zend_Db_Adapter_Exception */ + $error = strpos($e->getMessage(), 'driver does not support that attribute'); + if ($error) { + throw new Zend_Db_Adapter_Exception("PDO_IBM driver extension is downlevel. Please use driver release version 1.2.1 or later", 0, $e); + } else { + throw new Zend_Db_Adapter_Exception($e->getMessage(), $e->getCode(), $e); + } + } + } + + /** + * Creates a PDO DSN for the adapter from $this->_config settings. + * + * @return string + */ + protected function _dsn() + { + $this->_checkRequiredOptions($this->_config); + + // check if using full connection string + if (array_key_exists('host', $this->_config)) { + $dsn = ';DATABASE=' . $this->_config['dbname'] + . ';HOSTNAME=' . $this->_config['host'] + . ';PORT=' . $this->_config['port'] + // PDO_IBM supports only DB2 TCPIP protocol + . ';PROTOCOL=' . 'TCPIP;'; + } else { + // catalogued connection + $dsn = $this->_config['dbname']; + } + return $this->_pdoType . ': ' . $dsn; + } + + /** + * Checks required options + * + * @param array $config + * @throws Zend_Db_Adapter_Exception + * @return void + */ + protected function _checkRequiredOptions(array $config) + { + parent::_checkRequiredOptions($config); + + if (array_key_exists('host', $this->_config) && + !array_key_exists('port', $config)) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("Configuration must have a key for 'port' when 'host' is specified"); + } + } + + /** + * Prepares an SQL statement. + * + * @param string $sql The SQL statement with placeholders. + * @param array $bind An array of data to bind to the placeholders. + * @return PDOStatement + */ + public function prepare($sql) + { + $this->_connect(); + $stmtClass = $this->_defaultStmtClass; + $stmt = new $stmtClass($this, $sql); + $stmt->setFetchMode($this->_fetchMode); + return $stmt; + } + + /** + * Returns a list of the tables in the database. + * + * @return array + */ + public function listTables() + { + $this->_connect(); + return $this->_serverType->listTables(); + } + + /** + * Returns the column descriptions for a table. + * + * The return value is an associative array keyed by the column name, + * as returned by the RDBMS. + * + * The value of each array element is an associative array + * with the following keys: + * + * SCHEMA_NAME => string; name of database or schema + * TABLE_NAME => string; + * COLUMN_NAME => string; column name + * COLUMN_POSITION => number; ordinal position of column in table + * DATA_TYPE => string; SQL datatype name of column + * DEFAULT => string; default expression of column, null if none + * NULLABLE => boolean; true if column can have nulls + * LENGTH => number; length of CHAR/VARCHAR + * SCALE => number; scale of NUMERIC/DECIMAL + * PRECISION => number; precision of NUMERIC/DECIMAL + * UNSIGNED => boolean; unsigned property of an integer type + * PRIMARY => boolean; true if column is part of the primary key + * PRIMARY_POSITION => integer; position of column in primary key + * + * @todo Discover integer unsigned property. + * + * @param string $tableName + * @param string $schemaName OPTIONAL + * @return array + */ + public function describeTable($tableName, $schemaName = null) + { + $this->_connect(); + return $this->_serverType->describeTable($tableName, $schemaName); + } + + /** + * Inserts a table row with specified data. + * Special handling for PDO_IBM + * remove empty slots + * + * @param mixed $table The table to insert data into. + * @param array $bind Column-value pairs. + * @return int The number of affected rows. + */ + public function insert($table, array $bind) + { + $this->_connect(); + $newbind = array(); + if (is_array($bind)) { + foreach ($bind as $name => $value) { + if($value !== null) { + $newbind[$name] = $value; + } + } + } + + return parent::insert($table, $newbind); + } + + /** + * Adds an adapter-specific LIMIT clause to the SELECT statement. + * + * @param string $sql + * @param integer $count + * @param integer $offset OPTIONAL + * @return string + */ + public function limit($sql, $count, $offset = 0) + { + $this->_connect(); + return $this->_serverType->limit($sql, $count, $offset); + } + + /** + * Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT + * column. + * + * @param string $tableName OPTIONAL + * @param string $primaryKey OPTIONAL + * @return integer + */ + public function lastInsertId($tableName = null, $primaryKey = null) + { + $this->_connect(); + + if ($tableName !== null) { + $sequenceName = $tableName; + if ($primaryKey) { + $sequenceName .= "_$primaryKey"; + } + $sequenceName .= '_seq'; + return $this->lastSequenceId($sequenceName); + } + + $id = $this->getConnection()->lastInsertId(); + + return $id; + } + + /** + * Return the most recent value from the specified sequence in the database. + * + * @param string $sequenceName + * @return integer + */ + public function lastSequenceId($sequenceName) + { + $this->_connect(); + return $this->_serverType->lastSequenceId($sequenceName); + } + + /** + * Generate a new value from the specified sequence in the database, + * and return it. + * + * @param string $sequenceName + * @return integer + */ + public function nextSequenceId($sequenceName) + { + $this->_connect(); + return $this->_serverType->nextSequenceId($sequenceName); + } + + /** + * Retrieve server version in PHP style + * Pdo_Idm doesn't support getAttribute(PDO::ATTR_SERVER_VERSION) + * @return string + */ + public function getServerVersion() + { + try { + $stmt = $this->query('SELECT service_level, fixpack_num FROM TABLE (sysproc.env_get_inst_info()) as INSTANCEINFO'); + $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); + if (count($result)) { + $matches = null; + if (preg_match('/((?:[0-9]{1,2}\.){1,3}[0-9]{1,2})/', $result[0][0], $matches)) { + return $matches[1]; + } else { + return null; + } + } + return null; + } catch (PDOException $e) { + return null; + } + } +} diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Ibm/Db2.php b/library/vendor/Zend/Db/Adapter/Pdo/Ibm/Db2.php new file mode 100644 index 000000000..1c11c8bd8 --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Pdo/Ibm/Db2.php @@ -0,0 +1,224 @@ +_adapter = $adapter; + } + + /** + * Returns a list of the tables in the database. + * + * @return array + */ + public function listTables() + { + $sql = "SELECT tabname " + . "FROM SYSCAT.TABLES "; + return $this->_adapter->fetchCol($sql); + } + + /** + * DB2 catalog lookup for describe table + * + * @param string $tableName + * @param string $schemaName OPTIONAL + * @return array + */ + public function describeTable($tableName, $schemaName = null) + { + $sql = "SELECT DISTINCT c.tabschema, c.tabname, c.colname, c.colno, + c.typename, c.default, c.nulls, c.length, c.scale, + c.identity, tc.type AS tabconsttype, k.colseq + FROM syscat.columns c + LEFT JOIN (syscat.keycoluse k JOIN syscat.tabconst tc + ON (k.tabschema = tc.tabschema + AND k.tabname = tc.tabname + AND tc.type = 'P')) + ON (c.tabschema = k.tabschema + AND c.tabname = k.tabname + AND c.colname = k.colname) + WHERE " + . $this->_adapter->quoteInto('UPPER(c.tabname) = UPPER(?)', $tableName); + if ($schemaName) { + $sql .= $this->_adapter->quoteInto(' AND UPPER(c.tabschema) = UPPER(?)', $schemaName); + } + $sql .= " ORDER BY c.colno"; + + $desc = array(); + $stmt = $this->_adapter->query($sql); + + /** + * To avoid case issues, fetch using FETCH_NUM + */ + $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); + + /** + * The ordering of columns is defined by the query so we can map + * to variables to improve readability + */ + $tabschema = 0; + $tabname = 1; + $colname = 2; + $colno = 3; + $typename = 4; + $default = 5; + $nulls = 6; + $length = 7; + $scale = 8; + $identityCol = 9; + $tabconstype = 10; + $colseq = 11; + + foreach ($result as $key => $row) { + list ($primary, $primaryPosition, $identity) = array(false, null, false); + if ($row[$tabconstype] == 'P') { + $primary = true; + $primaryPosition = $row[$colseq]; + } + /** + * In IBM DB2, an column can be IDENTITY + * even if it is not part of the PRIMARY KEY. + */ + if ($row[$identityCol] == 'Y') { + $identity = true; + } + + $desc[$this->_adapter->foldCase($row[$colname])] = array( + 'SCHEMA_NAME' => $this->_adapter->foldCase($row[$tabschema]), + 'TABLE_NAME' => $this->_adapter->foldCase($row[$tabname]), + 'COLUMN_NAME' => $this->_adapter->foldCase($row[$colname]), + 'COLUMN_POSITION' => $row[$colno]+1, + 'DATA_TYPE' => $row[$typename], + 'DEFAULT' => $row[$default], + 'NULLABLE' => (bool) ($row[$nulls] == 'Y'), + 'LENGTH' => $row[$length], + 'SCALE' => $row[$scale], + 'PRECISION' => ($row[$typename] == 'DECIMAL' ? $row[$length] : 0), + 'UNSIGNED' => false, + 'PRIMARY' => $primary, + 'PRIMARY_POSITION' => $primaryPosition, + 'IDENTITY' => $identity + ); + } + + return $desc; + } + + /** + * Adds a DB2-specific LIMIT clause to the SELECT statement. + * + * @param string $sql + * @param integer $count + * @param integer $offset OPTIONAL + * @throws Zend_Db_Adapter_Exception + * @return string + */ + public function limit($sql, $count, $offset = 0) + { + $count = intval($count); + if ($count < 0) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid"); + } else { + $offset = intval($offset); + if ($offset < 0) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid"); + } + + if ($offset == 0 && $count > 0) { + $limit_sql = $sql . " FETCH FIRST $count ROWS ONLY"; + return $limit_sql; + } + /** + * DB2 does not implement the LIMIT clause as some RDBMS do. + * We have to simulate it with subqueries and ROWNUM. + * Unfortunately because we use the column wildcard "*", + * this puts an extra column into the query result set. + */ + $limit_sql = "SELECT z2.* + FROM ( + SELECT ROW_NUMBER() OVER() AS \"ZEND_DB_ROWNUM\", z1.* + FROM ( + " . $sql . " + ) z1 + ) z2 + WHERE z2.zend_db_rownum BETWEEN " . ($offset+1) . " AND " . ($offset+$count); + } + return $limit_sql; + } + + /** + * DB2-specific last sequence id + * + * @param string $sequenceName + * @return integer + */ + public function lastSequenceId($sequenceName) + { + $sql = 'SELECT PREVVAL FOR '.$this->_adapter->quoteIdentifier($sequenceName).' AS VAL FROM SYSIBM.SYSDUMMY1'; + $value = $this->_adapter->fetchOne($sql); + return $value; + } + + /** + * DB2-specific sequence id value + * + * @param string $sequenceName + * @return integer + */ + public function nextSequenceId($sequenceName) + { + $sql = 'SELECT NEXTVAL FOR '.$this->_adapter->quoteIdentifier($sequenceName).' AS VAL FROM SYSIBM.SYSDUMMY1'; + $value = $this->_adapter->fetchOne($sql); + return $value; + } +} diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Ibm/Ids.php b/library/vendor/Zend/Db/Adapter/Pdo/Ibm/Ids.php new file mode 100644 index 000000000..eeec43f28 --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Pdo/Ibm/Ids.php @@ -0,0 +1,297 @@ +_adapter = $adapter; + } + + /** + * Returns a list of the tables in the database. + * + * @return array + */ + public function listTables() + { + $sql = "SELECT tabname " + . "FROM systables "; + + return $this->_adapter->fetchCol($sql); + } + + /** + * IDS catalog lookup for describe table + * + * @param string $tableName + * @param string $schemaName OPTIONAL + * @return array + */ + public function describeTable($tableName, $schemaName = null) + { + // this is still a work in progress + + $sql= "SELECT DISTINCT t.owner, t.tabname, c.colname, c.colno, c.coltype, + d.default, c.collength, t.tabid + FROM syscolumns c + JOIN systables t ON c.tabid = t.tabid + LEFT JOIN sysdefaults d ON c.tabid = d.tabid AND c.colno = d.colno + WHERE " + . $this->_adapter->quoteInto('UPPER(t.tabname) = UPPER(?)', $tableName); + if ($schemaName) { + $sql .= $this->_adapter->quoteInto(' AND UPPER(t.owner) = UPPER(?)', $schemaName); + } + $sql .= " ORDER BY c.colno"; + + $desc = array(); + $stmt = $this->_adapter->query($sql); + + $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); + + /** + * The ordering of columns is defined by the query so we can map + * to variables to improve readability + */ + $tabschema = 0; + $tabname = 1; + $colname = 2; + $colno = 3; + $typename = 4; + $default = 5; + $length = 6; + $tabid = 7; + + $primaryCols = null; + + foreach ($result as $key => $row) { + $primary = false; + $primaryPosition = null; + + if (!$primaryCols) { + $primaryCols = $this->_getPrimaryInfo($row[$tabid]); + } + + if (array_key_exists($row[$colno], $primaryCols)) { + $primary = true; + $primaryPosition = $primaryCols[$row[$colno]]; + } + + $identity = false; + if ($row[$typename] == 6 + 256 || + $row[$typename] == 18 + 256) { + $identity = true; + } + + $desc[$this->_adapter->foldCase($row[$colname])] = array ( + 'SCHEMA_NAME' => $this->_adapter->foldCase($row[$tabschema]), + 'TABLE_NAME' => $this->_adapter->foldCase($row[$tabname]), + 'COLUMN_NAME' => $this->_adapter->foldCase($row[$colname]), + 'COLUMN_POSITION' => $row[$colno], + 'DATA_TYPE' => $this->_getDataType($row[$typename]), + 'DEFAULT' => $row[$default], + 'NULLABLE' => (bool) !($row[$typename] - 256 >= 0), + 'LENGTH' => $row[$length], + 'SCALE' => ($row[$typename] == 5 ? $row[$length]&255 : 0), + 'PRECISION' => ($row[$typename] == 5 ? (int)($row[$length]/256) : 0), + 'UNSIGNED' => false, + 'PRIMARY' => $primary, + 'PRIMARY_POSITION' => $primaryPosition, + 'IDENTITY' => $identity + ); + } + + return $desc; + } + + /** + * Map number representation of a data type + * to a string + * + * @param int $typeNo + * @return string + */ + protected function _getDataType($typeNo) + { + $typemap = array( + 0 => "CHAR", + 1 => "SMALLINT", + 2 => "INTEGER", + 3 => "FLOAT", + 4 => "SMALLFLOAT", + 5 => "DECIMAL", + 6 => "SERIAL", + 7 => "DATE", + 8 => "MONEY", + 9 => "NULL", + 10 => "DATETIME", + 11 => "BYTE", + 12 => "TEXT", + 13 => "VARCHAR", + 14 => "INTERVAL", + 15 => "NCHAR", + 16 => "NVARCHAR", + 17 => "INT8", + 18 => "SERIAL8", + 19 => "SET", + 20 => "MULTISET", + 21 => "LIST", + 22 => "Unnamed ROW", + 40 => "Variable-length opaque type", + 4118 => "Named ROW" + ); + + if ($typeNo - 256 >= 0) { + $typeNo = $typeNo - 256; + } + + return $typemap[$typeNo]; + } + + /** + * Helper method to retrieve primary key column + * and column location + * + * @param int $tabid + * @return array + */ + protected function _getPrimaryInfo($tabid) + { + $sql = "SELECT i.part1, i.part2, i.part3, i.part4, i.part5, i.part6, + i.part7, i.part8, i.part9, i.part10, i.part11, i.part12, + i.part13, i.part14, i.part15, i.part16 + FROM sysindexes i + JOIN sysconstraints c ON c.idxname = i.idxname + WHERE i.tabid = " . $tabid . " AND c.constrtype = 'P'"; + + $stmt = $this->_adapter->query($sql); + $results = $stmt->fetchAll(); + + $cols = array(); + + // this should return only 1 row + // unless there is no primary key, + // in which case, the empty array is returned + if ($results) { + $row = $results[0]; + } else { + return $cols; + } + + $position = 0; + foreach ($row as $key => $colno) { + $position++; + if ($colno == 0) { + return $cols; + } else { + $cols[$colno] = $position; + } + } + } + + /** + * Adds an IDS-specific LIMIT clause to the SELECT statement. + * + * @param string $sql + * @param integer $count + * @param integer $offset OPTIONAL + * @throws Zend_Db_Adapter_Exception + * @return string + */ + public function limit($sql, $count, $offset = 0) + { + $count = intval($count); + if ($count < 0) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid"); + } else if ($count == 0) { + $limit_sql = str_ireplace("SELECT", "SELECT * FROM (SELECT", $sql); + $limit_sql .= ") WHERE 0 = 1"; + } else { + $offset = intval($offset); + if ($offset < 0) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid"); + } + if ($offset == 0) { + $limit_sql = str_ireplace("SELECT", "SELECT FIRST $count", $sql); + } else { + $limit_sql = str_ireplace("SELECT", "SELECT SKIP $offset LIMIT $count", $sql); + } + } + return $limit_sql; + } + + /** + * IDS-specific last sequence id + * + * @param string $sequenceName + * @return integer + */ + public function lastSequenceId($sequenceName) + { + $sql = 'SELECT '.$this->_adapter->quoteIdentifier($sequenceName).'.CURRVAL FROM ' + .'systables WHERE tabid = 1'; + $value = $this->_adapter->fetchOne($sql); + return $value; + } + + /** + * IDS-specific sequence id value + * + * @param string $sequenceName + * @return integer + */ + public function nextSequenceId($sequenceName) + { + $sql = 'SELECT '.$this->_adapter->quoteIdentifier($sequenceName).'.NEXTVAL FROM ' + .'systables WHERE tabid = 1'; + $value = $this->_adapter->fetchOne($sql); + return $value; + } +} diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Mssql.php b/library/vendor/Zend/Db/Adapter/Pdo/Mssql.php new file mode 100644 index 000000000..762101aac --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Pdo/Mssql.php @@ -0,0 +1,420 @@ + Zend_Db::INT_TYPE, + Zend_Db::BIGINT_TYPE => Zend_Db::BIGINT_TYPE, + Zend_Db::FLOAT_TYPE => Zend_Db::FLOAT_TYPE, + 'INT' => Zend_Db::INT_TYPE, + 'SMALLINT' => Zend_Db::INT_TYPE, + 'TINYINT' => Zend_Db::INT_TYPE, + 'BIGINT' => Zend_Db::BIGINT_TYPE, + 'DECIMAL' => Zend_Db::FLOAT_TYPE, + 'FLOAT' => Zend_Db::FLOAT_TYPE, + 'MONEY' => Zend_Db::FLOAT_TYPE, + 'NUMERIC' => Zend_Db::FLOAT_TYPE, + 'REAL' => Zend_Db::FLOAT_TYPE, + 'SMALLMONEY' => Zend_Db::FLOAT_TYPE + ); + + /** + * Creates a PDO DSN for the adapter from $this->_config settings. + * + * @return string + */ + protected function _dsn() + { + // baseline of DSN parts + $dsn = $this->_config; + + // don't pass the username and password in the DSN + unset($dsn['username']); + unset($dsn['password']); + unset($dsn['options']); + unset($dsn['persistent']); + unset($dsn['driver_options']); + + if (isset($dsn['port'])) { + $seperator = ':'; + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $seperator = ','; + } + $dsn['host'] .= $seperator . $dsn['port']; + unset($dsn['port']); + } + + // this driver supports multiple DSN prefixes + // @see http://www.php.net/manual/en/ref.pdo-dblib.connection.php + if (isset($dsn['pdoType'])) { + switch (strtolower($dsn['pdoType'])) { + case 'freetds': + case 'sybase': + $this->_pdoType = 'sybase'; + break; + case 'mssql': + $this->_pdoType = 'mssql'; + break; + case 'dblib': + default: + $this->_pdoType = 'dblib'; + break; + } + unset($dsn['pdoType']); + } + + // use all remaining parts in the DSN + foreach ($dsn as $key => $val) { + $dsn[$key] = "$key=$val"; + } + + $dsn = $this->_pdoType . ':' . implode(';', $dsn); + return $dsn; + } + + /** + * @return void + */ + protected function _connect() + { + if ($this->_connection) { + return; + } + parent::_connect(); + $this->_connection->exec('SET QUOTED_IDENTIFIER ON'); + } + + /** + * Begin a transaction. + * + * It is necessary to override the abstract PDO transaction functions here, as + * the PDO driver for MSSQL does not support transactions. + */ + protected function _beginTransaction() + { + $this->_connect(); + $this->_connection->exec('BEGIN TRANSACTION'); + return true; + } + + /** + * Commit a transaction. + * + * It is necessary to override the abstract PDO transaction functions here, as + * the PDO driver for MSSQL does not support transactions. + */ + protected function _commit() + { + $this->_connect(); + $this->_connection->exec('COMMIT TRANSACTION'); + return true; + } + + /** + * Roll-back a transaction. + * + * It is necessary to override the abstract PDO transaction functions here, as + * the PDO driver for MSSQL does not support transactions. + */ + protected function _rollBack() { + $this->_connect(); + $this->_connection->exec('ROLLBACK TRANSACTION'); + return true; + } + + /** + * Returns a list of the tables in the database. + * + * @return array + */ + public function listTables() + { + $sql = "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name"; + return $this->fetchCol($sql); + } + + /** + * Returns the column descriptions for a table. + * + * The return value is an associative array keyed by the column name, + * as returned by the RDBMS. + * + * The value of each array element is an associative array + * with the following keys: + * + * SCHEMA_NAME => string; name of database or schema + * TABLE_NAME => string; + * COLUMN_NAME => string; column name + * COLUMN_POSITION => number; ordinal position of column in table + * DATA_TYPE => string; SQL datatype name of column + * DEFAULT => string; default expression of column, null if none + * NULLABLE => boolean; true if column can have nulls + * LENGTH => number; length of CHAR/VARCHAR + * SCALE => number; scale of NUMERIC/DECIMAL + * PRECISION => number; precision of NUMERIC/DECIMAL + * UNSIGNED => boolean; unsigned property of an integer type + * PRIMARY => boolean; true if column is part of the primary key + * PRIMARY_POSITION => integer; position of column in primary key + * PRIMARY_AUTO => integer; position of auto-generated column in primary key + * + * @todo Discover column primary key position. + * @todo Discover integer unsigned property. + * + * @param string $tableName + * @param string $schemaName OPTIONAL + * @return array + */ + public function describeTable($tableName, $schemaName = null) + { + if ($schemaName != null) { + if (strpos($schemaName, '.') !== false) { + $result = explode('.', $schemaName); + $schemaName = $result[1]; + } + } + /** + * Discover metadata information about this table. + */ + $sql = "exec sp_columns @table_name = " . $this->quoteIdentifier($tableName, true); + if ($schemaName != null) { + $sql .= ", @table_owner = " . $this->quoteIdentifier($schemaName, true); + } + + $stmt = $this->query($sql); + $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); + + $table_name = 2; + $column_name = 3; + $type_name = 5; + $precision = 6; + $length = 7; + $scale = 8; + $nullable = 10; + $column_def = 12; + $column_position = 16; + + /** + * Discover primary key column(s) for this table. + */ + $sql = "exec sp_pkeys @table_name = " . $this->quoteIdentifier($tableName, true); + if ($schemaName != null) { + $sql .= ", @table_owner = " . $this->quoteIdentifier($schemaName, true); + } + + $stmt = $this->query($sql); + $primaryKeysResult = $stmt->fetchAll(Zend_Db::FETCH_NUM); + $primaryKeyColumn = array(); + $pkey_column_name = 3; + $pkey_key_seq = 4; + foreach ($primaryKeysResult as $pkeysRow) { + $primaryKeyColumn[$pkeysRow[$pkey_column_name]] = $pkeysRow[$pkey_key_seq]; + } + + $desc = array(); + $p = 1; + foreach ($result as $key => $row) { + $identity = false; + $words = explode(' ', $row[$type_name], 2); + if (isset($words[0])) { + $type = $words[0]; + if (isset($words[1])) { + $identity = (bool) preg_match('/identity/', $words[1]); + } + } + + $isPrimary = array_key_exists($row[$column_name], $primaryKeyColumn); + if ($isPrimary) { + $primaryPosition = $primaryKeyColumn[$row[$column_name]]; + } else { + $primaryPosition = null; + } + + $desc[$this->foldCase($row[$column_name])] = array( + 'SCHEMA_NAME' => null, // @todo + 'TABLE_NAME' => $this->foldCase($row[$table_name]), + 'COLUMN_NAME' => $this->foldCase($row[$column_name]), + 'COLUMN_POSITION' => (int) $row[$column_position], + 'DATA_TYPE' => $type, + 'DEFAULT' => $row[$column_def], + 'NULLABLE' => (bool) $row[$nullable], + 'LENGTH' => $row[$length], + 'SCALE' => $row[$scale], + 'PRECISION' => $row[$precision], + 'UNSIGNED' => null, // @todo + 'PRIMARY' => $isPrimary, + 'PRIMARY_POSITION' => $primaryPosition, + 'IDENTITY' => $identity + ); + } + return $desc; + } + + /** + * Adds an adapter-specific LIMIT clause to the SELECT statement. + * + * @link http://lists.bestpractical.com/pipermail/rt-devel/2005-June/007339.html + * + * @param string $sql + * @param integer $count + * @param integer $offset OPTIONAL + * @throws Zend_Db_Adapter_Exception + * @return string + */ + public function limit($sql, $count, $offset = 0) + { + $count = intval($count); + if ($count <= 0) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid"); + } + + $offset = intval($offset); + if ($offset < 0) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid"); + } + + $sql = preg_replace( + '/^SELECT\s+(DISTINCT\s)?/i', + 'SELECT $1TOP ' . ($count+$offset) . ' ', + $sql + ); + + if ($offset > 0) { + $orderby = stristr($sql, 'ORDER BY'); + + if ($orderby !== false) { + $orderParts = explode(',', substr($orderby, 8)); + $pregReplaceCount = null; + $orderbyInverseParts = array(); + foreach ($orderParts as $orderPart) { + $orderPart = rtrim($orderPart); + $inv = preg_replace('/\s+desc$/i', ' ASC', $orderPart, 1, $pregReplaceCount); + if ($pregReplaceCount) { + $orderbyInverseParts[] = $inv; + continue; + } + $inv = preg_replace('/\s+asc$/i', ' DESC', $orderPart, 1, $pregReplaceCount); + if ($pregReplaceCount) { + $orderbyInverseParts[] = $inv; + continue; + } else { + $orderbyInverseParts[] = $orderPart . ' DESC'; + } + } + + $orderbyInverse = 'ORDER BY ' . implode(', ', $orderbyInverseParts); + } + + + + + $sql = 'SELECT * FROM (SELECT TOP ' . $count . ' * FROM (' . $sql . ') AS inner_tbl'; + if ($orderby !== false) { + $sql .= ' ' . $orderbyInverse . ' '; + } + $sql .= ') AS outer_tbl'; + if ($orderby !== false) { + $sql .= ' ' . $orderby; + } + } + + return $sql; + } + + /** + * Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column. + * + * As a convention, on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence + * from the arguments and returns the last id generated by that sequence. + * On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method + * returns the last value generated for such a column, and the table name + * argument is disregarded. + * + * Microsoft SQL Server does not support sequences, so the arguments to + * this method are ignored. + * + * @param string $tableName OPTIONAL Name of table. + * @param string $primaryKey OPTIONAL Name of primary key column. + * @return string + * @throws Zend_Db_Adapter_Exception + */ + public function lastInsertId($tableName = null, $primaryKey = null) + { + $sql = 'SELECT SCOPE_IDENTITY()'; + return (int)$this->fetchOne($sql); + } + + /** + * Retrieve server version in PHP style + * Pdo_Mssql doesn't support getAttribute(PDO::ATTR_SERVER_VERSION) + * @return string + */ + public function getServerVersion() + { + try { + $stmt = $this->query("SELECT SERVERPROPERTY('productversion')"); + $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); + if (count($result)) { + return $result[0][0]; + } + return null; + } catch (PDOException $e) { + return null; + } + } +} diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Mysql.php b/library/vendor/Zend/Db/Adapter/Pdo/Mysql.php index b406b9a76..951d665c4 100644 --- a/library/vendor/Zend/Db/Adapter/Pdo/Mysql.php +++ b/library/vendor/Zend/Db/Adapter/Pdo/Mysql.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Abstract diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Oci.php b/library/vendor/Zend/Db/Adapter/Pdo/Oci.php new file mode 100644 index 000000000..eb4e6fcf1 --- /dev/null +++ b/library/vendor/Zend/Db/Adapter/Pdo/Oci.php @@ -0,0 +1,375 @@ + Zend_Db::INT_TYPE, + Zend_Db::BIGINT_TYPE => Zend_Db::BIGINT_TYPE, + Zend_Db::FLOAT_TYPE => Zend_Db::FLOAT_TYPE, + 'BINARY_DOUBLE' => Zend_Db::FLOAT_TYPE, + 'BINARY_FLOAT' => Zend_Db::FLOAT_TYPE, + 'NUMBER' => Zend_Db::FLOAT_TYPE + ); + + /** + * Creates a PDO DSN for the adapter from $this->_config settings. + * + * @return string + */ + protected function _dsn() + { + // baseline of DSN parts + $dsn = $this->_config; + + if (isset($dsn['host'])) { + $tns = 'dbname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)' . + '(HOST=' . $dsn['host'] . ')'; + + if (isset($dsn['port'])) { + $tns .= '(PORT=' . $dsn['port'] . ')'; + } else { + $tns .= '(PORT=1521)'; + } + + $tns .= '))(CONNECT_DATA=(SID=' . $dsn['dbname'] . ')))'; + } else { + $tns = 'dbname=' . $dsn['dbname']; + } + + if (isset($dsn['charset'])) { + $tns .= ';charset=' . $dsn['charset']; + } + + return $this->_pdoType . ':' . $tns; + } + + /** + * Quote a raw string. + * Most PDO drivers have an implementation for the quote() method, + * but the Oracle OCI driver must use the same implementation as the + * Zend_Db_Adapter_Abstract class. + * + * @param string $value Raw string + * @return string Quoted string + */ + protected function _quote($value) + { + if (is_int($value) || is_float($value)) { + return $value; + } + $value = str_replace("'", "''", $value); + return "'" . addcslashes($value, "\000\n\r\\\032") . "'"; + } + + /** + * Quote a table identifier and alias. + * + * @param string|array|Zend_Db_Expr $ident The identifier or expression. + * @param string $alias An alias for the table. + * @return string The quoted identifier and alias. + */ + public function quoteTableAs($ident, $alias = null, $auto = false) + { + // Oracle doesn't allow the 'AS' keyword between the table identifier/expression and alias. + return $this->_quoteIdentifierAs($ident, $alias, $auto, ' '); + } + + /** + * Returns a list of the tables in the database. + * + * @return array + */ + public function listTables() + { + $data = $this->fetchCol('SELECT table_name FROM all_tables'); + return $data; + } + + /** + * Returns the column descriptions for a table. + * + * The return value is an associative array keyed by the column name, + * as returned by the RDBMS. + * + * The value of each array element is an associative array + * with the following keys: + * + * SCHEMA_NAME => string; name of schema + * TABLE_NAME => string; + * COLUMN_NAME => string; column name + * COLUMN_POSITION => number; ordinal position of column in table + * DATA_TYPE => string; SQL datatype name of column + * DEFAULT => string; default expression of column, null if none + * NULLABLE => boolean; true if column can have nulls + * LENGTH => number; length of CHAR/VARCHAR + * SCALE => number; scale of NUMERIC/DECIMAL + * PRECISION => number; precision of NUMERIC/DECIMAL + * UNSIGNED => boolean; unsigned property of an integer type + * PRIMARY => boolean; true if column is part of the primary key + * PRIMARY_POSITION => integer; position of column in primary key + * IDENTITY => integer; true if column is auto-generated with unique values + * + * @todo Discover integer unsigned property. + * + * @param string $tableName + * @param string $schemaName OPTIONAL + * @return array + */ + public function describeTable($tableName, $schemaName = null) + { + $version = $this->getServerVersion(); + if (($version === null) || version_compare($version, '9.0.0', '>=')) { + $sql = "SELECT TC.TABLE_NAME, TC.OWNER, TC.COLUMN_NAME, TC.DATA_TYPE, + TC.DATA_DEFAULT, TC.NULLABLE, TC.COLUMN_ID, TC.DATA_LENGTH, + TC.DATA_SCALE, TC.DATA_PRECISION, C.CONSTRAINT_TYPE, CC.POSITION + FROM ALL_TAB_COLUMNS TC + LEFT JOIN (ALL_CONS_COLUMNS CC JOIN ALL_CONSTRAINTS C + ON (CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME AND CC.TABLE_NAME = C.TABLE_NAME AND CC.OWNER = C.OWNER AND C.CONSTRAINT_TYPE = 'P')) + ON TC.TABLE_NAME = CC.TABLE_NAME AND TC.COLUMN_NAME = CC.COLUMN_NAME + WHERE UPPER(TC.TABLE_NAME) = UPPER(:TBNAME)"; + $bind[':TBNAME'] = $tableName; + if ($schemaName) { + $sql .= ' AND UPPER(TC.OWNER) = UPPER(:SCNAME)'; + $bind[':SCNAME'] = $schemaName; + } + $sql .= ' ORDER BY TC.COLUMN_ID'; + } else { + $subSql="SELECT AC.OWNER, AC.TABLE_NAME, ACC.COLUMN_NAME, AC.CONSTRAINT_TYPE, ACC.POSITION + from ALL_CONSTRAINTS AC, ALL_CONS_COLUMNS ACC + WHERE ACC.CONSTRAINT_NAME = AC.CONSTRAINT_NAME + AND ACC.TABLE_NAME = AC.TABLE_NAME + AND ACC.OWNER = AC.OWNER + AND AC.CONSTRAINT_TYPE = 'P' + AND UPPER(AC.TABLE_NAME) = UPPER(:TBNAME)"; + $bind[':TBNAME'] = $tableName; + if ($schemaName) { + $subSql .= ' AND UPPER(ACC.OWNER) = UPPER(:SCNAME)'; + $bind[':SCNAME'] = $schemaName; + } + $sql="SELECT TC.TABLE_NAME, TC.OWNER, TC.COLUMN_NAME, TC.DATA_TYPE, + TC.DATA_DEFAULT, TC.NULLABLE, TC.COLUMN_ID, TC.DATA_LENGTH, + TC.DATA_SCALE, TC.DATA_PRECISION, CC.CONSTRAINT_TYPE, CC.POSITION + FROM ALL_TAB_COLUMNS TC, ($subSql) CC + WHERE UPPER(TC.TABLE_NAME) = UPPER(:TBNAME) + AND TC.OWNER = CC.OWNER(+) AND TC.TABLE_NAME = CC.TABLE_NAME(+) AND TC.COLUMN_NAME = CC.COLUMN_NAME(+)"; + if ($schemaName) { + $sql .= ' AND UPPER(TC.OWNER) = UPPER(:SCNAME)'; + } + $sql .= ' ORDER BY TC.COLUMN_ID'; + } + + $stmt = $this->query($sql, $bind); + + /** + * Use FETCH_NUM so we are not dependent on the CASE attribute of the PDO connection + */ + $result = $stmt->fetchAll(Zend_Db::FETCH_NUM); + + $table_name = 0; + $owner = 1; + $column_name = 2; + $data_type = 3; + $data_default = 4; + $nullable = 5; + $column_id = 6; + $data_length = 7; + $data_scale = 8; + $data_precision = 9; + $constraint_type = 10; + $position = 11; + + $desc = array(); + foreach ($result as $key => $row) { + list ($primary, $primaryPosition, $identity) = array(false, null, false); + if ($row[$constraint_type] == 'P') { + $primary = true; + $primaryPosition = $row[$position]; + /** + * Oracle does not support auto-increment keys. + */ + $identity = false; + } + $desc[$this->foldCase($row[$column_name])] = array( + 'SCHEMA_NAME' => $this->foldCase($row[$owner]), + 'TABLE_NAME' => $this->foldCase($row[$table_name]), + 'COLUMN_NAME' => $this->foldCase($row[$column_name]), + 'COLUMN_POSITION' => $row[$column_id], + 'DATA_TYPE' => $row[$data_type], + 'DEFAULT' => $row[$data_default], + 'NULLABLE' => (bool) ($row[$nullable] == 'Y'), + 'LENGTH' => $row[$data_length], + 'SCALE' => $row[$data_scale], + 'PRECISION' => $row[$data_precision], + 'UNSIGNED' => null, // @todo + 'PRIMARY' => $primary, + 'PRIMARY_POSITION' => $primaryPosition, + 'IDENTITY' => $identity + ); + } + return $desc; + } + + /** + * Return the most recent value from the specified sequence in the database. + * This is supported only on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null. + * + * @param string $sequenceName + * @return integer + */ + public function lastSequenceId($sequenceName) + { + $this->_connect(); + $value = $this->fetchOne('SELECT '.$this->quoteIdentifier($sequenceName, true).'.CURRVAL FROM dual'); + return $value; + } + + /** + * Generate a new value from the specified sequence in the database, and return it. + * This is supported only on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null. + * + * @param string $sequenceName + * @return integer + */ + public function nextSequenceId($sequenceName) + { + $this->_connect(); + $value = $this->fetchOne('SELECT '.$this->quoteIdentifier($sequenceName, true).'.NEXTVAL FROM dual'); + return $value; + } + + /** + * Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column. + * + * As a convention, on RDBMS brands that support sequences + * (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence + * from the arguments and returns the last id generated by that sequence. + * On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method + * returns the last value generated for such a column, and the table name + * argument is disregarded. + * + * Oracle does not support IDENTITY columns, so if the sequence is not + * specified, this method returns null. + * + * @param string $tableName OPTIONAL Name of table. + * @param string $primaryKey OPTIONAL Name of primary key column. + * @return string + * @throws Zend_Db_Adapter_Oracle_Exception + */ + public function lastInsertId($tableName = null, $primaryKey = null) + { + if ($tableName !== null) { + $sequenceName = $tableName; + if ($primaryKey) { + $sequenceName .= $this->foldCase("_$primaryKey"); + } + $sequenceName .= $this->foldCase('_seq'); + return $this->lastSequenceId($sequenceName); + } + // No support for IDENTITY columns; return null + return null; + } + + /** + * Adds an adapter-specific LIMIT clause to the SELECT statement. + * + * @param string $sql + * @param integer $count + * @param integer $offset + * @throws Zend_Db_Adapter_Exception + * @return string + */ + public function limit($sql, $count, $offset = 0) + { + $count = intval($count); + if ($count <= 0) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid"); + } + + $offset = intval($offset); + if ($offset < 0) { + /** @see Zend_Db_Adapter_Exception */ + throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid"); + } + + /** + * Oracle does not implement the LIMIT clause as some RDBMS do. + * We have to simulate it with subqueries and ROWNUM. + * Unfortunately because we use the column wildcard "*", + * this puts an extra column into the query result set. + */ + $limit_sql = "SELECT z2.* + FROM ( + SELECT z1.*, ROWNUM AS \"zend_db_rownum\" + FROM ( + " . $sql . " + ) z1 + ) z2 + WHERE z2.\"zend_db_rownum\" BETWEEN " . ($offset+1) . " AND " . ($offset+$count); + return $limit_sql; + } + +} diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Pgsql.php b/library/vendor/Zend/Db/Adapter/Pdo/Pgsql.php index 6eeebaa65..060ed2847 100644 --- a/library/vendor/Zend/Db/Adapter/Pdo/Pgsql.php +++ b/library/vendor/Zend/Db/Adapter/Pdo/Pgsql.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Adapter_Pdo_Pgsql extends Zend_Db_Adapter_Pdo_Abstract diff --git a/library/vendor/Zend/Db/Adapter/Pdo/Sqlite.php b/library/vendor/Zend/Db/Adapter/Pdo/Sqlite.php index c8261fc9a..22169b983 100644 --- a/library/vendor/Zend/Db/Adapter/Pdo/Sqlite.php +++ b/library/vendor/Zend/Db/Adapter/Pdo/Sqlite.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Adapter_Pdo_Sqlite extends Zend_Db_Adapter_Pdo_Abstract diff --git a/library/vendor/Zend/Db/Adapter/Sqlsrv.php b/library/vendor/Zend/Db/Adapter/Sqlsrv.php index 28a9fe8bb..ce3324f33 100644 --- a/library/vendor/Zend/Db/Adapter/Sqlsrv.php +++ b/library/vendor/Zend/Db/Adapter/Sqlsrv.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract diff --git a/library/vendor/Zend/Db/Adapter/Sqlsrv/Exception.php b/library/vendor/Zend/Db/Adapter/Sqlsrv/Exception.php index 803199825..2bbc84d6b 100644 --- a/library/vendor/Zend/Db/Adapter/Sqlsrv/Exception.php +++ b/library/vendor/Zend/Db/Adapter/Sqlsrv/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Adapter_Sqlsrv_Exception extends Zend_Db_Adapter_Exception diff --git a/library/vendor/Zend/Db/Exception.php b/library/vendor/Zend/Db/Exception.php index a8f2485eb..837c47334 100644 --- a/library/vendor/Zend/Db/Exception.php +++ b/library/vendor/Zend/Db/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Db - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Db - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Db/Expr.php b/library/vendor/Zend/Db/Expr.php index e4a406a45..d8843a4cd 100644 --- a/library/vendor/Zend/Db/Expr.php +++ b/library/vendor/Zend/Db/Expr.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Expr - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -43,7 +43,7 @@ * @category Zend * @package Zend_Db * @subpackage Expr - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Expr diff --git a/library/vendor/Zend/Db/Profiler.php b/library/vendor/Zend/Db/Profiler.php index d7fe10400..c80ec5db0 100644 --- a/library/vendor/Zend/Db/Profiler.php +++ b/library/vendor/Zend/Db/Profiler.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Profiler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Db * @subpackage Profiler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Profiler diff --git a/library/vendor/Zend/Db/Profiler/Exception.php b/library/vendor/Zend/Db/Profiler/Exception.php index 4a3217b8e..c2f76fa6f 100644 --- a/library/vendor/Zend/Db/Profiler/Exception.php +++ b/library/vendor/Zend/Db/Profiler/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Profiler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Db * @subpackage Profiler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Profiler_Exception extends Zend_Db_Exception diff --git a/library/vendor/Zend/Db/Profiler/Firebug.php b/library/vendor/Zend/Db/Profiler/Firebug.php index ec62e0103..248654d83 100644 --- a/library/vendor/Zend/Db/Profiler/Firebug.php +++ b/library/vendor/Zend/Db/Profiler/Firebug.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Profiler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Db * @subpackage Profiler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Profiler_Firebug extends Zend_Db_Profiler diff --git a/library/vendor/Zend/Db/Profiler/Query.php b/library/vendor/Zend/Db/Profiler/Query.php index a41cb7066..97a7fef1f 100644 --- a/library/vendor/Zend/Db/Profiler/Query.php +++ b/library/vendor/Zend/Db/Profiler/Query.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Profiler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Db * @subpackage Profiler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Profiler_Query diff --git a/library/vendor/Zend/Db/Select.php b/library/vendor/Zend/Db/Select.php index d6ca37f55..5e3bcda74 100644 --- a/library/vendor/Zend/Db/Select.php +++ b/library/vendor/Zend/Db/Select.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Select - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Db * @subpackage Select - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Select @@ -79,6 +79,8 @@ class Zend_Db_Select const SQL_ASC = 'ASC'; const SQL_DESC = 'DESC'; + const REGEX_COLUMN_EXPR = '/^([\w]*\(([^\(\)]|(?1))*\))$/'; + /** * Bind variables for query * @@ -504,7 +506,7 @@ class Zend_Db_Select } foreach ($spec as $val) { - if (preg_match('/^[\w]*\([^\)]*\)$/', (string) $val)) { + if (preg_match(self::REGEX_COLUMN_EXPR, (string) $val)) { $val = new Zend_Db_Expr($val); } $this->_parts[self::GROUP][] = $val; @@ -596,7 +598,7 @@ class Zend_Db_Select $val = trim($matches[1]); $direction = $matches[2]; } - if (preg_match('/^[\w]*\([^\)]*\)$/', $val)) { + if (preg_match(self::REGEX_COLUMN_EXPR, (string) $val)) { $val = new Zend_Db_Expr($val); } $this->_parts[self::ORDER][] = array($val, $direction); @@ -933,7 +935,7 @@ class Zend_Db_Select $alias = $m[2]; } // Check for columns that look like functions and convert to Zend_Db_Expr - if (preg_match('/^[\w]*\([^\)]*\)$/', $col)) { + if (preg_match(self::REGEX_COLUMN_EXPR, (string) $col)) { $col = new Zend_Db_Expr($col); } elseif (preg_match('/(.+)\.(.+)/', $col, $m)) { $currentCorrelationName = $m[1]; @@ -1085,7 +1087,7 @@ class Zend_Db_Select } } - return $sql .= ' ' . implode(', ', $columns); + return $sql . ' ' . implode(', ', $columns); } /** diff --git a/library/vendor/Zend/Db/Select/Exception.php b/library/vendor/Zend/Db/Select/Exception.php index 6c8b896f8..6e7bfac67 100644 --- a/library/vendor/Zend/Db/Select/Exception.php +++ b/library/vendor/Zend/Db/Select/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Select - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Db * @subpackage Select - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Db/Statement.php b/library/vendor/Zend/Db/Statement.php index 016478e9f..e1c46333b 100644 --- a/library/vendor/Zend/Db/Statement.php +++ b/library/vendor/Zend/Db/Statement.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Db_Statement implements Zend_Db_Statement_Interface diff --git a/library/vendor/Zend/Db/Statement/Db2.php b/library/vendor/Zend/Db/Statement/Db2.php new file mode 100644 index 000000000..b8178640a --- /dev/null +++ b/library/vendor/Zend/Db/Statement/Db2.php @@ -0,0 +1,354 @@ +_adapter->getConnection(); + + // db2_prepare on i5 emits errors, these need to be + // suppressed so that proper exceptions can be thrown + $this->_stmt = @db2_prepare($connection, $sql); + + if (!$this->_stmt) { + /** + * @see Zend_Db_Statement_Db2_Exception + */ + throw new Zend_Db_Statement_Db2_Exception( + db2_stmt_errormsg(), + db2_stmt_error() + ); + } + } + + /** + * Binds a parameter to the specified variable name. + * + * @param mixed $parameter Name the parameter, either integer or string. + * @param mixed $variable Reference to PHP variable containing the value. + * @param mixed $type OPTIONAL Datatype of SQL parameter. + * @param mixed $length OPTIONAL Length of SQL parameter. + * @param mixed $options OPTIONAL Other options. + * @return bool + * @throws Zend_Db_Statement_Db2_Exception + */ + public function _bindParam($parameter, &$variable, $type = null, $length = null, $options = null) + { + if ($type === null) { + $type = DB2_PARAM_IN; + } + + if (isset($options['data-type'])) { + $datatype = $options['data-type']; + } else { + $datatype = DB2_CHAR; + } + + if (!db2_bind_param($this->_stmt, $parameter, "variable", $type, $datatype)) { + /** + * @see Zend_Db_Statement_Db2_Exception + */ + throw new Zend_Db_Statement_Db2_Exception( + db2_stmt_errormsg(), + db2_stmt_error() + ); + } + + return true; + } + + /** + * Closes the cursor, allowing the statement to be executed again. + * + * @return bool + */ + public function closeCursor() + { + if (!$this->_stmt) { + return false; + } + db2_free_stmt($this->_stmt); + $this->_stmt = false; + return true; + } + + + /** + * Returns the number of columns in the result set. + * Returns null if the statement has no result set metadata. + * + * @return int The number of columns. + */ + public function columnCount() + { + if (!$this->_stmt) { + return false; + } + return db2_num_fields($this->_stmt); + } + + /** + * Retrieves the error code, if any, associated with the last operation on + * the statement handle. + * + * @return string error code. + */ + public function errorCode() + { + if (!$this->_stmt) { + return false; + } + + $error = db2_stmt_error(); + if ($error === '') { + return false; + } + + return $error; + } + + /** + * Retrieves an array of error information, if any, associated with the + * last operation on the statement handle. + * + * @return array + */ + public function errorInfo() + { + $error = $this->errorCode(); + if ($error === false){ + return false; + } + + /* + * Return three-valued array like PDO. But DB2 does not distinguish + * between SQLCODE and native RDBMS error code, so repeat the SQLCODE. + */ + return array( + $error, + $error, + db2_stmt_errormsg() + ); + } + + /** + * Executes a prepared statement. + * + * @param array $params OPTIONAL Values to bind to parameter placeholders. + * @return bool + * @throws Zend_Db_Statement_Db2_Exception + */ + public function _execute(array $params = null) + { + if (!$this->_stmt) { + return false; + } + + $retval = true; + if ($params !== null) { + $retval = @db2_execute($this->_stmt, $params); + } else { + $retval = @db2_execute($this->_stmt); + } + + if ($retval === false) { + /** + * @see Zend_Db_Statement_Db2_Exception + */ + throw new Zend_Db_Statement_Db2_Exception( + db2_stmt_errormsg(), + db2_stmt_error()); + } + + $this->_keys = array(); + if ($field_num = $this->columnCount()) { + for ($i = 0; $i < $field_num; $i++) { + $name = db2_field_name($this->_stmt, $i); + $this->_keys[] = $name; + } + } + + $this->_values = array(); + if ($this->_keys) { + $this->_values = array_fill(0, count($this->_keys), null); + } + + return $retval; + } + + /** + * Fetches a row from the result set. + * + * @param int $style OPTIONAL Fetch mode for this fetch operation. + * @param int $cursor OPTIONAL Absolute, relative, or other. + * @param int $offset OPTIONAL Number for absolute or relative cursors. + * @return mixed Array, object, or scalar depending on fetch mode. + * @throws Zend_Db_Statement_Db2_Exception + */ + public function fetch($style = null, $cursor = null, $offset = null) + { + if (!$this->_stmt) { + return false; + } + + if ($style === null) { + $style = $this->_fetchMode; + } + + switch ($style) { + case Zend_Db::FETCH_NUM : + $row = db2_fetch_array($this->_stmt); + break; + case Zend_Db::FETCH_ASSOC : + $row = db2_fetch_assoc($this->_stmt); + break; + case Zend_Db::FETCH_BOTH : + $row = db2_fetch_both($this->_stmt); + break; + case Zend_Db::FETCH_OBJ : + $row = db2_fetch_object($this->_stmt); + break; + case Zend_Db::FETCH_BOUND: + $row = db2_fetch_both($this->_stmt); + if ($row !== false) { + return $this->_fetchBound($row); + } + break; + default: + /** + * @see Zend_Db_Statement_Db2_Exception + */ + throw new Zend_Db_Statement_Db2_Exception("Invalid fetch mode '$style' specified"); + break; + } + + return $row; + } + + /** + * Fetches the next row and returns it as an object. + * + * @param string $class OPTIONAL Name of the class to create. + * @param array $config OPTIONAL Constructor arguments for the class. + * @return mixed One object instance of the specified class. + */ + public function fetchObject($class = 'stdClass', array $config = array()) + { + $obj = $this->fetch(Zend_Db::FETCH_OBJ); + return $obj; + } + + /** + * Retrieves the next rowset (result set) for a SQL statement that has + * multiple result sets. An example is a stored procedure that returns + * the results of multiple queries. + * + * @return bool + * @throws Zend_Db_Statement_Db2_Exception + */ + public function nextRowset() + { + /** + * @see Zend_Db_Statement_Db2_Exception + */ + throw new Zend_Db_Statement_Db2_Exception(__FUNCTION__ . '() is not implemented'); + } + + /** + * Returns the number of rows affected by the execution of the + * last INSERT, DELETE, or UPDATE statement executed by this + * statement object. + * + * @return int The number of rows affected. + */ + public function rowCount() + { + if (!$this->_stmt) { + return false; + } + + $num = @db2_num_rows($this->_stmt); + + if ($num === false) { + return 0; + } + + return $num; + } + + /** + * Returns an array containing all of the result set rows. + * + * @param int $style OPTIONAL Fetch mode. + * @param int $col OPTIONAL Column number, if fetch mode is by column. + * @return array Collection of rows, each in a format by the fetch mode. + * + * Behaves like parent, but if limit() + * is used, the final result removes the extra column + * 'zend_db_rownum' + */ + public function fetchAll($style = null, $col = null) + { + $data = parent::fetchAll($style, $col); + $results = array(); + $remove = $this->_adapter->foldCase('ZEND_DB_ROWNUM'); + + foreach ($data as $row) { + if (is_array($row) && array_key_exists($remove, $row)) { + unset($row[$remove]); + } + $results[] = $row; + } + return $results; + } +} diff --git a/library/vendor/Zend/Amf/Value/ByteArray.php b/library/vendor/Zend/Db/Statement/Db2/Exception.php similarity index 54% rename from library/vendor/Zend/Amf/Value/ByteArray.php rename to library/vendor/Zend/Db/Statement/Db2/Exception.php index 0ab5b81da..d598a8527 100644 --- a/library/vendor/Zend/Amf/Value/ByteArray.php +++ b/library/vendor/Zend/Db/Statement/Db2/Exception.php @@ -13,46 +13,45 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Amf - * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Db + * @subpackage Statement + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** - * Wrapper class to store an AMF3 flash.utils.ByteArray - * - * @package Zend_Amf - * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * Zend_Db_Statement_Exception + */ + +/** + * @package Zend_Db + * @subpackage Statement + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Amf_Value_ByteArray + +class Zend_Db_Statement_Db2_Exception extends Zend_Db_Statement_Exception { /** - * @var string ByteString Data + * @var string */ - protected $_data = ''; + protected $code = '00000'; /** - * Create a ByteArray - * - * @param string $data - * @return void + * @var string */ - public function __construct($data) - { - $this->_data = $data; - } + protected $message = 'unknown exception'; /** - * Return the byte stream - * - * @return string + * @param string $msg + * @param string $state */ - public function getData() + function __construct($msg = 'unknown exception', $state = '00000') { - return $this->_data; + $this->message = $msg; + $this->code = $state; } + } + diff --git a/library/vendor/Zend/Db/Statement/Exception.php b/library/vendor/Zend/Db/Statement/Exception.php index 29bbecdb3..af5869976 100644 --- a/library/vendor/Zend/Db/Statement/Exception.php +++ b/library/vendor/Zend/Db/Statement/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Exception extends Zend_Db_Exception diff --git a/library/vendor/Zend/Db/Statement/Interface.php b/library/vendor/Zend/Db/Statement/Interface.php index eaeb0bf4b..7154d9141 100644 --- a/library/vendor/Zend/Db/Statement/Interface.php +++ b/library/vendor/Zend/Db/Statement/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Db_Statement_Interface diff --git a/library/vendor/Zend/Db/Statement/Mysqli.php b/library/vendor/Zend/Db/Statement/Mysqli.php new file mode 100644 index 000000000..366d9bf36 --- /dev/null +++ b/library/vendor/Zend/Db/Statement/Mysqli.php @@ -0,0 +1,356 @@ +_adapter->getConnection(); + + $this->_stmt = $mysqli->prepare($sql); + + if ($this->_stmt === false || $mysqli->errno) { + /** + * @see Zend_Db_Statement_Mysqli_Exception + */ + throw new Zend_Db_Statement_Mysqli_Exception("Mysqli prepare error: " . $mysqli->error, $mysqli->errno); + } + } + + /** + * Binds a parameter to the specified variable name. + * + * @param mixed $parameter Name the parameter, either integer or string. + * @param mixed $variable Reference to PHP variable containing the value. + * @param mixed $type OPTIONAL Datatype of SQL parameter. + * @param mixed $length OPTIONAL Length of SQL parameter. + * @param mixed $options OPTIONAL Other options. + * @return bool + * @throws Zend_Db_Statement_Mysqli_Exception + */ + protected function _bindParam($parameter, &$variable, $type = null, $length = null, $options = null) + { + return true; + } + + /** + * Closes the cursor and the statement. + * + * @return bool + */ + public function close() + { + if ($this->_stmt) { + $r = $this->_stmt->close(); + $this->_stmt = null; + return $r; + } + return false; + } + + /** + * Closes the cursor, allowing the statement to be executed again. + * + * @return bool + */ + public function closeCursor() + { + if ($stmt = $this->_stmt) { + $mysqli = $this->_adapter->getConnection(); + while ($mysqli->more_results()) { + $mysqli->next_result(); + } + $this->_stmt->free_result(); + return $this->_stmt->reset(); + } + return false; + } + + /** + * Returns the number of columns in the result set. + * Returns null if the statement has no result set metadata. + * + * @return int The number of columns. + */ + public function columnCount() + { + if (isset($this->_meta) && $this->_meta) { + return $this->_meta->field_count; + } + return 0; + } + + /** + * Retrieves the error code, if any, associated with the last operation on + * the statement handle. + * + * @return string error code. + */ + public function errorCode() + { + if (!$this->_stmt) { + return false; + } + return substr($this->_stmt->sqlstate, 0, 5); + } + + /** + * Retrieves an array of error information, if any, associated with the + * last operation on the statement handle. + * + * @return array + */ + public function errorInfo() + { + if (!$this->_stmt) { + return false; + } + return array( + substr($this->_stmt->sqlstate, 0, 5), + $this->_stmt->errno, + $this->_stmt->error, + ); + } + + /** + * Executes a prepared statement. + * + * @param array $params OPTIONAL Values to bind to parameter placeholders. + * @return bool + * @throws Zend_Db_Statement_Mysqli_Exception + */ + public function _execute(array $params = null) + { + if (!$this->_stmt) { + return false; + } + + // if no params were given as an argument to execute(), + // then default to the _bindParam array + if ($params === null) { + $params = $this->_bindParam; + } + // send $params as input parameters to the statement + if ($params) { + array_unshift($params, str_repeat('s', count($params))); + $stmtParams = array(); + foreach ($params as $k => &$value) { + $stmtParams[$k] = &$value; + } + call_user_func_array( + array($this->_stmt, 'bind_param'), + $stmtParams + ); + } + + // execute the statement + $retval = $this->_stmt->execute(); + if ($retval === false) { + /** + * @see Zend_Db_Statement_Mysqli_Exception + */ + throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . $this->_stmt->error, $this->_stmt->errno); + } + + + // retain metadata + if ($this->_meta === null) { + $this->_meta = $this->_stmt->result_metadata(); + if ($this->_stmt->errno) { + /** + * @see Zend_Db_Statement_Mysqli_Exception + */ + throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement metadata error: " . $this->_stmt->error, $this->_stmt->errno); + } + } + + // statements that have no result set do not return metadata + if ($this->_meta !== false) { + + // get the column names that will result + $this->_keys = array(); + foreach ($this->_meta->fetch_fields() as $col) { + $this->_keys[] = $this->_adapter->foldCase($col->name); + } + + // set up a binding space for result variables + $this->_values = array_fill(0, count($this->_keys), null); + + // set up references to the result binding space. + // just passing $this->_values in the call_user_func_array() + // below won't work, you need references. + $refs = array(); + foreach ($this->_values as $i => &$f) { + $refs[$i] = &$f; + } + + $this->_stmt->store_result(); + // bind to the result variables + call_user_func_array( + array($this->_stmt, 'bind_result'), + $this->_values + ); + } + return $retval; + } + + + /** + * Fetches a row from the result set. + * + * @param int $style OPTIONAL Fetch mode for this fetch operation. + * @param int $cursor OPTIONAL Absolute, relative, or other. + * @param int $offset OPTIONAL Number for absolute or relative cursors. + * @return mixed Array, object, or scalar depending on fetch mode. + * @throws Zend_Db_Statement_Mysqli_Exception + */ + public function fetch($style = null, $cursor = null, $offset = null) + { + if (!$this->_stmt) { + return false; + } + // fetch the next result + $retval = $this->_stmt->fetch(); + switch ($retval) { + case null: // end of data + case false: // error occurred + $this->_stmt->reset(); + return false; + default: + // fallthrough + } + + // make sure we have a fetch mode + if ($style === null) { + $style = $this->_fetchMode; + } + + // dereference the result values, otherwise things like fetchAll() + // return the same values for every entry (because of the reference). + $values = array(); + foreach ($this->_values as $key => $val) { + $values[] = $val; + } + + $row = false; + switch ($style) { + case Zend_Db::FETCH_NUM: + $row = $values; + break; + case Zend_Db::FETCH_ASSOC: + $row = array_combine($this->_keys, $values); + break; + case Zend_Db::FETCH_BOTH: + $assoc = array_combine($this->_keys, $values); + $row = array_merge($values, $assoc); + break; + case Zend_Db::FETCH_OBJ: + $row = (object) array_combine($this->_keys, $values); + break; + case Zend_Db::FETCH_BOUND: + $assoc = array_combine($this->_keys, $values); + $row = array_merge($values, $assoc); + return $this->_fetchBound($row); + break; + default: + /** + * @see Zend_Db_Statement_Mysqli_Exception + */ + throw new Zend_Db_Statement_Mysqli_Exception("Invalid fetch mode '$style' specified"); + break; + } + return $row; + } + + /** + * Retrieves the next rowset (result set) for a SQL statement that has + * multiple result sets. An example is a stored procedure that returns + * the results of multiple queries. + * + * @return bool + * @throws Zend_Db_Statement_Mysqli_Exception + */ + public function nextRowset() + { + /** + * @see Zend_Db_Statement_Mysqli_Exception + */ + throw new Zend_Db_Statement_Mysqli_Exception(__FUNCTION__.'() is not implemented'); + } + + /** + * Returns the number of rows affected by the execution of the + * last INSERT, DELETE, or UPDATE statement executed by this + * statement object. + * + * @return int The number of rows affected. + */ + public function rowCount() + { + if (!$this->_adapter) { + return false; + } + $mysqli = $this->_adapter->getConnection(); + return $mysqli->affected_rows; + } + +} diff --git a/library/vendor/Zend/Db/Statement/Mysqli/Exception.php b/library/vendor/Zend/Db/Statement/Mysqli/Exception.php new file mode 100644 index 000000000..89c74ecd0 --- /dev/null +++ b/library/vendor/Zend/Db/Statement/Mysqli/Exception.php @@ -0,0 +1,37 @@ +_lobAsString = (bool) $lob_as_string; + return $this; + } + + /** + * Return whether or not LOB are returned as string + * + * @return boolean + */ + public function getLobAsString() + { + return $this->_lobAsString; + } + + /** + * Prepares statement handle + * + * @param string $sql + * @return void + * @throws Zend_Db_Statement_Oracle_Exception + */ + protected function _prepare($sql) + { + $connection = $this->_adapter->getConnection(); + $this->_stmt = @oci_parse($connection, $sql); + if (!$this->_stmt) { + /** + * @see Zend_Db_Statement_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception(oci_error($connection)); + } + } + + /** + * Binds a parameter to the specified variable name. + * + * @param mixed $parameter Name the parameter, either integer or string. + * @param mixed $variable Reference to PHP variable containing the value. + * @param mixed $type OPTIONAL Datatype of SQL parameter. + * @param mixed $length OPTIONAL Length of SQL parameter. + * @param mixed $options OPTIONAL Other options. + * @return bool + * @throws Zend_Db_Statement_Exception + */ + protected function _bindParam($parameter, &$variable, $type = null, $length = null, $options = null) + { + // default value + if ($type === NULL) { + $type = SQLT_CHR; + } + + // default value + if ($length === NULL) { + $length = -1; + } + + $retval = @oci_bind_by_name($this->_stmt, $parameter, $variable, $length, $type); + if ($retval === false) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); + } + + return true; + } + + /** + * Closes the cursor, allowing the statement to be executed again. + * + * @return bool + */ + public function closeCursor() + { + if (!$this->_stmt) { + return false; + } + + oci_free_statement($this->_stmt); + $this->_stmt = false; + return true; + } + + /** + * Returns the number of columns in the result set. + * Returns null if the statement has no result set metadata. + * + * @return int The number of columns. + */ + public function columnCount() + { + if (!$this->_stmt) { + return false; + } + + return oci_num_fields($this->_stmt); + } + + + /** + * Retrieves the error code, if any, associated with the last operation on + * the statement handle. + * + * @return string error code. + */ + public function errorCode() + { + if (!$this->_stmt) { + return false; + } + + $error = oci_error($this->_stmt); + + if (!$error) { + return false; + } + + return $error['code']; + } + + + /** + * Retrieves an array of error information, if any, associated with the + * last operation on the statement handle. + * + * @return array + */ + public function errorInfo() + { + if (!$this->_stmt) { + return false; + } + + $error = oci_error($this->_stmt); + if (!$error) { + return false; + } + + if (isset($error['sqltext'])) { + return array( + $error['code'], + $error['message'], + $error['offset'], + $error['sqltext'], + ); + } else { + return array( + $error['code'], + $error['message'], + ); + } + } + + + /** + * Executes a prepared statement. + * + * @param array $params OPTIONAL Values to bind to parameter placeholders. + * @return bool + * @throws Zend_Db_Statement_Exception + */ + public function _execute(array $params = null) + { + $connection = $this->_adapter->getConnection(); + + if (!$this->_stmt) { + return false; + } + + if ($params !== null) { + if (!is_array($params)) { + $params = array($params); + } + $error = false; + foreach (array_keys($params) as $name) { + if (!$this->bindParam($name, $params[$name], null, -1)) { + $error = true; + break; + } + } + if ($error) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); + } + } + + $retval = @oci_execute($this->_stmt, $this->_adapter->_getExecuteMode()); + if ($retval === false) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); + } + + $this->_keys = Array(); + if ($field_num = oci_num_fields($this->_stmt)) { + for ($i = 1; $i <= $field_num; $i++) { + $name = oci_field_name($this->_stmt, $i); + $this->_keys[] = $name; + } + } + + $this->_values = Array(); + if ($this->_keys) { + $this->_values = array_fill(0, count($this->_keys), null); + } + + return $retval; + } + + /** + * Fetches a row from the result set. + * + * @param int $style OPTIONAL Fetch mode for this fetch operation. + * @param int $cursor OPTIONAL Absolute, relative, or other. + * @param int $offset OPTIONAL Number for absolute or relative cursors. + * @return mixed Array, object, or scalar depending on fetch mode. + * @throws Zend_Db_Statement_Exception + */ + public function fetch($style = null, $cursor = null, $offset = null) + { + if (!$this->_stmt) { + return false; + } + + if ($style === null) { + $style = $this->_fetchMode; + } + + $lob_as_string = $this->getLobAsString() ? OCI_RETURN_LOBS : 0; + + switch ($style) { + case Zend_Db::FETCH_NUM: + $row = oci_fetch_array($this->_stmt, OCI_NUM | OCI_RETURN_NULLS | $lob_as_string); + break; + case Zend_Db::FETCH_ASSOC: + $row = oci_fetch_array($this->_stmt, OCI_ASSOC | OCI_RETURN_NULLS | $lob_as_string); + break; + case Zend_Db::FETCH_BOTH: + $row = oci_fetch_array($this->_stmt, OCI_BOTH | OCI_RETURN_NULLS | $lob_as_string); + break; + case Zend_Db::FETCH_OBJ: + $row = oci_fetch_object($this->_stmt); + break; + case Zend_Db::FETCH_BOUND: + $row = oci_fetch_array($this->_stmt, OCI_BOTH | OCI_RETURN_NULLS | $lob_as_string); + if ($row !== false) { + return $this->_fetchBound($row); + } + break; + default: + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception( + array( + 'code' => 'HYC00', + 'message' => "Invalid fetch mode '$style' specified" + ) + ); + break; + } + + if (! $row && $error = oci_error($this->_stmt)) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception($error); + } + + if (is_array($row) && array_key_exists('zend_db_rownum', $row)) { + unset($row['zend_db_rownum']); + } + + return $row; + } + + /** + * Returns an array containing all of the result set rows. + * + * @param int $style OPTIONAL Fetch mode. + * @param int $col OPTIONAL Column number, if fetch mode is by column. + * @return array Collection of rows, each in a format by the fetch mode. + * @throws Zend_Db_Statement_Exception + */ + public function fetchAll($style = null, $col = 0) + { + if (!$this->_stmt) { + return false; + } + + // make sure we have a fetch mode + if ($style === null) { + $style = $this->_fetchMode; + } + + $flags = OCI_FETCHSTATEMENT_BY_ROW; + + switch ($style) { + case Zend_Db::FETCH_BOTH: + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception( + array( + 'code' => 'HYC00', + 'message' => "OCI8 driver does not support fetchAll(FETCH_BOTH), use fetch() in a loop instead" + ) + ); + // notreached + $flags |= OCI_NUM; + $flags |= OCI_ASSOC; + break; + case Zend_Db::FETCH_NUM: + $flags |= OCI_NUM; + break; + case Zend_Db::FETCH_ASSOC: + $flags |= OCI_ASSOC; + break; + case Zend_Db::FETCH_OBJ: + break; + case Zend_Db::FETCH_COLUMN: + $flags = $flags &~ OCI_FETCHSTATEMENT_BY_ROW; + $flags |= OCI_FETCHSTATEMENT_BY_COLUMN; + $flags |= OCI_NUM; + break; + default: + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception( + array( + 'code' => 'HYC00', + 'message' => "Invalid fetch mode '$style' specified" + ) + ); + break; + } + + $result = Array(); + if ($flags != OCI_FETCHSTATEMENT_BY_ROW) { /* not Zend_Db::FETCH_OBJ */ + if (! ($rows = oci_fetch_all($this->_stmt, $result, 0, -1, $flags) )) { + if ($error = oci_error($this->_stmt)) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception($error); + } + if (!$rows) { + return array(); + } + } + if ($style == Zend_Db::FETCH_COLUMN) { + $result = $result[$col]; + } + foreach ($result as &$row) { + if (is_array($row) && array_key_exists('zend_db_rownum', $row)) { + unset($row['zend_db_rownum']); + } + } + } else { + while (($row = oci_fetch_object($this->_stmt)) !== false) { + $result [] = $row; + } + if ($error = oci_error($this->_stmt)) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception($error); + } + } + + return $result; + } + + + /** + * Returns a single column from the next row of a result set. + * + * @param int $col OPTIONAL Position of the column to fetch. + * @return string + * @throws Zend_Db_Statement_Exception + */ + public function fetchColumn($col = 0) + { + if (!$this->_stmt) { + return false; + } + + if (!oci_fetch($this->_stmt)) { + // if no error, there is simply no record + if (!$error = oci_error($this->_stmt)) { + return false; + } + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception($error); + } + + $data = oci_result($this->_stmt, $col+1); //1-based + if ($data === false) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); + } + + if ($this->getLobAsString()) { + // instanceof doesn't allow '-', we must use a temporary string + $type = 'OCI-Lob'; + if ($data instanceof $type) { + $data = $data->read($data->size()); + } + } + + return $data; + } + + /** + * Fetches the next row and returns it as an object. + * + * @param string $class OPTIONAL Name of the class to create. + * @param array $config OPTIONAL Constructor arguments for the class. + * @return mixed One object instance of the specified class. + * @throws Zend_Db_Statement_Exception + */ + public function fetchObject($class = 'stdClass', array $config = array()) + { + if (!$this->_stmt) { + return false; + } + + $obj = oci_fetch_object($this->_stmt); + + if ($error = oci_error($this->_stmt)) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception($error); + } + + /* @todo XXX handle parameters */ + + return $obj; + } + + /** + * Retrieves the next rowset (result set) for a SQL statement that has + * multiple result sets. An example is a stored procedure that returns + * the results of multiple queries. + * + * @return bool + * @throws Zend_Db_Statement_Exception + */ + public function nextRowset() + { + /** + * @see Zend_Db_Statement_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception( + array( + 'code' => 'HYC00', + 'message' => 'Optional feature not implemented' + ) + ); + } + + /** + * Returns the number of rows affected by the execution of the + * last INSERT, DELETE, or UPDATE statement executed by this + * statement object. + * + * @return int The number of rows affected. + * @throws Zend_Db_Statement_Exception + */ + public function rowCount() + { + if (!$this->_stmt) { + return false; + } + + $num_rows = oci_num_rows($this->_stmt); + + if ($num_rows === false) { + /** + * @see Zend_Db_Adapter_Oracle_Exception + */ + throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt)); + } + + return $num_rows; + } + +} diff --git a/library/vendor/Zend/Db/Statement/Oracle/Exception.php b/library/vendor/Zend/Db/Statement/Oracle/Exception.php new file mode 100644 index 000000000..feaa4cb78 --- /dev/null +++ b/library/vendor/Zend/Db/Statement/Oracle/Exception.php @@ -0,0 +1,58 @@ +message = $error['code']." ".$error['message']; + } else { + $this->message = $error['code']." ".$error['message']." "; + $this->message .= substr($error['sqltext'], 0, $error['offset']); + $this->message .= "*"; + $this->message .= substr($error['sqltext'], $error['offset']); + } + $this->code = $error['code']; + } + if (!$this->code && $code) { + $this->code = $code; + } + } +} + diff --git a/library/vendor/Zend/Db/Statement/Pdo.php b/library/vendor/Zend/Db/Statement/Pdo.php index db421eb67..5b63a17f0 100644 --- a/library/vendor/Zend/Db/Statement/Pdo.php +++ b/library/vendor/Zend/Db/Statement/Pdo.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggregate diff --git a/library/vendor/Zend/Db/Statement/Pdo/Ibm.php b/library/vendor/Zend/Db/Statement/Pdo/Ibm.php new file mode 100644 index 000000000..84f265e9d --- /dev/null +++ b/library/vendor/Zend/Db/Statement/Pdo/Ibm.php @@ -0,0 +1,92 @@ +_adapter->foldCase('ZEND_DB_ROWNUM'); + + foreach ($data as $row) { + if (is_array($row) && array_key_exists($remove, $row)) { + unset($row[$remove]); + } + $results[] = $row; + } + return $results; + } + + /** + * Binds a parameter to the specified variable name. + * + * @param mixed $parameter Name the parameter, either integer or string. + * @param mixed $variable Reference to PHP variable containing the value. + * @param mixed $type OPTIONAL Datatype of SQL parameter. + * @param mixed $length OPTIONAL Length of SQL parameter. + * @param mixed $options OPTIONAL Other options. + * @return bool + * @throws Zend_Db_Statement_Exception + */ + public function _bindParam($parameter, &$variable, $type = null, $length = null, $options = null) + { + try { + if (($type === null) && ($length === null) && ($options === null)) { + return $this->_stmt->bindParam($parameter, $variable); + } else { + return $this->_stmt->bindParam($parameter, $variable, $type, $length, $options); + } + } catch (PDOException $e) { + throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); + } + } + +} diff --git a/library/vendor/Zend/Db/Statement/Pdo/Oci.php b/library/vendor/Zend/Db/Statement/Pdo/Oci.php new file mode 100644 index 000000000..79334adfc --- /dev/null +++ b/library/vendor/Zend/Db/Statement/Pdo/Oci.php @@ -0,0 +1,90 @@ +_adapter->foldCase('zend_db_rownum'); + + foreach ($data as $row) { + if (is_array($row) && array_key_exists($remove, $row)) { + unset($row[$remove]); + } + $results[] = $row; + } + return $results; + } + + + /** + * Fetches a row from the result set. + * + * @param int $style OPTIONAL Fetch mode for this fetch operation. + * @param int $cursor OPTIONAL Absolute, relative, or other. + * @param int $offset OPTIONAL Number for absolute or relative cursors. + * @return mixed Array, object, or scalar depending on fetch mode. + * @throws Zend_Db_Statement_Exception + */ + public function fetch($style = null, $cursor = null, $offset = null) + { + $row = parent::fetch($style, $cursor, $offset); + + $remove = $this->_adapter->foldCase('zend_db_rownum'); + if (is_array($row) && array_key_exists($remove, $row)) { + unset($row[$remove]); + } + + return $row; + } +} diff --git a/library/vendor/Zend/Db/Statement/Sqlsrv.php b/library/vendor/Zend/Db/Statement/Sqlsrv.php index 6b36c82c9..84294e836 100644 --- a/library/vendor/Zend/Db/Statement/Sqlsrv.php +++ b/library/vendor/Zend/Db/Statement/Sqlsrv.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement diff --git a/library/vendor/Zend/Db/Statement/Sqlsrv/Exception.php b/library/vendor/Zend/Db/Statement/Sqlsrv/Exception.php index 8d21296c7..3358f3b7e 100644 --- a/library/vendor/Zend/Db/Statement/Sqlsrv/Exception.php +++ b/library/vendor/Zend/Db/Statement/Sqlsrv/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @package Zend_Db * @subpackage Statement - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Statement_Sqlsrv_Exception extends Zend_Db_Statement_Exception diff --git a/library/vendor/Zend/Db/Table.php b/library/vendor/Zend/Db/Table.php index 03005f00a..0dbfe8c98 100644 --- a/library/vendor/Zend/Db/Table.php +++ b/library/vendor/Zend/Db/Table.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Table extends Zend_Db_Table_Abstract diff --git a/library/vendor/Zend/Db/Table/Abstract.php b/library/vendor/Zend/Db/Table/Abstract.php index cadeccad2..ea393f2ce 100644 --- a/library/vendor/Zend/Db/Table/Abstract.php +++ b/library/vendor/Zend/Db/Table/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Db_Table_Abstract @@ -1175,7 +1175,9 @@ abstract class Zend_Db_Table_Abstract */ foreach ($depTables as $tableClass) { $t = self::getTableFromString($tableClass, $this); - $t->_cascadeDelete($tableClass, $row->getPrimaryKey()); + $t->_cascadeDelete( + get_class($this), $row->getPrimaryKey() + ); } } } @@ -1554,6 +1556,14 @@ abstract class Zend_Db_Table_Abstract return $data; } + /** + * Get table gateway object from string + * + * @param string $tableName + * @param Zend_Db_Table_Abstract $referenceTable + * @throws Zend_Db_Table_Row_Exception + * @return Zend_Db_Table_Abstract + */ public static function getTableFromString($tableName, Zend_Db_Table_Abstract $referenceTable = null) { if ($referenceTable instanceof Zend_Db_Table_Abstract) { diff --git a/library/vendor/Zend/Db/Table/Definition.php b/library/vendor/Zend/Db/Table/Definition.php index 8a0dea807..76265ae20 100644 --- a/library/vendor/Zend/Db/Table/Definition.php +++ b/library/vendor/Zend/Db/Table/Definition.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Table_Definition diff --git a/library/vendor/Zend/Db/Table/Exception.php b/library/vendor/Zend/Db/Table/Exception.php index 9189ff3a9..e1599a078 100644 --- a/library/vendor/Zend/Db/Table/Exception.php +++ b/library/vendor/Zend/Db/Table/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Table_Exception extends Zend_Db_Exception diff --git a/library/vendor/Zend/Db/Table/Row.php b/library/vendor/Zend/Db/Table/Row.php index 076d68304..adf00d411 100644 --- a/library/vendor/Zend/Db/Table/Row.php +++ b/library/vendor/Zend/Db/Table/Row.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Table_Row extends Zend_Db_Table_Row_Abstract diff --git a/library/vendor/Zend/Db/Table/Row/Abstract.php b/library/vendor/Zend/Db/Table/Row/Abstract.php index f5ef7f32f..e9c60b0bf 100644 --- a/library/vendor/Zend/Db/Table/Row/Abstract.php +++ b/library/vendor/Zend/Db/Table/Row/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess, IteratorAggregate diff --git a/library/vendor/Zend/Db/Table/Row/Exception.php b/library/vendor/Zend/Db/Table/Row/Exception.php index 67718b732..fe23d6634 100644 --- a/library/vendor/Zend/Db/Table/Row/Exception.php +++ b/library/vendor/Zend/Db/Table/Row/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Table_Row_Exception extends Zend_Db_Table_Exception diff --git a/library/vendor/Zend/Db/Table/Rowset.php b/library/vendor/Zend/Db/Table/Rowset.php index 57f114df7..ce20a58d7 100644 --- a/library/vendor/Zend/Db/Table/Rowset.php +++ b/library/vendor/Zend/Db/Table/Rowset.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Table_Rowset extends Zend_Db_Table_Rowset_Abstract diff --git a/library/vendor/Zend/Db/Table/Rowset/Abstract.php b/library/vendor/Zend/Db/Table/Rowset/Abstract.php index 358c5f00b..205fe1b52 100644 --- a/library/vendor/Zend/Db/Table/Rowset/Abstract.php +++ b/library/vendor/Zend/Db/Table/Rowset/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Countable, ArrayAccess diff --git a/library/vendor/Zend/Db/Table/Rowset/Exception.php b/library/vendor/Zend/Db/Table/Rowset/Exception.php index 75ebce43c..987911385 100644 --- a/library/vendor/Zend/Db/Table/Rowset/Exception.php +++ b/library/vendor/Zend/Db/Table/Rowset/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Table_Rowset_Exception extends Zend_Db_Table_Exception diff --git a/library/vendor/Zend/Db/Table/Select.php b/library/vendor/Zend/Db/Table/Select.php index 7b9e7b797..fade30296 100644 --- a/library/vendor/Zend/Db/Table/Select.php +++ b/library/vendor/Zend/Db/Table/Select.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_Db * @subpackage Select - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Table_Select extends Zend_Db_Select diff --git a/library/vendor/Zend/Db/Table/Select/Exception.php b/library/vendor/Zend/Db/Table/Select/Exception.php index 3fb6b026f..7ed15be88 100644 --- a/library/vendor/Zend/Db/Table/Select/Exception.php +++ b/library/vendor/Zend/Db/Table/Select/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Db * @subpackage Select - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Db * @subpackage Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Debug.php b/library/vendor/Zend/Debug.php index d8bebfe19..00196269e 100644 --- a/library/vendor/Zend/Debug.php +++ b/library/vendor/Zend/Debug.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Debug - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Debug - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Dom/Exception.php b/library/vendor/Zend/Dom/Exception.php index 38ad1d155..bd0331558 100644 --- a/library/vendor/Zend/Dom/Exception.php +++ b/library/vendor/Zend/Dom/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Dom - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * * @category Zend * @package Zend_Dom - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Dom_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Dom/Query.php b/library/vendor/Zend/Dom/Query.php index cc95f0258..311d1134b 100644 --- a/library/vendor/Zend/Dom/Query.php +++ b/library/vendor/Zend/Dom/Query.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Dom - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * * @package Zend_Dom * @subpackage Query - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Dom_Query @@ -81,8 +81,8 @@ class Zend_Dom_Query /** * Constructor * - * @param null|string $document - * @return void + * @param null|string $document + * @param null|string $encoding */ public function __construct($document = null, $encoding = null) { @@ -235,7 +235,8 @@ class Zend_Dom_Query * Perform an XPath query * * @param string|array $xpathQuery - * @param string $query CSS selector query + * @param string $query CSS selector query + * @throws Zend_Dom_Exception * @return Zend_Dom_Query_Result */ public function queryXpath($xpathQuery, $query = null) diff --git a/library/vendor/Zend/Dom/Query/Css2Xpath.php b/library/vendor/Zend/Dom/Query/Css2Xpath.php index 21428042c..5612ad7ab 100644 --- a/library/vendor/Zend/Dom/Query/Css2Xpath.php +++ b/library/vendor/Zend/Dom/Query/Css2Xpath.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Dom - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * * @package Zend_Dom * @subpackage Query - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Dom/Query/Result.php b/library/vendor/Zend/Dom/Query/Result.php index 983f03249..ab5bd0eda 100644 --- a/library/vendor/Zend/Dom/Query/Result.php +++ b/library/vendor/Zend/Dom/Query/Result.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Dom - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * @package Zend_Dom * @subpackage Query * @uses Iterator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -76,7 +76,6 @@ class Zend_Dom_Query_Result implements Iterator,Countable * @param string|array $xpathQuery * @param DOMDocument $document * @param DOMNodeList $nodeList - * @return void */ public function __construct($cssQuery, $xpathQuery, DOMDocument $document, DOMNodeList $nodeList) { @@ -119,7 +118,7 @@ class Zend_Dom_Query_Result implements Iterator,Countable /** * Iterator: rewind to first element * - * @return void + * @return DOMNode|null */ public function rewind() { @@ -163,7 +162,7 @@ class Zend_Dom_Query_Result implements Iterator,Countable /** * Iterator: move to next element * - * @return void + * @return DOMNode|null */ public function next() { diff --git a/library/vendor/Zend/EventManager/Event.php b/library/vendor/Zend/EventManager/Event.php index 60d175dd3..0c56f921d 100644 --- a/library/vendor/Zend/EventManager/Event.php +++ b/library/vendor/Zend/EventManager/Event.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_Event implements Zend_EventManager_EventDescription diff --git a/library/vendor/Zend/EventManager/EventCollection.php b/library/vendor/Zend/EventManager/EventCollection.php index db7574139..36fbca892 100644 --- a/library/vendor/Zend/EventManager/EventCollection.php +++ b/library/vendor/Zend/EventManager/EventCollection.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_EventManager_EventCollection diff --git a/library/vendor/Zend/EventManager/EventDescription.php b/library/vendor/Zend/EventManager/EventDescription.php index 55b8caa0a..2c6bca23b 100644 --- a/library/vendor/Zend/EventManager/EventDescription.php +++ b/library/vendor/Zend/EventManager/EventDescription.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_EventManager_EventDescription diff --git a/library/vendor/Zend/EventManager/EventManager.php b/library/vendor/Zend/EventManager/EventManager.php index e060fd7d5..654d0e570 100644 --- a/library/vendor/Zend/EventManager/EventManager.php +++ b/library/vendor/Zend/EventManager/EventManager.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_EventManager implements Zend_EventManager_EventCollection, Zend_EventManager_SharedEventCollectionAware @@ -84,8 +84,8 @@ class Zend_EventManager_EventManager implements Zend_EventManager_EventCollectio /** * Set static collections container * - * @param Zend_EventManager_StaticEventCollection $collections - * @return void + * @param Zend_EventManager_SharedEventCollection $collections + * @return $this */ public function setSharedCollections(Zend_EventManager_SharedEventCollection $collections) { diff --git a/library/vendor/Zend/EventManager/EventManagerAware.php b/library/vendor/Zend/EventManager/EventManagerAware.php index 1e9d85664..e1a9b33f8 100644 --- a/library/vendor/Zend/EventManager/EventManagerAware.php +++ b/library/vendor/Zend/EventManager/EventManagerAware.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_EventManager * @subpackage UnitTest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_EventManager * @subpackage UnitTest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_EventManager_EventManagerAware diff --git a/library/vendor/Zend/EventManager/Exception.php b/library/vendor/Zend/EventManager/Exception.php index f3395a8e1..4c2d748c7 100644 --- a/library/vendor/Zend/EventManager/Exception.php +++ b/library/vendor/Zend/EventManager/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_EventManager_Exception diff --git a/library/vendor/Zend/EventManager/Exception/InvalidArgumentException.php b/library/vendor/Zend/EventManager/Exception/InvalidArgumentException.php index ffa6f0035..52eb154f5 100644 --- a/library/vendor/Zend/EventManager/Exception/InvalidArgumentException.php +++ b/library/vendor/Zend/EventManager/Exception/InvalidArgumentException.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_Exception_InvalidArgumentException diff --git a/library/vendor/Zend/EventManager/Filter.php b/library/vendor/Zend/EventManager/Filter.php index b2db59a20..581ec3d7b 100644 --- a/library/vendor/Zend/EventManager/Filter.php +++ b/library/vendor/Zend/EventManager/Filter.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_EventManager_Filter diff --git a/library/vendor/Zend/EventManager/Filter/FilterIterator.php b/library/vendor/Zend/EventManager/Filter/FilterIterator.php index 892eff09a..666e5bcc8 100644 --- a/library/vendor/Zend/EventManager/Filter/FilterIterator.php +++ b/library/vendor/Zend/EventManager/Filter/FilterIterator.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_Filter_FilterIterator extends Zend_Stdlib_SplPriorityQueue @@ -88,11 +88,11 @@ class Zend_EventManager_Filter_FilterIterator extends Zend_Stdlib_SplPriorityQue * Iterate the next filter in the chain * * Iterates and calls the next filter in the chain. - * - * @param mixed $context - * @param array $params - * @param Zend_EventManager_Filter_FilterIterator $chain - * @return void + * + * @param mixed $context + * @param array $params + * @param Zend_EventManager_Filter_FilterIterator $chain + * @return mixed */ public function next($context = null, array $params = array(), $chain = null) { diff --git a/library/vendor/Zend/EventManager/FilterChain.php b/library/vendor/Zend/EventManager/FilterChain.php index b52d059a7..656cd0936 100644 --- a/library/vendor/Zend/EventManager/FilterChain.php +++ b/library/vendor/Zend/EventManager/FilterChain.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_FilterChain implements Zend_EventManager_Filter @@ -73,9 +73,10 @@ class Zend_EventManager_FilterChain implements Zend_EventManager_Filter /** * Connect a filter to the chain - * + * * @param callback $callback PHP Callback - * @param int $priority Priority in the queue at which to execute; defaults to 1 (higher numbers == higher priority) + * @param int $priority Priority in the queue at which to execute; defaults to 1 (higher numbers == higher priority) + * @throws Zend_Stdlib_Exception_InvalidCallbackException * @return Zend_Stdlib_CallbackHandler (to allow later unsubscribe) */ public function attach($callback, $priority = 1) diff --git a/library/vendor/Zend/EventManager/GlobalEventManager.php b/library/vendor/Zend/EventManager/GlobalEventManager.php index 41da3437c..542854547 100644 --- a/library/vendor/Zend/EventManager/GlobalEventManager.php +++ b/library/vendor/Zend/EventManager/GlobalEventManager.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_GlobalEventManager @@ -50,8 +50,8 @@ class Zend_EventManager_GlobalEventManager /** * Get event collection on which this operates - * - * @return void + * + * @return Zend_EventManager_EventCollection */ public static function getEventCollection() { diff --git a/library/vendor/Zend/EventManager/ListenerAggregate.php b/library/vendor/Zend/EventManager/ListenerAggregate.php index 6ffe131f4..c360252a5 100644 --- a/library/vendor/Zend/EventManager/ListenerAggregate.php +++ b/library/vendor/Zend/EventManager/ListenerAggregate.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_EventManager_ListenerAggregate diff --git a/library/vendor/Zend/EventManager/ResponseCollection.php b/library/vendor/Zend/EventManager/ResponseCollection.php index 362ff2dd6..6ef9d9aa1 100644 --- a/library/vendor/Zend/EventManager/ResponseCollection.php +++ b/library/vendor/Zend/EventManager/ResponseCollection.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -352,7 +352,7 @@ if (version_compare(PHP_VERSION, '5.3.0', '<')) { * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_ResponseCollection extends SplStack diff --git a/library/vendor/Zend/EventManager/SharedEventCollection.php b/library/vendor/Zend/EventManager/SharedEventCollection.php index 237c32154..0050c6137 100644 --- a/library/vendor/Zend/EventManager/SharedEventCollection.php +++ b/library/vendor/Zend/EventManager/SharedEventCollection.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_EventManager_SharedEventCollection diff --git a/library/vendor/Zend/EventManager/SharedEventCollectionAware.php b/library/vendor/Zend/EventManager/SharedEventCollectionAware.php index 98c9616f6..8ed947929 100644 --- a/library/vendor/Zend/EventManager/SharedEventCollectionAware.php +++ b/library/vendor/Zend/EventManager/SharedEventCollectionAware.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_EventManager * @subpackage UnitTest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_EventManager * @subpackage UnitTest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_EventManager_SharedEventCollectionAware diff --git a/library/vendor/Zend/EventManager/SharedEventManager.php b/library/vendor/Zend/EventManager/SharedEventManager.php index 97faa24ae..526404ddc 100644 --- a/library/vendor/Zend/EventManager/SharedEventManager.php +++ b/library/vendor/Zend/EventManager/SharedEventManager.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_SharedEventManager implements Zend_EventManager_SharedEventCollection diff --git a/library/vendor/Zend/EventManager/StaticEventManager.php b/library/vendor/Zend/EventManager/StaticEventManager.php index 656816129..355efc7bf 100644 --- a/library/vendor/Zend/EventManager/StaticEventManager.php +++ b/library/vendor/Zend/EventManager/StaticEventManager.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_EventManager - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_EventManager_StaticEventManager extends Zend_EventManager_SharedEventManager diff --git a/library/vendor/Zend/Exception.php b/library/vendor/Zend/Exception.php index 561e455a2..d97acb0f9 100644 --- a/library/vendor/Zend/Exception.php +++ b/library/vendor/Zend/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend -* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) +* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Exception extends Exception diff --git a/library/vendor/Zend/Feed.php b/library/vendor/Zend/Feed.php new file mode 100644 index 000000000..c84a4bfd4 --- /dev/null +++ b/library/vendor/Zend/Feed.php @@ -0,0 +1,395 @@ + 'http://a9.com/-/spec/opensearchrss/1.0/', + 'atom' => 'http://www.w3.org/2005/Atom', + 'rss' => 'http://blogs.law.harvard.edu/tech/rss', + ); + + + /** + * Set the HTTP client instance + * + * Sets the HTTP client object to use for retrieving the feeds. + * + * @param Zend_Http_Client $httpClient + * @return void + */ + public static function setHttpClient(Zend_Http_Client $httpClient) + { + self::$_httpClient = $httpClient; + } + + + /** + * Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used. + * + * @return Zend_Http_Client_Abstract + */ + public static function getHttpClient() + { + if (!self::$_httpClient instanceof Zend_Http_Client) { + /** + * @see Zend_Http_Client + */ + self::$_httpClient = new Zend_Http_Client(); + } + + return self::$_httpClient; + } + + + /** + * Toggle using POST instead of PUT and DELETE HTTP methods + * + * Some feed implementations do not accept PUT and DELETE HTTP + * methods, or they can't be used because of proxies or other + * measures. This allows turning on using POST where PUT and + * DELETE would normally be used; in addition, an + * X-Method-Override header will be sent with a value of PUT or + * DELETE as appropriate. + * + * @param boolean $override Whether to override PUT and DELETE. + * @return void + */ + public static function setHttpMethodOverride($override = true) + { + self::$_httpMethodOverride = $override; + } + + + /** + * Get the HTTP override state + * + * @return boolean + */ + public static function getHttpMethodOverride() + { + return self::$_httpMethodOverride; + } + + + /** + * Get the full version of a namespace prefix + * + * Looks up a prefix (atom:, etc.) in the list of registered + * namespaces and returns the full namespace URI if + * available. Returns the prefix, unmodified, if it's not + * registered. + * + * @return string + */ + public static function lookupNamespace($prefix) + { + return isset(self::$_namespaces[$prefix]) ? + self::$_namespaces[$prefix] : + $prefix; + } + + + /** + * Add a namespace and prefix to the registered list + * + * Takes a prefix and a full namespace URI and adds them to the + * list of registered namespaces for use by + * Zend_Feed::lookupNamespace(). + * + * @param string $prefix The namespace prefix + * @param string $namespaceURI The full namespace URI + * @return void + */ + public static function registerNamespace($prefix, $namespaceURI) + { + self::$_namespaces[$prefix] = $namespaceURI; + } + + + /** + * Imports a feed located at $uri. + * + * @param string $uri + * @throws Zend_Feed_Exception + * @return Zend_Feed_Abstract + */ + public static function import($uri) + { + $client = self::getHttpClient(); + $client->setUri($uri); + $response = $client->request('GET'); + if ($response->getStatus() !== 200) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Feed failed to load, got response code ' . $response->getStatus()); + } + $feed = $response->getBody(); + return self::importString($feed); + } + + + /** + * Imports a feed represented by $string. + * + * @param string $string + * @throws Zend_Feed_Exception + * @return Zend_Feed_Abstract + */ + public static function importString($string) + { + if (trim($string) == '') { + throw new Zend_Feed_Exception('Document/string being imported' + . ' is an Empty string or comes from an empty HTTP response'); + } + $doc = new DOMDocument; + $doc = Zend_Xml_Security::scan($string, $doc); + + if (!$doc) { + // prevent the class to generate an undefined variable notice (ZF-2590) + // Build error message + $error = libxml_get_last_error(); + if ($error && $error->message) { + $errormsg = "DOMDocument cannot parse XML: {$error->message}"; + } else { + $errormsg = "DOMDocument cannot parse XML"; + } + + + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception($errormsg); + } + + // Try to find the base feed element or a single of an Atom feed + if ($doc->getElementsByTagName('feed')->item(0) || + $doc->getElementsByTagName('entry')->item(0)) { + /** + * @see Zend_Feed_Atom + */ + // return a newly created Zend_Feed_Atom object + return new Zend_Feed_Atom(null, $string); + } + + // Try to find the base feed element of an RSS feed + if ($doc->getElementsByTagName('channel')->item(0)) { + /** + * @see Zend_Feed_Rss + */ + // return a newly created Zend_Feed_Rss object + return new Zend_Feed_Rss(null, $string); + } + + // $string does not appear to be a valid feed of the supported types + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Invalid or unsupported feed format'); + } + + + /** + * Imports a feed from a file located at $filename. + * + * @param string $filename + * @throws Zend_Feed_Exception + * @return Zend_Feed_Abstract + */ + public static function importFile($filename) + { + @ini_set('track_errors', 1); + $feed = @file_get_contents($filename); + @ini_restore('track_errors'); + if ($feed === false) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception("File could not be loaded: $php_errormsg"); + } + return self::importString($feed); + } + + + /** + * Attempts to find feeds at $uri referenced by tags. Returns an + * array of the feeds referenced at $uri. + * + * @todo Allow findFeeds() to follow one, but only one, code 302. + * + * @param string $uri + * @throws Zend_Feed_Exception + * @return array + */ + public static function findFeeds($uri) + { + // Get the HTTP response from $uri and save the contents + $client = self::getHttpClient(); + $client->setUri($uri); + $response = $client->request(); + if ($response->getStatus() !== 200) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception("Failed to access $uri, got response code " . $response->getStatus()); + } + $contents = $response->getBody(); + + // Parse the contents for appropriate tags + @ini_set('track_errors', 1); + $pattern = '~(]+)/?>~i'; + $result = @preg_match_all($pattern, $contents, $matches); + @ini_restore('track_errors'); + if ($result === false) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception("Internal error: $php_errormsg"); + } + + // Try to fetch a feed for each link tag that appears to refer to a feed + $feeds = array(); + if (isset($matches[1]) && count($matches[1]) > 0) { + foreach ($matches[1] as $link) { + // force string to be an utf-8 one + if (!mb_check_encoding($link, 'UTF-8')) { + $link = mb_convert_encoding($link, 'UTF-8'); + } + $xml = @Zend_Xml_Security::scan(rtrim($link, ' /') . ' />'); + if ($xml === false) { + continue; + } + $attributes = $xml->attributes(); + if (!isset($attributes['rel']) || !@preg_match('~^(?:alternate|service\.feed)~i', $attributes['rel'])) { + continue; + } + if (!isset($attributes['type']) || + !@preg_match('~^application/(?:atom|rss|rdf)\+xml~', $attributes['type'])) { + continue; + } + if (!isset($attributes['href'])) { + continue; + } + try { + // checks if we need to canonize the given uri + try { + $uri = Zend_Uri::factory((string) $attributes['href']); + } catch (Zend_Uri_Exception $e) { + // canonize the uri + $path = (string) $attributes['href']; + $query = $fragment = ''; + if (substr($path, 0, 1) != '/') { + // add the current root path to this one + $path = rtrim($client->getUri()->getPath(), '/') . '/' . $path; + } + if (strpos($path, '?') !== false) { + list($path, $query) = explode('?', $path, 2); + } + if (strpos($query, '#') !== false) { + list($query, $fragment) = explode('#', $query, 2); + } + $uri = Zend_Uri::factory($client->getUri(true)); + $uri->setPath($path); + $uri->setQuery($query); + $uri->setFragment($fragment); + } + + $feed = self::import($uri); + } catch (Exception $e) { + continue; + } + $feeds[$uri->getUri()] = $feed; + } + } + + // Return the fetched feeds + return $feeds; + } + + /** + * Construct a new Zend_Feed_Abstract object from a custom array + * + * @param array $data + * @param string $format (rss|atom) the requested output format + * @return Zend_Feed_Abstract + */ + public static function importArray(array $data, $format = 'atom') + { + $obj = 'Zend_Feed_' . ucfirst(strtolower($format)); + if (!class_exists($obj)) { + Zend_Loader::loadClass($obj); + } + + /** + * @see Zend_Feed_Builder + */ + return new $obj(null, null, new Zend_Feed_Builder($data)); + } + + /** + * Construct a new Zend_Feed_Abstract object from a Zend_Feed_Builder_Interface data source + * + * @param Zend_Feed_Builder_Interface $builder this object will be used to extract the data of the feed + * @param string $format (rss|atom) the requested output format + * @return Zend_Feed_Abstract + */ + public static function importBuilder(Zend_Feed_Builder_Interface $builder, $format = 'atom') + { + $obj = 'Zend_Feed_' . ucfirst(strtolower($format)); + if (!class_exists($obj)) { + Zend_Loader::loadClass($obj); + } + return new $obj(null, null, $builder); + } +} diff --git a/library/vendor/Zend/Feed/Abstract.php b/library/vendor/Zend/Feed/Abstract.php new file mode 100644 index 000000000..6e8db21c0 --- /dev/null +++ b/library/vendor/Zend/Feed/Abstract.php @@ -0,0 +1,295 @@ +setUri($uri); + $response = $client->request('GET'); + if ($response->getStatus() !== 200) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Feed failed to load, got response code ' . $response->getStatus() . '; request: ' . $client->getLastRequest() . "\nresponse: " . $response->asString()); + } + $this->_element = $this->_importFeedFromString($response->getBody()); + $this->__wakeup(); + } elseif ($string !== null) { + // Retrieve the feed from $string + $this->_element = $string; + $this->__wakeup(); + } else { + // Generate the feed from the array + $header = $builder->getHeader(); + $this->_element = new DOMDocument('1.0', $header['charset']); + $root = $this->_mapFeedHeaders($header); + $this->_mapFeedEntries($root, $builder->getEntries()); + $this->_element = $root; + $this->_buildEntryCache(); + } + } + + + /** + * Load the feed as an XML DOMDocument object + * + * @return void + * @throws Zend_Feed_Exception + */ + public function __wakeup() + { + @ini_set('track_errors', 1); + $doc = new DOMDocument; + $doc = @Zend_Xml_Security::scan($this->_element, $doc); + @ini_restore('track_errors'); + + if (!$doc) { + // prevent the class to generate an undefined variable notice (ZF-2590) + if (!isset($php_errormsg)) { + if (function_exists('xdebug_is_enabled')) { + $php_errormsg = '(error message not available, when XDebug is running)'; + } else { + $php_errormsg = '(error message not available)'; + } + } + + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception("DOMDocument cannot parse XML: $php_errormsg"); + } + + $this->_element = $doc; + } + + + /** + * Prepare for serialiation + * + * @return array + */ + public function __sleep() + { + $this->_element = $this->saveXML(); + + return array('_element'); + } + + + /** + * Cache the individual feed elements so they don't need to be + * searched for on every operation. + * + * @return void + */ + protected function _buildEntryCache() + { + $this->_entries = array(); + foreach ($this->_element->childNodes as $child) { + if ($child->localName == $this->_entryElementName) { + $this->_entries[] = $child; + } + } + } + + + /** + * Get the number of entries in this feed object. + * + * @return integer Entry count. + */ + public function count() + { + return count($this->_entries); + } + + + /** + * Required by the Iterator interface. + * + * @return void + */ + public function rewind() + { + $this->_entryIndex = 0; + } + + + /** + * Required by the Iterator interface. + * + * @return mixed The current row, or null if no rows. + */ + public function current() + { + return new $this->_entryClassName( + null, + $this->_entries[$this->_entryIndex]); + } + + + /** + * Required by the Iterator interface. + * + * @return mixed The current row number (starts at 0), or NULL if no rows + */ + public function key() + { + return $this->_entryIndex; + } + + + /** + * Required by the Iterator interface. + * + * @return mixed The next row, or null if no more rows. + */ + public function next() + { + ++$this->_entryIndex; + } + + + /** + * Required by the Iterator interface. + * + * @return boolean Whether the iteration is valid + */ + public function valid() + { + return 0 <= $this->_entryIndex && $this->_entryIndex < $this->count(); + } + + /** + * Generate the header of the feed when working in write mode + * + * @param array $array the data to use + * @return DOMElement root node + */ + abstract protected function _mapFeedHeaders($array); + + /** + * Generate the entries of the feed when working in write mode + * + * @param DOMElement $root the root node to use + * @param array $array the data to use + * @return DOMElement root node + */ + abstract protected function _mapFeedEntries(DOMElement $root, $array); + + /** + * Send feed to a http client with the correct header + * + * @throws Zend_Feed_Exception if headers have already been sent + * @return void + */ + abstract public function send(); + + /** + * Import a feed from a string + * + * Protects against XXE attack vectors. + * + * @param string $feed + * @return string + * @throws Zend_Feed_Exception on detection of an XXE vector + */ + protected function _importFeedFromString($feed) + { + if (trim($feed) == '') { + throw new Zend_Feed_Exception('Remote feed being imported' + . ' is an Empty string or comes from an empty HTTP response'); + } + $doc = new DOMDocument; + $doc = Zend_Xml_Security::scan($feed, $doc); + + if (!$doc) { + // prevent the class to generate an undefined variable notice (ZF-2590) + // Build error message + $error = libxml_get_last_error(); + if ($error && $error->message) { + $errormsg = "DOMDocument cannot parse XML: {$error->message}"; + } else { + $errormsg = "DOMDocument cannot parse XML"; + } + + + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception($errormsg); + } + + return $doc->saveXML($doc->documentElement); + } +} diff --git a/library/vendor/Zend/Feed/Atom.php b/library/vendor/Zend/Feed/Atom.php new file mode 100644 index 000000000..14009e5e8 --- /dev/null +++ b/library/vendor/Zend/Feed/Atom.php @@ -0,0 +1,386 @@ + + * elements). + * + * @var string + */ + protected $_entryElementName = 'entry'; + + /** + * The default namespace for Atom feeds. + * + * @var string + */ + protected $_defaultNamespace = 'atom'; + + + /** + * Override Zend_Feed_Abstract to set up the $_element and $_entries aliases. + * + * @return void + * @throws Zend_Feed_Exception + */ + public function __wakeup() + { + parent::__wakeup(); + + // Find the base feed element and create an alias to it. + $element = $this->_element->getElementsByTagName('feed')->item(0); + if (!$element) { + // Try to find a single instead. + $element = $this->_element->getElementsByTagName($this->_entryElementName)->item(0); + if (!$element) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('No root or <' . $this->_entryElementName + . '> element found, cannot parse feed.'); + } + + $doc = new DOMDocument($this->_element->version, + $this->_element->actualEncoding); + $feed = $doc->appendChild($doc->createElement('feed')); + $feed->appendChild($doc->importNode($element, true)); + $element = $feed; + } + + $this->_element = $element; + + // Find the entries and save a pointer to them for speed and + // simplicity. + $this->_buildEntryCache(); + } + + + /** + * Easy access to tags keyed by "rel" attributes. + * + * If $elt->link() is called with no arguments, we will attempt to + * return the value of the tag(s) like all other + * method-syntax attribute access. If an argument is passed to + * link(), however, then we will return the "href" value of the + * first tag that has a "rel" attribute matching $rel: + * + * $elt->link(): returns the value of the link tag. + * $elt->link('self'): returns the href from the first in the entry. + * + * @param string $rel The "rel" attribute to look for. + * @return mixed + */ + public function link($rel = null) + { + if ($rel === null) { + return parent::__call('link', null); + } + + // index link tags by their "rel" attribute. + $links = parent::__get('link'); + if (!is_array($links)) { + if ($links instanceof Zend_Feed_Element) { + $links = array($links); + } else { + return $links; + } + } + + foreach ($links as $link) { + if (empty($link['rel'])) { + continue; + } + if ($rel == $link['rel']) { + return $link['href']; + } + } + + return null; + } + + + /** + * Make accessing some individual elements of the feed easier. + * + * Special accessors 'entry' and 'entries' are provided so that if + * you wish to iterate over an Atom feed's entries, you can do so + * using foreach ($feed->entries as $entry) or foreach + * ($feed->entry as $entry). + * + * @param string $var The property to access. + * @return mixed + */ + public function __get($var) + { + switch ($var) { + case 'entry': + // fall through to the next case + case 'entries': + return $this; + + default: + return parent::__get($var); + } + } + + /** + * Generate the header of the feed when working in write mode + * + * @param array $array the data to use + * @return DOMElement root node + */ + protected function _mapFeedHeaders($array) + { + $feed = $this->_element->createElement('feed'); + $feed->setAttribute('xmlns', 'http://www.w3.org/2005/Atom'); + + $id = $this->_element->createElement('id', $array->link); + $feed->appendChild($id); + + $title = $this->_element->createElement('title'); + $title->appendChild($this->_element->createCDATASection($array->title)); + $feed->appendChild($title); + + if (isset($array->author)) { + $author = $this->_element->createElement('author'); + $name = $this->_element->createElement('name', $array->author); + $author->appendChild($name); + if (isset($array->email)) { + $email = $this->_element->createElement('email', $array->email); + $author->appendChild($email); + } + $feed->appendChild($author); + } + + $updated = isset($array->lastUpdate) ? $array->lastUpdate : time(); + $updated = $this->_element->createElement('updated', date(DATE_ATOM, $updated)); + $feed->appendChild($updated); + + if (isset($array->published)) { + $published = $this->_element->createElement('published', date(DATE_ATOM, $array->published)); + $feed->appendChild($published); + } + + $link = $this->_element->createElement('link'); + $link->setAttribute('rel', 'self'); + $link->setAttribute('href', $array->link); + if (isset($array->language)) { + $link->setAttribute('hreflang', $array->language); + } + $feed->appendChild($link); + + if (isset($array->description)) { + $subtitle = $this->_element->createElement('subtitle'); + $subtitle->appendChild($this->_element->createCDATASection($array->description)); + $feed->appendChild($subtitle); + } + + if (isset($array->copyright)) { + $copyright = $this->_element->createElement('rights', $array->copyright); + $feed->appendChild($copyright); + } + + if (isset($array->image)) { + $image = $this->_element->createElement('logo', $array->image); + $feed->appendChild($image); + } + + $generator = !empty($array->generator) ? $array->generator : 'Zend_Feed'; + $generator = $this->_element->createElement('generator', $generator); + $feed->appendChild($generator); + + return $feed; + } + + /** + * Generate the entries of the feed when working in write mode + * + * The following nodes are constructed for each feed entry + * + * url to feed entry + * entry title + * last update + * + * short text + * long version, can contain html + * + * + * @param array $array the data to use + * @param DOMElement $root the root node to use + * @return void + */ + protected function _mapFeedEntries(DOMElement $root, $array) + { + foreach ($array as $dataentry) { + $entry = $this->_element->createElement('entry'); + + $id = $this->_element->createElement('id', isset($dataentry->guid) ? $dataentry->guid : $dataentry->link); + $entry->appendChild($id); + + $title = $this->_element->createElement('title'); + $title->appendChild($this->_element->createCDATASection($dataentry->title)); + $entry->appendChild($title); + + $updated = isset($dataentry->lastUpdate) ? $dataentry->lastUpdate : time(); + $updated = $this->_element->createElement('updated', date(DATE_ATOM, $updated)); + $entry->appendChild($updated); + + $link = $this->_element->createElement('link'); + $link->setAttribute('rel', 'alternate'); + $link->setAttribute('href', $dataentry->link); + $entry->appendChild($link); + + $summary = $this->_element->createElement('summary'); + $summary->appendChild($this->_element->createCDATASection($dataentry->description)); + $entry->appendChild($summary); + + if (isset($dataentry->content)) { + $content = $this->_element->createElement('content'); + $content->setAttribute('type', 'html'); + $content->appendChild($this->_element->createCDATASection($dataentry->content)); + $entry->appendChild($content); + } + + if (isset($dataentry->category)) { + foreach ($dataentry->category as $category) { + $node = $this->_element->createElement('category'); + $node->setAttribute('term', $category['term']); + if (isset($category['scheme'])) { + $node->setAttribute('scheme', $category['scheme']); + } + $entry->appendChild($node); + } + } + + if (isset($dataentry->source)) { + $source = $this->_element->createElement('source'); + $title = $this->_element->createElement('title', $dataentry->source['title']); + $source->appendChild($title); + $link = $this->_element->createElement('link', $dataentry->source['title']); + $link->setAttribute('rel', 'alternate'); + $link->setAttribute('href', $dataentry->source['url']); + $source->appendChild($link); + } + + if (isset($dataentry->enclosure)) { + foreach ($dataentry->enclosure as $enclosure) { + $node = $this->_element->createElement('link'); + $node->setAttribute('rel', 'enclosure'); + $node->setAttribute('href', $enclosure['url']); + if (isset($enclosure['type'])) { + $node->setAttribute('type', $enclosure['type']); + } + if (isset($enclosure['length'])) { + $node->setAttribute('length', $enclosure['length']); + } + $entry->appendChild($node); + } + } + + if (isset($dataentry->comments)) { + $comments = $this->_element->createElementNS('http://wellformedweb.org/CommentAPI/', + 'wfw:comment', + $dataentry->comments); + $entry->appendChild($comments); + } + if (isset($dataentry->commentRss)) { + $comments = $this->_element->createElementNS('http://wellformedweb.org/CommentAPI/', + 'wfw:commentRss', + $dataentry->commentRss); + $entry->appendChild($comments); + } + + $root->appendChild($entry); + } + } + + /** + * Override Zend_Feed_Element to allow formated feeds + * + * @return string + */ + public function saveXml() + { + // Return a complete document including XML prologue. + $doc = new DOMDocument($this->_element->ownerDocument->version, + $this->_element->ownerDocument->actualEncoding); + $doc->appendChild($doc->importNode($this->_element, true)); + $doc->formatOutput = true; + + return $doc->saveXML(); + } + + /** + * Send feed to a http client with the correct header + * + * @return void + * @throws Zend_Feed_Exception if headers have already been sent + */ + public function send() + { + if (headers_sent()) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Cannot send ATOM because headers have already been sent.'); + } + + header('Content-Type: application/atom+xml; charset=' . $this->_element->ownerDocument->actualEncoding); + + echo $this->saveXML(); + } +} diff --git a/library/vendor/Zend/Feed/Builder.php b/library/vendor/Zend/Feed/Builder.php new file mode 100644 index 000000000..eed8b8146 --- /dev/null +++ b/library/vendor/Zend/Feed/Builder.php @@ -0,0 +1,390 @@ + + * array( + * 'title' => 'title of the feed', //required + * 'link' => 'canonical url to the feed', //required + * 'lastUpdate' => 'timestamp of the update date', // optional + * 'published' => 'timestamp of the publication date', //optional + * 'charset' => 'charset', // required + * 'description' => 'short description of the feed', //optional + * 'author' => 'author/publisher of the feed', //optional + * 'email' => 'email of the author', //optional + * 'webmaster' => 'email address for person responsible for technical issues' // optional, ignored if atom is used + * 'copyright' => 'copyright notice', //optional + * 'image' => 'url to image', //optional + * 'generator' => 'generator', // optional + * 'language' => 'language the feed is written in', // optional + * 'ttl' => 'how long in minutes a feed can be cached before refreshing', // optional, ignored if atom is used + * 'rating' => 'The PICS rating for the channel.', // optional, ignored if atom is used + * 'cloud' => array( + * 'domain' => 'domain of the cloud, e.g. rpc.sys.com' // required + * 'port' => 'port to connect to' // optional, default to 80 + * 'path' => 'path of the cloud, e.g. /RPC2 //required + * 'registerProcedure' => 'procedure to call, e.g. myCloud.rssPleaseNotify' // required + * 'protocol' => 'protocol to use, e.g. soap or xml-rpc' // required + * ), a cloud to be notified of updates // optional, ignored if atom is used + * 'textInput' => array( + * 'title' => 'the label of the Submit button in the text input area' // required, + * 'description' => 'explains the text input area' // required + * 'name' => 'the name of the text object in the text input area' // required + * 'link' => 'the URL of the CGI script that processes text input requests' // required + * ) // a text input box that can be displayed with the feed // optional, ignored if atom is used + * 'skipHours' => array( + * 'hour in 24 format', // e.g 13 (1pm) + * // up to 24 rows whose value is a number between 0 and 23 + * ) // Hint telling aggregators which hours they can skip // optional, ignored if atom is used + * 'skipDays ' => array( + * 'a day to skip', // e.g Monday + * // up to 7 rows whose value is a Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday + * ) // Hint telling aggregators which days they can skip // optional, ignored if atom is used + * 'itunes' => array( + * 'author' => 'Artist column' // optional, default to the main author value + * 'owner' => array( + * 'name' => 'name of the owner' // optional, default to main author value + * 'email' => 'email of the owner' // optional, default to main email value + * ) // Owner of the podcast // optional + * 'image' => 'album/podcast art' // optional, default to the main image value + * 'subtitle' => 'short description' // optional, default to the main description value + * 'summary' => 'longer description' // optional, default to the main description value + * 'block' => 'Prevent an episode from appearing (yes|no)' // optional + * 'category' => array( + * array('main' => 'main category', // required + * 'sub' => 'sub category' // optional + * ), + * // up to 3 rows + * ) // 'Category column and in iTunes Music Store Browse' // required + * 'explicit' => 'parental advisory graphic (yes|no|clean)' // optional + * 'keywords' => 'a comma separated list of 12 keywords maximum' // optional + * 'new-feed-url' => 'used to inform iTunes of new feed URL location' // optional + * ) // Itunes extension data // optional, ignored if atom is used + * 'entries' => array( + * array( + * 'title' => 'title of the feed entry', //required + * 'link' => 'url to a feed entry', //required + * 'description' => 'short version of a feed entry', // only text, no html, required + * 'guid' => 'id of the article, if not given link value will used', //optional + * 'content' => 'long version', // can contain html, optional + * 'lastUpdate' => 'timestamp of the publication date', // optional + * 'comments' => 'comments page of the feed entry', // optional + * 'commentRss' => 'the feed url of the associated comments', // optional + * 'source' => array( + * 'title' => 'title of the original source' // required, + * 'url' => 'url of the original source' // required + * ) // original source of the feed entry // optional + * 'category' => array( + * array( + * 'term' => 'first category label' // required, + * 'scheme' => 'url that identifies a categorization scheme' // optional + * ), + * array( + * //data for the second category and so on + * ) + * ) // list of the attached categories // optional + * 'enclosure' => array( + * array( + * 'url' => 'url of the linked enclosure' // required + * 'type' => 'mime type of the enclosure' // optional + * 'length' => 'length of the linked content in octets' // optional + * ), + * array( + * //data for the second enclosure and so on + * ) + * ) // list of the enclosures of the feed entry // optional + * ), + * array( + * //data for the second entry and so on + * ) + * ) + * ); + * + * + * @param array $data + * @return void + */ + public function __construct(array $data) + { + $this->_data = $data; + $this->_createHeader($data); + if (isset($data['entries'])) { + $this->_createEntries($data['entries']); + } + } + + /** + * Returns an instance of Zend_Feed_Builder_Header + * describing the header of the feed + * + * @return Zend_Feed_Builder_Header + */ + public function getHeader() + { + return $this->_header; + } + + /** + * Returns an array of Zend_Feed_Builder_Entry instances + * describing the entries of the feed + * + * @return array of Zend_Feed_Builder_Entry + */ + public function getEntries() + { + return $this->_entries; + } + + /** + * Create the Zend_Feed_Builder_Header instance + * + * @param array $data + * @throws Zend_Feed_Builder_Exception + * @return void + */ + protected function _createHeader(array $data) + { + $mandatories = array('title', 'link', 'charset'); + foreach ($mandatories as $mandatory) { + if (!isset($data[$mandatory])) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("$mandatory key is missing"); + } + } + $this->_header = new Zend_Feed_Builder_Header($data['title'], $data['link'], $data['charset']); + if (isset($data['lastUpdate'])) { + $this->_header->setLastUpdate($data['lastUpdate']); + } + if (isset($data['published'])) { + $this->_header->setPublishedDate($data['published']); + } + if (isset($data['description'])) { + $this->_header->setDescription($data['description']); + } + if (isset($data['author'])) { + $this->_header->setAuthor($data['author']); + } + if (isset($data['email'])) { + $this->_header->setEmail($data['email']); + } + if (isset($data['webmaster'])) { + $this->_header->setWebmaster($data['webmaster']); + } + if (isset($data['copyright'])) { + $this->_header->setCopyright($data['copyright']); + } + if (isset($data['image'])) { + $this->_header->setImage($data['image']); + } + if (isset($data['generator'])) { + $this->_header->setGenerator($data['generator']); + } + if (isset($data['language'])) { + $this->_header->setLanguage($data['language']); + } + if (isset($data['ttl'])) { + $this->_header->setTtl($data['ttl']); + } + if (isset($data['rating'])) { + $this->_header->setRating($data['rating']); + } + if (isset($data['cloud'])) { + $mandatories = array('domain', 'path', 'registerProcedure', 'protocol'); + foreach ($mandatories as $mandatory) { + if (!isset($data['cloud'][$mandatory])) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to define $mandatory property of your cloud"); + } + } + $uri_str = 'http://' . $data['cloud']['domain'] . $data['cloud']['path']; + $this->_header->setCloud($uri_str, $data['cloud']['registerProcedure'], $data['cloud']['protocol']); + } + if (isset($data['textInput'])) { + $mandatories = array('title', 'description', 'name', 'link'); + foreach ($mandatories as $mandatory) { + if (!isset($data['textInput'][$mandatory])) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to define $mandatory property of your textInput"); + } + } + $this->_header->setTextInput($data['textInput']['title'], + $data['textInput']['description'], + $data['textInput']['name'], + $data['textInput']['link']); + } + if (isset($data['skipHours'])) { + $this->_header->setSkipHours($data['skipHours']); + } + if (isset($data['skipDays'])) { + $this->_header->setSkipDays($data['skipDays']); + } + if (isset($data['itunes'])) { + $itunes = new Zend_Feed_Builder_Header_Itunes($data['itunes']['category']); + if (isset($data['itunes']['author'])) { + $itunes->setAuthor($data['itunes']['author']); + } + if (isset($data['itunes']['owner'])) { + $name = isset($data['itunes']['owner']['name']) ? $data['itunes']['owner']['name'] : ''; + $email = isset($data['itunes']['owner']['email']) ? $data['itunes']['owner']['email'] : ''; + $itunes->setOwner($name, $email); + } + if (isset($data['itunes']['image'])) { + $itunes->setImage($data['itunes']['image']); + } + if (isset($data['itunes']['subtitle'])) { + $itunes->setSubtitle($data['itunes']['subtitle']); + } + if (isset($data['itunes']['summary'])) { + $itunes->setSummary($data['itunes']['summary']); + } + if (isset($data['itunes']['block'])) { + $itunes->setBlock($data['itunes']['block']); + } + if (isset($data['itunes']['explicit'])) { + $itunes->setExplicit($data['itunes']['explicit']); + } + if (isset($data['itunes']['keywords'])) { + $itunes->setKeywords($data['itunes']['keywords']); + } + if (isset($data['itunes']['new-feed-url'])) { + $itunes->setNewFeedUrl($data['itunes']['new-feed-url']); + } + + $this->_header->setITunes($itunes); + } + } + + /** + * Create the array of article entries + * + * @param array $data + * @throws Zend_Feed_Builder_Exception + * @return void + */ + protected function _createEntries(array $data) + { + foreach ($data as $row) { + $mandatories = array('title', 'link', 'description'); + foreach ($mandatories as $mandatory) { + if (!isset($row[$mandatory])) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("$mandatory key is missing"); + } + } + $entry = new Zend_Feed_Builder_Entry($row['title'], $row['link'], $row['description']); + if (isset($row['author'])) { + $entry->setAuthor($row['author']); + } + if (isset($row['guid'])) { + $entry->setId($row['guid']); + } + if (isset($row['content'])) { + $entry->setContent($row['content']); + } + if (isset($row['lastUpdate'])) { + $entry->setLastUpdate($row['lastUpdate']); + } + if (isset($row['comments'])) { + $entry->setCommentsUrl($row['comments']); + } + if (isset($row['commentRss'])) { + $entry->setCommentsRssUrl($row['commentRss']); + } + if (isset($row['source'])) { + $mandatories = array('title', 'url'); + foreach ($mandatories as $mandatory) { + if (!isset($row['source'][$mandatory])) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("$mandatory key of source property is missing"); + } + } + $entry->setSource($row['source']['title'], $row['source']['url']); + } + if (isset($row['category'])) { + $entry->setCategories($row['category']); + } + if (isset($row['enclosure'])) { + $entry->setEnclosures($row['enclosure']); + } + + $this->_entries[] = $entry; + } + } +} diff --git a/library/vendor/Zend/Feed/Builder/Entry.php b/library/vendor/Zend/Feed/Builder/Entry.php new file mode 100644 index 000000000..dad54abf5 --- /dev/null +++ b/library/vendor/Zend/Feed/Builder/Entry.php @@ -0,0 +1,295 @@ +offsetSet('title', $title); + $this->offsetSet('link', $link); + $this->offsetSet('description', $description); + $this->setLastUpdate(time()); + } + + /** + * Read only properties accessor + * + * @param string $name property to read + * @return mixed + */ + public function __get($name) + { + if (!$this->offsetExists($name)) { + return NULL; + } + + return $this->offsetGet($name); + } + + /** + * Write properties accessor + * + * @param string $name name of the property to set + * @param mixed $value value to set + * @return void + */ + public function __set($name, $value) + { + $this->offsetSet($name, $value); + } + + /** + * Isset accessor + * + * @param string $key + * @return boolean + */ + public function __isset($key) + { + return $this->offsetExists($key); + } + + /** + * Unset accessor + * + * @param string $key + * @return void + */ + public function __unset($key) + { + if ($this->offsetExists($key)) { + $this->offsetUnset($key); + } + } + + /** + * Sets the author of the entry + * + * @param string $author + * @return Zend_Feed_Builder_Entry + */ + public function setAuthor($author) + { + $this->offsetSet('author', $author); + return $this; + } + + /** + * Sets the id/guid of the entry + * + * @param string $id + * @return Zend_Feed_Builder_Entry + */ + public function setId($id) + { + $this->offsetSet('guid', $id); + return $this; + } + + /** + * Sets the full html content of the entry + * + * @param string $content + * @return Zend_Feed_Builder_Entry + */ + public function setContent($content) + { + $this->offsetSet('content', $content); + return $this; + } + + /** + * Timestamp of the update date + * + * @param int $lastUpdate + * @return Zend_Feed_Builder_Entry + */ + public function setLastUpdate($lastUpdate) + { + $this->offsetSet('lastUpdate', $lastUpdate); + return $this; + } + + /** + * Sets the url of the commented page associated to the entry + * + * @param string $comments + * @return Zend_Feed_Builder_Entry + */ + public function setCommentsUrl($comments) + { + $this->offsetSet('comments', $comments); + return $this; + } + + /** + * Sets the url of the comments feed link + * + * @param string $commentRss + * @return Zend_Feed_Builder_Entry + */ + public function setCommentsRssUrl($commentRss) + { + $this->offsetSet('commentRss', $commentRss); + return $this; + } + + /** + * Defines a reference to the original source + * + * @param string $title + * @param string $url + * @return Zend_Feed_Builder_Entry + */ + public function setSource($title, $url) + { + $this->offsetSet('source', array('title' => $title, + 'url' => $url)); + return $this; + } + + /** + * Sets the categories of the entry + * Format of the array: + * + * array( + * array( + * 'term' => 'first category label', + * 'scheme' => 'url that identifies a categorization scheme' // optional + * ), + * // second category and so one + * ) + * + * + * @param array $categories + * @return Zend_Feed_Builder_Entry + */ + public function setCategories(array $categories) + { + foreach ($categories as $category) { + $this->addCategory($category); + } + return $this; + } + + /** + * Add a category to the entry + * + * @param array $category see Zend_Feed_Builder_Entry::setCategories() for format + * @return Zend_Feed_Builder_Entry + * @throws Zend_Feed_Builder_Exception + */ + public function addCategory(array $category) + { + if (empty($category['term'])) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to define the name of the category"); + } + + if (!$this->offsetExists('category')) { + $categories = array($category); + } else { + $categories = $this->offsetGet('category'); + $categories[] = $category; + } + $this->offsetSet('category', $categories); + return $this; + } + + /** + * Sets the enclosures of the entry + * Format of the array: + * + * array( + * array( + * 'url' => 'url of the linked enclosure', + * 'type' => 'mime type of the enclosure' // optional + * 'length' => 'length of the linked content in octets' // optional + * ), + * // second enclosure and so one + * ) + * + * + * @param array $enclosures + * @return Zend_Feed_Builder_Entry + * @throws Zend_Feed_Builder_Exception + */ + public function setEnclosures(array $enclosures) + { + foreach ($enclosures as $enclosure) { + if (empty($enclosure['url'])) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to supply an url for your enclosure"); + } + $type = isset($enclosure['type']) ? $enclosure['type'] : ''; + $length = isset($enclosure['length']) ? $enclosure['length'] : ''; + $this->addEnclosure($enclosure['url'], $type, $length); + } + return $this; + } + + /** + * Add an enclosure to the entry + * + * @param string $url + * @param string $type + * @param string $length + * @return Zend_Feed_Builder_Entry + */ + public function addEnclosure($url, $type = '', $length = '') + { + if (!$this->offsetExists('enclosure')) { + $enclosure = array(); + } else { + $enclosure = $this->offsetGet('enclosure'); + } + $enclosure[] = array('url' => $url, + 'type' => $type, + 'length' => $length); + $this->offsetSet('enclosure', $enclosure); + return $this; + } +} diff --git a/library/vendor/Zend/CodeGenerator/Php/Exception.php b/library/vendor/Zend/Feed/Builder/Exception.php similarity index 69% rename from library/vendor/Zend/CodeGenerator/Php/Exception.php rename to library/vendor/Zend/Feed/Builder/Exception.php index 8843be7e8..9fc6ec6a5 100644 --- a/library/vendor/Zend/CodeGenerator/Php/Exception.php +++ b/library/vendor/Zend/Feed/Builder/Exception.php @@ -1,4 +1,5 @@ offsetSet('title', $title); + $this->offsetSet('link', $link); + $this->offsetSet('charset', $charset); + $this->setLastUpdate(time()) + ->setGenerator('Zend_Feed'); + } + + /** + * Read only properties accessor + * + * @param string $name property to read + * @return mixed + */ + public function __get($name) + { + if (!$this->offsetExists($name)) { + return NULL; + } + + return $this->offsetGet($name); + } + + /** + * Write properties accessor + * + * @param string $name name of the property to set + * @param mixed $value value to set + * @return void + */ + public function __set($name, $value) + { + $this->offsetSet($name, $value); + } + + /** + * Isset accessor + * + * @param string $key + * @return boolean + */ + public function __isset($key) + { + return $this->offsetExists($key); + } + + /** + * Unset accessor + * + * @param string $key + * @return void + */ + public function __unset($key) + { + if ($this->offsetExists($key)) { + $this->offsetUnset($key); + } + } + + /** + * Timestamp of the update date + * + * @param int $lastUpdate + * @return Zend_Feed_Builder_Header + */ + public function setLastUpdate($lastUpdate) + { + $this->offsetSet('lastUpdate', $lastUpdate); + return $this; + } + + /** + * Timestamp of the publication date + * + * @param int $published + * @return Zend_Feed_Builder_Header + */ + public function setPublishedDate($published) + { + $this->offsetSet('published', $published); + return $this; + } + + /** + * Short description of the feed + * + * @param string $description + * @return Zend_Feed_Builder_Header + */ + public function setDescription($description) + { + $this->offsetSet('description', $description); + return $this; + } + + /** + * Sets the author of the feed + * + * @param string $author + * @return Zend_Feed_Builder_Header + */ + public function setAuthor($author) + { + $this->offsetSet('author', $author); + return $this; + } + + /** + * Sets the author's email + * + * @param string $email + * @return Zend_Feed_Builder_Header + * @throws Zend_Feed_Builder_Exception + */ + public function setEmail($email) + { + /** + * @see Zend_Validate_EmailAddress + */ + $validate = new Zend_Validate_EmailAddress(); + if (!$validate->isValid($email)) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set a valid email address into the email property"); + } + $this->offsetSet('email', $email); + return $this; + } + + /** + * Sets the copyright notice + * + * @param string $copyright + * @return Zend_Feed_Builder_Header + */ + public function setCopyright($copyright) + { + $this->offsetSet('copyright', $copyright); + return $this; + } + + /** + * Sets the image of the feed + * + * @param string $image + * @return Zend_Feed_Builder_Header + */ + public function setImage($image) + { + $this->offsetSet('image', $image); + return $this; + } + + /** + * Sets the generator of the feed + * + * @param string $generator + * @return Zend_Feed_Builder_Header + */ + public function setGenerator($generator) + { + $this->offsetSet('generator', $generator); + return $this; + } + + /** + * Sets the language of the feed + * + * @param string $language + * @return Zend_Feed_Builder_Header + */ + public function setLanguage($language) + { + $this->offsetSet('language', $language); + return $this; + } + + /** + * Email address for person responsible for technical issues + * Ignored if atom is used + * + * @param string $webmaster + * @return Zend_Feed_Builder_Header + * @throws Zend_Feed_Builder_Exception + */ + public function setWebmaster($webmaster) + { + /** + * @see Zend_Validate_EmailAddress + */ + $validate = new Zend_Validate_EmailAddress(); + if (!$validate->isValid($webmaster)) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set a valid email address into the webmaster property"); + } + $this->offsetSet('webmaster', $webmaster); + return $this; + } + + /** + * How long in minutes a feed can be cached before refreshing + * Ignored if atom is used + * + * @param int $ttl + * @return Zend_Feed_Builder_Header + * @throws Zend_Feed_Builder_Exception + */ + public function setTtl($ttl) + { + /** + * @see Zend_Validate_Int + */ + $validate = new Zend_Validate_Int(); + if (!$validate->isValid($ttl)) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set an integer value to the ttl property"); + } + $this->offsetSet('ttl', $ttl); + return $this; + } + + /** + * PICS rating for the feed + * Ignored if atom is used + * + * @param string $rating + * @return Zend_Feed_Builder_Header + */ + public function setRating($rating) + { + $this->offsetSet('rating', $rating); + return $this; + } + + /** + * Cloud to be notified of updates of the feed + * Ignored if atom is used + * + * @param string|Zend_Uri_Http $uri + * @param string $procedure procedure to call, e.g. myCloud.rssPleaseNotify + * @param string $protocol protocol to use, e.g. soap or xml-rpc + * @return Zend_Feed_Builder_Header + * @throws Zend_Feed_Builder_Exception + */ + public function setCloud($uri, $procedure, $protocol) + { + if (is_string($uri) && Zend_Uri_Http::check($uri)) { + $uri = Zend_Uri::factory($uri); + } + if (!$uri instanceof Zend_Uri_Http) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception('Passed parameter is not a valid HTTP URI'); + } + if (!$uri->getPort()) { + $uri->setPort(80); + } + $this->offsetSet('cloud', array('uri' => $uri, + 'procedure' => $procedure, + 'protocol' => $protocol)); + return $this; + } + + /** + * A text input box that can be displayed with the feed + * Ignored if atom is used + * + * @param string $title the label of the Submit button in the text input area + * @param string $description explains the text input area + * @param string $name the name of the text object in the text input area + * @param string $link the URL of the CGI script that processes text input requests + * @return Zend_Feed_Builder_Header + */ + public function setTextInput($title, $description, $name, $link) + { + $this->offsetSet('textInput', array('title' => $title, + 'description' => $description, + 'name' => $name, + 'link' => $link)); + return $this; + } + + /** + * Hint telling aggregators which hours they can skip + * Ignored if atom is used + * + * @param array $hours list of hours in 24 format + * @return Zend_Feed_Builder_Header + * @throws Zend_Feed_Builder_Exception + */ + public function setSkipHours(array $hours) + { + if (count($hours) > 24) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you can not have more than 24 rows in the skipHours property"); + } + foreach ($hours as $hour) { + if ($hour < 0 || $hour > 23) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("$hour has te be between 0 and 23"); + } + } + $this->offsetSet('skipHours', $hours); + return $this; + } + + /** + * Hint telling aggregators which days they can skip + * Ignored if atom is used + * + * @param array $days list of days to skip, e.g. Monday + * @return Zend_Feed_Builder_Header + * @throws Zend_Feed_Builder_Exception + */ + public function setSkipDays(array $days) + { + if (count($days) > 7) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you can not have more than 7 days in the skipDays property"); + } + $valid = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'); + foreach ($days as $day) { + if (!in_array(strtolower($day), $valid)) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("$day is not a valid day"); + } + } + $this->offsetSet('skipDays', $days); + return $this; + } + + /** + * Sets the iTunes rss extension + * + * @param Zend_Feed_Builder_Header_Itunes $itunes + * @return Zend_Feed_Builder_Header + */ + public function setITunes(Zend_Feed_Builder_Header_Itunes $itunes) + { + $this->offsetSet('itunes', $itunes); + return $this; + } +} diff --git a/library/vendor/Zend/Feed/Builder/Header/Itunes.php b/library/vendor/Zend/Feed/Builder/Header/Itunes.php new file mode 100644 index 000000000..de7d50db8 --- /dev/null +++ b/library/vendor/Zend/Feed/Builder/Header/Itunes.php @@ -0,0 +1,281 @@ +setCategories($categories); + } + + /** + * Sets the categories column and in iTunes Music Store Browse + * $categories must conform to the following format: + * + * array(array('main' => 'main category', + * 'sub' => 'sub category' // optionnal + * ), + * // up to 3 rows + * ) + * + * + * @param array $categories + * @return Zend_Feed_Builder_Header_Itunes + * @throws Zend_Feed_Builder_Exception + */ + public function setCategories(array $categories) + { + $nb = count($categories); + if (0 === $nb) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set at least one itunes category"); + } + if ($nb > 3) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set at most three itunes categories"); + } + foreach ($categories as $i => $category) { + if (empty($category['main'])) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set the main category (category #$i)"); + } + } + $this->offsetSet('category', $categories); + return $this; + } + + /** + * Sets the artist value, default to the feed's author value + * + * @param string $author + * @return Zend_Feed_Builder_Header_Itunes + */ + public function setAuthor($author) + { + $this->offsetSet('author', $author); + return $this; + } + + /** + * Sets the owner of the postcast + * + * @param string $name default to the feed's author value + * @param string $email default to the feed's email value + * @return Zend_Feed_Builder_Header_Itunes + * @throws Zend_Feed_Builder_Exception + */ + public function setOwner($name = '', $email = '') + { + if (!empty($email)) { + /** + * @see Zend_Validate_EmailAddress + */ + $validate = new Zend_Validate_EmailAddress(); + if (!$validate->isValid($email)) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set a valid email address into the itunes owner's email property"); + } + } + $this->offsetSet('owner', array('name' => $name, 'email' => $email)); + return $this; + } + + /** + * Sets the album/podcast art picture + * Default to the feed's image value + * + * @param string $image + * @return Zend_Feed_Builder_Header_Itunes + */ + public function setImage($image) + { + $this->offsetSet('image', $image); + return $this; + } + + /** + * Sets the short description of the podcast + * Default to the feed's description + * + * @param string $subtitle + * @return Zend_Feed_Builder_Header_Itunes + */ + public function setSubtitle($subtitle) + { + $this->offsetSet('subtitle', $subtitle); + return $this; + } + + /** + * Sets the longer description of the podcast + * Default to the feed's description + * + * @param string $summary + * @return Zend_Feed_Builder_Header_Itunes + */ + public function setSummary($summary) + { + $this->offsetSet('summary', $summary); + return $this; + } + + /** + * Prevent a feed from appearing + * + * @param string $block can be 'yes' or 'no' + * @return Zend_Feed_Builder_Header_Itunes + * @throws Zend_Feed_Builder_Exception + */ + public function setBlock($block) + { + $block = strtolower($block); + if (!in_array($block, array('yes', 'no'))) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set yes or no to the itunes block property"); + } + $this->offsetSet('block', $block); + return $this; + } + + /** + * Configuration of the parental advisory graphic + * + * @param string $explicit can be 'yes', 'no' or 'clean' + * @return Zend_Feed_Builder_Header_Itunes + * @throws Zend_Feed_Builder_Exception + */ + public function setExplicit($explicit) + { + $explicit = strtolower($explicit); + if (!in_array($explicit, array('yes', 'no', 'clean'))) { + /** + * @see Zend_Feed_Builder_Exception + */ + throw new Zend_Feed_Builder_Exception("you have to set yes, no or clean to the itunes explicit property"); + } + $this->offsetSet('explicit', $explicit); + return $this; + } + + /** + * Sets a comma separated list of 12 keywords maximum + * + * @param string $keywords + * @return Zend_Feed_Builder_Header_Itunes + */ + public function setKeywords($keywords) + { + $this->offsetSet('keywords', $keywords); + return $this; + } + + /** + * Sets the new feed URL location + * + * @param string $url + * @return Zend_Feed_Builder_Header_Itunes + */ + public function setNewFeedUrl($url) + { + $this->offsetSet('new_feed_url', $url); + return $this; + } + + /** + * Read only properties accessor + * + * @param string $name property to read + * @return mixed + */ + public function __get($name) + { + if (!$this->offsetExists($name)) { + return NULL; + } + + return $this->offsetGet($name); + } + + /** + * Write properties accessor + * + * @param string $name name of the property to set + * @param mixed $value value to set + * @return void + */ + public function __set($name, $value) + { + $this->offsetSet($name, $value); + } + + /** + * Isset accessor + * + * @param string $key + * @return boolean + */ + public function __isset($key) + { + return $this->offsetExists($key); + } + + /** + * Unset accessor + * + * @param string $key + * @return void + */ + public function __unset($key) + { + if ($this->offsetExists($key)) { + $this->offsetUnset($key); + } + } + +} diff --git a/library/vendor/Zend/Feed/Builder/Interface.php b/library/vendor/Zend/Feed/Builder/Interface.php new file mode 100644 index 000000000..8e2615694 --- /dev/null +++ b/library/vendor/Zend/Feed/Builder/Interface.php @@ -0,0 +1,52 @@ +_element = $element; + } + + + /** + * Get a DOM representation of the element + * + * Returns the underlying DOM object, which can then be + * manipulated with full DOM methods. + * + * @return DOMDocument + */ + public function getDOM() + { + return $this->_element; + } + + + /** + * Update the object from a DOM element + * + * Take a DOMElement object, which may be originally from a call + * to getDOM() or may be custom created, and use it as the + * DOM tree for this Zend_Feed_Element. + * + * @param DOMElement $element + * @return void + */ + public function setDOM(DOMElement $element) + { + $this->_element = $this->_element->ownerDocument->importNode($element, true); + } + + /** + * Set the parent element of this object to another + * Zend_Feed_Element. + * + * @param Zend_Feed_Element $element + * @return void + */ + public function setParent(Zend_Feed_Element $element) + { + $this->_parentElement = $element; + $this->_appended = false; + } + + + /** + * Appends this element to its parent if necessary. + * + * @return void + */ + protected function ensureAppended() + { + if (!$this->_appended) { + $this->_parentElement->getDOM()->appendChild($this->_element); + $this->_appended = true; + $this->_parentElement->ensureAppended(); + } + } + + + /** + * Get an XML string representation of this element + * + * Returns a string of this element's XML, including the XML + * prologue. + * + * @return string + */ + public function saveXml() + { + // Return a complete document including XML prologue. + $doc = new DOMDocument($this->_element->ownerDocument->version, + $this->_element->ownerDocument->actualEncoding); + $doc->appendChild($doc->importNode($this->_element, true)); + return $doc->saveXML(); + } + + + /** + * Get the XML for only this element + * + * Returns a string of this element's XML without prologue. + * + * @return string + */ + public function saveXmlFragment() + { + return $this->_element->ownerDocument->saveXML($this->_element); + } + + /** + * Get encoding + * + * @return string + */ + public function getEncoding() + { + return $this->_encoding; + } + + /** + * Set encoding + * + * @param string $value Encoding to use + * @return Zend_Feed_Element + */ + public function setEncoding($value) + { + $this->_encoding = (string) $value; + return $this; + } + + /** + * Map variable access onto the underlying entry representation. + * + * Get-style access returns a Zend_Feed_Element representing the + * child element accessed. To get string values, use method syntax + * with the __call() overriding. + * + * @param string $var The property to access. + * @return mixed + */ + public function __get($var) + { + $nodes = $this->_children($var); + $length = count($nodes); + + if ($length == 1) { + return new Zend_Feed_Element($nodes[0]); + } elseif ($length > 1) { + return array_map(create_function('$e', 'return new Zend_Feed_Element($e);'), $nodes); + } else { + // When creating anonymous nodes for __set chaining, don't + // call appendChild() on them. Instead we pass the current + // element to them as an extra reference; the child is + // then responsible for appending itself when it is + // actually set. This way "if ($foo->bar)" doesn't create + // a phantom "bar" element in our tree. + if (strpos($var, ':') !== false) { + list($ns, $elt) = explode(':', $var, 2); + $node = $this->_element->ownerDocument->createElementNS(Zend_Feed::lookupNamespace($ns), $elt); + } else { + $node = $this->_element->ownerDocument->createElement($var); + } + $node = new self($node); + $node->setParent($this); + return $node; + } + } + + + /** + * Map variable sets onto the underlying entry representation. + * + * @param string $var The property to change. + * @param string $val The property's new value. + * @return void + * @throws Zend_Feed_Exception + */ + public function __set($var, $val) + { + $this->ensureAppended(); + + $nodes = $this->_children($var); + if (!$nodes) { + if (strpos($var, ':') !== false) { + list($ns, $elt) = explode(':', $var, 2); + $node = $this->_element->ownerDocument->createElementNS(Zend_Feed::lookupNamespace($ns), + $var, htmlspecialchars($val, ENT_NOQUOTES, $this->getEncoding())); + $this->_element->appendChild($node); + } else { + $node = $this->_element->ownerDocument->createElement($var, + htmlspecialchars($val, ENT_NOQUOTES, $this->getEncoding())); + $this->_element->appendChild($node); + } + } elseif (count($nodes) > 1) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Cannot set the value of multiple tags simultaneously.'); + } else { + $nodes[0]->nodeValue = $val; + } + } + + + /** + * Map isset calls onto the underlying entry representation. + * + * @param string $var + * @return boolean + */ + public function __isset($var) + { + // Look for access of the form {ns:var}. We don't use + // _children() here because we can break out of the loop + // immediately once we find something. + if (strpos($var, ':') !== false) { + list($ns, $elt) = explode(':', $var, 2); + foreach ($this->_element->childNodes as $child) { + if ($child->localName == $elt && $child->prefix == $ns) { + return true; + } + } + } else { + foreach ($this->_element->childNodes as $child) { + if ($child->localName == $var) { + return true; + } + } + } + } + + + /** + * Get the value of an element with method syntax. + * + * Map method calls to get the string value of the requested + * element. If there are multiple elements that match, this will + * return an array of those objects. + * + * @param string $var The element to get the string value of. + * @param mixed $unused This parameter is not used. + * @return mixed The node's value, null, or an array of nodes. + */ + public function __call($var, $unused) + { + $nodes = $this->_children($var); + + if (!$nodes) { + return null; + } elseif (count($nodes) > 1) { + return $nodes; + } else { + return $nodes[0]->nodeValue; + } + } + + + /** + * Remove all children matching $var. + * + * @param string $var + * @return void + */ + public function __unset($var) + { + $nodes = $this->_children($var); + foreach ($nodes as $node) { + $parent = $node->parentNode; + $parent->removeChild($node); + } + } + + + /** + * Returns the nodeValue of this element when this object is used + * in a string context. + * + * @return string + */ + public function __toString() + { + return $this->_element->nodeValue; + } + + + /** + * Finds children with tagnames matching $var + * + * Similar to SimpleXML's children() method. + * + * @param string $var Tagname to match, can be either namespace:tagName or just tagName. + * @return array + */ + protected function _children($var) + { + $found = array(); + + // Look for access of the form {ns:var}. + if (strpos($var, ':') !== false) { + list($ns, $elt) = explode(':', $var, 2); + foreach ($this->_element->childNodes as $child) { + if ($child->localName == $elt && $child->prefix == $ns) { + $found[] = $child; + } + } + } else { + foreach ($this->_element->childNodes as $child) { + if ($child->localName == $var) { + $found[] = $child; + } + } + } + + return $found; + } + + + /** + * Required by the ArrayAccess interface. + * + * @param string $offset + * @return boolean + */ + public function offsetExists($offset) + { + if (strpos($offset, ':') !== false) { + list($ns, $attr) = explode(':', $offset, 2); + return $this->_element->hasAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); + } else { + return $this->_element->hasAttribute($offset); + } + } + + + /** + * Required by the ArrayAccess interface. + * + * @param string $offset + * @return string + */ + public function offsetGet($offset) + { + if (strpos($offset, ':') !== false) { + list($ns, $attr) = explode(':', $offset, 2); + return $this->_element->getAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); + } else { + return $this->_element->getAttribute($offset); + } + } + + + /** + * Required by the ArrayAccess interface. + * + * @param string $offset + * @param string $value + * @return string + */ + public function offsetSet($offset, $value) + { + $this->ensureAppended(); + + if (strpos($offset, ':') !== false) { + list($ns, $attr) = explode(':', $offset, 2); + // DOMElement::setAttributeNS() requires $qualifiedName to have a prefix + return $this->_element->setAttributeNS(Zend_Feed::lookupNamespace($ns), $offset, $value); + } else { + return $this->_element->setAttribute($offset, $value); + } + } + + + /** + * Required by the ArrayAccess interface. + * + * @param string $offset + * @return boolean + */ + public function offsetUnset($offset) + { + if (strpos($offset, ':') !== false) { + list($ns, $attr) = explode(':', $offset, 2); + return $this->_element->removeAttributeNS(Zend_Feed::lookupNamespace($ns), $attr); + } else { + return $this->_element->removeAttribute($offset); + } + } + +} diff --git a/library/vendor/Zend/Feed/Entry/Abstract.php b/library/vendor/Zend/Feed/Entry/Abstract.php new file mode 100644 index 000000000..9ae213ae1 --- /dev/null +++ b/library/vendor/Zend/Feed/Entry/Abstract.php @@ -0,0 +1,121 @@ +getElementsByTagName($this->_rootElement)->item(0); + if (!$element) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('No root <' . $this->_rootElement . '> element found, cannot parse feed.'); + } + } else { + $doc = new DOMDocument('1.0', 'utf-8'); + if ($this->_rootNamespace !== null) { + $element = $doc->createElementNS(Zend_Feed::lookupNamespace($this->_rootNamespace), $this->_rootElement); + } else { + $element = $doc->createElement($this->_rootElement); + } + } + } + + parent::__construct($element); + } + +} diff --git a/library/vendor/Zend/Feed/Entry/Atom.php b/library/vendor/Zend/Feed/Entry/Atom.php new file mode 100644 index 000000000..f2edffa1c --- /dev/null +++ b/library/vendor/Zend/Feed/Entry/Atom.php @@ -0,0 +1,272 @@ +link('edit'); + if (!$deleteUri) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Cannot delete entry; no link rel="edit" is present.'); + } + + // DELETE + $client = Zend_Feed::getHttpClient(); + do { + $client->setUri($deleteUri); + if (Zend_Feed::getHttpMethodOverride()) { + $client->setHeader('X-HTTP-Method-Override', 'DELETE'); + $response = $client->request('POST'); + } else { + $response = $client->request('DELETE'); + } + $httpStatus = $response->getStatus(); + switch ((int) $httpStatus / 100) { + // Success + case 2: + return true; + // Redirect + case 3: + $deleteUri = $response->getHeader('Location'); + continue; + // Error + default: + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception("Expected response code 2xx, got $httpStatus"); + } + } while (true); + } + + + /** + * Save a new or updated Atom entry. + * + * Save is used to either create new entries or to save changes to + * existing ones. If we have a link rel="edit", we are changing + * an existing entry. In this case we re-serialize the entry and + * PUT it to the edit URI, checking for a 200 OK result. + * + * For posting new entries, you must specify the $postUri + * parameter to save() to tell the object where to post itself. + * We use $postUri and POST the serialized entry there, checking + * for a 201 Created response. If the insert is successful, we + * then parse the response from the POST to get any values that + * the server has generated: an id, an updated time, and its new + * link rel="edit". + * + * @param string $postUri Location to POST for creating new entries. + * @return void + * @throws Zend_Feed_Exception + */ + public function save($postUri = null) + { + if ($this->id()) { + // If id is set, look for link rel="edit" in the + // entry object and PUT. + $editUri = $this->link('edit'); + if (!$editUri) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Cannot edit entry; no link rel="edit" is present.'); + } + + $client = Zend_Feed::getHttpClient(); + $client->setUri($editUri); + if (Zend_Feed::getHttpMethodOverride()) { + $client->setHeaders(array('X-HTTP-Method-Override: PUT', + 'Content-Type: ' . self::CONTENT_TYPE)); + $client->setRawData($this->saveXML()); + $response = $client->request('POST'); + } else { + $client->setHeaders('Content-Type', self::CONTENT_TYPE); + $client->setRawData($this->saveXML()); + $response = $client->request('PUT'); + } + if ($response->getStatus() !== 200) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Expected response code 200, got ' . $response->getStatus()); + } + } else { + if ($postUri === null) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('PostURI must be specified to save new entries.'); + } + $client = Zend_Feed::getHttpClient(); + $client->setUri($postUri); + $client->setHeaders('Content-Type', self::CONTENT_TYPE); + $client->setRawData($this->saveXML()); + $response = $client->request('POST'); + + if ($response->getStatus() !== 201) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Expected response code 201, got ' + . $response->getStatus()); + } + } + + // Update internal properties using $client->responseBody; + @ini_set('track_errors', 1); + $newEntry = new DOMDocument; + $newEntry = @Zend_Xml_Security::scan($response->getBody(), $newEntry); + @ini_restore('track_errors'); + + if (!$newEntry) { + // prevent the class to generate an undefined variable notice (ZF-2590) + if (!isset($php_errormsg)) { + if (function_exists('xdebug_is_enabled')) { + $php_errormsg = '(error message not available, when XDebug is running)'; + } else { + $php_errormsg = '(error message not available)'; + } + } + + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('XML cannot be parsed: ' . $php_errormsg); + } + + $newEntry = $newEntry->getElementsByTagName($this->_rootElement)->item(0); + if (!$newEntry) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('No root element found in server response:' + . "\n\n" . $client->responseBody); + } + + if ($this->_element->parentNode) { + $oldElement = $this->_element; + $this->_element = $oldElement->ownerDocument->importNode($newEntry, true); + $oldElement->parentNode->replaceChild($this->_element, $oldElement); + } else { + $this->_element = $newEntry; + } + } + + + /** + * Easy access to tags keyed by "rel" attributes. + * + * If $elt->link() is called with no arguments, we will attempt to + * return the value of the tag(s) like all other + * method-syntax attribute access. If an argument is passed to + * link(), however, then we will return the "href" value of the + * first tag that has a "rel" attribute matching $rel: + * + * $elt->link(): returns the value of the link tag. + * $elt->link('self'): returns the href from the first in the entry. + * + * @param string $rel The "rel" attribute to look for. + * @return mixed + */ + public function link($rel = null) + { + if ($rel === null) { + return parent::__call('link', null); + } + + // index link tags by their "rel" attribute. + $links = parent::__get('link'); + if (!is_array($links)) { + if ($links instanceof Zend_Feed_Element) { + $links = array($links); + } else { + return $links; + } + } + + foreach ($links as $link) { + if (empty($link['rel'])) { + $link['rel'] = 'alternate'; // see Atom 1.0 spec + } + if ($rel == $link['rel']) { + return $link['href']; + } + } + + return null; + } + +} diff --git a/library/vendor/Zend/Feed/Entry/Rss.php b/library/vendor/Zend/Feed/Entry/Rss.php new file mode 100644 index 000000000..782f6aa8b --- /dev/null +++ b/library/vendor/Zend/Feed/Entry/Rss.php @@ -0,0 +1,121 @@ +_element->lookupPrefix('http://purl.org/rss/1.0/modules/content/'); + return parent::__get("$prefix:encoded"); + default: + return parent::__get($var); + } + } + + /** + * Overwrites parent::_set method to enable write access + * to content:encoded element. + * + * @param string $var The property to change. + * @param string $val The property's new value. + * @return void + */ + public function __set($var, $value) + { + switch ($var) { + case 'content': + parent::__set('content:encoded', $value); + break; + default: + parent::__set($var, $value); + } + } + + /** + * Overwrites parent::_isset method to enable access + * to content:encoded element. + * + * @param string $var + * @return boolean + */ + public function __isset($var) + { + switch ($var) { + case 'content': + // don't use other callback to prevent invalid returned value + return $this->content() !== null; + default: + return parent::__isset($var); + } + } + + /** + * Overwrites parent::_call method to enable read access + * to content:encoded element. + * Please note that method-style write access is not currently supported + * by parent method, consequently this method doesn't as well. + * + * @param string $var The element to get the string value of. + * @param mixed $unused This parameter is not used. + * @return mixed The node's value, null, or an array of nodes. + */ + public function __call($var, $unused) + { + switch ($var) { + case 'content': + $prefix = $this->_element->lookupPrefix('http://purl.org/rss/1.0/modules/content/'); + return parent::__call("$prefix:encoded", $unused); + default: + return parent::__call($var, $unused); + } + } +} diff --git a/library/vendor/Zend/Feed/Exception.php b/library/vendor/Zend/Feed/Exception.php new file mode 100644 index 000000000..70d84f2c3 --- /dev/null +++ b/library/vendor/Zend/Feed/Exception.php @@ -0,0 +1,41 @@ +getHubs(); + } + + /** + * Allows the external environment to make Zend_Oauth use a specific + * Client instance. + * + * @param Zend_Http_Client $httpClient + * @return void + */ + public static function setHttpClient(Zend_Http_Client $httpClient) + { + self::$httpClient = $httpClient; + } + + /** + * Return the singleton instance of the HTTP Client. Note that + * the instance is reset and cleared of previous parameters GET/POST. + * Headers are NOT reset but handled by this component if applicable. + * + * @return Zend_Http_Client + */ + public static function getHttpClient() + { + if (!isset(self::$httpClient)): + self::$httpClient = new Zend_Http_Client; + else: + self::$httpClient->resetParameters(); + endif; + return self::$httpClient; + } + + /** + * Simple mechanism to delete the entire singleton HTTP Client instance + * which forces an new instantiation for subsequent requests. + * + * @return void + */ + public static function clearHttpClient() + { + self::$httpClient = null; + } + + /** + * RFC 3986 safe url encoding method + * + * @param string $string + * @return string + */ + public static function urlencode($string) + { + $rawencoded = rawurlencode($string); + $rfcencoded = str_replace('%7E', '~', $rawencoded); + return $rfcencoded; + } +} diff --git a/library/vendor/Zend/Feed/Pubsubhubbub/CallbackAbstract.php b/library/vendor/Zend/Feed/Pubsubhubbub/CallbackAbstract.php new file mode 100644 index 000000000..87e7a98b0 --- /dev/null +++ b/library/vendor/Zend/Feed/Pubsubhubbub/CallbackAbstract.php @@ -0,0 +1,309 @@ +setConfig($config); + } + } + + /** + * Process any injected configuration options + * + * @param array|Zend_Config $config Options array or Zend_Config instance + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_CallbackAbstract + */ + public function setConfig($config) + { + if ($config instanceof Zend_Config) { + $config = $config->toArray(); + } elseif (!is_array($config)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Array or Zend_Config object' + . 'expected, got ' . gettype($config)); + } + if (array_key_exists('storage', $config)) { + $this->setStorage($config['storage']); + } + return $this; + } + + /** + * Send the response, including all headers. + * If you wish to handle this via Zend_Controller, use the getter methods + * to retrieve any data needed to be set on your HTTP Response object, or + * simply give this object the HTTP Response instance to work with for you! + * + * @return void + */ + public function sendResponse() + { + $this->getHttpResponse()->sendResponse(); + } + + /** + * Sets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used + * to background save any verification tokens associated with a subscription + * or other. + * + * @param Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $storage + * @return Zend_Feed_Pubsubhubbub_CallbackAbstract + */ + public function setStorage(Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $storage) + { + $this->_storage = $storage; + return $this; + } + + /** + * Gets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used + * to background save any verification tokens associated with a subscription + * or other. + * + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface + */ + public function getStorage() + { + if ($this->_storage === null) { + throw new Zend_Feed_Pubsubhubbub_Exception('No storage object has been' + . ' set that subclasses Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface'); + } + return $this->_storage; + } + + /** + * An instance of a class handling Http Responses. This is implemented in + * Zend_Feed_Pubsubhubbub_HttpResponse which shares an unenforced interface with + * (i.e. not inherited from) Zend_Controller_Response_Http. + * + * @param Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http $httpResponse + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_CallbackAbstract + */ + public function setHttpResponse($httpResponse) + { + if (!is_object($httpResponse) + || (!$httpResponse instanceof Zend_Feed_Pubsubhubbub_HttpResponse + && !$httpResponse instanceof Zend_Controller_Response_Http) + ) { + throw new Zend_Feed_Pubsubhubbub_Exception('HTTP Response object must' + . ' implement one of Zend_Feed_Pubsubhubbub_HttpResponse or' + . ' Zend_Controller_Response_Http'); + } + $this->_httpResponse = $httpResponse; + return $this; + } + + /** + * An instance of a class handling Http Responses. This is implemented in + * Zend_Feed_Pubsubhubbub_HttpResponse which shares an unenforced interface with + * (i.e. not inherited from) Zend_Controller_Response_Http. + * + * @return Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http + */ + public function getHttpResponse() + { + if ($this->_httpResponse === null) { + $this->_httpResponse = new Zend_Feed_Pubsubhubbub_HttpResponse; + } + return $this->_httpResponse; + } + + /** + * Sets the number of Subscribers for which any updates are on behalf of. + * In other words, is this class serving one or more subscribers? How many? + * Defaults to 1 if left unchanged. + * + * @param string|int $count + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_CallbackAbstract + */ + public function setSubscriberCount($count) + { + $count = intval($count); + if ($count <= 0) { + throw new Zend_Feed_Pubsubhubbub_Exception('Subscriber count must be' + . ' greater than zero'); + } + $this->_subscriberCount = $count; + return $this; + } + + /** + * Gets the number of Subscribers for which any updates are on behalf of. + * In other words, is this class serving one or more subscribers? How many? + * + * @return int + */ + public function getSubscriberCount() + { + return $this->_subscriberCount; + } + + /** + * Attempt to detect the callback URL (specifically the path forward) + */ + protected function _detectCallbackUrl() + { + $callbackUrl = ''; + if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) { + $callbackUrl = $_SERVER['HTTP_X_ORIGINAL_URL']; + } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) { + $callbackUrl = $_SERVER['HTTP_X_REWRITE_URL']; + } elseif (isset($_SERVER['REQUEST_URI'])) { + $callbackUrl = $_SERVER['REQUEST_URI']; + $scheme = 'http'; + if ($_SERVER['HTTPS'] == 'on') { + $scheme = 'https'; + } + $schemeAndHttpHost = $scheme . '://' . $this->_getHttpHost(); + if (strpos($callbackUrl, $schemeAndHttpHost) === 0) { + $callbackUrl = substr($callbackUrl, strlen($schemeAndHttpHost)); + } + } elseif (isset($_SERVER['ORIG_PATH_INFO'])) { + $callbackUrl= $_SERVER['ORIG_PATH_INFO']; + if (!empty($_SERVER['QUERY_STRING'])) { + $callbackUrl .= '?' . $_SERVER['QUERY_STRING']; + } + } + return $callbackUrl; + } + + /** + * Get the HTTP host + * + * @return string + */ + protected function _getHttpHost() + { + if (!empty($_SERVER['HTTP_HOST'])) { + return $_SERVER['HTTP_HOST']; + } + $scheme = 'http'; + if ($_SERVER['HTTPS'] == 'on') { + $scheme = 'https'; + } + $name = $_SERVER['SERVER_NAME']; + $port = $_SERVER['SERVER_PORT']; + if (($scheme == 'http' && $port == 80) + || ($scheme == 'https' && $port == 443) + ) { + return $name; + } else { + return $name . ':' . $port; + } + } + + /** + * Retrieve a Header value from either $_SERVER or Apache + * + * @param string $header + * @return bool + */ + protected function _getHeader($header) + { + $temp = strtoupper(str_replace('-', '_', $header)); + if (!empty($_SERVER[$temp])) { + return $_SERVER[$temp]; + } + $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header)); + if (!empty($_SERVER[$temp])) { + return $_SERVER[$temp]; + } + if (function_exists('apache_request_headers')) { + $headers = apache_request_headers(); + if (!empty($headers[$header])) { + return $headers[$header]; + } + } + return false; + } + + /** + * Return the raw body of the request + * + * @return string|false Raw body, or false if not present + */ + protected function _getRawBody() + { + $body = file_get_contents('php://input'); + if (strlen(trim($body)) == 0 && isset($GLOBALS['HTTP_RAW_POST_DATA'])) { + $body = $GLOBALS['HTTP_RAW_POST_DATA']; + } + if (strlen(trim($body)) > 0) { + return $body; + } + return false; + } +} diff --git a/library/vendor/Zend/Feed/Pubsubhubbub/CallbackInterface.php b/library/vendor/Zend/Feed/Pubsubhubbub/CallbackInterface.php new file mode 100644 index 000000000..d655c1bb4 --- /dev/null +++ b/library/vendor/Zend/Feed/Pubsubhubbub/CallbackInterface.php @@ -0,0 +1,69 @@ +sendHeaders(); + echo $this->getBody(); + } + + /** + * Send all headers + * + * Sends any headers specified. If an {@link setHttpResponseCode() HTTP response code} + * has been specified, it is sent with the first header. + * + * @return void + */ + public function sendHeaders() + { + if (count($this->_headers) || (200 != $this->_httpResponseCode)) { + $this->canSendHeaders(true); + } elseif (200 == $this->_httpResponseCode) { + return; + } + $httpCodeSent = false; + foreach ($this->_headers as $header) { + if (!$httpCodeSent && $this->_httpResponseCode) { + header($header['name'] . ': ' . $header['value'], $header['replace'], $this->_httpResponseCode); + $httpCodeSent = true; + } else { + header($header['name'] . ': ' . $header['value'], $header['replace']); + } + } + if (!$httpCodeSent) { + header('HTTP/1.1 ' . $this->_httpResponseCode); + $httpCodeSent = true; + } + } + + /** + * Set a header + * + * If $replace is true, replaces any headers already defined with that + * $name. + * + * @param string $name + * @param string $value + * @param boolean $replace + * @return Zend_Feed_Pubsubhubbub_HttpResponse + */ + public function setHeader($name, $value, $replace = false) + { + $name = $this->_normalizeHeader($name); + $value = (string) $value; + if ($replace) { + foreach ($this->_headers as $key => $header) { + if ($name == $header['name']) { + unset($this->_headers[$key]); + } + } + } + $this->_headers[] = array( + 'name' => $name, + 'value' => $value, + 'replace' => $replace, + ); + + return $this; + } + + /** + * Check if a specific Header is set and return its value + * + * @param string $name + * @return string|null + */ + public function getHeader($name) + { + $name = $this->_normalizeHeader($name); + foreach ($this->_headers as $header) { + if ($header['name'] == $name) { + return $header['value']; + } + } + } + + /** + * Return array of headers; see {@link $_headers} for format + * + * @return array + */ + public function getHeaders() + { + return $this->_headers; + } + + /** + * Can we send headers? + * + * @param boolean $throw Whether or not to throw an exception if headers have been sent; defaults to false + * @return boolean + * @throws Zend_Feed_Pubsubhubbub_Exception + */ + public function canSendHeaders($throw = false) + { + $ok = headers_sent($file, $line); + if ($ok && $throw) { + throw new Zend_Feed_Pubsubhubbub_Exception('Cannot send headers; headers already sent in ' . $file . ', line ' . $line); + } + return !$ok; + } + + /** + * Set HTTP response code to use with headers + * + * @param int $code + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_HttpResponse + */ + public function setHttpResponseCode($code) + { + if (!is_int($code) || (100 > $code) || (599 < $code)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid HTTP response' + . ' code:' . $code); + } + $this->_httpResponseCode = $code; + return $this; + } + + /** + * Retrieve HTTP response code + * + * @return int + */ + public function getHttpResponseCode() + { + return $this->_httpResponseCode; + } + + /** + * Set body content + * + * @param string $content + * @return Zend_Feed_Pubsubhubbub_HttpResponse + */ + public function setBody($content) + { + $this->_body = (string) $content; + $this->setHeader('content-length', strlen($content)); + return $this; + } + + /** + * Return the body content + * + * @return string + */ + public function getBody() + { + return $this->_body; + } + + /** + * Normalizes a header name to X-Capitalized-Names + * + * @param string $name + * @return string + */ + protected function _normalizeHeader($name) + { + $filtered = str_replace(array('-', '_'), ' ', (string) $name); + $filtered = ucwords(strtolower($filtered)); + $filtered = str_replace(' ', '-', $filtered); + return $filtered; + } +} diff --git a/library/vendor/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php b/library/vendor/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php new file mode 100644 index 000000000..ad0807b36 --- /dev/null +++ b/library/vendor/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php @@ -0,0 +1,61 @@ +_db = new Zend_Db_Table($table); + } else { + $this->_db = $tableGateway; + } + } + +} diff --git a/library/vendor/Zend/Feed/Pubsubhubbub/Model/Subscription.php b/library/vendor/Zend/Feed/Pubsubhubbub/Model/Subscription.php new file mode 100644 index 000000000..0917d778d --- /dev/null +++ b/library/vendor/Zend/Feed/Pubsubhubbub/Model/Subscription.php @@ -0,0 +1,135 @@ +_db->find($data['id']); + if (count($result)) { + $data['created_time'] = $result->current()->created_time; + $now = new Zend_Date; + if (isset($data['lease_seconds'])) { + $data['expiration_time'] = $now->add($data['lease_seconds'], Zend_Date::SECOND) + ->get('yyyy-MM-dd HH:mm:ss'); + } + $this->_db->update( + $data, + $this->_db->getAdapter()->quoteInto('id = ?', $data['id']) + ); + return false; + } + + $this->_db->insert($data); + return true; + } + + /** + * Get subscription by ID/key + * + * @param string $key + * @throws Zend_Db_Table_Exception + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return array + */ + public function getSubscription($key) + { + if (empty($key) || !is_string($key)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "key"' + .' of "' . $key . '" must be a non-empty string'); + } + $result = $this->_db->find($key); + if (count($result)) { + return $result->current()->toArray(); + } + return false; + } + + /** + * Determine if a subscription matching the key exists + * + * @param string $key + * @throws Zend_Db_Table_Exception + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return bool + */ + public function hasSubscription($key) + { + if (empty($key) || !is_string($key)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "key"' + .' of "' . $key . '" must be a non-empty string'); + } + $result = $this->_db->find($key); + if (count($result)) { + return true; + } + return false; + } + + /** + * Delete a subscription + * + * @param string $key + * @return bool + */ + public function deleteSubscription($key) + { + $result = $this->_db->find($key); + if (count($result)) { + $this->_db->delete( + $this->_db->getAdapter()->quoteInto('id = ?', $key) + ); + return true; + } + return false; + } + +} diff --git a/library/vendor/Zend/Feed/Pubsubhubbub/Model/SubscriptionInterface.php b/library/vendor/Zend/Feed/Pubsubhubbub/Model/SubscriptionInterface.php new file mode 100644 index 000000000..c604ff1fc --- /dev/null +++ b/library/vendor/Zend/Feed/Pubsubhubbub/Model/SubscriptionInterface.php @@ -0,0 +1,65 @@ +setConfig($config); + } + } + + /** + * Process any injected configuration options + * + * @param array|Zend_Config $config Options array or Zend_Config instance + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function setConfig($config) + { + if ($config instanceof Zend_Config) { + $config = $config->toArray(); + } elseif (!is_array($config)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Array or Zend_Config object' + . 'expected, got ' . gettype($config)); + } + if (array_key_exists('hubUrls', $config)) { + $this->addHubUrls($config['hubUrls']); + } + if (array_key_exists('updatedTopicUrls', $config)) { + $this->addUpdatedTopicUrls($config['updatedTopicUrls']); + } + if (array_key_exists('parameters', $config)) { + $this->setParameters($config['parameters']); + } + return $this; + } + + /** + * Add a Hub Server URL supported by Publisher + * + * @param string $url + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function addHubUrl($url) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "url"' + .' of "' . $url . '" must be a non-empty string and a valid' + .'URL'); + } + $this->_hubUrls[] = $url; + return $this; + } + + /** + * Add an array of Hub Server URLs supported by Publisher + * + * @param array $urls + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function addHubUrls(array $urls) + { + foreach ($urls as $url) { + $this->addHubUrl($url); + } + return $this; + } + + /** + * Remove a Hub Server URL + * + * @param string $url + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function removeHubUrl($url) + { + if (!in_array($url, $this->getHubUrls())) { + return $this; + } + $key = array_search($url, $this->_hubUrls); + unset($this->_hubUrls[$key]); + return $this; + } + + /** + * Return an array of unique Hub Server URLs currently available + * + * @return array + */ + public function getHubUrls() + { + $this->_hubUrls = array_unique($this->_hubUrls); + return $this->_hubUrls; + } + + /** + * Add a URL to a topic (Atom or RSS feed) which has been updated + * + * @param string $url + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function addUpdatedTopicUrl($url) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "url"' + .' of "' . $url . '" must be a non-empty string and a valid' + .'URL'); + } + $this->_updatedTopicUrls[] = $url; + return $this; + } + + /** + * Add an array of Topic URLs which have been updated + * + * @param array $urls + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function addUpdatedTopicUrls(array $urls) + { + foreach ($urls as $url) { + $this->addUpdatedTopicUrl($url); + } + return $this; + } + + /** + * Remove an updated topic URL + * + * @param string $url + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function removeUpdatedTopicUrl($url) + { + if (!in_array($url, $this->getUpdatedTopicUrls())) { + return $this; + } + $key = array_search($url, $this->_updatedTopicUrls); + unset($this->_updatedTopicUrls[$key]); + return $this; + } + + /** + * Return an array of unique updated topic URLs currently available + * + * @return array + */ + public function getUpdatedTopicUrls() + { + $this->_updatedTopicUrls = array_unique($this->_updatedTopicUrls); + return $this->_updatedTopicUrls; + } + + /** + * Notifies a single Hub Server URL of changes + * + * @param string $url The Hub Server's URL + * @return void + * @throws Zend_Feed_Pubsubhubbub_Exception Thrown on failure + */ + public function notifyHub($url) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "url"' + .' of "' . $url . '" must be a non-empty string and a valid' + .'URL'); + } + $client = $this->_getHttpClient(); + $client->setUri($url); + $response = $client->request(); + if ($response->getStatus() !== 204) { + throw new Zend_Feed_Pubsubhubbub_Exception('Notification to Hub Server ' + . 'at "' . $url . '" appears to have failed with a status code of "' + . $response->getStatus() . '" and message "' + . $response->getMessage() . '"'); + } + } + + /** + * Notifies all Hub Server URLs of changes + * + * If a Hub notification fails, certain data will be retained in an + * an array retrieved using getErrors(), if a failure occurs for any Hubs + * the isSuccess() check will return FALSE. This method is designed not + * to needlessly fail with an Exception/Error unless from Zend_Http_Client. + * + * @return void + * @throws Zend_Feed_Pubsubhubbub_Exception Thrown if no hubs attached + */ + public function notifyAll() + { + $client = $this->_getHttpClient(); + $hubs = $this->getHubUrls(); + if (empty($hubs)) { + throw new Zend_Feed_Pubsubhubbub_Exception('No Hub Server URLs' + . ' have been set so no notifcations can be sent'); + } + $this->_errors = array(); + foreach ($hubs as $url) { + $client->setUri($url); + $response = $client->request(); + if ($response->getStatus() !== 204) { + $this->_errors[] = array( + 'response' => $response, + 'hubUrl' => $url + ); + } + } + } + + /** + * Add an optional parameter to the update notification requests + * + * @param string $name + * @param string|null $value + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function setParameter($name, $value = null) + { + if (is_array($name)) { + $this->setParameters($name); + return $this; + } + if (empty($name) || !is_string($name)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "name"' + .' of "' . $name . '" must be a non-empty string'); + } + if ($value === null) { + $this->removeParameter($name); + return $this; + } + if (empty($value) || (!is_string($value) && $value !== null)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "value"' + .' of "' . $value . '" must be a non-empty string'); + } + $this->_parameters[$name] = $value; + return $this; + } + + /** + * Add an optional parameter to the update notification requests + * + * @param array $parameters + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function setParameters(array $parameters) + { + foreach ($parameters as $name => $value) { + $this->setParameter($name, $value); + } + return $this; + } + + /** + * Remove an optional parameter for the notification requests + * + * @param string $name + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Publisher + */ + public function removeParameter($name) + { + if (empty($name) || !is_string($name)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "name"' + .' of "' . $name . '" must be a non-empty string'); + } + if (array_key_exists($name, $this->_parameters)) { + unset($this->_parameters[$name]); + } + return $this; + } + + /** + * Return an array of optional parameters for notification requests + * + * @return array + */ + public function getParameters() + { + return $this->_parameters; + } + + /** + * Returns a boolean indicator of whether the notifications to Hub + * Servers were ALL successful. If even one failed, FALSE is returned. + * + * @return bool + */ + public function isSuccess() + { + if (count($this->_errors) > 0) { + return false; + } + return true; + } + + /** + * Return an array of errors met from any failures, including keys: + * 'response' => the Zend_Http_Response object from the failure + * 'hubUrl' => the URL of the Hub Server whose notification failed + * + * @return array + */ + public function getErrors() + { + return $this->_errors; + } + + /** + * Get a basic prepared HTTP client for use + * + * @throws Zend_Feed_Pubsubhubbub_Exception + * @throws Zend_Http_Client_Exception + * @return Zend_Http_Client + */ + protected function _getHttpClient() + { + $client = Zend_Feed_Pubsubhubbub::getHttpClient(); + $client->setMethod(Zend_Http_Client::POST); + $client->setConfig(array( + 'useragent' => 'Zend_Feed_Pubsubhubbub_Publisher/' . Zend_Version::VERSION, + )); + $params = array(); + $params[] = 'hub.mode=publish'; + $topics = $this->getUpdatedTopicUrls(); + if (empty($topics)) { + throw new Zend_Feed_Pubsubhubbub_Exception('No updated topic URLs' + . ' have been set'); + } + foreach ($topics as $topicUrl) { + $params[] = 'hub.url=' . urlencode($topicUrl); + } + $optParams = $this->getParameters(); + foreach ($optParams as $name => $value) { + $params[] = urlencode($name) . '=' . urlencode($value); + } + $paramString = implode('&', $params); + $client->setRawData($paramString, 'application/x-www-form-urlencoded'); + return $client; + } +} diff --git a/library/vendor/Zend/Feed/Pubsubhubbub/Subscriber.php b/library/vendor/Zend/Feed/Pubsubhubbub/Subscriber.php new file mode 100644 index 000000000..5e3faca59 --- /dev/null +++ b/library/vendor/Zend/Feed/Pubsubhubbub/Subscriber.php @@ -0,0 +1,852 @@ +setConfig($config); + } + } + + /** + * Process any injected configuration options + * + * @param array|Zend_Config $config Options array or Zend_Config instance + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function setConfig($config) + { + if ($config instanceof Zend_Config) { + $config = $config->toArray(); + } elseif (!is_array($config)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Array or Zend_Config object' + . ' expected, got ' . gettype($config)); + } + if (array_key_exists('hubUrls', $config)) { + $this->addHubUrls($config['hubUrls']); + } + if (array_key_exists('callbackUrl', $config)) { + $this->setCallbackUrl($config['callbackUrl']); + } + if (array_key_exists('topicUrl', $config)) { + $this->setTopicUrl($config['topicUrl']); + } + if (array_key_exists('storage', $config)) { + $this->setStorage($config['storage']); + } + if (array_key_exists('leaseSeconds', $config)) { + $this->setLeaseSeconds($config['leaseSeconds']); + } + if (array_key_exists('parameters', $config)) { + $this->setParameters($config['parameters']); + } + if (array_key_exists('authentications', $config)) { + $this->addAuthentications($config['authentications']); + } + if (array_key_exists('usePathParameter', $config)) { + $this->usePathParameter($config['usePathParameter']); + } + if (array_key_exists('preferredVerificationMode', $config)) { + $this->setPreferredVerificationMode( + $config['preferredVerificationMode'] + ); + } + return $this; + } + + /** + * Set the topic URL (RSS or Atom feed) to which the intended (un)subscribe + * event will relate + * + * @param string $url + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function setTopicUrl($url) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "url"' + .' of "' . $url . '" must be a non-empty string and a valid' + .' URL'); + } + $this->_topicUrl = $url; + return $this; + } + + /** + * Set the topic URL (RSS or Atom feed) to which the intended (un)subscribe + * event will relate + * + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return string + */ + public function getTopicUrl() + { + if (empty($this->_topicUrl)) { + throw new Zend_Feed_Pubsubhubbub_Exception('A valid Topic (RSS or Atom' + . ' feed) URL MUST be set before attempting any operation'); + } + return $this->_topicUrl; + } + + /** + * Set the number of seconds for which any subscription will remain valid + * + * @param int $seconds + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function setLeaseSeconds($seconds) + { + $seconds = intval($seconds); + if ($seconds <= 0) { + throw new Zend_Feed_Pubsubhubbub_Exception('Expected lease seconds' + . ' must be an integer greater than zero'); + } + $this->_leaseSeconds = $seconds; + return $this; + } + + /** + * Get the number of lease seconds on subscriptions + * + * @return int + */ + public function getLeaseSeconds() + { + return $this->_leaseSeconds; + } + + /** + * Set the callback URL to be used by Hub Servers when communicating with + * this Subscriber + * + * @param string $url + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function setCallbackUrl($url) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "url"' + . ' of "' . $url . '" must be a non-empty string and a valid' + . ' URL'); + } + $this->_callbackUrl = $url; + return $this; + } + + /** + * Get the callback URL to be used by Hub Servers when communicating with + * this Subscriber + * + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return string + */ + public function getCallbackUrl() + { + if (empty($this->_callbackUrl)) { + throw new Zend_Feed_Pubsubhubbub_Exception('A valid Callback URL MUST be' + . ' set before attempting any operation'); + } + return $this->_callbackUrl; + } + + /** + * Set preferred verification mode (sync or async). By default, this + * Subscriber prefers synchronous verification, but does support + * asynchronous if that's the Hub Server's utilised mode. + * + * Zend_Feed_Pubsubhubbub_Subscriber will always send both modes, whose + * order of occurance in the parameter list determines this preference. + * + * @param string $mode Should be 'sync' or 'async' + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function setPreferredVerificationMode($mode) + { + if ($mode !== Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_SYNC + && $mode !== Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_ASYNC) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid preferred' + . ' mode specified: "' . $mode . '" but should be one of' + . ' Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_SYNC or' + . ' Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_ASYNC'); + } + $this->_preferredVerificationMode = $mode; + return $this; + } + + /** + * Get preferred verification mode (sync or async). + * + * @return string + */ + public function getPreferredVerificationMode() + { + return $this->_preferredVerificationMode; + } + + /** + * Add a Hub Server URL supported by Publisher + * + * @param string $url + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function addHubUrl($url) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "url"' + . ' of "' . $url . '" must be a non-empty string and a valid' + . ' URL'); + } + $this->_hubUrls[] = $url; + return $this; + } + + /** + * Add an array of Hub Server URLs supported by Publisher + * + * @param array $urls + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function addHubUrls(array $urls) + { + foreach ($urls as $url) { + $this->addHubUrl($url); + } + return $this; + } + + /** + * Remove a Hub Server URL + * + * @param string $url + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function removeHubUrl($url) + { + if (!in_array($url, $this->getHubUrls())) { + return $this; + } + $key = array_search($url, $this->_hubUrls); + unset($this->_hubUrls[$key]); + return $this; + } + + /** + * Return an array of unique Hub Server URLs currently available + * + * @return array + */ + public function getHubUrls() + { + $this->_hubUrls = array_unique($this->_hubUrls); + return $this->_hubUrls; + } + + /** + * Add authentication credentials for a given URL + * + * @param string $url + * @param array $authentication + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function addAuthentication($url, array $authentication) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "url"' + . ' of "' . $url . '" must be a non-empty string and a valid' + . ' URL'); + } + $this->_authentications[$url] = $authentication; + return $this; + } + + /** + * Add authentication credentials for hub URLs + * + * @param array $authentications + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function addAuthentications(array $authentications) + { + foreach ($authentications as $url => $authentication) { + $this->addAuthentication($url, $authentication); + } + return $this; + } + + /** + * Get all hub URL authentication credentials + * + * @return array + */ + public function getAuthentications() + { + return $this->_authentications; + } + + /** + * Set flag indicating whether or not to use a path parameter + * + * @param bool $bool + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function usePathParameter($bool = true) + { + $this->_usePathParameter = $bool; + return $this; + } + + /** + * Add an optional parameter to the (un)subscribe requests + * + * @param string $name + * @param string|null $value + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function setParameter($name, $value = null) + { + if (is_array($name)) { + $this->setParameters($name); + return $this; + } + if (empty($name) || !is_string($name)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "name"' + . ' of "' . $name . '" must be a non-empty string'); + } + if ($value === null) { + $this->removeParameter($name); + return $this; + } + if (empty($value) || (!is_string($value) && $value !== null)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "value"' + . ' of "' . $value . '" must be a non-empty string'); + } + $this->_parameters[$name] = $value; + return $this; + } + + /** + * Add an optional parameter to the (un)subscribe requests + * + * @param array $parameters + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function setParameters(array $parameters) + { + foreach ($parameters as $name => $value) { + $this->setParameter($name, $value); + } + return $this; + } + + /** + * Remove an optional parameter for the (un)subscribe requests + * + * @param string $name + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function removeParameter($name) + { + if (empty($name) || !is_string($name)) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "name"' + . ' of "' . $name . '" must be a non-empty string'); + } + if (array_key_exists($name, $this->_parameters)) { + unset($this->_parameters[$name]); + } + return $this; + } + + /** + * Return an array of optional parameters for (un)subscribe requests + * + * @return array + */ + public function getParameters() + { + return $this->_parameters; + } + + /** + * Sets an instance of Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface used to background + * save any verification tokens associated with a subscription or other. + * + * @param Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $storage + * @return Zend_Feed_Pubsubhubbub_Subscriber + */ + public function setStorage(Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $storage) + { + $this->_storage = $storage; + return $this; + } + + /** + * Gets an instance of Zend_Feed_Pubsubhubbub_Storage_StorageInterface used + * to background save any verification tokens associated with a subscription + * or other. + * + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface + */ + public function getStorage() + { + if ($this->_storage === null) { + throw new Zend_Feed_Pubsubhubbub_Exception('No storage vehicle ' + . 'has been set.'); + } + return $this->_storage; + } + + /** + * Subscribe to one or more Hub Servers using the stored Hub URLs + * for the given Topic URL (RSS or Atom feed) + */ + public function subscribeAll() + { + return $this->_doRequest('subscribe'); + } + + /** + * Unsubscribe from one or more Hub Servers using the stored Hub URLs + * for the given Topic URL (RSS or Atom feed) + */ + public function unsubscribeAll() + { + return $this->_doRequest('unsubscribe'); + } + + /** + * Returns a boolean indicator of whether the notifications to Hub + * Servers were ALL successful. If even one failed, FALSE is returned. + * + * @return bool + */ + public function isSuccess() + { + if (count($this->_errors) > 0) { + return false; + } + return true; + } + + /** + * Return an array of errors met from any failures, including keys: + * 'response' => the Zend_Http_Response object from the failure + * 'hubUrl' => the URL of the Hub Server whose notification failed + * + * @return array + */ + public function getErrors() + { + return $this->_errors; + } + + /** + * Return an array of Hub Server URLs who returned a response indicating + * operation in Asynchronous Verification Mode, i.e. they will not confirm + * any (un)subscription immediately but at a later time (Hubs may be + * doing this as a batch process when load balancing) + * + * @return array + */ + public function getAsyncHubs() + { + return $this->_asyncHubs; + } + + /** + * Executes an (un)subscribe request + * + * @param string $mode + * @throws Zend_Feed_Pubsubhubbub_Exception + * @throws Zend_Http_Client_Exception + */ + protected function _doRequest($mode) + { + $client = $this->_getHttpClient(); + $hubs = $this->getHubUrls(); + if (empty($hubs)) { + throw new Zend_Feed_Pubsubhubbub_Exception('No Hub Server URLs' + . ' have been set so no subscriptions can be attempted'); + } + $this->_errors = array(); + $this->_asyncHubs = array(); + foreach ($hubs as $url) { + if (array_key_exists($url, $this->_authentications)) { + $auth = $this->_authentications[$url]; + $client->setAuth($auth[0], $auth[1]); + } + $client->setUri($url); + $client->setRawData( + $this->_getRequestParameters($url, $mode), + 'application/x-www-form-urlencoded' + ); + $response = $client->request(); + if ($response->getStatus() !== 204 + && $response->getStatus() !== 202 + ) { + $this->_errors[] = array( + 'response' => $response, + 'hubUrl' => $url, + ); + /** + * At first I thought it was needed, but the backend storage will + * allow tracking async without any user interference. It's left + * here in case the user is interested in knowing what Hubs + * are using async verification modes so they may update Models and + * move these to asynchronous processes. + */ + } elseif ($response->getStatus() == 202) { + $this->_asyncHubs[] = array( + 'response' => $response, + 'hubUrl' => $url, + ); + } + } + } + + /** + * Get a basic prepared HTTP client for use + * + * @return Zend_Http_Client + */ + protected function _getHttpClient() + { + $client = Zend_Feed_Pubsubhubbub::getHttpClient(); + $client->setMethod(Zend_Http_Client::POST); + $client->setConfig(array('useragent' => 'Zend_Feed_Pubsubhubbub_Subscriber/' + . Zend_Version::VERSION)); + return $client; + } + + /** + * Return a list of standard protocol/optional parameters for addition to + * client's POST body that are specific to the current Hub Server URL + * + * @param string $hubUrl + * @param string $mode + * @throws Zend_Feed_Pubsubhubbub_Exception + * @return string + */ + protected function _getRequestParameters($hubUrl, $mode) + { + if (!in_array($mode, array('subscribe', 'unsubscribe'))) { + throw new Zend_Feed_Pubsubhubbub_Exception('Invalid mode specified: "' + . $mode . '" which should have been "subscribe" or "unsubscribe"'); + } + + $params = array( + 'hub.mode' => $mode, + 'hub.topic' => $this->getTopicUrl(), + ); + + if ($this->getPreferredVerificationMode() + == Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_SYNC + ) { + $vmodes = array( + Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_SYNC, + Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_ASYNC, + ); + } else { + $vmodes = array( + Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_ASYNC, + Zend_Feed_Pubsubhubbub::VERIFICATION_MODE_SYNC, + ); + } + $params['hub.verify'] = array(); + foreach($vmodes as $vmode) { + $params['hub.verify'][] = $vmode; + } + + /** + * Establish a persistent verify_token and attach key to callback + * URL's path/querystring + */ + $key = $this->_generateSubscriptionKey($params, $hubUrl); + $token = $this->_generateVerifyToken(); + $params['hub.verify_token'] = $token; + + // Note: query string only usable with PuSH 0.2 Hubs + if (!$this->_usePathParameter) { + $params['hub.callback'] = $this->getCallbackUrl() + . '?xhub.subscription=' . Zend_Feed_Pubsubhubbub::urlencode($key); + } else { + $params['hub.callback'] = rtrim($this->getCallbackUrl(), '/') + . '/' . Zend_Feed_Pubsubhubbub::urlencode($key); + } + if ($mode == 'subscribe' && $this->getLeaseSeconds() !== null) { + $params['hub.lease_seconds'] = $this->getLeaseSeconds(); + } + + // hub.secret not currently supported + $optParams = $this->getParameters(); + foreach ($optParams as $name => $value) { + $params[$name] = $value; + } + + // store subscription to storage + $now = new Zend_Date; + $expires = null; + if (isset($params['hub.lease_seconds'])) { + $expires = $now->add($params['hub.lease_seconds'], Zend_Date::SECOND) + ->get('yyyy-MM-dd HH:mm:ss'); + } + $data = array( + 'id' => $key, + 'topic_url' => $params['hub.topic'], + 'hub_url' => $hubUrl, + 'created_time' => $now->get('yyyy-MM-dd HH:mm:ss'), + 'lease_seconds' => $expires, + 'verify_token' => hash('sha256', $params['hub.verify_token']), + 'secret' => null, + 'expiration_time' => $expires, + 'subscription_state' => Zend_Feed_Pubsubhubbub::SUBSCRIPTION_NOTVERIFIED, + ); + $this->getStorage()->setSubscription($data); + + return $this->_toByteValueOrderedString( + $this->_urlEncode($params) + ); + } + + /** + * Simple helper to generate a verification token used in (un)subscribe + * requests to a Hub Server. Follows no particular method, which means + * it might be improved/changed in future. + * + * @return string + */ + protected function _generateVerifyToken() + { + if (!empty($this->_testStaticToken)) { + return $this->_testStaticToken; + } + return uniqid(rand(), true) . time(); + } + + /** + * Simple helper to generate a verification token used in (un)subscribe + * requests to a Hub Server. + * + * @param array $params + * @param string $hubUrl The Hub Server URL for which this token will apply + * @return string + */ + protected function _generateSubscriptionKey(array $params, $hubUrl) + { + $keyBase = $params['hub.topic'] . $hubUrl; + $key = md5($keyBase); + return $key; + } + + /** + * URL Encode an array of parameters + * + * @param array $params + * @return array + */ + protected function _urlEncode(array $params) + { + $encoded = array(); + foreach ($params as $key => $value) { + if (is_array($value)) { + $ekey = Zend_Feed_Pubsubhubbub::urlencode($key); + $encoded[$ekey] = array(); + foreach ($value as $duplicateKey) { + $encoded[$ekey][] + = Zend_Feed_Pubsubhubbub::urlencode($duplicateKey); + } + } else { + $encoded[Zend_Feed_Pubsubhubbub::urlencode($key)] + = Zend_Feed_Pubsubhubbub::urlencode($value); + } + } + return $encoded; + } + + /** + * Order outgoing parameters + * + * @param array $params + * @return array + */ + protected function _toByteValueOrderedString(array $params) + { + $return = array(); + uksort($params, 'strnatcmp'); + foreach ($params as $key => $value) { + if (is_array($value)) { + foreach ($value as $keyduplicate) { + $return[] = $key . '=' . $keyduplicate; + } + } else { + $return[] = $key . '=' . $value; + } + } + return implode('&', $return); + } + + /** + * This is STRICTLY for testing purposes only... + */ + protected $_testStaticToken = null; + + final public function setTestStaticToken($token) + { + $this->_testStaticToken = (string) $token; + } +} diff --git a/library/vendor/Zend/Feed/Pubsubhubbub/Subscriber/Callback.php b/library/vendor/Zend/Feed/Pubsubhubbub/Subscriber/Callback.php new file mode 100644 index 000000000..e50a90e5f --- /dev/null +++ b/library/vendor/Zend/Feed/Pubsubhubbub/Subscriber/Callback.php @@ -0,0 +1,327 @@ +_subscriptionKey = $key; + return $this; + } + + /** + * Handle any callback from a Hub Server responding to a subscription or + * unsubscription request. This should be the Hub Server confirming the + * the request prior to taking action on it. + * + * @param array $httpGetData GET data if available and not in $_GET + * @param bool $sendResponseNow Whether to send response now or when asked + * @return void + */ + public function handle(array $httpGetData = null, $sendResponseNow = false) + { + if ($httpGetData === null) { + $httpGetData = $_GET; + } + + /** + * Handle any feed updates (sorry for the mess :P) + * + * This DOES NOT attempt to process a feed update. Feed updates + * SHOULD be validated/processed by an asynchronous process so as + * to avoid holding up responses to the Hub. + */ + $contentType = $this->_getHeader('Content-Type'); + if (strtolower($_SERVER['REQUEST_METHOD']) == 'post' + && $this->_hasValidVerifyToken(null, false) + && (stripos($contentType, 'application/atom+xml') === 0 + || stripos($contentType, 'application/rss+xml') === 0 + || stripos($contentType, 'application/xml') === 0 + || stripos($contentType, 'text/xml') === 0 + || stripos($contentType, 'application/rdf+xml') === 0) + ) { + $this->setFeedUpdate($this->_getRawBody()); + $this->getHttpResponse() + ->setHeader('X-Hub-On-Behalf-Of', $this->getSubscriberCount()); + /** + * Handle any (un)subscribe confirmation requests + */ + } elseif ($this->isValidHubVerification($httpGetData)) { + $data = $this->_currentSubscriptionData; + $this->getHttpResponse()->setBody($httpGetData['hub_challenge']); + $data['subscription_state'] = Zend_Feed_Pubsubhubbub::SUBSCRIPTION_VERIFIED; + if (isset($httpGetData['hub_lease_seconds'])) { + $data['lease_seconds'] = $httpGetData['hub_lease_seconds']; + } + $this->getStorage()->setSubscription($data); + /** + * Hey, C'mon! We tried everything else! + */ + } else { + $this->getHttpResponse()->setHttpResponseCode(404); + } + if ($sendResponseNow) { + $this->sendResponse(); + } + } + + /** + * Checks validity of the request simply by making a quick pass and + * confirming the presence of all REQUIRED parameters. + * + * @param array $httpGetData + * @return bool + */ + public function isValidHubVerification(array $httpGetData) + { + /** + * As per the specification, the hub.verify_token is OPTIONAL. This + * implementation of Pubsubhubbub considers it REQUIRED and will + * always send a hub.verify_token parameter to be echoed back + * by the Hub Server. Therefore, its absence is considered invalid. + */ + if (strtolower($_SERVER['REQUEST_METHOD']) !== 'get') { + return false; + } + $required = array( + 'hub_mode', + 'hub_topic', + 'hub_challenge', + 'hub_verify_token', + ); + foreach ($required as $key) { + if (!array_key_exists($key, $httpGetData)) { + return false; + } + } + if ($httpGetData['hub_mode'] !== 'subscribe' + && $httpGetData['hub_mode'] !== 'unsubscribe' + ) { + return false; + } + if ($httpGetData['hub_mode'] == 'subscribe' + && !array_key_exists('hub_lease_seconds', $httpGetData) + ) { + return false; + } + if (!Zend_Uri::check($httpGetData['hub_topic'])) { + return false; + } + + /** + * Attempt to retrieve any Verification Token Key attached to Callback + * URL's path by our Subscriber implementation + */ + if (!$this->_hasValidVerifyToken($httpGetData)) { + return false; + } + return true; + } + + /** + * Sets a newly received feed (Atom/RSS) sent by a Hub as an update to a + * Topic we've subscribed to. + * + * @param string $feed + * @return Zend_Feed_Pubsubhubbub_Subscriber_Callback + */ + public function setFeedUpdate($feed) + { + $this->_feedUpdate = $feed; + return $this; + } + + /** + * Check if any newly received feed (Atom/RSS) update was received + * + * @return bool + */ + public function hasFeedUpdate() + { + if ($this->_feedUpdate === null) { + return false; + } + return true; + } + + /** + * Gets a newly received feed (Atom/RSS) sent by a Hub as an update to a + * Topic we've subscribed to. + * + * @return string + */ + public function getFeedUpdate() + { + return $this->_feedUpdate; + } + + /** + * Check for a valid verify_token. By default attempts to compare values + * with that sent from Hub, otherwise merely ascertains its existence. + * + * @param array $httpGetData + * @param bool $checkValue + * @return bool + */ + protected function _hasValidVerifyToken(array $httpGetData = null, $checkValue = true) + { + $verifyTokenKey = $this->_detectVerifyTokenKey($httpGetData); + if (empty($verifyTokenKey)) { + return false; + } + $verifyTokenExists = $this->getStorage()->hasSubscription($verifyTokenKey); + if (!$verifyTokenExists) { + return false; + } + if ($checkValue) { + $data = $this->getStorage()->getSubscription($verifyTokenKey); + $verifyToken = $data['verify_token']; + if ($verifyToken !== hash('sha256', $httpGetData['hub_verify_token'])) { + return false; + } + $this->_currentSubscriptionData = $data; + return true; + } + return true; + } + + /** + * Attempt to detect the verification token key. This would be passed in + * the Callback URL (which we are handling with this class!) as a URI + * path part (the last part by convention). + * + * @param null|array $httpGetData + * @return false|string + */ + protected function _detectVerifyTokenKey(array $httpGetData = null) + { + /** + * Available when sub keys encoding in Callback URL path + */ + if (isset($this->_subscriptionKey)) { + return $this->_subscriptionKey; + } + + /** + * Available only if allowed by PuSH 0.2 Hubs + */ + if (is_array($httpGetData) + && isset($httpGetData['xhub_subscription']) + ) { + return $httpGetData['xhub_subscription']; + } + + /** + * Available (possibly) if corrupted in transit and not part of $_GET + */ + $params = $this->_parseQueryString(); + if (isset($params['xhub.subscription'])) { + return rawurldecode($params['xhub.subscription']); + } + + return false; + } + + /** + * Build an array of Query String parameters. + * This bypasses $_GET which munges parameter names and cannot accept + * multiple parameters with the same key. + * + * @return array|void + */ + protected function _parseQueryString() + { + $params = array(); + $queryString = ''; + if (isset($_SERVER['QUERY_STRING'])) { + $queryString = $_SERVER['QUERY_STRING']; + } + if (empty($queryString)) { + return array(); + } + $parts = explode('&', $queryString); + foreach ($parts as $kvpair) { + $pair = explode('=', $kvpair); + $key = rawurldecode($pair[0]); + $value = rawurldecode($pair[1]); + if (isset($params[$key])) { + if (is_array($params[$key])) { + $params[$key][] = $value; + } else { + $params[$key] = array($params[$key], $value); + } + } else { + $params[$key] = $value; + } + } + return $params; + } +} diff --git a/library/vendor/Zend/Feed/Reader.php b/library/vendor/Zend/Feed/Reader.php new file mode 100644 index 000000000..bac41ab13 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader.php @@ -0,0 +1,733 @@ + array( + 'DublinCore_Feed', + 'Atom_Feed' + ), + 'entry' => array( + 'Content_Entry', + 'DublinCore_Entry', + 'Atom_Entry' + ), + 'core' => array( + 'DublinCore_Feed', + 'Atom_Feed', + 'Content_Entry', + 'DublinCore_Entry', + 'Atom_Entry' + ) + ); + + /** + * Get the Feed cache + * + * @return Zend_Cache_Core + */ + public static function getCache() + { + return self::$_cache; + } + + /** + * Set the feed cache + * + * @param Zend_Cache_Core $cache + * @return void + */ + public static function setCache(Zend_Cache_Core $cache) + { + self::$_cache = $cache; + } + + /** + * Set the HTTP client instance + * + * Sets the HTTP client object to use for retrieving the feeds. + * + * @param Zend_Http_Client $httpClient + * @return void + */ + public static function setHttpClient(Zend_Http_Client $httpClient) + { + self::$_httpClient = $httpClient; + } + + + /** + * Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used. + * + * @return Zend_Http_Client_Abstract + */ + public static function getHttpClient() + { + if (!self::$_httpClient instanceof Zend_Http_Client) { + /** + * @see Zend_Http_Client + */ + self::$_httpClient = new Zend_Http_Client(); + } + + return self::$_httpClient; + } + + /** + * Toggle using POST instead of PUT and DELETE HTTP methods + * + * Some feed implementations do not accept PUT and DELETE HTTP + * methods, or they can't be used because of proxies or other + * measures. This allows turning on using POST where PUT and + * DELETE would normally be used; in addition, an + * X-Method-Override header will be sent with a value of PUT or + * DELETE as appropriate. + * + * @param boolean $override Whether to override PUT and DELETE. + * @return void + */ + public static function setHttpMethodOverride($override = true) + { + self::$_httpMethodOverride = $override; + } + + /** + * Get the HTTP override state + * + * @return boolean + */ + public static function getHttpMethodOverride() + { + return self::$_httpMethodOverride; + } + + /** + * Set the flag indicating whether or not to use HTTP conditional GET + * + * @param bool $bool + * @return void + */ + public static function useHttpConditionalGet($bool = true) + { + self::$_httpConditionalGet = $bool; + } + + /** + * Import a feed by providing a URL + * + * @param string $url The URL to the feed + * @param string $etag OPTIONAL Last received ETag for this resource + * @param string $lastModified OPTIONAL Last-Modified value for this resource + * @return Zend_Feed_Reader_FeedInterface + */ + public static function import($uri, $etag = null, $lastModified = null) + { + $cache = self::getCache(); + $feed = null; + $responseXml = ''; + $client = self::getHttpClient(); + $client->resetParameters(); + $client->setHeaders('If-None-Match', null); + $client->setHeaders('If-Modified-Since', null); + $client->setUri($uri); + $cacheId = 'Zend_Feed_Reader_' . md5($uri); + + if (self::$_httpConditionalGet && $cache) { + $data = $cache->load($cacheId); + if ($data) { + if ($etag === null) { + $etag = $cache->load($cacheId.'_etag'); + } + if ($lastModified === null) { + $lastModified = $cache->load($cacheId.'_lastmodified'); + } + if ($etag) { + $client->setHeaders('If-None-Match', $etag); + } + if ($lastModified) { + $client->setHeaders('If-Modified-Since', $lastModified); + } + } + $response = $client->request('GET'); + if ($response->getStatus() !== 200 && $response->getStatus() !== 304) { + throw new Zend_Feed_Exception('Feed failed to load, got response code ' . $response->getStatus()); + } + if ($response->getStatus() == 304) { + $responseXml = $data; + } else { + $responseXml = $response->getBody(); + $cache->save($responseXml, $cacheId); + if ($response->getHeader('ETag')) { + $cache->save($response->getHeader('ETag'), $cacheId.'_etag'); + } + if ($response->getHeader('Last-Modified')) { + $cache->save($response->getHeader('Last-Modified'), $cacheId.'_lastmodified'); + } + } + if (empty($responseXml)) { + throw new Zend_Feed_Exception('Feed failed to load, got empty response body'); + } + return self::importString($responseXml); + } elseif ($cache) { + $data = $cache->load($cacheId); + if ($data !== false) { + return self::importString($data); + } + $response = $client->request('GET'); + if ($response->getStatus() !== 200) { + throw new Zend_Feed_Exception('Feed failed to load, got response code ' . $response->getStatus()); + } + $responseXml = $response->getBody(); + $cache->save($responseXml, $cacheId); + if (empty($responseXml)) { + throw new Zend_Feed_Exception('Feed failed to load, got empty response body'); + } + return self::importString($responseXml); + } else { + $response = $client->request('GET'); + if ($response->getStatus() !== 200) { + throw new Zend_Feed_Exception('Feed failed to load, got response code ' . $response->getStatus()); + } + $responseXml = $response->getBody(); + if (empty($responseXml)) { + throw new Zend_Feed_Exception('Feed failed to load, got empty response body'); + } + $reader = self::importString($responseXml); + $reader->setOriginalSourceUri($uri); + return $reader; + } + } + + /** + * Import a feed by providing a Zend_Feed_Abstract object + * + * @param Zend_Feed_Abstract $feed A fully instantiated Zend_Feed object + * @return Zend_Feed_Reader_FeedInterface + */ + public static function importFeed(Zend_Feed_Abstract $feed) + { + $dom = $feed->getDOM()->ownerDocument; + $type = self::detectType($dom); + self::_registerCoreExtensions(); + if (substr($type, 0, 3) == 'rss') { + $reader = new Zend_Feed_Reader_Feed_Rss($dom, $type); + } else { + $reader = new Zend_Feed_Reader_Feed_Atom($dom, $type); + } + + return $reader; + } + + /** + * Import a feed from a string + * + * @param string $string + * @return Zend_Feed_Reader_FeedInterface + */ + public static function importString($string) + { + $dom = new DOMDocument; + try { + $dom = Zend_Xml_Security::scan($string, $dom); + } catch (Zend_Xml_Exception $e) { + throw new Zend_Feed_Exception( + $e->getMessage() + ); + } + if (!$dom) { + // Build error message + $error = libxml_get_last_error(); + if ($error && $error->message) { + $errormsg = "DOMDocument cannot parse XML: {$error->message}"; + } else { + $errormsg = "DOMDocument cannot parse XML: Please check the XML document's validity"; + } + + throw new Zend_Feed_Exception($errormsg); + } + + $type = self::detectType($dom); + + self::_registerCoreExtensions(); + + if (substr($type, 0, 3) == 'rss') { + $reader = new Zend_Feed_Reader_Feed_Rss($dom, $type); + } elseif (substr($type, 8, 5) == 'entry') { + $reader = new Zend_Feed_Reader_Entry_Atom($dom->documentElement, 0, Zend_Feed_Reader::TYPE_ATOM_10); + } elseif (substr($type, 0, 4) == 'atom') { + $reader = new Zend_Feed_Reader_Feed_Atom($dom, $type); + } else { + throw new Zend_Feed_Exception('The URI used does not point to a ' + . 'valid Atom, RSS or RDF feed that Zend_Feed_Reader can parse.'); + } + return $reader; + } + + /** + * Imports a feed from a file located at $filename. + * + * @param string $filename + * @throws Zend_Feed_Exception + * @return Zend_Feed_Reader_FeedInterface + */ + public static function importFile($filename) + { + @ini_set('track_errors', 1); + $feed = @file_get_contents($filename); + @ini_restore('track_errors'); + if ($feed === false) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception("File could not be loaded: $php_errormsg"); + } + return self::importString($feed); + } + + public static function findFeedLinks($uri) + { + // Get the HTTP response from $uri and save the contents + $client = self::getHttpClient(); + $client->setUri($uri); + $response = $client->request(); + if ($response->getStatus() !== 200) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception("Failed to access $uri, got response code " . $response->getStatus()); + } + $responseHtml = $response->getBody(); + $libxml_errflag = libxml_use_internal_errors(true); + $oldValue = libxml_disable_entity_loader(true); + $dom = new DOMDocument; + $status = $dom->loadHTML($responseHtml); + libxml_disable_entity_loader($oldValue); + libxml_use_internal_errors($libxml_errflag); + if (!$status) { + // Build error message + $error = libxml_get_last_error(); + if ($error && $error->message) { + $errormsg = "DOMDocument cannot parse HTML: {$error->message}"; + } else { + $errormsg = "DOMDocument cannot parse HTML: Please check the XML document's validity"; + } + + throw new Zend_Feed_Exception($errormsg); + } + $feedSet = new Zend_Feed_Reader_FeedSet; + $links = $dom->getElementsByTagName('link'); + $feedSet->addLinks($links, $uri); + return $feedSet; + } + + /** + * Detect the feed type of the provided feed + * + * @param Zend_Feed_Abstract|DOMDocument|string $feed + * @param bool $specOnly + * @return string + * @throws Zend_Feed_Exception + */ + public static function detectType($feed, $specOnly = false) + { + if ($feed instanceof Zend_Feed_Reader_FeedInterface) { + $dom = $feed->getDomDocument(); + } elseif($feed instanceof DOMDocument) { + $dom = $feed; + } elseif(is_string($feed) && !empty($feed)) { + @ini_set('track_errors', 1); + //$oldValue = libxml_disable_entity_loader(true); + $dom = new DOMDocument; + try { + $dom = Zend_Xml_Security::scan($feed, $dom); + } catch (Zend_Xml_Exception $e) { + throw new Zend_Feed_Exception( + $e->getMessage() + ); + } + //libxml_disable_entity_loader($oldValue); + @ini_restore('track_errors'); + if (!$dom) { + if (!isset($php_errormsg)) { + if (function_exists('xdebug_is_enabled')) { + $php_errormsg = '(error message not available, when XDebug is running)'; + } else { + $php_errormsg = '(error message not available)'; + } + } + throw new Zend_Feed_Exception("DOMDocument cannot parse XML: $php_errormsg"); + } + } else { + throw new Zend_Feed_Exception('Invalid object/scalar provided: must' + . ' be of type Zend_Feed_Reader_FeedInterface, DomDocument or string'); + } + $xpath = new DOMXPath($dom); + + if ($xpath->query('/rss')->length) { + $type = self::TYPE_RSS_ANY; + $version = $xpath->evaluate('string(/rss/@version)'); + + if (strlen($version) > 0) { + switch($version) { + case '2.0': + $type = self::TYPE_RSS_20; + break; + + case '0.94': + $type = self::TYPE_RSS_094; + break; + + case '0.93': + $type = self::TYPE_RSS_093; + break; + + case '0.92': + $type = self::TYPE_RSS_092; + break; + + case '0.91': + $type = self::TYPE_RSS_091; + break; + } + } + + return $type; + } + + $xpath->registerNamespace('rdf', self::NAMESPACE_RDF); + + if ($xpath->query('/rdf:RDF')->length) { + $xpath->registerNamespace('rss', self::NAMESPACE_RSS_10); + + if ($xpath->query('/rdf:RDF/rss:channel')->length + || $xpath->query('/rdf:RDF/rss:image')->length + || $xpath->query('/rdf:RDF/rss:item')->length + || $xpath->query('/rdf:RDF/rss:textinput')->length + ) { + return self::TYPE_RSS_10; + } + + $xpath->registerNamespace('rss', self::NAMESPACE_RSS_090); + + if ($xpath->query('/rdf:RDF/rss:channel')->length + || $xpath->query('/rdf:RDF/rss:image')->length + || $xpath->query('/rdf:RDF/rss:item')->length + || $xpath->query('/rdf:RDF/rss:textinput')->length + ) { + return self::TYPE_RSS_090; + } + } + + $type = self::TYPE_ATOM_ANY; + $xpath->registerNamespace('atom', self::NAMESPACE_ATOM_10); + + if ($xpath->query('//atom:feed')->length) { + return self::TYPE_ATOM_10; + } + + if ($xpath->query('//atom:entry')->length) { + if ($specOnly == true) { + return self::TYPE_ATOM_10; + } else { + return self::TYPE_ATOM_10_ENTRY; + } + } + + $xpath->registerNamespace('atom', self::NAMESPACE_ATOM_03); + + if ($xpath->query('//atom:feed')->length) { + return self::TYPE_ATOM_03; + } + + return self::TYPE_ANY; + } + + /** + * Set plugin loader for use with Extensions + * + * @param Zend_Loader_PluginLoader_Interface $loader + */ + public static function setPluginLoader(Zend_Loader_PluginLoader_Interface $loader) + { + self::$_pluginLoader = $loader; + } + + /** + * Get plugin loader for use with Extensions + * + * @return Zend_Loader_PluginLoader_Interface $loader + */ + public static function getPluginLoader() + { + if (!isset(self::$_pluginLoader)) { + self::$_pluginLoader = new Zend_Loader_PluginLoader(array( + 'Zend_Feed_Reader_Extension_' => 'Zend/Feed/Reader/Extension/', + )); + } + return self::$_pluginLoader; + } + + /** + * Add prefix path for loading Extensions + * + * @param string $prefix + * @param string $path + * @return void + */ + public static function addPrefixPath($prefix, $path) + { + $prefix = rtrim($prefix, '_'); + $path = rtrim($path, DIRECTORY_SEPARATOR); + self::getPluginLoader()->addPrefixPath($prefix, $path); + } + + /** + * Add multiple Extension prefix paths at once + * + * @param array $spec + * @return void + */ + public static function addPrefixPaths(array $spec) + { + if (isset($spec['prefix']) && isset($spec['path'])) { + self::addPrefixPath($spec['prefix'], $spec['path']); + } + foreach ($spec as $prefixPath) { + if (isset($prefixPath['prefix']) && isset($prefixPath['path'])) { + self::addPrefixPath($prefixPath['prefix'], $prefixPath['path']); + } + } + } + + /** + * Register an Extension by name + * + * @param string $name + * @return void + * @throws Zend_Feed_Exception if unable to resolve Extension class + */ + public static function registerExtension($name) + { + $feedName = $name . '_Feed'; + $entryName = $name . '_Entry'; + if (self::isRegistered($name)) { + if (self::getPluginLoader()->isLoaded($feedName) || + self::getPluginLoader()->isLoaded($entryName)) { + return; + } + } + try { + self::getPluginLoader()->load($feedName); + self::$_extensions['feed'][] = $feedName; + } catch (Zend_Loader_PluginLoader_Exception $e) { + } + try { + self::getPluginLoader()->load($entryName); + self::$_extensions['entry'][] = $entryName; + } catch (Zend_Loader_PluginLoader_Exception $e) { + } + if (!self::getPluginLoader()->isLoaded($feedName) + && !self::getPluginLoader()->isLoaded($entryName) + ) { + throw new Zend_Feed_Exception('Could not load extension: ' . $name + . 'using Plugin Loader. Check prefix paths are configured and extension exists.'); + } + } + + /** + * Is a given named Extension registered? + * + * @param string $extensionName + * @return boolean + */ + public static function isRegistered($extensionName) + { + $feedName = $extensionName . '_Feed'; + $entryName = $extensionName . '_Entry'; + if (in_array($feedName, self::$_extensions['feed']) + || in_array($entryName, self::$_extensions['entry']) + ) { + return true; + } + return false; + } + + /** + * Get a list of extensions + * + * @return array + */ + public static function getExtensions() + { + return self::$_extensions; + } + + /** + * Reset class state to defaults + * + * @return void + */ + public static function reset() + { + self::$_cache = null; + self::$_httpClient = null; + self::$_httpMethodOverride = false; + self::$_httpConditionalGet = false; + self::$_pluginLoader = null; + self::$_prefixPaths = array(); + self::$_extensions = array( + 'feed' => array( + 'DublinCore_Feed', + 'Atom_Feed' + ), + 'entry' => array( + 'Content_Entry', + 'DublinCore_Entry', + 'Atom_Entry' + ), + 'core' => array( + 'DublinCore_Feed', + 'Atom_Feed', + 'Content_Entry', + 'DublinCore_Entry', + 'Atom_Entry' + ) + ); + } + + /** + * Register core (default) extensions + * + * @return void + */ + protected static function _registerCoreExtensions() + { + self::registerExtension('DublinCore'); + self::registerExtension('Content'); + self::registerExtension('Atom'); + self::registerExtension('Slash'); + self::registerExtension('WellFormedWeb'); + self::registerExtension('Thread'); + self::registerExtension('Podcast'); + } + + /** + * Utility method to apply array_unique operation to a multidimensional + * array. + * + * @param array + * @return array + */ + public static function arrayUnique(array $array) + { + foreach ($array as &$value) { + $value = serialize($value); + } + $array = array_unique($array); + foreach ($array as &$value) { + $value = unserialize($value); + } + return $array; + } + +} diff --git a/library/vendor/Zend/Amf/Exception.php b/library/vendor/Zend/Feed/Reader/Collection.php similarity index 72% rename from library/vendor/Zend/Amf/Exception.php rename to library/vendor/Zend/Feed/Reader/Collection.php index 7c961dd39..b12d6744a 100644 --- a/library/vendor/Zend/Amf/Exception.php +++ b/library/vendor/Zend/Feed/Reader/Collection.php @@ -13,21 +13,21 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Amf - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Feed_Reader + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** - * @see Zend_Exception - */ - -/** - * @package Zend_Amf - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @category Zend + * @package Zend_Feed_Reader + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Amf_Exception extends Zend_Exception +class Zend_Feed_Reader_Collection extends ArrayObject { + + + } diff --git a/library/vendor/Zend/Feed/Reader/Collection/Author.php b/library/vendor/Zend/Feed/Reader/Collection/Author.php new file mode 100644 index 000000000..327db04ac --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Collection/Author.php @@ -0,0 +1,50 @@ +getIterator() as $element) { + $authors[] = $element['name']; + } + return array_unique($authors); + } + +} diff --git a/library/vendor/Zend/Feed/Reader/Collection/Category.php b/library/vendor/Zend/Feed/Reader/Collection/Category.php new file mode 100644 index 000000000..df7f8a4c9 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Collection/Category.php @@ -0,0 +1,56 @@ +getIterator() as $element) { + if (isset($element['label']) && !empty($element['label'])) { + $categories[] = $element['label']; + } else { + $categories[] = $element['term']; + } + } + return array_unique($categories); + } + +} diff --git a/library/vendor/Zend/Amf/Value/Messaging/AsyncMessage.php b/library/vendor/Zend/Feed/Reader/Collection/CollectionAbstract.php similarity index 53% rename from library/vendor/Zend/Amf/Value/Messaging/AsyncMessage.php rename to library/vendor/Zend/Feed/Reader/Collection/CollectionAbstract.php index b6b9b8645..d718d55ed 100644 --- a/library/vendor/Zend/Amf/Value/Messaging/AsyncMessage.php +++ b/library/vendor/Zend/Feed/Reader/Collection/CollectionAbstract.php @@ -13,30 +13,29 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Amf - * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Feed_Reader + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ - -/** Zend_Amf_Value_Messaging_AbstractMessage */ - /** - * This type of message contains information necessary to perform - * point-to-point or publish-subscribe messaging. - * - * @package Zend_Amf - * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @category Zend + * @package Zend_Feed_Reader + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Amf_Value_Messaging_AsyncMessage extends Zend_Amf_Value_Messaging_AbstractMessage +abstract class Zend_Feed_Reader_Collection_CollectionAbstract extends ArrayObject { + /** - * The message id to be responded to. - * @var String + * Return a simple array of the most relevant slice of + * the collection values. For example, feed categories contain + * the category name, domain/URI, and other data. This method would + * merely return the most useful data - i.e. the category names. + * + * @return array */ - public $correlationId; + public abstract function getValues(); + } diff --git a/library/vendor/Zend/Feed/Reader/Entry/Atom.php b/library/vendor/Zend/Feed/Reader/Entry/Atom.php new file mode 100644 index 000000000..e301b1fb8 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Entry/Atom.php @@ -0,0 +1,396 @@ +_xpathQuery = '//atom:entry[' . ($this->_entryKey + 1) . ']'; + + $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Entry'); + $this->_extensions['Atom_Entry'] = new $atomClass($entry, $entryKey, $type); + + $threadClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Thread_Entry'); + $this->_extensions['Thread_Entry'] = new $threadClass($entry, $entryKey, $type); + + $threadClass = Zend_Feed_Reader::getPluginLoader()->getClassName('DublinCore_Entry'); + $this->_extensions['DublinCore_Entry'] = new $threadClass($entry, $entryKey, $type); + } + + /** + * Get the specified author + * + * @param int $index + * @return string|null + */ + public function getAuthor($index = 0) + { + $authors = $this->getAuthors(); + + if (isset($authors[$index])) { + return $authors[$index]; + } + + return null; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (array_key_exists('authors', $this->_data)) { + return $this->_data['authors']; + } + + $people = $this->getExtension('Atom')->getAuthors(); + + $this->_data['authors'] = $people; + + return $this->_data['authors']; + } + + /** + * Get the entry content + * + * @return string + */ + public function getContent() + { + if (array_key_exists('content', $this->_data)) { + return $this->_data['content']; + } + + $content = $this->getExtension('Atom')->getContent(); + + $this->_data['content'] = $content; + + return $this->_data['content']; + } + + /** + * Get the entry creation date + * + * @return string + */ + public function getDateCreated() + { + if (array_key_exists('datecreated', $this->_data)) { + return $this->_data['datecreated']; + } + + $dateCreated = $this->getExtension('Atom')->getDateCreated(); + + $this->_data['datecreated'] = $dateCreated; + + return $this->_data['datecreated']; + } + + /** + * Get the entry modification date + * + * @return string + */ + public function getDateModified() + { + if (array_key_exists('datemodified', $this->_data)) { + return $this->_data['datemodified']; + } + + $dateModified = $this->getExtension('Atom')->getDateModified(); + + $this->_data['datemodified'] = $dateModified; + + return $this->_data['datemodified']; + } + + /** + * Get the entry description + * + * @return string + */ + public function getDescription() + { + if (array_key_exists('description', $this->_data)) { + return $this->_data['description']; + } + + $description = $this->getExtension('Atom')->getDescription(); + + $this->_data['description'] = $description; + + return $this->_data['description']; + } + + /** + * Get the entry enclosure + * + * @return string + */ + public function getEnclosure() + { + if (array_key_exists('enclosure', $this->_data)) { + return $this->_data['enclosure']; + } + + $enclosure = $this->getExtension('Atom')->getEnclosure(); + + $this->_data['enclosure'] = $enclosure; + + return $this->_data['enclosure']; + } + + /** + * Get the entry ID + * + * @return string + */ + public function getId() + { + if (array_key_exists('id', $this->_data)) { + return $this->_data['id']; + } + + $id = $this->getExtension('Atom')->getId(); + + $this->_data['id'] = $id; + + return $this->_data['id']; + } + + /** + * Get a specific link + * + * @param int $index + * @return string + */ + public function getLink($index = 0) + { + if (!array_key_exists('links', $this->_data)) { + $this->getLinks(); + } + + if (isset($this->_data['links'][$index])) { + return $this->_data['links'][$index]; + } + + return null; + } + + /** + * Get all links + * + * @return array + */ + public function getLinks() + { + if (array_key_exists('links', $this->_data)) { + return $this->_data['links']; + } + + $links = $this->getExtension('Atom')->getLinks(); + + $this->_data['links'] = $links; + + return $this->_data['links']; + } + + /** + * Get a permalink to the entry + * + * @return string + */ + public function getPermalink() + { + return $this->getLink(0); + } + + /** + * Get the entry title + * + * @return string + */ + public function getTitle() + { + if (array_key_exists('title', $this->_data)) { + return $this->_data['title']; + } + + $title = $this->getExtension('Atom')->getTitle(); + + $this->_data['title'] = $title; + + return $this->_data['title']; + } + + /** + * Get the number of comments/replies for current entry + * + * @return integer + */ + public function getCommentCount() + { + if (array_key_exists('commentcount', $this->_data)) { + return $this->_data['commentcount']; + } + + $commentcount = $this->getExtension('Thread')->getCommentCount(); + + if (!$commentcount) { + $commentcount = $this->getExtension('Atom')->getCommentCount(); + } + + $this->_data['commentcount'] = $commentcount; + + return $this->_data['commentcount']; + } + + /** + * Returns a URI pointing to the HTML page where comments can be made on this entry + * + * @return string + */ + public function getCommentLink() + { + if (array_key_exists('commentlink', $this->_data)) { + return $this->_data['commentlink']; + } + + $commentlink = $this->getExtension('Atom')->getCommentLink(); + + $this->_data['commentlink'] = $commentlink; + + return $this->_data['commentlink']; + } + + /** + * Returns a URI pointing to a feed of all comments for this entry + * + * @return string + */ + public function getCommentFeedLink() + { + if (array_key_exists('commentfeedlink', $this->_data)) { + return $this->_data['commentfeedlink']; + } + + $commentfeedlink = $this->getExtension('Atom')->getCommentFeedLink(); + + $this->_data['commentfeedlink'] = $commentfeedlink; + + return $this->_data['commentfeedlink']; + } + + /** + * Get category data as a Zend_Feed_Reader_Collection_Category object + * + * @return Zend_Feed_Reader_Collection_Category + */ + public function getCategories() + { + if (array_key_exists('categories', $this->_data)) { + return $this->_data['categories']; + } + + $categoryCollection = $this->getExtension('Atom')->getCategories(); + + if (count($categoryCollection) == 0) { + $categoryCollection = $this->getExtension('DublinCore')->getCategories(); + } + + $this->_data['categories'] = $categoryCollection; + + return $this->_data['categories']; + } + + /** + * Get source feed metadata from the entry + * + * @return Zend_Feed_Reader_Feed_Atom_Source|null + */ + public function getSource() + { + if (array_key_exists('source', $this->_data)) { + return $this->_data['source']; + } + + $source = $this->getExtension('Atom')->getSource(); + + $this->_data['source'] = $source; + + return $this->_data['source']; + } + + /** + * Set the XPath query (incl. on all Extensions) + * + * @param DOMXPath $xpath + */ + public function setXpath(DOMXPath $xpath) + { + parent::setXpath($xpath); + foreach ($this->_extensions as $extension) { + $extension->setXpath($this->_xpath); + } + } +} diff --git a/library/vendor/Zend/Feed/Reader/Entry/Rss.php b/library/vendor/Zend/Feed/Reader/Entry/Rss.php new file mode 100644 index 000000000..38a3ff74c --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Entry/Rss.php @@ -0,0 +1,656 @@ +_xpathQueryRss = '//item[' . ($this->_entryKey+1) . ']'; + $this->_xpathQueryRdf = '//rss:item[' . ($this->_entryKey+1) . ']'; + + $pluginLoader = Zend_Feed_Reader::getPluginLoader(); + + $dublinCoreClass = $pluginLoader->getClassName('DublinCore_Entry'); + $this->_extensions['DublinCore_Entry'] = new $dublinCoreClass($entry, $entryKey, $type); + + $contentClass = $pluginLoader->getClassName('Content_Entry'); + $this->_extensions['Content_Entry'] = new $contentClass($entry, $entryKey, $type); + + $atomClass = $pluginLoader->getClassName('Atom_Entry'); + $this->_extensions['Atom_Entry'] = new $atomClass($entry, $entryKey, $type); + + $wfwClass = $pluginLoader->getClassName('WellFormedWeb_Entry'); + $this->_extensions['WellFormedWeb_Entry'] = new $wfwClass($entry, $entryKey, $type); + + $slashClass = $pluginLoader->getClassName('Slash_Entry'); + $this->_extensions['Slash_Entry'] = new $slashClass($entry, $entryKey, $type); + + $threadClass = $pluginLoader->getClassName('Thread_Entry'); + $this->_extensions['Thread_Entry'] = new $threadClass($entry, $entryKey, $type); + } + + /** + * Get an author entry + * + * @param DOMElement $element + * @return string + */ + public function getAuthor($index = 0) + { + $authors = $this->getAuthors(); + + if (isset($authors[$index])) { + return $authors[$index]; + } + + return null; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (array_key_exists('authors', $this->_data)) { + return $this->_data['authors']; + } + + $authors = array(); + $authors_dc = $this->getExtension('DublinCore')->getAuthors(); + if (!empty($authors_dc)) { + foreach ($authors_dc as $author) { + $authors[] = array( + 'name' => $author['name'] + ); + } + } + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 + && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $list = $this->_xpath->query($this->_xpathQueryRss . '//author'); + } else { + $list = $this->_xpath->query($this->_xpathQueryRdf . '//rss:author'); + } + if ($list->length) { + foreach ($list as $author) { + $string = trim($author->nodeValue); + $email = null; + $name = null; + $data = array(); + // Pretty rough parsing - but it's a catchall + if (preg_match("/^.*@[^ ]*/", $string, $matches)) { + $data['email'] = trim($matches[0]); + if (preg_match("/\((.*)\)$/", $string, $matches)) { + $data['name'] = $matches[1]; + } + $authors[] = $data; + } + } + } + + if (count($authors) == 0) { + $authors = $this->getExtension('Atom')->getAuthors(); + } else { + $authors = new Zend_Feed_Reader_Collection_Author( + Zend_Feed_Reader::arrayUnique($authors) + ); + } + + if (count($authors) == 0) { + $authors = null; + } + + $this->_data['authors'] = $authors; + + return $this->_data['authors']; + } + + /** + * Get the entry content + * + * @return string + */ + public function getContent() + { + if (array_key_exists('content', $this->_data)) { + return $this->_data['content']; + } + + $content = $this->getExtension('Content')->getContent(); + + if (!$content) { + $content = $this->getDescription(); + } + + if (empty($content)) { + $content = $this->getExtension('Atom')->getContent(); + } + + $this->_data['content'] = $content; + + return $this->_data['content']; + } + + /** + * Get the entry's date of creation + * + * @return string + */ + public function getDateCreated() + { + return $this->getDateModified(); + } + + /** + * Get the entry's date of modification + * + * @return string + */ + public function getDateModified() + { + if (array_key_exists('datemodified', $this->_data)) { + return $this->_data['datemodified']; + } + + $dateModified = null; + $date = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 + && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090 + ) { + $dateModified = $this->_xpath->evaluate('string('.$this->_xpathQueryRss.'/pubDate)'); + if ($dateModified) { + $dateModifiedParsed = strtotime($dateModified); + if ($dateModifiedParsed) { + $date = new Zend_Date($dateModifiedParsed); + } else { + $dateStandards = array(Zend_Date::RSS, Zend_Date::RFC_822, + Zend_Date::RFC_2822, Zend_Date::DATES); + $date = new Zend_Date; + foreach ($dateStandards as $standard) { + try { + $date->set($dateModified, $standard); + break; + } catch (Zend_Date_Exception $e) { + if ($standard == Zend_Date::DATES) { + throw new Zend_Feed_Exception( + 'Could not load date due to unrecognised' + .' format (should follow RFC 822 or 2822):' + . $e->getMessage(), + 0, $e + ); + } + } + } + } + } + } + + if (!$date) { + $date = $this->getExtension('DublinCore')->getDate(); + } + + if (!$date) { + $date = $this->getExtension('Atom')->getDateModified(); + } + + if (!$date) { + $date = null; + } + + $this->_data['datemodified'] = $date; + + return $this->_data['datemodified']; + } + + /** + * Get the entry description + * + * @return string + */ + public function getDescription() + { + if (array_key_exists('description', $this->_data)) { + return $this->_data['description']; + } + + $description = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 + && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090 + ) { + $description = $this->_xpath->evaluate('string('.$this->_xpathQueryRss.'/description)'); + } else { + $description = $this->_xpath->evaluate('string('.$this->_xpathQueryRdf.'/rss:description)'); + } + + if (!$description) { + $description = $this->getExtension('DublinCore')->getDescription(); + } + + if (empty($description)) { + $description = $this->getExtension('Atom')->getDescription(); + } + + if (!$description) { + $description = null; + } + + $this->_data['description'] = $description; + + return $this->_data['description']; + } + + /** + * Get the entry enclosure + * @return string + */ + public function getEnclosure() + { + if (array_key_exists('enclosure', $this->_data)) { + return $this->_data['enclosure']; + } + + $enclosure = null; + + if ($this->getType() == Zend_Feed_Reader::TYPE_RSS_20) { + $nodeList = $this->_xpath->query($this->_xpathQueryRss . '/enclosure'); + + if ($nodeList->length > 0) { + $enclosure = new stdClass(); + $enclosure->url = $nodeList->item(0)->getAttribute('url'); + $enclosure->length = $nodeList->item(0)->getAttribute('length'); + $enclosure->type = $nodeList->item(0)->getAttribute('type'); + } + } + + if (!$enclosure) { + $enclosure = $this->getExtension('Atom')->getEnclosure(); + } + + $this->_data['enclosure'] = $enclosure; + + return $this->_data['enclosure']; + } + + /** + * Get the entry ID + * + * @return string + */ + public function getId() + { + if (array_key_exists('id', $this->_data)) { + return $this->_data['id']; + } + + $id = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 + && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090 + ) { + $id = $this->_xpath->evaluate('string('.$this->_xpathQueryRss.'/guid)'); + } + + if (!$id) { + $id = $this->getExtension('DublinCore')->getId(); + } + + if (empty($id)) { + $id = $this->getExtension('Atom')->getId(); + } + + if (!$id) { + if ($this->getPermalink()) { + $id = $this->getPermalink(); + } elseif ($this->getTitle()) { + $id = $this->getTitle(); + } else { + $id = null; + } + } + + $this->_data['id'] = $id; + + return $this->_data['id']; + } + + /** + * Get a specific link + * + * @param int $index + * @return string + */ + public function getLink($index = 0) + { + if (!array_key_exists('links', $this->_data)) { + $this->getLinks(); + } + + if (isset($this->_data['links'][$index])) { + return $this->_data['links'][$index]; + } + + return null; + } + + /** + * Get all links + * + * @return array + */ + public function getLinks() + { + if (array_key_exists('links', $this->_data)) { + return $this->_data['links']; + } + + $links = array(); + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $list = $this->_xpath->query($this->_xpathQueryRss.'//link'); + } else { + $list = $this->_xpath->query($this->_xpathQueryRdf.'//rss:link'); + } + + if (!$list->length) { + $links = $this->getExtension('Atom')->getLinks(); + } else { + foreach ($list as $link) { + $links[] = $link->nodeValue; + } + } + + $this->_data['links'] = $links; + + return $this->_data['links']; + } + + /** + * Get all categories + * + * @return Zend_Feed_Reader_Collection_Category + */ + public function getCategories() + { + if (array_key_exists('categories', $this->_data)) { + return $this->_data['categories']; + } + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $list = $this->_xpath->query($this->_xpathQueryRss.'//category'); + } else { + $list = $this->_xpath->query($this->_xpathQueryRdf.'//rss:category'); + } + + if ($list->length) { + $categoryCollection = new Zend_Feed_Reader_Collection_Category; + foreach ($list as $category) { + $categoryCollection[] = array( + 'term' => $category->nodeValue, + 'scheme' => $category->getAttribute('domain'), + 'label' => $category->nodeValue, + ); + } + } else { + $categoryCollection = $this->getExtension('DublinCore')->getCategories(); + } + + if (count($categoryCollection) == 0) { + $categoryCollection = $this->getExtension('Atom')->getCategories(); + } + + $this->_data['categories'] = $categoryCollection; + + return $this->_data['categories']; + } + + /** + * Get a permalink to the entry + * + * @return string + */ + public function getPermalink() + { + return $this->getLink(0); + } + + /** + * Get the entry title + * + * @return string + */ + public function getTitle() + { + if (array_key_exists('title', $this->_data)) { + return $this->_data['title']; + } + + $title = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 + && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090 + ) { + $title = $this->_xpath->evaluate('string('.$this->_xpathQueryRss.'/title)'); + } else { + $title = $this->_xpath->evaluate('string('.$this->_xpathQueryRdf.'/rss:title)'); + } + + if (!$title) { + $title = $this->getExtension('DublinCore')->getTitle(); + } + + if (!$title) { + $title = $this->getExtension('Atom')->getTitle(); + } + + if (!$title) { + $title = null; + } + + $this->_data['title'] = $title; + + return $this->_data['title']; + } + + /** + * Get the number of comments/replies for current entry + * + * @return string|null + */ + public function getCommentCount() + { + if (array_key_exists('commentcount', $this->_data)) { + return $this->_data['commentcount']; + } + + $commentcount = $this->getExtension('Slash')->getCommentCount(); + + if (!$commentcount) { + $commentcount = $this->getExtension('Thread')->getCommentCount(); + } + + if (!$commentcount) { + $commentcount = $this->getExtension('Atom')->getCommentCount(); + } + + if (!$commentcount) { + $commentcount = null; + } + + $this->_data['commentcount'] = $commentcount; + + return $this->_data['commentcount']; + } + + /** + * Returns a URI pointing to the HTML page where comments can be made on this entry + * + * @return string + */ + public function getCommentLink() + { + if (array_key_exists('commentlink', $this->_data)) { + return $this->_data['commentlink']; + } + + $commentlink = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 + && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090 + ) { + $commentlink = $this->_xpath->evaluate('string('.$this->_xpathQueryRss.'/comments)'); + } + + if (!$commentlink) { + $commentlink = $this->getExtension('Atom')->getCommentLink(); + } + + if (!$commentlink) { + $commentlink = null; + } + + $this->_data['commentlink'] = $commentlink; + + return $this->_data['commentlink']; + } + + /** + * Returns a URI pointing to a feed of all comments for this entry + * + * @return string + */ + public function getCommentFeedLink() + { + if (array_key_exists('commentfeedlink', $this->_data)) { + return $this->_data['commentfeedlink']; + } + + $commentfeedlink = $this->getExtension('WellFormedWeb')->getCommentFeedLink(); + + if (!$commentfeedlink) { + $commentfeedlink = $this->getExtension('Atom')->getCommentFeedLink('rss'); + } + + if (!$commentfeedlink) { + $commentfeedlink = $this->getExtension('Atom')->getCommentFeedLink('rdf'); + } + + if (!$commentfeedlink) { + $commentfeedlink = null; + } + + $this->_data['commentfeedlink'] = $commentfeedlink; + + return $this->_data['commentfeedlink']; + } + + /** + * Set the XPath query (incl. on all Extensions) + * + * @param DOMXPath $xpath + */ + public function setXpath(DOMXPath $xpath) + { + parent::setXpath($xpath); + foreach ($this->_extensions as $extension) { + $extension->setXpath($this->_xpath); + } + } +} diff --git a/library/vendor/Zend/Feed/Reader/EntryAbstract.php b/library/vendor/Zend/Feed/Reader/EntryAbstract.php new file mode 100644 index 000000000..6ce5994fc --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/EntryAbstract.php @@ -0,0 +1,241 @@ +_entry = $entry; + $this->_entryKey = $entryKey; + $this->_domDocument = $entry->ownerDocument; + if ($type !== null) { + $this->_data['type'] = $type; + } else { + $this->_data['type'] = Zend_Feed_Reader::detectType( + $this->_domDocument + ); + } + $this->_loadExtensions(); + } + + /** + * Get the DOM + * + * @return DOMDocument + */ + public function getDomDocument() + { + return $this->_domDocument; + } + + /** + * Get the entry element + * + * @return DOMElement + */ + public function getElement() + { + return $this->_entry; + } + + /** + * Get the Entry's encoding + * + * @return string + */ + public function getEncoding() + { + $assumed = $this->getDomDocument()->encoding; + if (empty($assumed)) { + $assumed = 'UTF-8'; + } + return $assumed; + } + + /** + * Get entry as xml + * + * @return string + */ + public function saveXml() + { + $dom = new DOMDocument('1.0', $this->getEncoding()); + $entry = $dom->importNode($this->getElement(), true); + $dom->appendChild($entry); + return $dom->saveXml(); + } + + /** + * Get the entry type + * + * @return string + */ + public function getType() + { + return $this->_data['type']; + } + + /** + * Get the XPath query object + * + * @return DOMXPath + */ + public function getXpath() + { + if (!$this->_xpath) { + $this->setXpath(new DOMXPath($this->getDomDocument())); + } + return $this->_xpath; + } + + /** + * Set the XPath query + * + * @param DOMXPath $xpath + * @return Zend_Feed_Reader_Entry_EntryAbstract + */ + public function setXpath(DOMXPath $xpath) + { + $this->_xpath = $xpath; + return $this; + } + + /** + * Get registered extensions + * + * @return array + */ + public function getExtensions() + { + return $this->_extensions; + } + + /** + * Return an Extension object with the matching name (postfixed with _Entry) + * + * @param string $name + * @return Zend_Feed_Reader_Extension_EntryAbstract + */ + public function getExtension($name) + { + if (array_key_exists($name . '_Entry', $this->_extensions)) { + return $this->_extensions[$name . '_Entry']; + } + return null; + } + + /** + * Method overloading: call given method on first extension implementing it + * + * @param string $method + * @param array $args + * @return mixed + * @throws Zend_Feed_Exception if no extensions implements the method + */ + public function __call($method, $args) + { + foreach ($this->_extensions as $extension) { + if (method_exists($extension, $method)) { + return call_user_func_array(array($extension, $method), $args); + } + } + throw new Zend_Feed_Exception( + 'Method: ' . $method + . 'does not exist and could not be located on a registered Extension' + ); + } + + /** + * Load extensions from Zend_Feed_Reader + * + * @return void + */ + protected function _loadExtensions() + { + $all = Zend_Feed_Reader::getExtensions(); + $feed = $all['entry']; + foreach ($feed as $extension) { + if (in_array($extension, $all['core'])) { + continue; + } + $className = Zend_Feed_Reader::getPluginLoader()->getClassName($extension); + $this->_extensions[$extension] = new $className( + $this->getElement(), $this->_entryKey, $this->_data['type'] + ); + } + } +} diff --git a/library/vendor/Zend/Feed/Reader/EntryInterface.php b/library/vendor/Zend/Feed/Reader/EntryInterface.php new file mode 100644 index 000000000..2eee00aa9 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/EntryInterface.php @@ -0,0 +1,143 @@ +getAuthors(); + + if (isset($authors[$index])) { + return $authors[$index]; + } + + return null; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (array_key_exists('authors', $this->_data)) { + return $this->_data['authors']; + } + + $authors = array(); + $list = $this->getXpath()->query($this->getXpathPrefix() . '//atom:author'); + + if (!$list->length) { + /** + * TODO: Limit query to feed level els only! + */ + $list = $this->getXpath()->query('//atom:author'); + } + + if ($list->length) { + foreach ($list as $author) { + $author = $this->_getAuthor($author); + if (!empty($author)) { + $authors[] = $author; + } + } + } + + if (count($authors) == 0) { + $authors = null; + } else { + $authors = new Zend_Feed_Reader_Collection_Author( + Zend_Feed_Reader::arrayUnique($authors) + ); + } + + $this->_data['authors'] = $authors; + return $this->_data['authors']; + } + + /** + * Get the entry content + * + * @return string + */ + public function getContent() + { + if (array_key_exists('content', $this->_data)) { + return $this->_data['content']; + } + + $content = null; + + $el = $this->getXpath()->query($this->getXpathPrefix() . '/atom:content'); + if($el->length > 0) { + $el = $el->item(0); + $type = $el->getAttribute('type'); + switch ($type) { + case '': + case 'text': + case 'text/plain': + case 'html': + case 'text/html': + $content = $el->nodeValue; + break; + case 'xhtml': + $this->getXpath()->registerNamespace('xhtml', 'http://www.w3.org/1999/xhtml'); + $xhtml = $this->getXpath()->query( + $this->getXpathPrefix() . '/atom:content/xhtml:div' + )->item(0); + //$xhtml->setAttribute('xmlns', 'http://www.w3.org/1999/xhtml'); + $d = new DOMDocument('1.0', $this->getEncoding()); + $xhtmls = $d->importNode($xhtml, true); + $d->appendChild($xhtmls); + $content = $this->_collectXhtml( + $d->saveXML(), + $d->lookupPrefix('http://www.w3.org/1999/xhtml') + ); + break; + } + } + + if (!$content) { + $content = $this->getDescription(); + } + + $this->_data['content'] = trim($content); + + return $this->_data['content']; + } + + /** + * Parse out XHTML to remove the namespacing + */ + protected function _collectXhtml($xhtml, $prefix) + { + if (!empty($prefix)) $prefix = $prefix . ':'; + $matches = array( + "/<\?xml[^<]*>[^<]*<" . $prefix . "div[^<]*/", + "/<\/" . $prefix . "div>\s*$/" + ); + $xhtml = preg_replace($matches, '', $xhtml); + if (!empty($prefix)) { + $xhtml = preg_replace("/(<[\/]?)" . $prefix . "([a-zA-Z]+)/", '$1$2', $xhtml); + } + return $xhtml; + } + + /** + * Get the entry creation date + * + * @return string + */ + public function getDateCreated() + { + if (array_key_exists('datecreated', $this->_data)) { + return $this->_data['datecreated']; + } + + $date = null; + + if ($this->_getAtomType() === Zend_Feed_Reader::TYPE_ATOM_03) { + $dateCreated = $this->getXpath()->evaluate('string(' . $this->getXpathPrefix() . '/atom:created)'); + } else { + $dateCreated = $this->getXpath()->evaluate('string(' . $this->getXpathPrefix() . '/atom:published)'); + } + + if ($dateCreated) { + $date = new Zend_Date; + $date->set($dateCreated, Zend_Date::ISO_8601); + } + + $this->_data['datecreated'] = $date; + + return $this->_data['datecreated']; + } + + /** + * Get the entry modification date + * + * @return string + */ + public function getDateModified() + { + if (array_key_exists('datemodified', $this->_data)) { + return $this->_data['datemodified']; + } + + $date = null; + + if ($this->_getAtomType() === Zend_Feed_Reader::TYPE_ATOM_03) { + $dateModified = $this->getXpath()->evaluate('string(' . $this->getXpathPrefix() . '/atom:modified)'); + } else { + $dateModified = $this->getXpath()->evaluate('string(' . $this->getXpathPrefix() . '/atom:updated)'); + } + + if ($dateModified) { + $date = new Zend_Date; + $date->set($dateModified, Zend_Date::ISO_8601); + } + + $this->_data['datemodified'] = $date; + + return $this->_data['datemodified']; + } + + /** + * Get the entry description + * + * @return string + */ + public function getDescription() + { + if (array_key_exists('description', $this->_data)) { + return $this->_data['description']; + } + + $description = $this->getXpath()->evaluate('string(' . $this->getXpathPrefix() . '/atom:summary)'); + + if (!$description) { + $description = null; + } + + $this->_data['description'] = $description; + + return $this->_data['description']; + } + + /** + * Get the entry enclosure + * + * @return string + */ + public function getEnclosure() + { + if (array_key_exists('enclosure', $this->_data)) { + return $this->_data['enclosure']; + } + + $enclosure = null; + + $nodeList = $this->getXpath()->query($this->getXpathPrefix() . '/atom:link[@rel="enclosure"]'); + + if ($nodeList->length > 0) { + $enclosure = new stdClass(); + $enclosure->url = $nodeList->item(0)->getAttribute('href'); + $enclosure->length = $nodeList->item(0)->getAttribute('length'); + $enclosure->type = $nodeList->item(0)->getAttribute('type'); + } + + $this->_data['enclosure'] = $enclosure; + + return $this->_data['enclosure']; + } + + /** + * Get the entry ID + * + * @return string + */ + public function getId() + { + if (array_key_exists('id', $this->_data)) { + return $this->_data['id']; + } + + $id = $this->getXpath()->evaluate('string(' . $this->getXpathPrefix() . '/atom:id)'); + + if (!$id) { + if ($this->getPermalink()) { + $id = $this->getPermalink(); + } elseif ($this->getTitle()) { + $id = $this->getTitle(); + } else { + $id = null; + } + } + + $this->_data['id'] = $id; + + return $this->_data['id']; + } + + /** + * Get the base URI of the feed (if set). + * + * @return string|null + */ + public function getBaseUrl() + { + if (array_key_exists('baseUrl', $this->_data)) { + return $this->_data['baseUrl']; + } + + $baseUrl = $this->getXpath()->evaluate('string(' + . $this->getXpathPrefix() . '/@xml:base[1]' + . ')'); + + if (!$baseUrl) { + $baseUrl = $this->getXpath()->evaluate('string(//@xml:base[1])'); + } + + if (!$baseUrl) { + $baseUrl = null; + } + + $this->_data['baseUrl'] = $baseUrl; + + return $this->_data['baseUrl']; + } + + /** + * Get a specific link + * + * @param int $index + * @return string + */ + public function getLink($index = 0) + { + if (!array_key_exists('links', $this->_data)) { + $this->getLinks(); + } + + if (isset($this->_data['links'][$index])) { + return $this->_data['links'][$index]; + } + + return null; + } + + /** + * Get all links + * + * @return array + */ + public function getLinks() + { + if (array_key_exists('links', $this->_data)) { + return $this->_data['links']; + } + + $links = array(); + + $list = $this->getXpath()->query( + $this->getXpathPrefix() . '//atom:link[@rel="alternate"]/@href' . '|' . + $this->getXpathPrefix() . '//atom:link[not(@rel)]/@href' + ); + + if ($list->length) { + foreach ($list as $link) { + $links[] = $this->_absolutiseUri($link->value); + } + } + + $this->_data['links'] = $links; + + return $this->_data['links']; + } + + /** + * Get a permalink to the entry + * + * @return string + */ + public function getPermalink() + { + return $this->getLink(0); + } + + /** + * Get the entry title + * + * @return string + */ + public function getTitle() + { + if (array_key_exists('title', $this->_data)) { + return $this->_data['title']; + } + + $title = $this->getXpath()->evaluate('string(' . $this->getXpathPrefix() . '/atom:title)'); + + if (!$title) { + $title = null; + } + + $this->_data['title'] = $title; + + return $this->_data['title']; + } + + /** + * Get the number of comments/replies for current entry + * + * @return integer + */ + public function getCommentCount() + { + if (array_key_exists('commentcount', $this->_data)) { + return $this->_data['commentcount']; + } + + $count = null; + + $this->getXpath()->registerNamespace('thread10', 'http://purl.org/syndication/thread/1.0'); + $list = $this->getXpath()->query( + $this->getXpathPrefix() . '//atom:link[@rel="replies"]/@thread10:count' + ); + + if ($list->length) { + $count = $list->item(0)->value; + } + + $this->_data['commentcount'] = $count; + + return $this->_data['commentcount']; + } + + /** + * Returns a URI pointing to the HTML page where comments can be made on this entry + * + * @return string + */ + public function getCommentLink() + { + if (array_key_exists('commentlink', $this->_data)) { + return $this->_data['commentlink']; + } + + $link = null; + + $list = $this->getXpath()->query( + $this->getXpathPrefix() . '//atom:link[@rel="replies" and @type="text/html"]/@href' + ); + + if ($list->length) { + $link = $list->item(0)->value; + $link = $this->_absolutiseUri($link); + } + + $this->_data['commentlink'] = $link; + + return $this->_data['commentlink']; + } + + /** + * Returns a URI pointing to a feed of all comments for this entry + * + * @return string + */ + public function getCommentFeedLink($type = 'atom') + { + if (array_key_exists('commentfeedlink', $this->_data)) { + return $this->_data['commentfeedlink']; + } + + $link = null; + + $list = $this->getXpath()->query( + $this->getXpathPrefix() . '//atom:link[@rel="replies" and @type="application/'.$type.'+xml"]/@href' + ); + + if ($list->length) { + $link = $list->item(0)->value; + $link = $this->_absolutiseUri($link); + } + + $this->_data['commentfeedlink'] = $link; + + return $this->_data['commentfeedlink']; + } + + /** + * Get all categories + * + * @return Zend_Feed_Reader_Collection_Category + */ + public function getCategories() + { + if (array_key_exists('categories', $this->_data)) { + return $this->_data['categories']; + } + + if ($this->_getAtomType() == Zend_Feed_Reader::TYPE_ATOM_10) { + $list = $this->getXpath()->query($this->getXpathPrefix() . '//atom:category'); + } else { + /** + * Since Atom 0.3 did not support categories, it would have used the + * Dublin Core extension. However there is a small possibility Atom 0.3 + * may have been retrofittied to use Atom 1.0 instead. + */ + $this->getXpath()->registerNamespace('atom10', Zend_Feed_Reader::NAMESPACE_ATOM_10); + $list = $this->getXpath()->query($this->getXpathPrefix() . '//atom10:category'); + } + + if ($list->length) { + $categoryCollection = new Zend_Feed_Reader_Collection_Category; + foreach ($list as $category) { + $categoryCollection[] = array( + 'term' => $category->getAttribute('term'), + 'scheme' => $category->getAttribute('scheme'), + 'label' => $category->getAttribute('label') + ); + } + } else { + return new Zend_Feed_Reader_Collection_Category; + } + + $this->_data['categories'] = $categoryCollection; + + return $this->_data['categories']; + } + + /** + * Get source feed metadata from the entry + * + * @return Zend_Feed_Reader_Feed_Atom_Source|null + */ + public function getSource() + { + if (array_key_exists('source', $this->_data)) { + return $this->_data['source']; + } + + $source = null; + // TODO: Investigate why _getAtomType() fails here. Is it even needed? + if ($this->getType() == Zend_Feed_Reader::TYPE_ATOM_10) { + $list = $this->getXpath()->query($this->getXpathPrefix() . '/atom:source[1]'); + if ($list->length) { + $element = $list->item(0); + $source = new Zend_Feed_Reader_Feed_Atom_Source($element, $this->getXpathPrefix()); + } + } + + $this->_data['source'] = $source; + return $this->_data['source']; + } + + /** + * Attempt to absolutise the URI, i.e. if a relative URI apply the + * xml:base value as a prefix to turn into an absolute URI. + */ + protected function _absolutiseUri($link) + { + if (!Zend_Uri::check($link)) { + if ($this->getBaseUrl() !== null) { + $link = $this->getBaseUrl() . $link; + if (!Zend_Uri::check($link)) { + $link = null; + } + } + } + return $link; + } + + /** + * Get an author entry + * + * @param DOMElement $element + * @return string + */ + protected function _getAuthor(DOMElement $element) + { + $author = array(); + + $emailNode = $element->getElementsByTagName('email'); + $nameNode = $element->getElementsByTagName('name'); + $uriNode = $element->getElementsByTagName('uri'); + + if ($emailNode->length && strlen($emailNode->item(0)->nodeValue) > 0) { + $author['email'] = $emailNode->item(0)->nodeValue; + } + + if ($nameNode->length && strlen($nameNode->item(0)->nodeValue) > 0) { + $author['name'] = $nameNode->item(0)->nodeValue; + } + + if ($uriNode->length && strlen($uriNode->item(0)->nodeValue) > 0) { + $author['uri'] = $uriNode->item(0)->nodeValue; + } + + if (empty($author)) { + return null; + } + return $author; + } + + /** + * Register the default namespaces for the current feed format + */ + protected function _registerNamespaces() + { + switch ($this->_getAtomType()) { + case Zend_Feed_Reader::TYPE_ATOM_03: + $this->getXpath()->registerNamespace('atom', Zend_Feed_Reader::NAMESPACE_ATOM_03); + break; + default: + $this->getXpath()->registerNamespace('atom', Zend_Feed_Reader::NAMESPACE_ATOM_10); + break; + } + } + + /** + * Detect the presence of any Atom namespaces in use + */ + protected function _getAtomType() + { + $dom = $this->getDomDocument(); + $prefixAtom03 = $dom->lookupPrefix(Zend_Feed_Reader::NAMESPACE_ATOM_03); + $prefixAtom10 = $dom->lookupPrefix(Zend_Feed_Reader::NAMESPACE_ATOM_10); + if ($dom->isDefaultNamespace(Zend_Feed_Reader::NAMESPACE_ATOM_03) + || !empty($prefixAtom03)) { + return Zend_Feed_Reader::TYPE_ATOM_03; + } + if ($dom->isDefaultNamespace(Zend_Feed_Reader::NAMESPACE_ATOM_10) + || !empty($prefixAtom10)) { + return Zend_Feed_Reader::TYPE_ATOM_10; + } + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/Atom/Feed.php b/library/vendor/Zend/Feed/Reader/Extension/Atom/Feed.php new file mode 100644 index 000000000..e6db5e161 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/Atom/Feed.php @@ -0,0 +1,586 @@ +getAuthors(); + + if (isset($authors[$index])) { + return $authors[$index]; + } + + return null; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (array_key_exists('authors', $this->_data)) { + return $this->_data['authors']; + } + + $list = $this->_xpath->query('//atom:author'); + + $authors = array(); + + if ($list->length) { + foreach ($list as $author) { + $author = $this->_getAuthor($author); + if (!empty($author)) { + $authors[] = $author; + } + } + } + + if (count($authors) == 0) { + $authors = null; + } else { + $authors = new Zend_Feed_Reader_Collection_Author( + Zend_Feed_Reader::arrayUnique($authors) + ); + } + + $this->_data['authors'] = $authors; + + return $this->_data['authors']; + } + + /** + * Get the copyright entry + * + * @return string|null + */ + public function getCopyright() + { + if (array_key_exists('copyright', $this->_data)) { + return $this->_data['copyright']; + } + + $copyright = null; + + if ($this->getType() === Zend_Feed_Reader::TYPE_ATOM_03) { + $copyright = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:copyright)'); + } else { + $copyright = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:rights)'); + } + + if (!$copyright) { + $copyright = null; + } + + $this->_data['copyright'] = $copyright; + + return $this->_data['copyright']; + } + + /** + * Get the feed creation date + * + * @return Zend_Date|null + */ + public function getDateCreated() + { + if (array_key_exists('datecreated', $this->_data)) { + return $this->_data['datecreated']; + } + + $date = null; + + if ($this->getType() === Zend_Feed_Reader::TYPE_ATOM_03) { + $dateCreated = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:created)'); + } else { + $dateCreated = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:published)'); + } + + if ($dateCreated) { + $date = new Zend_Date; + $date->set($dateCreated, Zend_Date::ISO_8601); + } + + $this->_data['datecreated'] = $date; + + return $this->_data['datecreated']; + } + + /** + * Get the feed modification date + * + * @return Zend_Date|null + */ + public function getDateModified() + { + if (array_key_exists('datemodified', $this->_data)) { + return $this->_data['datemodified']; + } + + $date = null; + + if ($this->getType() === Zend_Feed_Reader::TYPE_ATOM_03) { + $dateModified = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:modified)'); + } else { + $dateModified = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:updated)'); + } + + if ($dateModified) { + $date = new Zend_Date; + $date->set($dateModified, Zend_Date::ISO_8601); + } + + $this->_data['datemodified'] = $date; + + return $this->_data['datemodified']; + } + + /** + * Get the feed description + * + * @return string|null + */ + public function getDescription() + { + if (array_key_exists('description', $this->_data)) { + return $this->_data['description']; + } + + $description = null; + + if ($this->getType() === Zend_Feed_Reader::TYPE_ATOM_03) { + $description = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:tagline)'); // TODO: Is this the same as subtitle? + } else { + $description = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:subtitle)'); + } + + if (!$description) { + $description = null; + } + + $this->_data['description'] = $description; + + return $this->_data['description']; + } + + /** + * Get the feed generator entry + * + * @return string|null + */ + public function getGenerator() + { + if (array_key_exists('generator', $this->_data)) { + return $this->_data['generator']; + } + // TODO: Add uri support + $generator = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:generator)'); + + if (!$generator) { + $generator = null; + } + + $this->_data['generator'] = $generator; + + return $this->_data['generator']; + } + + /** + * Get the feed ID + * + * @return string|null + */ + public function getId() + { + if (array_key_exists('id', $this->_data)) { + return $this->_data['id']; + } + + $id = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:id)'); + + if (!$id) { + if ($this->getLink()) { + $id = $this->getLink(); + } elseif ($this->getTitle()) { + $id = $this->getTitle(); + } else { + $id = null; + } + } + + $this->_data['id'] = $id; + + return $this->_data['id']; + } + + /** + * Get the feed language + * + * @return string|null + */ + public function getLanguage() + { + if (array_key_exists('language', $this->_data)) { + return $this->_data['language']; + } + + $language = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:lang)'); + + if (!$language) { + $language = $this->_xpath->evaluate('string(//@xml:lang[1])'); + } + + if (!$language) { + $language = null; + } + + $this->_data['language'] = $language; + + return $this->_data['language']; + } + + /** + * Get the feed image + * + * @return array|null + */ + public function getImage() + { + if (array_key_exists('image', $this->_data)) { + return $this->_data['image']; + } + + $imageUrl = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:logo)'); + + if (!$imageUrl) { + $image = null; + } else { + $image = array('uri'=>$imageUrl); + } + + $this->_data['image'] = $image; + + return $this->_data['image']; + } + + /** + * Get the feed image + * + * @return array|null + */ + public function getIcon() + { + if (array_key_exists('icon', $this->_data)) { + return $this->_data['icon']; + } + + $imageUrl = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:icon)'); + + if (!$imageUrl) { + $image = null; + } else { + $image = array('uri'=>$imageUrl); + } + + $this->_data['icon'] = $image; + + return $this->_data['icon']; + } + + /** + * Get the base URI of the feed (if set). + * + * @return string|null + */ + public function getBaseUrl() + { + if (array_key_exists('baseUrl', $this->_data)) { + return $this->_data['baseUrl']; + } + + $baseUrl = $this->_xpath->evaluate('string(//@xml:base[1])'); + + if (!$baseUrl) { + $baseUrl = null; + } + $this->_data['baseUrl'] = $baseUrl; + + return $this->_data['baseUrl']; + } + + /** + * Get a link to the source website + * + * @return string|null + */ + public function getLink() + { + if (array_key_exists('link', $this->_data)) { + return $this->_data['link']; + } + + $link = null; + + $list = $this->_xpath->query( + $this->getXpathPrefix() . '/atom:link[@rel="alternate"]/@href' . '|' . + $this->getXpathPrefix() . '/atom:link[not(@rel)]/@href' + ); + + if ($list->length) { + $link = $list->item(0)->nodeValue; + $link = $this->_absolutiseUri($link); + } + + $this->_data['link'] = $link; + + return $this->_data['link']; + } + + /** + * Get a link to the feed's XML Url + * + * @return string|null + */ + public function getFeedLink() + { + if (array_key_exists('feedlink', $this->_data)) { + return $this->_data['feedlink']; + } + + $link = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:link[@rel="self"]/@href)'); + + $link = $this->_absolutiseUri($link); + + $this->_data['feedlink'] = $link; + + return $this->_data['feedlink']; + } + + /** + * Get an array of any supported Pusubhubbub endpoints + * + * @return array|null + */ + public function getHubs() + { + if (array_key_exists('hubs', $this->_data)) { + return $this->_data['hubs']; + } + $hubs = array(); + + $list = $this->_xpath->query($this->getXpathPrefix() + . '//atom:link[@rel="hub"]/@href'); + + if ($list->length) { + foreach ($list as $uri) { + $hubs[] = $this->_absolutiseUri($uri->nodeValue); + } + } else { + $hubs = null; + } + + $this->_data['hubs'] = $hubs; + + return $this->_data['hubs']; + } + + /** + * Get the feed title + * + * @return string|null + */ + public function getTitle() + { + if (array_key_exists('title', $this->_data)) { + return $this->_data['title']; + } + + $title = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:title)'); + + if (!$title) { + $title = null; + } + + $this->_data['title'] = $title; + + return $this->_data['title']; + } + + /** + * Get all categories + * + * @return Zend_Feed_Reader_Collection_Category + */ + public function getCategories() + { + if (array_key_exists('categories', $this->_data)) { + return $this->_data['categories']; + } + + if ($this->getType() == Zend_Feed_Reader::TYPE_ATOM_10) { + $list = $this->_xpath->query($this->getXpathPrefix() . '/atom:category'); + } else { + /** + * Since Atom 0.3 did not support categories, it would have used the + * Dublin Core extension. However there is a small possibility Atom 0.3 + * may have been retrofittied to use Atom 1.0 instead. + */ + $this->_xpath->registerNamespace('atom10', Zend_Feed_Reader::NAMESPACE_ATOM_10); + $list = $this->_xpath->query($this->getXpathPrefix() . '/atom10:category'); + } + + if ($list->length) { + $categoryCollection = new Zend_Feed_Reader_Collection_Category; + foreach ($list as $category) { + $categoryCollection[] = array( + 'term' => $category->getAttribute('term'), + 'scheme' => $category->getAttribute('scheme'), + 'label' => $category->getAttribute('label') + ); + } + } else { + return new Zend_Feed_Reader_Collection_Category; + } + + $this->_data['categories'] = $categoryCollection; + + return $this->_data['categories']; + } + + /** + * Get an author entry in RSS format + * + * @param DOMElement $element + * @return string + */ + protected function _getAuthor(DOMElement $element) + { + $author = array(); + + $emailNode = $element->getElementsByTagName('email'); + $nameNode = $element->getElementsByTagName('name'); + $uriNode = $element->getElementsByTagName('uri'); + + if ($emailNode->length && strlen($emailNode->item(0)->nodeValue) > 0) { + $author['email'] = $emailNode->item(0)->nodeValue; + } + + if ($nameNode->length && strlen($nameNode->item(0)->nodeValue) > 0) { + $author['name'] = $nameNode->item(0)->nodeValue; + } + + if ($uriNode->length && strlen($uriNode->item(0)->nodeValue) > 0) { + $author['uri'] = $uriNode->item(0)->nodeValue; + } + + if (empty($author)) { + return null; + } + return $author; + } + + /** + * Attempt to absolutise the URI, i.e. if a relative URI apply the + * xml:base value as a prefix to turn into an absolute URI. + */ + protected function _absolutiseUri($link) + { + if (!Zend_Uri::check($link)) { + if ($this->getBaseUrl() !== null) { + $link = $this->getBaseUrl() . $link; + if (!Zend_Uri::check($link)) { + $link = null; + } + } + } + return $link; + } + + /** + * Register the default namespaces for the current feed format + */ + protected function _registerNamespaces() + { + if ($this->getType() == Zend_Feed_Reader::TYPE_ATOM_10 + || $this->getType() == Zend_Feed_Reader::TYPE_ATOM_03 + ) { + return; // pre-registered at Feed level + } + $atomDetected = $this->_getAtomType(); + switch ($atomDetected) { + case Zend_Feed_Reader::TYPE_ATOM_03: + $this->_xpath->registerNamespace('atom', Zend_Feed_Reader::NAMESPACE_ATOM_03); + break; + default: + $this->_xpath->registerNamespace('atom', Zend_Feed_Reader::NAMESPACE_ATOM_10); + break; + } + } + + /** + * Detect the presence of any Atom namespaces in use + */ + protected function _getAtomType() + { + $dom = $this->getDomDocument(); + $prefixAtom03 = $dom->lookupPrefix(Zend_Feed_Reader::NAMESPACE_ATOM_03); + $prefixAtom10 = $dom->lookupPrefix(Zend_Feed_Reader::NAMESPACE_ATOM_10); + if ($dom->isDefaultNamespace(Zend_Feed_Reader::NAMESPACE_ATOM_10) + || !empty($prefixAtom10)) { + return Zend_Feed_Reader::TYPE_ATOM_10; + } + if ($dom->isDefaultNamespace(Zend_Feed_Reader::NAMESPACE_ATOM_03) + || !empty($prefixAtom03)) { + return Zend_Feed_Reader::TYPE_ATOM_03; + } + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/Content/Entry.php b/library/vendor/Zend/Feed/Reader/Extension/Content/Entry.php new file mode 100644 index 000000000..e6ecdf5a0 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/Content/Entry.php @@ -0,0 +1,59 @@ +getType() !== Zend_Feed_Reader::TYPE_RSS_10 + && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090 + ) { + $content = $this->_xpath->evaluate('string('.$this->getXpathPrefix().'/content:encoded)'); + } else { + $content = $this->_xpath->evaluate('string('.$this->getXpathPrefix().'/content:encoded)'); + } + return $content; + } + + /** + * Register RSS Content Module namespace + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('content', 'http://purl.org/rss/1.0/modules/content/'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php b/library/vendor/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php new file mode 100644 index 000000000..cce0839e2 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php @@ -0,0 +1,95 @@ +getLicenses(); + + if (isset($licenses[$index])) { + return $licenses[$index]; + } + + return null; + } + + /** + * Get the entry licenses + * + * @return array + */ + public function getLicenses() + { + $name = 'licenses'; + if (array_key_exists($name, $this->_data)) { + return $this->_data[$name]; + } + + $licenses = array(); + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//cc:license'); + + if ($list->length) { + foreach ($list as $license) { + $licenses[] = $license->nodeValue; + } + + $licenses = array_unique($licenses); + } else { + $cc = new Zend_Feed_Reader_Extension_CreativeCommons_Feed( + $this->_domDocument, $this->_data['type'], $this->_xpath + ); + $licenses = $cc->getLicenses(); + } + + $this->_data[$name] = $licenses; + + return $this->_data[$name]; + } + + /** + * Register Creative Commons namespaces + * + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('cc', 'http://backend.userland.com/creativeCommonsRssModule'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php b/library/vendor/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php new file mode 100644 index 000000000..28855ffda --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php @@ -0,0 +1,88 @@ +getLicenses(); + + if (isset($licenses[$index])) { + return $licenses[$index]; + } + + return null; + } + + /** + * Get the entry licenses + * + * @return array + */ + public function getLicenses() + { + $name = 'licenses'; + if (array_key_exists($name, $this->_data)) { + return $this->_data[$name]; + } + + $licenses = array(); + $list = $this->_xpath->evaluate('channel/cc:license'); + + if ($list->length) { + foreach ($list as $license) { + $licenses[] = $license->nodeValue; + } + + $licenses = array_unique($licenses); + } + + $this->_data[$name] = $licenses; + + return $this->_data[$name]; + } + + /** + * Register Creative Commons namespaces + * + * @return void + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('cc', 'http://backend.userland.com/creativeCommonsRssModule'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/DublinCore/Entry.php b/library/vendor/Zend/Feed/Reader/Extension/DublinCore/Entry.php new file mode 100644 index 000000000..9e2f44a65 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/DublinCore/Entry.php @@ -0,0 +1,263 @@ +getAuthors(); + + if (isset($authors[$index])) { + return $authors[$index]; + } + + return null; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (array_key_exists('authors', $this->_data)) { + return $this->_data['authors']; + } + + $authors = array(); + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//dc11:creator'); + + if (!$list->length) { + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//dc10:creator'); + } + if (!$list->length) { + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//dc11:publisher'); + + if (!$list->length) { + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//dc10:publisher'); + } + } + + if ($list->length) { + foreach ($list as $author) { + $authors[] = array( + 'name' => $author->nodeValue + ); + } + $authors = new Zend_Feed_Reader_Collection_Author( + Zend_Feed_Reader::arrayUnique($authors) + ); + } else { + $authors = null; + } + + $this->_data['authors'] = $authors; + + return $this->_data['authors']; + } + + /** + * Get categories (subjects under DC) + * + * @return Zend_Feed_Reader_Collection_Category + */ + public function getCategories() + { + if (array_key_exists('categories', $this->_data)) { + return $this->_data['categories']; + } + + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//dc11:subject'); + + if (!$list->length) { + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//dc10:subject'); + } + + if ($list->length) { + $categoryCollection = new Zend_Feed_Reader_Collection_Category; + foreach ($list as $category) { + $categoryCollection[] = array( + 'term' => $category->nodeValue, + 'scheme' => null, + 'label' => $category->nodeValue, + ); + } + } else { + $categoryCollection = new Zend_Feed_Reader_Collection_Category; + } + + $this->_data['categories'] = $categoryCollection; + return $this->_data['categories']; + } + + + /** + * Get the entry content + * + * @return string + */ + public function getContent() + { + return $this->getDescription(); + } + + /** + * Get the entry description + * + * @return string + */ + public function getDescription() + { + if (array_key_exists('description', $this->_data)) { + return $this->_data['description']; + } + + $description = null; + $description = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:description)'); + + if (!$description) { + $description = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:description)'); + } + + if (!$description) { + $description = null; + } + + $this->_data['description'] = $description; + + return $this->_data['description']; + } + + /** + * Get the entry ID + * + * @return string + */ + public function getId() + { + if (array_key_exists('id', $this->_data)) { + return $this->_data['id']; + } + + $id = null; + $id = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:identifier)'); + + if (!$id) { + $id = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:identifier)'); + } + + $this->_data['id'] = $id; + + return $this->_data['id']; + } + + /** + * Get the entry title + * + * @return string + */ + public function getTitle() + { + if (array_key_exists('title', $this->_data)) { + return $this->_data['title']; + } + + $title = null; + $title = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:title)'); + + if (!$title) { + $title = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:title)'); + } + + if (!$title) { + $title = null; + } + + $this->_data['title'] = $title; + + return $this->_data['title']; + } + + /** + * + * + * @return Zend_Date|null + */ + public function getDate() + { + if (array_key_exists('date', $this->_data)) { + return $this->_data['date']; + } + + $d = null; + $date = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:date)'); + + if (!$date) { + $date = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:date)'); + } + + if ($date) { + $d = new Zend_Date; + $d->set($date, Zend_Date::ISO_8601); + } + + $this->_data['date'] = $d; + + return $this->_data['date']; + } + + /** + * Register DC namespaces + * + * @return void + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('dc10', 'http://purl.org/dc/elements/1.0/'); + $this->_xpath->registerNamespace('dc11', 'http://purl.org/dc/elements/1.1/'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/DublinCore/Feed.php b/library/vendor/Zend/Feed/Reader/Extension/DublinCore/Feed.php new file mode 100644 index 000000000..e6dd8086d --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/DublinCore/Feed.php @@ -0,0 +1,306 @@ +getAuthors(); + + if (isset($authors[$index])) { + return $authors[$index]; + } + + return null; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (array_key_exists('authors', $this->_data)) { + return $this->_data['authors']; + } + + $authors = array(); + $list = $this->_xpath->query('//dc11:creator'); + + if (!$list->length) { + $list = $this->_xpath->query('//dc10:creator'); + } + if (!$list->length) { + $list = $this->_xpath->query('//dc11:publisher'); + + if (!$list->length) { + $list = $this->_xpath->query('//dc10:publisher'); + } + } + + if ($list->length) { + foreach ($list as $author) { + $authors[] = array( + 'name' => $author->nodeValue + ); + } + $authors = new Zend_Feed_Reader_Collection_Author( + Zend_Feed_Reader::arrayUnique($authors) + ); + } else { + $authors = null; + } + + $this->_data['authors'] = $authors; + + return $this->_data['authors']; + } + + /** + * Get the copyright entry + * + * @return string|null + */ + public function getCopyright() + { + if (array_key_exists('copyright', $this->_data)) { + return $this->_data['copyright']; + } + + $copyright = null; + $copyright = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:rights)'); + + if (!$copyright) { + $copyright = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:rights)'); + } + + if (!$copyright) { + $copyright = null; + } + + $this->_data['copyright'] = $copyright; + + return $this->_data['copyright']; + } + + /** + * Get the feed description + * + * @return string|null + */ + public function getDescription() + { + if (array_key_exists('description', $this->_data)) { + return $this->_data['description']; + } + + $description = null; + $description = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:description)'); + + if (!$description) { + $description = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:description)'); + } + + if (!$description) { + $description = null; + } + + $this->_data['description'] = $description; + + return $this->_data['description']; + } + + /** + * Get the feed ID + * + * @return string|null + */ + public function getId() + { + if (array_key_exists('id', $this->_data)) { + return $this->_data['id']; + } + + $id = null; + $id = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:identifier)'); + + if (!$id) { + $id = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:identifier)'); + } + + $this->_data['id'] = $id; + + return $this->_data['id']; + } + + /** + * Get the feed language + * + * @return string|null + */ + public function getLanguage() + { + if (array_key_exists('language', $this->_data)) { + return $this->_data['language']; + } + + $language = null; + $language = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:language)'); + + if (!$language) { + $language = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:language)'); + } + + if (!$language) { + $language = null; + } + + $this->_data['language'] = $language; + + return $this->_data['language']; + } + + /** + * Get the feed title + * + * @return string|null + */ + public function getTitle() + { + if (array_key_exists('title', $this->_data)) { + return $this->_data['title']; + } + + $title = null; + $title = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:title)'); + + if (!$title) { + $title = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:title)'); + } + + if (!$title) { + $title = null; + } + + $this->_data['title'] = $title; + + return $this->_data['title']; + } + + /** + * + * + * @return Zend_Date|null + */ + public function getDate() + { + if (array_key_exists('date', $this->_data)) { + return $this->_data['date']; + } + + $d = null; + $date = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc11:date)'); + + if (!$date) { + $date = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/dc10:date)'); + } + + if ($date) { + $d = new Zend_Date; + $d->set($date, Zend_Date::ISO_8601); + } + + $this->_data['date'] = $d; + + return $this->_data['date']; + } + + /** + * Get categories (subjects under DC) + * + * @return Zend_Feed_Reader_Collection_Category + */ + public function getCategories() + { + if (array_key_exists('categories', $this->_data)) { + return $this->_data['categories']; + } + + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//dc11:subject'); + + if (!$list->length) { + $list = $this->_xpath->evaluate($this->getXpathPrefix() . '//dc10:subject'); + } + + if ($list->length) { + $categoryCollection = new Zend_Feed_Reader_Collection_Category; + foreach ($list as $category) { + $categoryCollection[] = array( + 'term' => $category->nodeValue, + 'scheme' => null, + 'label' => $category->nodeValue, + ); + } + } else { + $categoryCollection = new Zend_Feed_Reader_Collection_Category; + } + + $this->_data['categories'] = $categoryCollection; + return $this->_data['categories']; + } + + /** + * Register the default namespaces for the current feed format + * + * @return void + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('dc10', 'http://purl.org/dc/elements/1.0/'); + $this->_xpath->registerNamespace('dc11', 'http://purl.org/dc/elements/1.1/'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/EntryAbstract.php b/library/vendor/Zend/Feed/Reader/Extension/EntryAbstract.php new file mode 100644 index 000000000..6b1cda623 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/EntryAbstract.php @@ -0,0 +1,200 @@ +_entry = $entry; + $this->_entryKey = $entryKey; + $this->_domDocument = $entry->ownerDocument; + + if ($type !== null) { + $this->_data['type'] = $type; + } else { + $this->_data['type'] = Zend_Feed_Reader::detectType($entry->ownerDocument, true); + } + // set the XPath query prefix for the entry being queried + if ($this->getType() == Zend_Feed_Reader::TYPE_RSS_10 + || $this->getType() == Zend_Feed_Reader::TYPE_RSS_090 + ) { + $this->setXpathPrefix('//rss:item[' . ($this->_entryKey+1) . ']'); + } elseif ($this->getType() == Zend_Feed_Reader::TYPE_ATOM_10 + || $this->getType() == Zend_Feed_Reader::TYPE_ATOM_03 + ) { + $this->setXpathPrefix('//atom:entry[' . ($this->_entryKey+1) . ']'); + } else { + $this->setXpathPrefix('//item[' . ($this->_entryKey+1) . ']'); + } + } + + /** + * Get the DOM + * + * @return DOMDocument + */ + public function getDomDocument() + { + return $this->_domDocument; + } + + /** + * Get the Entry's encoding + * + * @return string + */ + public function getEncoding() + { + $assumed = $this->getDomDocument()->encoding; + return $assumed; + } + + /** + * Get the entry type + * + * @return string + */ + public function getType() + { + return $this->_data['type']; + } + + /** + * Set the XPath query + * + * @param DOMXPath $xpath + * @return Zend_Feed_Reader_Extension_EntryAbstract + */ + public function setXpath(DOMXPath $xpath) + { + $this->_xpath = $xpath; + $this->_registerNamespaces(); + return $this; + } + + /** + * Get the XPath query object + * + * @return DOMXPath + */ + public function getXpath() + { + if (!$this->_xpath) { + $this->setXpath(new DOMXPath($this->getDomDocument())); + } + return $this->_xpath; + } + + /** + * Serialize the entry to an array + * + * @return array + */ + public function toArray() + { + return $this->_data; + } + + /** + * Get the XPath prefix + * + * @return string + */ + public function getXpathPrefix() + { + return $this->_xpathPrefix; + } + + /** + * Set the XPath prefix + * + * @param string $prefix + * @return Zend_Feed_Reader_Extension_EntryAbstract + */ + public function setXpathPrefix($prefix) + { + $this->_xpathPrefix = $prefix; + return $this; + } + + /** + * Register XML namespaces + * + * @return void + */ + protected abstract function _registerNamespaces(); +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/FeedAbstract.php b/library/vendor/Zend/Feed/Reader/Extension/FeedAbstract.php new file mode 100644 index 000000000..3122f9719 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/FeedAbstract.php @@ -0,0 +1,186 @@ +_domDocument = $dom; + + if ($type !== null) { + $this->_data['type'] = $type; + } else { + $this->_data['type'] = Zend_Feed_Reader::detectType($dom); + } + + if ($xpath !== null) { + $this->_xpath = $xpath; + } else { + $this->_xpath = new DOMXPath($this->_domDocument); + } + + $this->_registerNamespaces(); + } + + /** + * Get the DOM + * + * @return DOMDocument + */ + public function getDomDocument() + { + return $this->_domDocument; + } + + /** + * Get the Feed's encoding + * + * @return string + */ + public function getEncoding() + { + $assumed = $this->getDomDocument()->encoding; + return $assumed; + } + + /** + * Get the feed type + * + * @return string + */ + public function getType() + { + return $this->_data['type']; + } + + + /** + * Return the feed as an array + * + * @return array + */ + public function toArray() // untested + { + return $this->_data; + } + + /** + * Set the XPath query + * + * @param DOMXPath $xpath + * @return Zend_Feed_Reader_Extension_EntryAbstract + */ + public function setXpath(DOMXPath $xpath) + { + $this->_xpath = $xpath; + $this->_registerNamespaces(); + return $this; + } + + /** + * Get the DOMXPath object + * + * @return string + */ + public function getXpath() + { + return $this->_xpath; + } + + /** + * Get the XPath prefix + * + * @return string + */ + public function getXpathPrefix() + { + return $this->_xpathPrefix; + } + + /** + * Set the XPath prefix + * + * @return Zend_Feed_Reader_Feed_Atom + */ + public function setXpathPrefix($prefix) + { + $this->_xpathPrefix = $prefix; + } + + /** + * Register the default namespaces for the current feed format + */ + abstract protected function _registerNamespaces(); +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/Podcast/Entry.php b/library/vendor/Zend/Feed/Reader/Extension/Podcast/Entry.php new file mode 100644 index 000000000..202307a1d --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/Podcast/Entry.php @@ -0,0 +1,200 @@ +_data['author'])) { + return $this->_data['author']; + } + + $author = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:author)'); + + if (!$author) { + $author = null; + } + + $this->_data['author'] = $author; + + return $this->_data['author']; + } + + /** + * Get the entry block + * + * @return string + */ + public function getBlock() + { + if (isset($this->_data['block'])) { + return $this->_data['block']; + } + + $block = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:block)'); + + if (!$block) { + $block = null; + } + + $this->_data['block'] = $block; + + return $this->_data['block']; + } + + /** + * Get the entry duration + * + * @return string + */ + public function getDuration() + { + if (isset($this->_data['duration'])) { + return $this->_data['duration']; + } + + $duration = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:duration)'); + + if (!$duration) { + $duration = null; + } + + $this->_data['duration'] = $duration; + + return $this->_data['duration']; + } + + /** + * Get the entry explicit + * + * @return string + */ + public function getExplicit() + { + if (isset($this->_data['explicit'])) { + return $this->_data['explicit']; + } + + $explicit = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:explicit)'); + + if (!$explicit) { + $explicit = null; + } + + $this->_data['explicit'] = $explicit; + + return $this->_data['explicit']; + } + + /** + * Get the entry keywords + * + * @return string + */ + public function getKeywords() + { + if (isset($this->_data['keywords'])) { + return $this->_data['keywords']; + } + + $keywords = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:keywords)'); + + if (!$keywords) { + $keywords = null; + } + + $this->_data['keywords'] = $keywords; + + return $this->_data['keywords']; + } + + /** + * Get the entry subtitle + * + * @return string + */ + public function getSubtitle() + { + if (isset($this->_data['subtitle'])) { + return $this->_data['subtitle']; + } + + $subtitle = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:subtitle)'); + + if (!$subtitle) { + $subtitle = null; + } + + $this->_data['subtitle'] = $subtitle; + + return $this->_data['subtitle']; + } + + /** + * Get the entry summary + * + * @return string + */ + public function getSummary() + { + if (isset($this->_data['summary'])) { + return $this->_data['summary']; + } + + $summary = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:summary)'); + + if (!$summary) { + $summary = null; + } + + $this->_data['summary'] = $summary; + + return $this->_data['summary']; + } + + /** + * Register iTunes namespace + * + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('itunes', 'http://www.itunes.com/dtds/podcast-1.0.dtd'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/Podcast/Feed.php b/library/vendor/Zend/Feed/Reader/Extension/Podcast/Feed.php new file mode 100644 index 000000000..9835ac726 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/Podcast/Feed.php @@ -0,0 +1,292 @@ +_data['author'])) { + return $this->_data['author']; + } + + $author = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:author)'); + + if (!$author) { + $author = null; + } + + $this->_data['author'] = $author; + + return $this->_data['author']; + } + + /** + * Get the entry block + * + * @return string + */ + public function getBlock() + { + if (isset($this->_data['block'])) { + return $this->_data['block']; + } + + $block = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:block)'); + + if (!$block) { + $block = null; + } + + $this->_data['block'] = $block; + + return $this->_data['block']; + } + + /** + * Get the entry category + * + * @return string + */ + public function getCategories() + { + if (isset($this->_data['categories'])) { + return $this->_data['categories']; + } + + $categoryList = $this->_xpath->query($this->getXpathPrefix() . '/itunes:category'); + + $categories = array(); + + if ($categoryList->length > 0) { + foreach ($categoryList as $node) { + $children = null; + + if ($node->childNodes->length > 0) { + $children = array(); + + foreach ($node->childNodes as $childNode) { + if (!($childNode instanceof DOMText)) { + $children[$childNode->getAttribute('text')] = null; + } + } + } + + $categories[$node->getAttribute('text')] = $children; + } + } + + + if (!$categories) { + $categories = null; + } + + $this->_data['categories'] = $categories; + + return $this->_data['categories']; + } + + /** + * Get the entry explicit + * + * @return string + */ + public function getExplicit() + { + if (isset($this->_data['explicit'])) { + return $this->_data['explicit']; + } + + $explicit = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:explicit)'); + + if (!$explicit) { + $explicit = null; + } + + $this->_data['explicit'] = $explicit; + + return $this->_data['explicit']; + } + + /** + * Get the entry image + * + * @return string + */ + public function getImage() + { + if (isset($this->_data['image'])) { + return $this->_data['image']; + } + + $image = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:image/@href)'); + + if (!$image) { + $image = null; + } + + $this->_data['image'] = $image; + + return $this->_data['image']; + } + + /** + * Get the entry keywords + * + * @return string + */ + public function getKeywords() + { + if (isset($this->_data['keywords'])) { + return $this->_data['keywords']; + } + + $keywords = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:keywords)'); + + if (!$keywords) { + $keywords = null; + } + + $this->_data['keywords'] = $keywords; + + return $this->_data['keywords']; + } + + /** + * Get the entry's new feed url + * + * @return string + */ + public function getNewFeedUrl() + { + if (isset($this->_data['new-feed-url'])) { + return $this->_data['new-feed-url']; + } + + $newFeedUrl = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:new-feed-url)'); + + if (!$newFeedUrl) { + $newFeedUrl = null; + } + + $this->_data['new-feed-url'] = $newFeedUrl; + + return $this->_data['new-feed-url']; + } + + /** + * Get the entry owner + * + * @return string + */ + public function getOwner() + { + if (isset($this->_data['owner'])) { + return $this->_data['owner']; + } + + $owner = null; + + $email = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:owner/itunes:email)'); + $name = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:owner/itunes:name)'); + + if (!empty($email)) { + $owner = $email . (empty($name) ? '' : ' (' . $name . ')'); + } else if (!empty($name)) { + $owner = $name; + } + + if (!$owner) { + $owner = null; + } + + $this->_data['owner'] = $owner; + + return $this->_data['owner']; + } + + /** + * Get the entry subtitle + * + * @return string + */ + public function getSubtitle() + { + if (isset($this->_data['subtitle'])) { + return $this->_data['subtitle']; + } + + $subtitle = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:subtitle)'); + + if (!$subtitle) { + $subtitle = null; + } + + $this->_data['subtitle'] = $subtitle; + + return $this->_data['subtitle']; + } + + /** + * Get the entry summary + * + * @return string + */ + public function getSummary() + { + if (isset($this->_data['summary'])) { + return $this->_data['summary']; + } + + $summary = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:summary)'); + + if (!$summary) { + $summary = null; + } + + $this->_data['summary'] = $summary; + + return $this->_data['summary']; + } + + /** + * Register iTunes namespace + * + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('itunes', 'http://www.itunes.com/dtds/podcast-1.0.dtd'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/Slash/Entry.php b/library/vendor/Zend/Feed/Reader/Extension/Slash/Entry.php new file mode 100644 index 000000000..eb02284b4 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/Slash/Entry.php @@ -0,0 +1,142 @@ +_getData('section'); + } + + /** + * Get the entry department + * + * @return string|null + */ + public function getDepartment() + { + return $this->_getData('department'); + } + + /** + * Get the entry hit_parade + * + * @return array + */ + public function getHitParade() + { + $name = 'hit_parade'; + + if (isset($this->_data[$name])) { + return $this->_data[$name]; + } + + $stringParade = $this->_getData($name); + $hitParade = array(); + + if (!empty($stringParade)) { + $stringParade = explode(',', $stringParade); + + foreach ($stringParade as $hit) + $hitParade[] = $hit + 0; //cast to integer + } + + $this->_data[$name] = $hitParade; + return $hitParade; + } + + /** + * Get the entry comments + * + * @return int + */ + public function getCommentCount() + { + $name = 'comments'; + + if (isset($this->_data[$name])) { + return $this->_data[$name]; + } + + $comments = $this->_getData($name, 'string'); + + if (!$comments) { + $this->_data[$name] = null; + return $this->_data[$name]; + } + + return $comments; + } + + /** + * Get the entry data specified by name + * @param string $name + * @param string $type + * + * @return mixed|null + */ + protected function _getData($name, $type = 'string') + { + if (array_key_exists($name, $this->_data)) { + return $this->_data[$name]; + } + + $data = $this->_xpath->evaluate($type . '(' . $this->getXpathPrefix() . '/slash10:' . $name . ')'); + + if (!$data) { + $data = null; + } + + $this->_data[$name] = $data; + + return $data; + } + + /** + * Register Slash namespaces + * + * @return void + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('slash10', 'http://purl.org/rss/1.0/modules/slash/'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/Syndication/Feed.php b/library/vendor/Zend/Feed/Reader/Extension/Syndication/Feed.php new file mode 100644 index 000000000..ef9b98939 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/Syndication/Feed.php @@ -0,0 +1,166 @@ +_getData($name); + + if ($period === null) { + $this->_data[$name] = 'daily'; + return 'daily'; //Default specified by spec + } + + switch ($period) + { + case 'hourly': + case 'daily': + case 'weekly': + case 'yearly': + return $period; + default: + throw new Zend_Feed_Exception("Feed specified invalid update period: '$period'." + . " Must be one of hourly, daily, weekly or yearly" + ); + } + } + + /** + * Get update frequency + * @return int + */ + public function getUpdateFrequency() + { + $name = 'updateFrequency'; + $freq = $this->_getData($name, 'number'); + + if (!$freq || $freq < 1) { + $this->_data[$name] = 1; + return 1; + } + + return $freq; + } + + /** + * Get update frequency as ticks + * @return int + */ + public function getUpdateFrequencyAsTicks() + { + $name = 'updateFrequency'; + $freq = $this->_getData($name, 'number'); + + if (!$freq || $freq < 1) { + $this->_data[$name] = 1; + $freq = 1; + } + + $period = $this->getUpdatePeriod(); + $ticks = 1; + + switch ($period) + { + //intentional fall through + case 'yearly': + $ticks *= 52; //TODO: fix generalisation, how? + case 'weekly': + $ticks *= 7; + case 'daily': + $ticks *= 24; + case 'hourly': + $ticks *= 3600; + break; + default: //Never arrive here, exception thrown in getPeriod() + break; + } + + return $ticks / $freq; + } + + /** + * Get update base + * + * @return Zend_Date|null + */ + public function getUpdateBase() + { + $updateBase = $this->_getData('updateBase'); + $date = null; + if ($updateBase) { + $date = new Zend_Date; + $date->set($updateBase, Zend_Date::W3C); + } + return $date; + } + + /** + * Get the entry data specified by name + * + * @param string $name + * @param string $type + * @return mixed|null + */ + private function _getData($name, $type = 'string') + { + if (array_key_exists($name, $this->_data)) { + return $this->_data[$name]; + } + + $data = $this->_xpath->evaluate($type . '(' . $this->getXpathPrefix() . '/syn10:' . $name . ')'); + + if (!$data) { + $data = null; + } + + $this->_data[$name] = $data; + + return $data; + } + + /** + * Register Syndication namespaces + * + * @return void + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('syn10', 'http://purl.org/rss/1.0/modules/syndication/'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/Thread/Entry.php b/library/vendor/Zend/Feed/Reader/Extension/Thread/Entry.php new file mode 100644 index 000000000..b9dc3f57d --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/Thread/Entry.php @@ -0,0 +1,90 @@ +_getData('total'); + } + + /** + * Get the entry data specified by name + * + * @param string $name + * @param string $type + * @return mixed|null + */ + protected function _getData($name) + { + if (array_key_exists($name, $this->_data)) { + return $this->_data[$name]; + } + + $data = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/thread10:' . $name . ')'); + + if (!$data) { + $data = null; + } + + $this->_data[$name] = $data; + + return $data; + } + + /** + * Register Atom Thread Extension 1.0 namespace + * + * @return void + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('thread10', 'http://purl.org/syndication/thread/1.0'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php b/library/vendor/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php new file mode 100644 index 000000000..3f850a9f2 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php @@ -0,0 +1,71 @@ +_data)) { + return $this->_data[$name]; + } + + $data = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/wfw:' . $name . ')'); + + if (!$data) { + $data = null; + } + + $this->_data[$name] = $data; + + return $data; + } + + /** + * Register Slash namespaces + * + * @return void + */ + protected function _registerNamespaces() + { + $this->_xpath->registerNamespace('wfw', 'http://wellformedweb.org/CommentAPI/'); + } +} diff --git a/library/vendor/Zend/Feed/Reader/Feed/Atom.php b/library/vendor/Zend/Feed/Reader/Feed/Atom.php new file mode 100644 index 000000000..2ee910cc1 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Feed/Atom.php @@ -0,0 +1,419 @@ +getClassName('Atom_Feed'); + $this->_extensions['Atom_Feed'] = new $atomClass($dom, $this->_data['type'], $this->_xpath); + $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('DublinCore_Feed'); + $this->_extensions['DublinCore_Feed'] = new $atomClass($dom, $this->_data['type'], $this->_xpath); + foreach ($this->_extensions as $extension) { + $extension->setXpathPrefix('/atom:feed'); + } + } + + /** + * Get a single author + * + * @param int $index + * @return string|null + */ + public function getAuthor($index = 0) + { + $authors = $this->getAuthors(); + + if (isset($authors[$index])) { + return $authors[$index]; + } + + return null; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (array_key_exists('authors', $this->_data)) { + return $this->_data['authors']; + } + + $authors = $this->getExtension('Atom')->getAuthors(); + + $this->_data['authors'] = $authors; + + return $this->_data['authors']; + } + + /** + * Get the copyright entry + * + * @return string|null + */ + public function getCopyright() + { + if (array_key_exists('copyright', $this->_data)) { + return $this->_data['copyright']; + } + + $copyright = $this->getExtension('Atom')->getCopyright(); + + if (!$copyright) { + $copyright = null; + } + + $this->_data['copyright'] = $copyright; + + return $this->_data['copyright']; + } + + /** + * Get the feed creation date + * + * @return string|null + */ + public function getDateCreated() + { + if (array_key_exists('datecreated', $this->_data)) { + return $this->_data['datecreated']; + } + + $dateCreated = $this->getExtension('Atom')->getDateCreated(); + + if (!$dateCreated) { + $dateCreated = null; + } + + $this->_data['datecreated'] = $dateCreated; + + return $this->_data['datecreated']; + } + + /** + * Get the feed modification date + * + * @return string|null + */ + public function getDateModified() + { + if (array_key_exists('datemodified', $this->_data)) { + return $this->_data['datemodified']; + } + + $dateModified = $this->getExtension('Atom')->getDateModified(); + + if (!$dateModified) { + $dateModified = null; + } + + $this->_data['datemodified'] = $dateModified; + + return $this->_data['datemodified']; + } + + /** + * Get the feed lastBuild date. This is not implemented in Atom. + * + * @return string|null + */ + public function getLastBuildDate() + { + return null; + } + + /** + * Get the feed description + * + * @return string|null + */ + public function getDescription() + { + if (array_key_exists('description', $this->_data)) { + return $this->_data['description']; + } + + $description = $this->getExtension('Atom')->getDescription(); + + if (!$description) { + $description = null; + } + + $this->_data['description'] = $description; + + return $this->_data['description']; + } + + /** + * Get the feed generator entry + * + * @return string|null + */ + public function getGenerator() + { + if (array_key_exists('generator', $this->_data)) { + return $this->_data['generator']; + } + + $generator = $this->getExtension('Atom')->getGenerator(); + + $this->_data['generator'] = $generator; + + return $this->_data['generator']; + } + + /** + * Get the feed ID + * + * @return string|null + */ + public function getId() + { + if (array_key_exists('id', $this->_data)) { + return $this->_data['id']; + } + + $id = $this->getExtension('Atom')->getId(); + + $this->_data['id'] = $id; + + return $this->_data['id']; + } + + /** + * Get the feed language + * + * @return string|null + */ + public function getLanguage() + { + if (array_key_exists('language', $this->_data)) { + return $this->_data['language']; + } + + $language = $this->getExtension('Atom')->getLanguage(); + + if (!$language) { + $language = $this->_xpath->evaluate('string(//@xml:lang[1])'); + } + + if (!$language) { + $language = null; + } + + $this->_data['language'] = $language; + + return $this->_data['language']; + } + + /** + * Get a link to the source website + * + * @return string|null + */ + public function getBaseUrl() + { + if (array_key_exists('baseUrl', $this->_data)) { + return $this->_data['baseUrl']; + } + + $baseUrl = $this->getExtension('Atom')->getBaseUrl(); + + $this->_data['baseUrl'] = $baseUrl; + + return $this->_data['baseUrl']; + } + + /** + * Get a link to the source website + * + * @return string|null + */ + public function getLink() + { + if (array_key_exists('link', $this->_data)) { + return $this->_data['link']; + } + + $link = $this->getExtension('Atom')->getLink(); + + $this->_data['link'] = $link; + + return $this->_data['link']; + } + + /** + * Get feed image data + * + * @return array|null + */ + public function getImage() + { + if (array_key_exists('image', $this->_data)) { + return $this->_data['image']; + } + + $link = $this->getExtension('Atom')->getImage(); + + $this->_data['image'] = $link; + + return $this->_data['image']; + } + + /** + * Get a link to the feed's XML Url + * + * @return string|null + */ + public function getFeedLink() + { + if (array_key_exists('feedlink', $this->_data)) { + return $this->_data['feedlink']; + } + + $link = $this->getExtension('Atom')->getFeedLink(); + + if ($link === null || empty($link)) { + $link = $this->getOriginalSourceUri(); + } + + $this->_data['feedlink'] = $link; + + return $this->_data['feedlink']; + } + + /** + * Get the feed title + * + * @return string|null + */ + public function getTitle() + { + if (array_key_exists('title', $this->_data)) { + return $this->_data['title']; + } + + $title = $this->getExtension('Atom')->getTitle(); + + $this->_data['title'] = $title; + + return $this->_data['title']; + } + + /** + * Get an array of any supported Pusubhubbub endpoints + * + * @return array|null + */ + public function getHubs() + { + if (array_key_exists('hubs', $this->_data)) { + return $this->_data['hubs']; + } + + $hubs = $this->getExtension('Atom')->getHubs(); + + $this->_data['hubs'] = $hubs; + + return $this->_data['hubs']; + } + + /** + * Get all categories + * + * @return Zend_Feed_Reader_Collection_Category + */ + public function getCategories() + { + if (array_key_exists('categories', $this->_data)) { + return $this->_data['categories']; + } + + $categoryCollection = $this->getExtension('Atom')->getCategories(); + + if (count($categoryCollection) == 0) { + $categoryCollection = $this->getExtension('DublinCore')->getCategories(); + } + + $this->_data['categories'] = $categoryCollection; + + return $this->_data['categories']; + } + + /** + * Read all entries to the internal entries array + * + * @return void + */ + protected function _indexEntries() + { + if ($this->getType() == Zend_Feed_Reader::TYPE_ATOM_10 || + $this->getType() == Zend_Feed_Reader::TYPE_ATOM_03) { + $entries = array(); + $entries = $this->_xpath->evaluate('//atom:entry'); + + foreach($entries as $index=>$entry) { + $this->_entries[$index] = $entry; + } + } + } + + /** + * Register the default namespaces for the current feed format + * + */ + protected function _registerNamespaces() + { + switch ($this->_data['type']) { + case Zend_Feed_Reader::TYPE_ATOM_03: + $this->_xpath->registerNamespace('atom', Zend_Feed_Reader::NAMESPACE_ATOM_03); + break; + case Zend_Feed_Reader::TYPE_ATOM_10: + default: + $this->_xpath->registerNamespace('atom', Zend_Feed_Reader::NAMESPACE_ATOM_10); + } + } +} diff --git a/library/vendor/Zend/Feed/Reader/Feed/Atom/Source.php b/library/vendor/Zend/Feed/Reader/Feed/Atom/Source.php new file mode 100644 index 000000000..7a0ff37e6 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Feed/Atom/Source.php @@ -0,0 +1,101 @@ +_domDocument = $source->ownerDocument; + $this->_xpath = new DOMXPath($this->_domDocument); + $this->_data['type'] = $type; + $this->_registerNamespaces(); + $this->_loadExtensions(); + + $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Feed'); + $this->_extensions['Atom_Feed'] = new $atomClass($this->_domDocument, $this->_data['type'], $this->_xpath); + $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('DublinCore_Feed'); + $this->_extensions['DublinCore_Feed'] = new $atomClass($this->_domDocument, $this->_data['type'], $this->_xpath); + foreach ($this->_extensions as $extension) { + $extension->setXpathPrefix(rtrim($xpathPrefix, '/') . '/atom:source'); + } + } + + /** + * Since this is not an Entry carrier but a vehicle for Feed metadata, any + * applicable Entry methods are stubbed out and do nothing. + */ + + /** + * @return void + */ + public function count() {} + + /** + * @return void + */ + public function current() {} + + /** + * @return void + */ + public function key() {} + + /** + * @return void + */ + public function next() {} + + /** + * @return void + */ + public function rewind() {} + + /** + * @return void + */ + public function valid() {} + + /** + * @return void + */ + protected function _indexEntries() {} + +} diff --git a/library/vendor/Zend/Feed/Reader/Feed/Rss.php b/library/vendor/Zend/Feed/Reader/Feed/Rss.php new file mode 100644 index 000000000..b4f3a5c88 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/Feed/Rss.php @@ -0,0 +1,726 @@ +getClassName('DublinCore_Feed'); + $this->_extensions['DublinCore_Feed'] = new $dublinCoreClass($dom, $this->_data['type'], $this->_xpath); + $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Feed'); + $this->_extensions['Atom_Feed'] = new $atomClass($dom, $this->_data['type'], $this->_xpath); + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $xpathPrefix = '/rss/channel'; + } else { + $xpathPrefix = '/rdf:RDF/rss:channel'; + } + foreach ($this->_extensions as $extension) { + $extension->setXpathPrefix($xpathPrefix); + } + } + + /** + * Get a single author + * + * @param int $index + * @return string|null + */ + public function getAuthor($index = 0) + { + $authors = $this->getAuthors(); + + if (isset($authors[$index])) { + return $authors[$index]; + } + + return null; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (array_key_exists('authors', $this->_data)) { + return $this->_data['authors']; + } + + $authors = array(); + $authors_dc = $this->getExtension('DublinCore')->getAuthors(); + if (!empty($authors_dc)) { + foreach ($authors_dc as $author) { + $authors[] = array( + 'name' => $author['name'] + ); + } + } + + /** + * Technically RSS doesn't specific author element use at the feed level + * but it's supported on a "just in case" basis. + */ + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 + && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $list = $this->_xpath->query('//author'); + } else { + $list = $this->_xpath->query('//rss:author'); + } + if ($list->length) { + foreach ($list as $author) { + $string = trim($author->nodeValue); + $email = null; + $name = null; + $data = array(); + // Pretty rough parsing - but it's a catchall + if (preg_match("/^.*@[^ ]*/", $string, $matches)) { + $data['email'] = trim($matches[0]); + if (preg_match("/\((.*)\)$/", $string, $matches)) { + $data['name'] = $matches[1]; + } + $authors[] = $data; + } + } + } + + if (count($authors) == 0) { + $authors = $this->getExtension('Atom')->getAuthors(); + } else { + $authors = new Zend_Feed_Reader_Collection_Author( + Zend_Feed_Reader::arrayUnique($authors) + ); + } + + if (count($authors) == 0) { + $authors = null; + } + + $this->_data['authors'] = $authors; + + return $this->_data['authors']; + } + + /** + * Get the copyright entry + * + * @return string|null + */ + public function getCopyright() + { + if (array_key_exists('copyright', $this->_data)) { + return $this->_data['copyright']; + } + + $copyright = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $copyright = $this->_xpath->evaluate('string(/rss/channel/copyright)'); + } + + if (!$copyright && $this->getExtension('DublinCore') !== null) { + $copyright = $this->getExtension('DublinCore')->getCopyright(); + } + + if (empty($copyright)) { + $copyright = $this->getExtension('Atom')->getCopyright(); + } + + if (!$copyright) { + $copyright = null; + } + + $this->_data['copyright'] = $copyright; + + return $this->_data['copyright']; + } + + /** + * Get the feed creation date + * + * @return string|null + */ + public function getDateCreated() + { + return $this->getDateModified(); + } + + /** + * Get the feed modification date + * + * @return Zend_Date + */ + public function getDateModified() + { + if (array_key_exists('datemodified', $this->_data)) { + return $this->_data['datemodified']; + } + + $dateModified = null; + $date = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $dateModified = $this->_xpath->evaluate('string(/rss/channel/pubDate)'); + if (!$dateModified) { + $dateModified = $this->_xpath->evaluate('string(/rss/channel/lastBuildDate)'); + } + if ($dateModified) { + $dateModifiedParsed = strtotime($dateModified); + if ($dateModifiedParsed) { + $date = new Zend_Date($dateModifiedParsed); + } else { + $dateStandards = array(Zend_Date::RSS, Zend_Date::RFC_822, + Zend_Date::RFC_2822, Zend_Date::DATES); + $date = new Zend_Date; + foreach ($dateStandards as $standard) { + try { + $date->set($dateModified, $standard); + break; + } catch (Zend_Date_Exception $e) { + if ($standard == Zend_Date::DATES) { + throw new Zend_Feed_Exception( + 'Could not load date due to unrecognised' + .' format (should follow RFC 822 or 2822):' + . $e->getMessage(), + 0, $e + ); + } + } + } + } + } + } + + if (!$date) { + $date = $this->getExtension('DublinCore')->getDate(); + } + + if (!$date) { + $date = $this->getExtension('Atom')->getDateModified(); + } + + if (!$date) { + $date = null; + } + + $this->_data['datemodified'] = $date; + + return $this->_data['datemodified']; + } + + /** + * Get the feed lastBuild date + * + * @return Zend_Date + */ + public function getLastBuildDate() + { + if (array_key_exists('lastBuildDate', $this->_data)) { + return $this->_data['lastBuildDate']; + } + + $lastBuildDate = null; + $date = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $lastBuildDate = $this->_xpath->evaluate('string(/rss/channel/lastBuildDate)'); + if ($lastBuildDate) { + $lastBuildDateParsed = strtotime($lastBuildDate); + if ($lastBuildDateParsed) { + $date = new Zend_Date($lastBuildDateParsed); + } else { + $dateStandards = array(Zend_Date::RSS, Zend_Date::RFC_822, + Zend_Date::RFC_2822, Zend_Date::DATES); + $date = new Zend_Date; + foreach ($dateStandards as $standard) { + try { + $date->set($lastBuildDate, $standard); + break; + } catch (Zend_Date_Exception $e) { + if ($standard == Zend_Date::DATES) { + throw new Zend_Feed_Exception( + 'Could not load date due to unrecognised' + .' format (should follow RFC 822 or 2822):' + . $e->getMessage(), + 0, $e + ); + } + } + } + } + } + } + + if (!$date) { + $date = null; + } + + $this->_data['lastBuildDate'] = $date; + + return $this->_data['lastBuildDate']; + } + + /** + * Get the feed description + * + * @return string|null + */ + public function getDescription() + { + if (array_key_exists('description', $this->_data)) { + return $this->_data['description']; + } + + $description = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $description = $this->_xpath->evaluate('string(/rss/channel/description)'); + } else { + $description = $this->_xpath->evaluate('string(/rdf:RDF/rss:channel/rss:description)'); + } + + if (!$description && $this->getExtension('DublinCore') !== null) { + $description = $this->getExtension('DublinCore')->getDescription(); + } + + if (empty($description)) { + $description = $this->getExtension('Atom')->getDescription(); + } + + if (!$description) { + $description = null; + } + + $this->_data['description'] = $description; + + return $this->_data['description']; + } + + /** + * Get the feed ID + * + * @return string|null + */ + public function getId() + { + if (array_key_exists('id', $this->_data)) { + return $this->_data['id']; + } + + $id = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $id = $this->_xpath->evaluate('string(/rss/channel/guid)'); + } + + if (!$id && $this->getExtension('DublinCore') !== null) { + $id = $this->getExtension('DublinCore')->getId(); + } + + if (empty($id)) { + $id = $this->getExtension('Atom')->getId(); + } + + if (!$id) { + if ($this->getLink()) { + $id = $this->getLink(); + } elseif ($this->getTitle()) { + $id = $this->getTitle(); + } else { + $id = null; + } + } + + $this->_data['id'] = $id; + + return $this->_data['id']; + } + + /** + * Get the feed image data + * + * @return array|null + */ + public function getImage() + { + if (array_key_exists('image', $this->_data)) { + return $this->_data['image']; + } + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $list = $this->_xpath->query('/rss/channel/image'); + $prefix = '/rss/channel/image[1]'; + } else { + $list = $this->_xpath->query('/rdf:RDF/rss:channel/rss:image'); + $prefix = '/rdf:RDF/rss:channel/rss:image[1]'; + } + if ($list->length > 0) { + $image = array(); + $value = $this->_xpath->evaluate('string(' . $prefix . '/url)'); + if ($value) { + $image['uri'] = $value; + } + $value = $this->_xpath->evaluate('string(' . $prefix . '/link)'); + if ($value) { + $image['link'] = $value; + } + $value = $this->_xpath->evaluate('string(' . $prefix . '/title)'); + if ($value) { + $image['title'] = $value; + } + $value = $this->_xpath->evaluate('string(' . $prefix . '/height)'); + if ($value) { + $image['height'] = $value; + } + $value = $this->_xpath->evaluate('string(' . $prefix . '/width)'); + if ($value) { + $image['width'] = $value; + } + $value = $this->_xpath->evaluate('string(' . $prefix . '/description)'); + if ($value) { + $image['description'] = $value; + } + } else { + $image = null; + } + + $this->_data['image'] = $image; + + return $this->_data['image']; + } + + /** + * Get the feed language + * + * @return string|null + */ + public function getLanguage() + { + if (array_key_exists('language', $this->_data)) { + return $this->_data['language']; + } + + $language = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $language = $this->_xpath->evaluate('string(/rss/channel/language)'); + } + + if (!$language && $this->getExtension('DublinCore') !== null) { + $language = $this->getExtension('DublinCore')->getLanguage(); + } + + if (empty($language)) { + $language = $this->getExtension('Atom')->getLanguage(); + } + + if (!$language) { + $language = $this->_xpath->evaluate('string(//@xml:lang[1])'); + } + + if (!$language) { + $language = null; + } + + $this->_data['language'] = $language; + + return $this->_data['language']; + } + + /** + * Get a link to the feed + * + * @return string|null + */ + public function getLink() + { + if (array_key_exists('link', $this->_data)) { + return $this->_data['link']; + } + + $link = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $link = $this->_xpath->evaluate('string(/rss/channel/link)'); + } else { + $link = $this->_xpath->evaluate('string(/rdf:RDF/rss:channel/rss:link)'); + } + + if (empty($link)) { + $link = $this->getExtension('Atom')->getLink(); + } + + if (!$link) { + $link = null; + } + + $this->_data['link'] = $link; + + return $this->_data['link']; + } + + /** + * Get a link to the feed XML + * + * @return string|null + */ + public function getFeedLink() + { + if (array_key_exists('feedlink', $this->_data)) { + return $this->_data['feedlink']; + } + + $link = null; + + $link = $this->getExtension('Atom')->getFeedLink(); + + if ($link === null || empty($link)) { + $link = $this->getOriginalSourceUri(); + } + + $this->_data['feedlink'] = $link; + + return $this->_data['feedlink']; + } + + /** + * Get the feed generator entry + * + * @return string|null + */ + public function getGenerator() + { + if (array_key_exists('generator', $this->_data)) { + return $this->_data['generator']; + } + + $generator = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $generator = $this->_xpath->evaluate('string(/rss/channel/generator)'); + } + + if (!$generator) { + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $generator = $this->_xpath->evaluate('string(/rss/channel/atom:generator)'); + } else { + $generator = $this->_xpath->evaluate('string(/rdf:RDF/rss:channel/atom:generator)'); + } + } + + if (empty($generator)) { + $generator = $this->getExtension('Atom')->getGenerator(); + } + + if (!$generator) { + $generator = null; + } + + $this->_data['generator'] = $generator; + + return $this->_data['generator']; + } + + /** + * Get the feed title + * + * @return string|null + */ + public function getTitle() + { + if (array_key_exists('title', $this->_data)) { + return $this->_data['title']; + } + + $title = null; + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $title = $this->_xpath->evaluate('string(/rss/channel/title)'); + } else { + $title = $this->_xpath->evaluate('string(/rdf:RDF/rss:channel/rss:title)'); + } + + if (!$title && $this->getExtension('DublinCore') !== null) { + $title = $this->getExtension('DublinCore')->getTitle(); + } + + if (!$title) { + $title = $this->getExtension('Atom')->getTitle(); + } + + if (!$title) { + $title = null; + } + + $this->_data['title'] = $title; + + return $this->_data['title']; + } + + /** + * Get an array of any supported Pusubhubbub endpoints + * + * @return array|null + */ + public function getHubs() + { + if (array_key_exists('hubs', $this->_data)) { + return $this->_data['hubs']; + } + + $hubs = $this->getExtension('Atom')->getHubs(); + + if (empty($hubs)) { + $hubs = null; + } else { + $hubs = array_unique($hubs); + } + + $this->_data['hubs'] = $hubs; + + return $this->_data['hubs']; + } + + /** + * Get all categories + * + * @return Zend_Feed_Reader_Collection_Category + */ + public function getCategories() + { + if (array_key_exists('categories', $this->_data)) { + return $this->_data['categories']; + } + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && + $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $list = $this->_xpath->query('/rss/channel//category'); + } else { + $list = $this->_xpath->query('/rdf:RDF/rss:channel//rss:category'); + } + + if ($list->length) { + $categoryCollection = new Zend_Feed_Reader_Collection_Category; + foreach ($list as $category) { + $categoryCollection[] = array( + 'term' => $category->nodeValue, + 'scheme' => $category->getAttribute('domain'), + 'label' => $category->nodeValue, + ); + } + } else { + $categoryCollection = $this->getExtension('DublinCore')->getCategories(); + } + + if (count($categoryCollection) == 0) { + $categoryCollection = $this->getExtension('Atom')->getCategories(); + } + + $this->_data['categories'] = $categoryCollection; + + return $this->_data['categories']; + } + + /** + * Read all entries to the internal entries array + * + */ + protected function _indexEntries() + { + $entries = array(); + + if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) { + $entries = $this->_xpath->evaluate('//item'); + } else { + $entries = $this->_xpath->evaluate('//rss:item'); + } + + foreach($entries as $index=>$entry) { + $this->_entries[$index] = $entry; + } + } + + /** + * Register the default namespaces for the current feed format + * + */ + protected function _registerNamespaces() + { + switch ($this->_data['type']) { + case Zend_Feed_Reader::TYPE_RSS_10: + $this->_xpath->registerNamespace('rdf', Zend_Feed_Reader::NAMESPACE_RDF); + $this->_xpath->registerNamespace('rss', Zend_Feed_Reader::NAMESPACE_RSS_10); + break; + + case Zend_Feed_Reader::TYPE_RSS_090: + $this->_xpath->registerNamespace('rdf', Zend_Feed_Reader::NAMESPACE_RDF); + $this->_xpath->registerNamespace('rss', Zend_Feed_Reader::NAMESPACE_RSS_090); + break; + } + } +} diff --git a/library/vendor/Zend/Feed/Reader/FeedAbstract.php b/library/vendor/Zend/Feed/Reader/FeedAbstract.php new file mode 100644 index 000000000..353e2c755 --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/FeedAbstract.php @@ -0,0 +1,318 @@ +_domDocument = $domDocument; + $this->_xpath = new DOMXPath($this->_domDocument); + + if ($type !== null) { + $this->_data['type'] = $type; + } else { + $this->_data['type'] = Zend_Feed_Reader::detectType($this->_domDocument); + } + $this->_registerNamespaces(); + $this->_indexEntries(); + $this->_loadExtensions(); + } + + /** + * Set an original source URI for the feed being parsed. This value + * is returned from getFeedLink() method if the feed does not carry + * a self-referencing URI. + * + * @param string $uri + */ + public function setOriginalSourceUri($uri) + { + $this->_originalSourceUri = $uri; + } + + /** + * Get an original source URI for the feed being parsed. Returns null if + * unset or the feed was not imported from a URI. + * + * @return string|null + */ + public function getOriginalSourceUri() + { + return $this->_originalSourceUri; + } + + /** + * Get the number of feed entries. + * Required by the Iterator interface. + * + * @return int + */ + public function count() + { + return count($this->_entries); + } + + /** + * Return the current entry + * + * @return Zend_Feed_Reader_EntryInterface + */ + public function current() + { + if (substr($this->getType(), 0, 3) == 'rss') { + $reader = new Zend_Feed_Reader_Entry_Rss($this->_entries[$this->key()], $this->key(), $this->getType()); + } else { + $reader = new Zend_Feed_Reader_Entry_Atom($this->_entries[$this->key()], $this->key(), $this->getType()); + } + + $reader->setXpath($this->_xpath); + + return $reader; + } + + /** + * Get the DOM + * + * @return DOMDocument + */ + public function getDomDocument() + { + return $this->_domDocument; + } + + /** + * Get the Feed's encoding + * + * @return string + */ + public function getEncoding() + { + $assumed = $this->getDomDocument()->encoding; + if (empty($assumed)) { + $assumed = 'UTF-8'; + } + return $assumed; + } + + /** + * Get feed as xml + * + * @return string + */ + public function saveXml() + { + return $this->getDomDocument()->saveXml(); + } + + /** + * Get the DOMElement representing the items/feed element + * + * @return DOMElement + */ + public function getElement() + { + return $this->getDomDocument()->documentElement; + } + + /** + * Get the DOMXPath object for this feed + * + * @return DOMXPath + */ + public function getXpath() + { + return $this->_xpath; + } + + /** + * Get the feed type + * + * @return string + */ + public function getType() + { + return $this->_data['type']; + } + + /** + * Return the current feed key + * + * @return unknown + */ + public function key() + { + return $this->_entriesKey; + } + + /** + * Move the feed pointer forward + * + */ + public function next() + { + ++$this->_entriesKey; + } + + /** + * Reset the pointer in the feed object + * + */ + public function rewind() + { + $this->_entriesKey = 0; + } + + /** + * Check to see if the iterator is still valid + * + * @return boolean + */ + public function valid() + { + return 0 <= $this->_entriesKey && $this->_entriesKey < $this->count(); + } + + public function getExtensions() + { + return $this->_extensions; + } + + public function __call($method, $args) + { + foreach ($this->_extensions as $extension) { + if (method_exists($extension, $method)) { + return call_user_func_array(array($extension, $method), $args); + } + } + throw new Zend_Feed_Exception('Method: ' . $method + . 'does not exist and could not be located on a registered Extension'); + } + + /** + * Return an Extension object with the matching name (postfixed with _Feed) + * + * @param string $name + * @return Zend_Feed_Reader_Extension_FeedAbstract + */ + public function getExtension($name) + { + if (array_key_exists($name . '_Feed', $this->_extensions)) { + return $this->_extensions[$name . '_Feed']; + } + return null; + } + + protected function _loadExtensions() + { + $all = Zend_Feed_Reader::getExtensions(); + $feed = $all['feed']; + foreach ($feed as $extension) { + if (in_array($extension, $all['core'])) { + continue; + } + $className = Zend_Feed_Reader::getPluginLoader()->getClassName($extension); + $this->_extensions[$extension] = new $className( + $this->getDomDocument(), $this->_data['type'], $this->_xpath + ); + } + } + + /** + * Read all entries to the internal entries array + * + */ + abstract protected function _indexEntries(); + + /** + * Register the default namespaces for the current feed format + * + */ + abstract protected function _registerNamespaces(); +} diff --git a/library/vendor/Zend/Feed/Reader/FeedInterface.php b/library/vendor/Zend/Feed/Reader/FeedInterface.php new file mode 100644 index 000000000..be65c725f --- /dev/null +++ b/library/vendor/Zend/Feed/Reader/FeedInterface.php @@ -0,0 +1,122 @@ +getAttribute('rel')) !== 'alternate' + || !$link->getAttribute('type') || !$link->getAttribute('href')) { + continue; + } + if (!isset($this->rss) && $link->getAttribute('type') == 'application/rss+xml') { + $this->rss = $this->_absolutiseUri(trim($link->getAttribute('href')), $uri); + } elseif(!isset($this->atom) && $link->getAttribute('type') == 'application/atom+xml') { + $this->atom = $this->_absolutiseUri(trim($link->getAttribute('href')), $uri); + } elseif(!isset($this->rdf) && $link->getAttribute('type') == 'application/rdf+xml') { + $this->rdf = $this->_absolutiseUri(trim($link->getAttribute('href')), $uri); + } + $this[] = new self(array( + 'rel' => 'alternate', + 'type' => $link->getAttribute('type'), + 'href' => $this->_absolutiseUri(trim($link->getAttribute('href')), $uri), + )); + } + } + + /** + * Attempt to turn a relative URI into an absolute URI + */ + protected function _absolutiseUri($link, $uri = null) + { + if (!Zend_Uri::check($link)) { + if ($uri !== null) { + $uri = Zend_Uri::factory($uri); + + if ($link[0] !== '/') { + $link = $uri->getPath() . '/' . $link; + } + + $link = $uri->getScheme() . '://' . $uri->getHost() . '/' . $this->_canonicalizePath($link); + if (!Zend_Uri::check($link)) { + $link = null; + } + } + } + return $link; + } + + /** + * Canonicalize relative path + */ + protected function _canonicalizePath($path) + { + $parts = array_filter(explode('/', $path)); + $absolutes = array(); + foreach ($parts as $part) { + if ('.' == $part) { + continue; + } + if ('..' == $part) { + array_pop($absolutes); + } else { + $absolutes[] = $part; + } + } + return implode('/', $absolutes); + } + + /** + * Supports lazy loading of feeds using Zend_Feed_Reader::import() but + * delegates any other operations to the parent class. + * + * @param string $offset + * @return mixed + * @uses Zend_Feed_Reader + */ + public function offsetGet($offset) + { + if ($offset == 'feed' && !$this->offsetExists('feed')) { + if (!$this->offsetExists('href')) { + return null; + } + $feed = Zend_Feed_Reader::import($this->offsetGet('href')); + $this->offsetSet('feed', $feed); + return $feed; + } + return parent::offsetGet($offset); + } + +} diff --git a/library/vendor/Zend/Feed/Rss.php b/library/vendor/Zend/Feed/Rss.php new file mode 100644 index 000000000..149aaffc7 --- /dev/null +++ b/library/vendor/Zend/Feed/Rss.php @@ -0,0 +1,526 @@ +s). + * + * @var string + */ + protected $_entryElementName = 'item'; + + /** + * The default namespace for RSS channels. + * + * @var string + */ + protected $_defaultNamespace = 'rss'; + + /** + * Override Zend_Feed_Abstract to set up the $_element and $_entries aliases. + * + * @return void + * @throws Zend_Feed_Exception + */ + public function __wakeup() + { + parent::__wakeup(); + + // Find the base channel element and create an alias to it. + $rdfTags = $this->_element->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'RDF'); + if ($rdfTags->length != 0) { + $this->_element = $rdfTags->item(0); + } else { + $this->_element = $this->_element->getElementsByTagName('channel')->item(0); + } + if (!$this->_element) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('No root element found, cannot parse channel.'); + } + + // Find the entries and save a pointer to them for speed and + // simplicity. + $this->_buildEntryCache(); + } + + + /** + * Make accessing some individual elements of the channel easier. + * + * Special accessors 'item' and 'items' are provided so that if + * you wish to iterate over an RSS channel's items, you can do so + * using foreach ($channel->items as $item) or foreach + * ($channel->item as $item). + * + * @param string $var The property to access. + * @return mixed + */ + public function __get($var) + { + switch ($var) { + case 'item': + // fall through to the next case + case 'items': + return $this; + + default: + return parent::__get($var); + } + } + + /** + * Generate the header of the feed when working in write mode + * + * @param array $array the data to use + * @return DOMElement root node + */ + protected function _mapFeedHeaders($array) + { + $channel = $this->_element->createElement('channel'); + + $title = $this->_element->createElement('title'); + $title->appendChild($this->_element->createCDATASection($array->title)); + $channel->appendChild($title); + + $link = $this->_element->createElement('link', $array->link); + $channel->appendChild($link); + + $desc = isset($array->description) ? $array->description : ''; + $description = $this->_element->createElement('description'); + $description->appendChild($this->_element->createCDATASection($desc)); + $channel->appendChild($description); + + $pubdate = isset($array->lastUpdate) ? $array->lastUpdate : time(); + $pubdate = $this->_element->createElement('pubDate', date(DATE_RSS, $pubdate)); + $channel->appendChild($pubdate); + + if (isset($array->published)) { + $lastBuildDate = $this->_element->createElement('lastBuildDate', date(DATE_RSS, $array->published)); + $channel->appendChild($lastBuildDate); + } + + $editor = ''; + if (!empty($array->email)) { + $editor .= $array->email; + } + if (!empty($array->author)) { + $editor .= ' (' . $array->author . ')'; + } + if (!empty($editor)) { + $author = $this->_element->createElement('managingEditor', ltrim($editor)); + $channel->appendChild($author); + } + if (isset($array->webmaster)) { + $channel->appendChild($this->_element->createElement('webMaster', $array->webmaster)); + } + + if (!empty($array->copyright)) { + $copyright = $this->_element->createElement('copyright', $array->copyright); + $channel->appendChild($copyright); + } + + if (isset($array->category)) { + $category = $this->_element->createElement('category', $array->category); + $channel->appendChild($category); + } + + if (!empty($array->image)) { + $image = $this->_element->createElement('image'); + $url = $this->_element->createElement('url', $array->image); + $image->appendChild($url); + $imagetitle = $this->_element->createElement('title'); + $imagetitle->appendChild($this->_element->createCDATASection($array->title)); + $image->appendChild($imagetitle); + $imagelink = $this->_element->createElement('link', $array->link); + $image->appendChild($imagelink); + + $channel->appendChild($image); + } + + $generator = !empty($array->generator) ? $array->generator : 'Zend_Feed'; + $generator = $this->_element->createElement('generator', $generator); + $channel->appendChild($generator); + + if (!empty($array->language)) { + $language = $this->_element->createElement('language', $array->language); + $channel->appendChild($language); + } + + $doc = $this->_element->createElement('docs', 'http://blogs.law.harvard.edu/tech/rss'); + $channel->appendChild($doc); + + if (isset($array->cloud)) { + $cloud = $this->_element->createElement('cloud'); + $cloud->setAttribute('domain', $array->cloud['uri']->getHost()); + $cloud->setAttribute('port', $array->cloud['uri']->getPort()); + $cloud->setAttribute('path', $array->cloud['uri']->getPath()); + $cloud->setAttribute('registerProcedure', $array->cloud['procedure']); + $cloud->setAttribute('protocol', $array->cloud['protocol']); + $channel->appendChild($cloud); + } + + if (isset($array->ttl)) { + $ttl = $this->_element->createElement('ttl', $array->ttl); + $channel->appendChild($ttl); + } + + if (isset($array->rating)) { + $rating = $this->_element->createElement('rating', $array->rating); + $channel->appendChild($rating); + } + + if (isset($array->textInput)) { + $textinput = $this->_element->createElement('textInput'); + $textinput->appendChild($this->_element->createElement('title', $array->textInput['title'])); + $textinput->appendChild($this->_element->createElement('description', $array->textInput['description'])); + $textinput->appendChild($this->_element->createElement('name', $array->textInput['name'])); + $textinput->appendChild($this->_element->createElement('link', $array->textInput['link'])); + $channel->appendChild($textinput); + } + + if (isset($array->skipHours)) { + $skipHours = $this->_element->createElement('skipHours'); + foreach ($array->skipHours as $hour) { + $skipHours->appendChild($this->_element->createElement('hour', $hour)); + } + $channel->appendChild($skipHours); + } + + if (isset($array->skipDays)) { + $skipDays = $this->_element->createElement('skipDays'); + foreach ($array->skipDays as $day) { + $skipDays->appendChild($this->_element->createElement('day', $day)); + } + $channel->appendChild($skipDays); + } + + if (isset($array->itunes)) { + $this->_buildiTunes($channel, $array); + } + + return $channel; + } + + /** + * Adds the iTunes extensions to a root node + * + * @param DOMElement $root + * @param array $array + * @return void + */ + private function _buildiTunes(DOMElement $root, $array) + { + /* author node */ + $author = ''; + if (isset($array->itunes->author)) { + $author = $array->itunes->author; + } elseif (isset($array->author)) { + $author = $array->author; + } + if (!empty($author)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:author', $author); + $root->appendChild($node); + } + + /* owner node */ + $author = ''; + $email = ''; + if (isset($array->itunes->owner)) { + if (isset($array->itunes->owner['name'])) { + $author = $array->itunes->owner['name']; + } + if (isset($array->itunes->owner['email'])) { + $email = $array->itunes->owner['email']; + } + } + if (empty($author) && isset($array->author)) { + $author = $array->author; + } + if (empty($email) && isset($array->email)) { + $email = $array->email; + } + if (!empty($author) || !empty($email)) { + $owner = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:owner'); + if (!empty($author)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:name', $author); + $owner->appendChild($node); + } + if (!empty($email)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:email', $email); + $owner->appendChild($node); + } + $root->appendChild($owner); + } + $image = ''; + if (isset($array->itunes->image)) { + $image = $array->itunes->image; + } elseif (isset($array->image)) { + $image = $array->image; + } + if (!empty($image)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:image'); + $node->setAttribute('href', $image); + $root->appendChild($node); + } + $subtitle = ''; + if (isset($array->itunes->subtitle)) { + $subtitle = $array->itunes->subtitle; + } elseif (isset($array->description)) { + $subtitle = $array->description; + } + if (!empty($subtitle)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:subtitle', $subtitle); + $root->appendChild($node); + } + $summary = ''; + if (isset($array->itunes->summary)) { + $summary = $array->itunes->summary; + } elseif (isset($array->description)) { + $summary = $array->description; + } + if (!empty($summary)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:summary', $summary); + $root->appendChild($node); + } + if (isset($array->itunes->block)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:block', $array->itunes->block); + $root->appendChild($node); + } + if (isset($array->itunes->explicit)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:explicit', $array->itunes->explicit); + $root->appendChild($node); + } + if (isset($array->itunes->keywords)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:keywords', $array->itunes->keywords); + $root->appendChild($node); + } + if (isset($array->itunes->new_feed_url)) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:new-feed-url', $array->itunes->new_feed_url); + $root->appendChild($node); + } + if (isset($array->itunes->category)) { + foreach ($array->itunes->category as $i => $category) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:category'); + $node->setAttribute('text', $category['main']); + $root->appendChild($node); + $add_end_category = false; + if (!empty($category['sub'])) { + $add_end_category = true; + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:category'); + $node->setAttribute('text', $category['sub']); + $root->appendChild($node); + } + if ($i > 0 || $add_end_category) { + $node = $this->_element->createElementNS('http://www.itunes.com/DTDs/Podcast-1.0.dtd', 'itunes:category'); + $root->appendChild($node); + } + } + } + } + + /** + * Generate the entries of the feed when working in write mode + * + * The following nodes are constructed for each feed entry + * + * entry title + * url to feed entry + * url to feed entry + * short text + * long version, can contain html + * + * + * @param DOMElement $root the root node to use + * @param array $array the data to use + * @return void + */ + protected function _mapFeedEntries(DOMElement $root, $array) + { + Zend_Feed::registerNamespace('content', 'http://purl.org/rss/1.0/modules/content/'); + + foreach ($array as $dataentry) { + $item = $this->_element->createElement('item'); + + $title = $this->_element->createElement('title'); + $title->appendChild($this->_element->createCDATASection($dataentry->title)); + $item->appendChild($title); + + if (isset($dataentry->author)) { + $author = $this->_element->createElement('author', $dataentry->author); + $item->appendChild($author); + } + + $link = $this->_element->createElement('link', $dataentry->link); + $item->appendChild($link); + + if (isset($dataentry->guid)) { + $guid = $this->_element->createElement('guid', $dataentry->guid); + if (!Zend_Uri::check($dataentry->guid)) { + $guid->setAttribute('isPermaLink', 'false'); + } + $item->appendChild($guid); + } + + $description = $this->_element->createElement('description'); + $description->appendChild($this->_element->createCDATASection($dataentry->description)); + $item->appendChild($description); + + if (isset($dataentry->content)) { + $content = $this->_element->createElement('content:encoded'); + $content->appendChild($this->_element->createCDATASection($dataentry->content)); + $item->appendChild($content); + } + + $pubdate = isset($dataentry->lastUpdate) ? $dataentry->lastUpdate : time(); + $pubdate = $this->_element->createElement('pubDate', date(DATE_RSS, $pubdate)); + $item->appendChild($pubdate); + + if (isset($dataentry->category)) { + foreach ($dataentry->category as $category) { + $node = $this->_element->createElement('category'); + $node->appendChild($this->_element->createCDATASection($category['term'])); + if (isset($category['scheme'])) { + $node->setAttribute('domain', $category['scheme']); + } + $item->appendChild($node); + } + } + + if (isset($dataentry->source)) { + $source = $this->_element->createElement('source', $dataentry->source['title']); + $source->setAttribute('url', $dataentry->source['url']); + $item->appendChild($source); + } + + if (isset($dataentry->comments)) { + $comments = $this->_element->createElement('comments', $dataentry->comments); + $item->appendChild($comments); + } + if (isset($dataentry->commentRss)) { + $comments = $this->_element->createElementNS('http://wellformedweb.org/CommentAPI/', + 'wfw:commentRss', + $dataentry->commentRss); + $item->appendChild($comments); + } + + + if (isset($dataentry->enclosure)) { + foreach ($dataentry->enclosure as $enclosure) { + $node = $this->_element->createElement('enclosure'); + $node->setAttribute('url', $enclosure['url']); + if (isset($enclosure['type'])) { + $node->setAttribute('type', $enclosure['type']); + } + if (isset($enclosure['length'])) { + $node->setAttribute('length', $enclosure['length']); + } + $item->appendChild($node); + } + } + + $root->appendChild($item); + } + } + + /** + * Override Zend_Feed_Element to include root node + * + * @return string + */ + public function saveXml() + { + // Return a complete document including XML prologue. + $doc = new DOMDocument($this->_element->ownerDocument->version, + $this->_element->ownerDocument->actualEncoding); + $root = $doc->createElement('rss'); + + // Use rss version 2.0 + $root->setAttribute('version', '2.0'); + + // Content namespace + $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:content', 'http://purl.org/rss/1.0/modules/content/'); + $root->appendChild($doc->importNode($this->_element, true)); + + // Append root node + $doc->appendChild($root); + + // Format output + $doc->formatOutput = true; + + return $doc->saveXML(); + } + + /** + * Send feed to a http client with the correct header + * + * @return void + * @throws Zend_Feed_Exception if headers have already been sent + */ + public function send() + { + if (headers_sent()) { + /** + * @see Zend_Feed_Exception + */ + throw new Zend_Feed_Exception('Cannot send RSS because headers have already been sent.'); + } + + header('Content-Type: application/rss+xml; charset=' . $this->_element->ownerDocument->actualEncoding); + + echo $this->saveXml(); + } + +} diff --git a/library/vendor/Zend/Feed/Writer.php b/library/vendor/Zend/Feed/Writer.php new file mode 100644 index 000000000..2b9215e9f --- /dev/null +++ b/library/vendor/Zend/Feed/Writer.php @@ -0,0 +1,265 @@ + array(), + 'feed' => array(), + 'entryRenderer' => array(), + 'feedRenderer' => array(), + ); + + /** + * Set plugin loader for use with Extensions + * + * @param Zend_Loader_PluginLoader_Interface + */ + public static function setPluginLoader(Zend_Loader_PluginLoader_Interface $loader) + { + self::$_pluginLoader = $loader; + } + + /** + * Get plugin loader for use with Extensions + * + * @return Zend_Loader_PluginLoader_Interface + */ + public static function getPluginLoader() + { + if (!isset(self::$_pluginLoader)) { + self::$_pluginLoader = new Zend_Loader_PluginLoader(array( + 'Zend_Feed_Writer_Extension_' => 'Zend/Feed/Writer/Extension/', + )); + } + return self::$_pluginLoader; + } + + /** + * Add prefix path for loading Extensions + * + * @param string $prefix + * @param string $path + * @return void + */ + public static function addPrefixPath($prefix, $path) + { + $prefix = rtrim($prefix, '_'); + $path = rtrim($path, DIRECTORY_SEPARATOR); + self::getPluginLoader()->addPrefixPath($prefix, $path); + } + + /** + * Add multiple Extension prefix paths at once + * + * @param array $spec + * @return void + */ + public static function addPrefixPaths(array $spec) + { + if (isset($spec['prefix']) && isset($spec['path'])) { + self::addPrefixPath($spec['prefix'], $spec['path']); + } + foreach ($spec as $prefixPath) { + if (isset($prefixPath['prefix']) && isset($prefixPath['path'])) { + self::addPrefixPath($prefixPath['prefix'], $prefixPath['path']); + } + } + } + + /** + * Register an Extension by name + * + * @param string $name + * @return void + * @throws Zend_Feed_Exception if unable to resolve Extension class + */ + public static function registerExtension($name) + { + $feedName = $name . '_Feed'; + $entryName = $name . '_Entry'; + $feedRendererName = $name . '_Renderer_Feed'; + $entryRendererName = $name . '_Renderer_Entry'; + if (self::isRegistered($name)) { + if (self::getPluginLoader()->isLoaded($feedName) + || self::getPluginLoader()->isLoaded($entryName) + || self::getPluginLoader()->isLoaded($feedRendererName) + || self::getPluginLoader()->isLoaded($entryRendererName) + ) { + return; + } + } + try { + self::getPluginLoader()->load($feedName); + self::$_extensions['feed'][] = $feedName; + } catch (Zend_Loader_PluginLoader_Exception $e) { + } + try { + self::getPluginLoader()->load($entryName); + self::$_extensions['entry'][] = $entryName; + } catch (Zend_Loader_PluginLoader_Exception $e) { + } + try { + self::getPluginLoader()->load($feedRendererName); + self::$_extensions['feedRenderer'][] = $feedRendererName; + } catch (Zend_Loader_PluginLoader_Exception $e) { + } + try { + self::getPluginLoader()->load($entryRendererName); + self::$_extensions['entryRenderer'][] = $entryRendererName; + } catch (Zend_Loader_PluginLoader_Exception $e) { + } + if (!self::getPluginLoader()->isLoaded($feedName) + && !self::getPluginLoader()->isLoaded($entryName) + && !self::getPluginLoader()->isLoaded($feedRendererName) + && !self::getPluginLoader()->isLoaded($entryRendererName) + ) { + throw new Zend_Feed_Exception('Could not load extension: ' . $name + . 'using Plugin Loader. Check prefix paths are configured and extension exists.'); + } + } + + /** + * Is a given named Extension registered? + * + * @param string $extensionName + * @return boolean + */ + public static function isRegistered($extensionName) + { + $feedName = $extensionName . '_Feed'; + $entryName = $extensionName . '_Entry'; + $feedRendererName = $extensionName . '_Renderer_Feed'; + $entryRendererName = $extensionName . '_Renderer_Entry'; + if (in_array($feedName, self::$_extensions['feed']) + || in_array($entryName, self::$_extensions['entry']) + || in_array($feedRendererName, self::$_extensions['feedRenderer']) + || in_array($entryRendererName, self::$_extensions['entryRenderer']) + ) { + return true; + } + return false; + } + + /** + * Get a list of extensions + * + * @return array + */ + public static function getExtensions() + { + return self::$_extensions; + } + + /** + * Reset class state to defaults + * + * @return void + */ + public static function reset() + { + self::$_pluginLoader = null; + self::$_prefixPaths = array(); + self::$_extensions = array( + 'entry' => array(), + 'feed' => array(), + 'entryRenderer' => array(), + 'feedRenderer' => array(), + ); + } + + /** + * Register core (default) extensions + * + * @return void + */ + public static function registerCoreExtensions() + { + self::registerExtension('DublinCore'); + self::registerExtension('Content'); + self::registerExtension('Atom'); + self::registerExtension('Slash'); + self::registerExtension('WellFormedWeb'); + self::registerExtension('Threading'); + self::registerExtension('ITunes'); + } + + public static function lcfirst($str) + { + $str[0] = strtolower($str[0]); + return $str; + } + +} diff --git a/library/vendor/Zend/Feed/Writer/Deleted.php b/library/vendor/Zend/Feed/Writer/Deleted.php new file mode 100644 index 000000000..0302bed16 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Deleted.php @@ -0,0 +1,195 @@ +_data['encoding'] = $encoding; + } + + /** + * Get the feed character encoding + * + * @return string|null + */ + public function getEncoding() + { + if (!array_key_exists('encoding', $this->_data)) { + return 'UTF-8'; + } + return $this->_data['encoding']; + } + + /** + * Unset a specific data point + * + * @param string $name + */ + public function remove($name) + { + if (isset($this->_data[$name])) { + unset($this->_data[$name]); + } + } + + /** + * Set the current feed type being exported to "rss" or "atom". This allows + * other objects to gracefully choose whether to execute or not, depending + * on their appropriateness for the current type, e.g. renderers. + * + * @param string $type + */ + public function setType($type) + { + $this->_type = $type; + } + + /** + * Retrieve the current or last feed type exported. + * + * @return string Value will be "rss" or "atom" + */ + public function getType() + { + return $this->_type; + } + + public function setReference($reference) + { + if (empty($reference) || !is_string($reference)) { + throw new Zend_Feed_Exception('Invalid parameter: reference must be a non-empty string'); + } + $this->_data['reference'] = $reference; + } + + public function getReference() + { + if (!array_key_exists('reference', $this->_data)) { + return null; + } + return $this->_data['reference']; + } + + public function setWhen($date = null) + { + $zdate = null; + if ($date === null) { + $zdate = new Zend_Date; + } elseif ($date instanceof Zend_Date) { + $zdate = $date; + } elseif (ctype_digit((string)$date)) { + $zdate = new Zend_Date($date, Zend_Date::TIMESTAMP); + } else { + throw new Zend_Feed_Exception('Invalid Zend_Date object or UNIX Timestamp passed as parameter'); + } + $this->_data['when'] = $zdate; + } + + public function getWhen() + { + if (!array_key_exists('when', $this->_data)) { + return null; + } + return $this->_data['when']; + } + + public function setBy(array $by) + { + $author = array(); + if (!array_key_exists('name', $by) + || empty($by['name']) + || !is_string($by['name']) + ) { + throw new Zend_Feed_Exception('Invalid parameter: author array must include a "name" key with a non-empty string value'); + } + $author['name'] = $by['name']; + if (isset($by['email'])) { + if (empty($by['email']) || !is_string($by['email'])) { + throw new Zend_Feed_Exception('Invalid parameter: "email" array value must be a non-empty string'); + } + $author['email'] = $by['email']; + } + if (isset($by['uri'])) { + if (empty($by['uri']) + || !is_string($by['uri']) + || !Zend_Uri::check($by['uri']) + ) { + throw new Zend_Feed_Exception('Invalid parameter: "uri" array value must be a non-empty string and valid URI/IRI'); + } + $author['uri'] = $by['uri']; + } + $this->_data['by'] = $author; + } + + public function getBy() + { + if (!array_key_exists('by', $this->_data)) { + return null; + } + return $this->_data['by']; + } + + public function setComment($comment) + { + $this->_data['comment'] = $comment; + } + + public function getComment() + { + if (!array_key_exists('comment', $this->_data)) { + return null; + } + return $this->_data['comment']; + } + +} diff --git a/library/vendor/Zend/Feed/Writer/Entry.php b/library/vendor/Zend/Feed/Writer/Entry.php new file mode 100644 index 000000000..fd8cb4e9f --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Entry.php @@ -0,0 +1,734 @@ +_loadExtensions(); + } + + /** + * Set a single author + * + * @param int $index + * @return string|null + */ + public function addAuthor($name, $email = null, $uri = null) + { + $author = array(); + if (is_array($name)) { + if (!array_key_exists('name', $name) + || empty($name['name']) + || !is_string($name['name']) + ) { + throw new Zend_Feed_Exception('Invalid parameter: author array must include a "name" key with a non-empty string value'); + } + $author['name'] = $name['name']; + if (isset($name['email'])) { + if (empty($name['email']) || !is_string($name['email'])) { + throw new Zend_Feed_Exception('Invalid parameter: "email" array value must be a non-empty string'); + } + $author['email'] = $name['email']; + } + if (isset($name['uri'])) { + if (empty($name['uri']) + || !is_string($name['uri']) + || !Zend_Uri::check($name['uri']) + ) { + throw new Zend_Feed_Exception('Invalid parameter: "uri" array value must be a non-empty string and valid URI/IRI'); + } + $author['uri'] = $name['uri']; + } + /** + * @deprecated + * Array notation (above) is preferred and will be the sole supported input from ZF 2.0 + */ + } else { + if (empty($name) || !is_string($name)) { + throw new Zend_Feed_Exception('Invalid parameter: "name" must be a non-empty string value'); + } + $author['name'] = $name; + if (isset($email)) { + if (empty($email) || !is_string($email)) { + throw new Zend_Feed_Exception('Invalid parameter: "email" value must be a non-empty string'); + } + $author['email'] = $email; + } + if (isset($uri)) { + if (empty($uri) || !is_string($uri) || !Zend_Uri::check($uri)) { + throw new Zend_Feed_Exception('Invalid parameter: "uri" value must be a non-empty string and valid URI/IRI'); + } + $author['uri'] = $uri; + } + } + $this->_data['authors'][] = $author; + } + + /** + * Set an array with feed authors + * + * @return array + */ + public function addAuthors(array $authors) + { + foreach($authors as $author) { + $this->addAuthor($author); + } + } + + /** + * Set the feed character encoding + * + * @return string|null + */ + public function setEncoding($encoding) + { + if (empty($encoding) || !is_string($encoding)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['encoding'] = $encoding; + } + + /** + * Get the feed character encoding + * + * @return string|null + */ + public function getEncoding() + { + if (!array_key_exists('encoding', $this->_data)) { + return 'UTF-8'; + } + return $this->_data['encoding']; + } + + /** + * Set the copyright entry + * + * @return string|null + */ + public function setCopyright($copyright) + { + if (empty($copyright) || !is_string($copyright)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['copyright'] = $copyright; + } + + /** + * Set the entry's content + * + * @return string|null + */ + public function setContent($content) + { + if (empty($content) || !is_string($content)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['content'] = $content; + } + + /** + * Set the feed creation date + * + * @return string|null + */ + public function setDateCreated($date = null) + { + $zdate = null; + if ($date === null) { + $zdate = new Zend_Date; + } elseif ($date instanceof Zend_Date) { + $zdate = $date; + } elseif (ctype_digit((string)$date)) { + $zdate = new Zend_Date($date, Zend_Date::TIMESTAMP); + } else { + throw new Zend_Feed_Exception('Invalid Zend_Date object or UNIX Timestamp passed as parameter'); + } + $this->_data['dateCreated'] = $zdate; + } + + /** + * Set the feed modification date + * + * @return string|null + */ + public function setDateModified($date = null) + { + $zdate = null; + if ($date === null) { + $zdate = new Zend_Date; + } elseif ($date instanceof Zend_Date) { + $zdate = $date; + } elseif (ctype_digit((string)$date)) { + $zdate = new Zend_Date($date, Zend_Date::TIMESTAMP); + } else { + throw new Zend_Feed_Exception('Invalid Zend_Date object or UNIX Timestamp passed as parameter'); + } + $this->_data['dateModified'] = $zdate; + } + + /** + * Set the feed description + * + * @return string|null + */ + public function setDescription($description) + { + if (empty($description) || !is_string($description)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['description'] = $description; + } + + /** + * Set the feed ID + * + * @return string|null + */ + public function setId($id) + { + if (empty($id) || !is_string($id)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['id'] = $id; + } + + /** + * Set a link to the HTML source of this entry + * + * @return string|null + */ + public function setLink($link) + { + if (empty($link) || !is_string($link) || !Zend_Uri::check($link)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string and valid URI/IRI'); + } + $this->_data['link'] = $link; + } + + /** + * Set the number of comments associated with this entry + * + * @return string|null + */ + public function setCommentCount($count) + { + if ( !is_numeric($count) || (int) $count < 0) { + throw new Zend_Feed_Exception('Invalid parameter: "count" must be a non-empty integer number'); + } + $this->_data['commentCount'] = (int) $count; + } + + /** + * Set a link to a HTML page containing comments associated with this entry + * + * @return string|null + */ + public function setCommentLink($link) + { + if (empty($link) || !is_string($link) || !Zend_Uri::check($link)) { + throw new Zend_Feed_Exception('Invalid parameter: "link" must be a non-empty string and valid URI/IRI'); + } + $this->_data['commentLink'] = $link; + } + + /** + * Set a link to an XML feed for any comments associated with this entry + * + * @return string|null + */ + public function setCommentFeedLink(array $link) + { + if (!isset($link['uri']) || !is_string($link['uri']) || !Zend_Uri::check($link['uri'])) { + throw new Zend_Feed_Exception('Invalid parameter: "link" must be a non-empty string and valid URI/IRI'); + } + if (!isset($link['type']) || !in_array($link['type'], array('atom', 'rss', 'rdf'))) { + throw new Zend_Feed_Exception('Invalid parameter: "type" must be one' + . ' of "atom", "rss" or "rdf"'); + } + if (!isset($this->_data['commentFeedLinks'])) { + $this->_data['commentFeedLinks'] = array(); + } + $this->_data['commentFeedLinks'][] = $link; + } + + /** + * Set a links to an XML feed for any comments associated with this entry. + * Each link is an array with keys "uri" and "type", where type is one of: + * "atom", "rss" or "rdf". + * + * @return string|null + */ + public function setCommentFeedLinks(array $links) + { + foreach ($links as $link) { + $this->setCommentFeedLink($link); + } + } + + /** + * Set the feed title + * + * @return string|null + */ + public function setTitle($title) + { + if (empty($title) || !is_string($title)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['title'] = $title; + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (!array_key_exists('authors', $this->_data)) { + return null; + } + return $this->_data['authors']; + } + + /** + * Get the entry content + * + * @return string + */ + public function getContent() + { + if (!array_key_exists('content', $this->_data)) { + return null; + } + return $this->_data['content']; + } + + /** + * Get the entry copyright information + * + * @return string + */ + public function getCopyright() + { + if (!array_key_exists('copyright', $this->_data)) { + return null; + } + return $this->_data['copyright']; + } + + /** + * Get the entry creation date + * + * @return string + */ + public function getDateCreated() + { + if (!array_key_exists('dateCreated', $this->_data)) { + return null; + } + return $this->_data['dateCreated']; + } + + /** + * Get the entry modification date + * + * @return string + */ + public function getDateModified() + { + if (!array_key_exists('dateModified', $this->_data)) { + return null; + } + return $this->_data['dateModified']; + } + + /** + * Get the entry description + * + * @return string + */ + public function getDescription() + { + if (!array_key_exists('description', $this->_data)) { + return null; + } + return $this->_data['description']; + } + + /** + * Get the entry ID + * + * @return string + */ + public function getId() + { + if (!array_key_exists('id', $this->_data)) { + return null; + } + return $this->_data['id']; + } + + /** + * Get a link to the HTML source + * + * @return string|null + */ + public function getLink() + { + if (!array_key_exists('link', $this->_data)) { + return null; + } + return $this->_data['link']; + } + + + /** + * Get all links + * + * @return array + */ + public function getLinks() + { + if (!array_key_exists('links', $this->_data)) { + return null; + } + return $this->_data['links']; + } + + /** + * Get the entry title + * + * @return string + */ + public function getTitle() + { + if (!array_key_exists('title', $this->_data)) { + return null; + } + return $this->_data['title']; + } + + /** + * Get the number of comments/replies for current entry + * + * @return integer + */ + public function getCommentCount() + { + if (!array_key_exists('commentCount', $this->_data)) { + return null; + } + return $this->_data['commentCount']; + } + + /** + * Returns a URI pointing to the HTML page where comments can be made on this entry + * + * @return string + */ + public function getCommentLink() + { + if (!array_key_exists('commentLink', $this->_data)) { + return null; + } + return $this->_data['commentLink']; + } + + /** + * Returns an array of URIs pointing to a feed of all comments for this entry + * where the array keys indicate the feed type (atom, rss or rdf). + * + * @return string + */ + public function getCommentFeedLinks() + { + if (!array_key_exists('commentFeedLinks', $this->_data)) { + return null; + } + return $this->_data['commentFeedLinks']; + } + + /** + * Add a entry category + * + * @param string $category + */ + public function addCategory(array $category) + { + if (!isset($category['term'])) { + throw new Zend_Feed_Exception('Each category must be an array and ' + . 'contain at least a "term" element containing the machine ' + . ' readable category name'); + } + if (isset($category['scheme'])) { + if (empty($category['scheme']) + || !is_string($category['scheme']) + || !Zend_Uri::check($category['scheme']) + ) { + throw new Zend_Feed_Exception('The Atom scheme or RSS domain of' + . ' a category must be a valid URI'); + } + } + if (!isset($this->_data['categories'])) { + $this->_data['categories'] = array(); + } + $this->_data['categories'][] = $category; + } + + /** + * Set an array of entry categories + * + * @param array $categories + */ + public function addCategories(array $categories) + { + foreach ($categories as $category) { + $this->addCategory($category); + } + } + + /** + * Get the entry categories + * + * @return string|null + */ + public function getCategories() + { + if (!array_key_exists('categories', $this->_data)) { + return null; + } + return $this->_data['categories']; + } + + /** + * Adds an enclosure to the entry. The array parameter may contain the + * keys 'uri', 'type' and 'length'. Only 'uri' is required for Atom, though the + * others must also be provided or RSS rendering (where they are required) + * will throw an Exception. + * + * @param array $enclosures + */ + public function setEnclosure(array $enclosure) + { + if (!isset($enclosure['uri'])) { + throw new Zend_Feed_Exception('Enclosure "uri" is not set'); + } + if (!Zend_Uri::check($enclosure['uri'])) { + throw new Zend_Feed_Exception('Enclosure "uri" is not a valid URI/IRI'); + } + $this->_data['enclosure'] = $enclosure; + } + + /** + * Retrieve an array of all enclosures to be added to entry. + * + * @return array + */ + public function getEnclosure() + { + if (!array_key_exists('enclosure', $this->_data)) { + return null; + } + return $this->_data['enclosure']; + } + + /** + * Unset a specific data point + * + * @param string $name + */ + public function remove($name) + { + if (isset($this->_data[$name])) { + unset($this->_data[$name]); + } + } + + /** + * Get registered extensions + * + * @return array + */ + public function getExtensions() + { + return $this->_extensions; + } + + /** + * Return an Extension object with the matching name (postfixed with _Entry) + * + * @param string $name + * @return object + */ + public function getExtension($name) + { + if (array_key_exists($name . '_Entry', $this->_extensions)) { + return $this->_extensions[$name . '_Entry']; + } + return null; + } + + /** + * Set the current feed type being exported to "rss" or "atom". This allows + * other objects to gracefully choose whether to execute or not, depending + * on their appropriateness for the current type, e.g. renderers. + * + * @param string $type + */ + public function setType($type) + { + $this->_type = $type; + } + + /** + * Retrieve the current or last feed type exported. + * + * @return string Value will be "rss" or "atom" + */ + public function getType() + { + return $this->_type; + } + + /** + * Method overloading: call given method on first extension implementing it + * + * @param string $method + * @param array $args + * @return mixed + * @throws Zend_Feed_Exception if no extensions implements the method + */ + public function __call($method, $args) + { + foreach ($this->_extensions as $extension) { + try { + return call_user_func_array(array($extension, $method), $args); + } catch (Zend_Feed_Writer_Exception_InvalidMethodException $e) { + } + } + throw new Zend_Feed_Exception('Method: ' . $method + . ' does not exist and could not be located on a registered Extension'); + } + + /** + * Creates a new Zend_Feed_Writer_Source data container for use. This is NOT + * added to the current feed automatically, but is necessary to create a + * container with some initial values preset based on the current feed data. + * + * @return Zend_Feed_Writer_Source + */ + public function createSource() + { + $source = new Zend_Feed_Writer_Source; + if ($this->getEncoding()) { + $source->setEncoding($this->getEncoding()); + } + $source->setType($this->getType()); + return $source; + } + + /** + * Appends a Zend_Feed_Writer_Entry object representing a new entry/item + * the feed data container's internal group of entries. + * + * @param Zend_Feed_Writer_Source $source + */ + public function setSource(Zend_Feed_Writer_Source $source) + { + $this->_data['source'] = $source; + } + + /** + * @return Zend_Feed_Writer_Source + */ + public function getSource() + { + if (isset($this->_data['source'])) { + return $this->_data['source']; + } + return null; + } + + /** + * Load extensions from Zend_Feed_Writer + * + * @return void + */ + protected function _loadExtensions() + { + $all = Zend_Feed_Writer::getExtensions(); + $exts = $all['entry']; + foreach ($exts as $ext) { + $className = Zend_Feed_Writer::getPluginLoader()->getClassName($ext); + $this->_extensions[$ext] = new $className(); + $this->_extensions[$ext]->setEncoding($this->getEncoding()); + } + } +} diff --git a/library/vendor/Zend/Cloud/StorageService/Exception.php b/library/vendor/Zend/Feed/Writer/Exception/InvalidMethodException.php similarity index 64% rename from library/vendor/Zend/Cloud/StorageService/Exception.php rename to library/vendor/Zend/Feed/Writer/Exception/InvalidMethodException.php index e444cc0bb..bcbcf3ea1 100644 --- a/library/vendor/Zend/Cloud/StorageService/Exception.php +++ b/library/vendor/Zend/Feed/Writer/Exception/InvalidMethodException.php @@ -1,4 +1,5 @@ getType()) == 'atom') { + return; + } + $this->_setFeedLinks($this->_dom, $this->_base); + $this->_setHubs($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append namespaces to root element of feed + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:atom', + 'http://www.w3.org/2005/Atom'); + } + + /** + * Set feed link elements + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setFeedLinks(DOMDocument $dom, DOMElement $root) + { + $flinks = $this->getDataContainer()->getFeedLinks(); + if(!$flinks || empty($flinks)) { + return; + } + foreach ($flinks as $type => $href) { + $mime = 'application/' . strtolower($type) . '+xml'; + $flink = $dom->createElement('atom:link'); + $root->appendChild($flink); + $flink->setAttribute('rel', 'self'); + $flink->setAttribute('type', $mime); + $flink->setAttribute('href', $href); + } + $this->_called = true; + } + + /** + * Set PuSH hubs + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setHubs(DOMDocument $dom, DOMElement $root) + { + $hubs = $this->getDataContainer()->getHubs(); + if (!$hubs || empty($hubs)) { + return; + } + foreach ($hubs as $hubUrl) { + $hub = $dom->createElement('atom:link'); + $hub->setAttribute('rel', 'hub'); + $hub->setAttribute('href', $hubUrl); + $root->appendChild($hub); + } + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php b/library/vendor/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php new file mode 100644 index 000000000..89ab7cd10 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php @@ -0,0 +1,91 @@ +getType()) == 'atom') { + return; + } + $this->_setContent($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append namespaces to root element + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:content', + 'http://purl.org/rss/1.0/modules/content/'); + } + + /** + * Set entry content + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setContent(DOMDocument $dom, DOMElement $root) + { + $content = $this->getDataContainer()->getContent(); + if (!$content) { + return; + } + $element = $dom->createElement('content:encoded'); + $root->appendChild($element); + $cdata = $dom->createCDATASection($content); + $element->appendChild($cdata); + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php b/library/vendor/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php new file mode 100644 index 000000000..91e38df53 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php @@ -0,0 +1,95 @@ +getType()) == 'atom') { + return; + } + $this->_setAuthors($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append namespaces to entry + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:dc', + 'http://purl.org/dc/elements/1.1/'); + } + + /** + * Set entry author elements + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setAuthors(DOMDocument $dom, DOMElement $root) + { + $authors = $this->getDataContainer()->getAuthors(); + if (!$authors || empty($authors)) { + return; + } + foreach ($authors as $data) { + $author = $this->_dom->createElement('dc:creator'); + if (array_key_exists('name', $data)) { + $text = $dom->createTextNode($data['name']); + $author->appendChild($text); + $root->appendChild($author); + } + } + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php b/library/vendor/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php new file mode 100644 index 000000000..ac0a2b188 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php @@ -0,0 +1,95 @@ +getType()) == 'atom') { + return; + } + $this->_setAuthors($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append namespaces to feed element + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:dc', + 'http://purl.org/dc/elements/1.1/'); + } + + /** + * Set feed authors + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setAuthors(DOMDocument $dom, DOMElement $root) + { + $authors = $this->getDataContainer()->getAuthors(); + if (!$authors || empty($authors)) { + return; + } + foreach ($authors as $data) { + $author = $this->_dom->createElement('dc:creator'); + if (array_key_exists('name', $data)) { + $text = $dom->createTextNode($data['name']); + $author->appendChild($text); + $root->appendChild($author); + } + } + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/ITunes/Entry.php b/library/vendor/Zend/Feed/Writer/Extension/ITunes/Entry.php new file mode 100644 index 000000000..4c33393e5 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/ITunes/Entry.php @@ -0,0 +1,232 @@ +_encoding = $enc; + return $this; + } + + /** + * Get feed encoding + * + * @return string + */ + public function getEncoding() + { + return $this->_encoding; + } + + /** + * Set a block value of "yes" or "no". You may also set an empty string. + * + * @param string + * @return Zend_Feed_Writer_Extension_ITunes_Entry + */ + public function setItunesBlock($value) + { + if (!ctype_alpha($value) && strlen($value) > 0) { + throw new Zend_Feed_Exception('invalid parameter: "block" may only' + . ' contain alphabetic characters'); + } + if (iconv_strlen($value, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: "block" may only' + . ' contain a maximum of 255 characters'); + } + $this->_data['block'] = $value; + } + + /** + * Add authors to itunes entry + * + * @param array $values + * @return Zend_Feed_Writer_Extension_ITunes_Entry + */ + public function addItunesAuthors(array $values) + { + foreach ($values as $value) { + $this->addItunesAuthor($value); + } + return $this; + } + + /** + * Add author to itunes entry + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Entry + */ + public function addItunesAuthor($value) + { + if (iconv_strlen($value, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: any "author" may only' + . ' contain a maximum of 255 characters each'); + } + if (!isset($this->_data['authors'])) { + $this->_data['authors'] = array(); + } + $this->_data['authors'][] = $value; + return $this; + } + + /** + * Set duration + * + * @param int $value + * @return Zend_Feed_Writer_Extension_ITunes_Entry + */ + public function setItunesDuration($value) + { + $value = (string) $value; + if (!ctype_digit($value) + && !preg_match("/^\d+:[0-5]{1}[0-9]{1}$/", $value) + && !preg_match("/^\d+:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$/", $value) + ) { + throw new Zend_Feed_Exception('invalid parameter: "duration" may only' + . ' be of a specified [[HH:]MM:]SS format'); + } + $this->_data['duration'] = $value; + return $this; + } + + /** + * Set "explicit" flag + * + * @param bool $value + * @return Zend_Feed_Writer_Extension_ITunes_Entry + */ + public function setItunesExplicit($value) + { + if (!in_array($value, array('yes','no','clean'))) { + throw new Zend_Feed_Exception('invalid parameter: "explicit" may only' + . ' be one of "yes", "no" or "clean"'); + } + $this->_data['explicit'] = $value; + return $this; + } + + /** + * Set keywords + * + * @param array $value + * @return Zend_Feed_Writer_Extension_ITunes_Entry + */ + public function setItunesKeywords(array $value) + { + if (count($value) > 12) { + throw new Zend_Feed_Exception('invalid parameter: "keywords" may only' + . ' contain a maximum of 12 terms'); + } + $concat = implode(',', $value); + if (iconv_strlen($concat, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: "keywords" may only' + . ' have a concatenated length of 255 chars where terms are delimited' + . ' by a comma'); + } + $this->_data['keywords'] = $value; + return $this; + } + + /** + * Set subtitle + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Entry + */ + public function setItunesSubtitle($value) + { + if (iconv_strlen($value, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: "subtitle" may only' + . ' contain a maximum of 255 characters'); + } + $this->_data['subtitle'] = $value; + return $this; + } + + /** + * Set summary + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Entry + */ + public function setItunesSummary($value) + { + if (iconv_strlen($value, $this->getEncoding()) > 4000) { + throw new Zend_Feed_Exception('invalid parameter: "summary" may only' + . ' contain a maximum of 4000 characters'); + } + $this->_data['summary'] = $value; + return $this; + } + + /** + * Overloading to itunes specific setters + * + * @param string $method + * @param array $params + * @return mixed + */ + public function __call($method, array $params) + { + $point = Zend_Feed_Writer::lcfirst(substr($method, 9)); + if (!method_exists($this, 'setItunes' . ucfirst($point)) + && !method_exists($this, 'addItunes' . ucfirst($point)) + ) { + throw new Zend_Feed_Writer_Exception_InvalidMethodException( + 'invalid method: ' . $method + ); + } + if (!array_key_exists($point, $this->_data) + || empty($this->_data[$point]) + ) { + return null; + } + return $this->_data[$point]; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/ITunes/Feed.php b/library/vendor/Zend/Feed/Writer/Extension/ITunes/Feed.php new file mode 100644 index 000000000..43c2883e0 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/ITunes/Feed.php @@ -0,0 +1,343 @@ +_encoding = $enc; + return $this; + } + + /** + * Get feed encoding + * + * @return string + */ + public function getEncoding() + { + return $this->_encoding; + } + + /** + * Set a block value of "yes" or "no". You may also set an empty string. + * + * @param string + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesBlock($value) + { + if (!ctype_alpha($value) && strlen($value) > 0) { + throw new Zend_Feed_Exception('invalid parameter: "block" may only' + . ' contain alphabetic characters'); + } + if (iconv_strlen($value, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: "block" may only' + . ' contain a maximum of 255 characters'); + } + $this->_data['block'] = $value; + return $this; + } + + /** + * Add feed authors + * + * @param array $values + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function addItunesAuthors(array $values) + { + foreach ($values as $value) { + $this->addItunesAuthor($value); + } + return $this; + } + + /** + * Add feed author + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function addItunesAuthor($value) + { + if (iconv_strlen($value, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: any "author" may only' + . ' contain a maximum of 255 characters each'); + } + if (!isset($this->_data['authors'])) { + $this->_data['authors'] = array(); + } + $this->_data['authors'][] = $value; + return $this; + } + + /** + * Set feed categories + * + * @param array $values + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesCategories(array $values) + { + if (!isset($this->_data['categories'])) { + $this->_data['categories'] = array(); + } + foreach ($values as $key=>$value) { + if (!is_array($value)) { + if (iconv_strlen($value, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: any "category" may only' + . ' contain a maximum of 255 characters each'); + } + $this->_data['categories'][] = $value; + } else { + if (iconv_strlen($key, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: any "category" may only' + . ' contain a maximum of 255 characters each'); + } + $this->_data['categories'][$key] = array(); + foreach ($value as $val) { + if (iconv_strlen($val, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: any "category" may only' + . ' contain a maximum of 255 characters each'); + } + $this->_data['categories'][$key][] = $val; + } + } + } + return $this; + } + + /** + * Set feed image (icon) + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesImage($value) + { + if (!Zend_Uri::check($value)) { + throw new Zend_Feed_Exception('invalid parameter: "image" may only' + . ' be a valid URI/IRI'); + } + if (!in_array(substr($value, -3), array('jpg','png'))) { + throw new Zend_Feed_Exception('invalid parameter: "image" may only' + . ' use file extension "jpg" or "png" which must be the last three' + . ' characters of the URI (i.e. no query string or fragment)'); + } + $this->_data['image'] = $value; + return $this; + } + + /** + * Set feed cumulative duration + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesDuration($value) + { + $value = (string) $value; + if (!ctype_digit($value) + && !preg_match("/^\d+:[0-5]{1}[0-9]{1}$/", $value) + && !preg_match("/^\d+:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$/", $value) + ) { + throw new Zend_Feed_Exception('invalid parameter: "duration" may only' + . ' be of a specified [[HH:]MM:]SS format'); + } + $this->_data['duration'] = $value; + return $this; + } + + /** + * Set "explicit" flag + * + * @param string $value Valid values: "yes", "no" or "clean" + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesExplicit($value) + { + if (!in_array($value, array('yes','no','clean'))) { + throw new Zend_Feed_Exception('invalid parameter: "explicit" may only' + . ' be one of "yes", "no" or "clean"'); + } + $this->_data['explicit'] = $value; + return $this; + } + + /** + * Set feed keywords + * + * @param array $value + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesKeywords(array $value) + { + if (count($value) > 12) { + throw new Zend_Feed_Exception('invalid parameter: "keywords" may only' + . ' contain a maximum of 12 terms'); + } + $concat = implode(',', $value); + if (iconv_strlen($concat, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: "keywords" may only' + . ' have a concatenated length of 255 chars where terms are delimited' + . ' by a comma'); + } + $this->_data['keywords'] = $value; + return $this; + } + + /** + * Set new feed URL + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesNewFeedUrl($value) + { + if (!Zend_Uri::check($value)) { + throw new Zend_Feed_Exception('invalid parameter: "newFeedUrl" may only' + . ' be a valid URI/IRI'); + } + $this->_data['newFeedUrl'] = $value; + return $this; + } + + /** + * Add feed owners + * + * @param array $values + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function addItunesOwners(array $values) + { + foreach ($values as $value) { + $this->addItunesOwner($value); + } + return $this; + } + + /** + * Add feed owner + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function addItunesOwner(array $value) + { + if (!isset($value['name']) || !isset($value['email'])) { + throw new Zend_Feed_Exception('invalid parameter: any "owner" must' + . ' be an array containing keys "name" and "email"'); + } + if (iconv_strlen($value['name'], $this->getEncoding()) > 255 + || iconv_strlen($value['email'], $this->getEncoding()) > 255 + ) { + throw new Zend_Feed_Exception('invalid parameter: any "owner" may only' + . ' contain a maximum of 255 characters each for "name" and "email"'); + } + if (!isset($this->_data['owners'])) { + $this->_data['owners'] = array(); + } + $this->_data['owners'][] = $value; + return $this; + } + + /** + * Set feed subtitle + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesSubtitle($value) + { + if (iconv_strlen($value, $this->getEncoding()) > 255) { + throw new Zend_Feed_Exception('invalid parameter: "subtitle" may only' + . ' contain a maximum of 255 characters'); + } + $this->_data['subtitle'] = $value; + return $this; + } + + /** + * Set feed summary + * + * @param string $value + * @return Zend_Feed_Writer_Extension_ITunes_Feed + */ + public function setItunesSummary($value) + { + if (iconv_strlen($value, $this->getEncoding()) > 4000) { + throw new Zend_Feed_Exception('invalid parameter: "summary" may only' + . ' contain a maximum of 4000 characters'); + } + $this->_data['summary'] = $value; + return $this; + } + + /** + * Overloading: proxy to internal setters + * + * @param string $method + * @param array $params + * @return mixed + */ + public function __call($method, array $params) + { + $point = Zend_Feed_Writer::lcfirst(substr($method, 9)); + if (!method_exists($this, 'setItunes' . ucfirst($point)) + && !method_exists($this, 'addItunes' . ucfirst($point)) + ) { + throw new Zend_Feed_Writer_Exception_InvalidMethodException( + 'invalid method: ' . $method + ); + } + if (!array_key_exists($point, $this->_data) || empty($this->_data[$point])) { + return null; + } + return $this->_data[$point]; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php b/library/vendor/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php new file mode 100644 index 000000000..7f8578b56 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php @@ -0,0 +1,215 @@ +_setAuthors($this->_dom, $this->_base); + $this->_setBlock($this->_dom, $this->_base); + $this->_setDuration($this->_dom, $this->_base); + $this->_setExplicit($this->_dom, $this->_base); + $this->_setKeywords($this->_dom, $this->_base); + $this->_setSubtitle($this->_dom, $this->_base); + $this->_setSummary($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append namespaces to entry root + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:itunes', + 'http://www.itunes.com/dtds/podcast-1.0.dtd'); + } + + /** + * Set entry authors + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setAuthors(DOMDocument $dom, DOMElement $root) + { + $authors = $this->getDataContainer()->getItunesAuthors(); + if (!$authors || empty($authors)) { + return; + } + foreach ($authors as $author) { + $el = $dom->createElement('itunes:author'); + $text = $dom->createTextNode($author); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + } + + /** + * Set itunes block + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setBlock(DOMDocument $dom, DOMElement $root) + { + $block = $this->getDataContainer()->getItunesBlock(); + if ($block === null) { + return; + } + $el = $dom->createElement('itunes:block'); + $text = $dom->createTextNode($block); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set entry duration + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDuration(DOMDocument $dom, DOMElement $root) + { + $duration = $this->getDataContainer()->getItunesDuration(); + if (!$duration) { + return; + } + $el = $dom->createElement('itunes:duration'); + $text = $dom->createTextNode($duration); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set explicit flag + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setExplicit(DOMDocument $dom, DOMElement $root) + { + $explicit = $this->getDataContainer()->getItunesExplicit(); + if ($explicit === null) { + return; + } + $el = $dom->createElement('itunes:explicit'); + $text = $dom->createTextNode($explicit); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set entry keywords + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setKeywords(DOMDocument $dom, DOMElement $root) + { + $keywords = $this->getDataContainer()->getItunesKeywords(); + if (!$keywords || empty($keywords)) { + return; + } + $el = $dom->createElement('itunes:keywords'); + $text = $dom->createTextNode(implode(',', $keywords)); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set entry subtitle + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setSubtitle(DOMDocument $dom, DOMElement $root) + { + $subtitle = $this->getDataContainer()->getItunesSubtitle(); + if (!$subtitle) { + return; + } + $el = $dom->createElement('itunes:subtitle'); + $text = $dom->createTextNode($subtitle); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set entry summary + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setSummary(DOMDocument $dom, DOMElement $root) + { + $summary = $this->getDataContainer()->getItunesSummary(); + if (!$summary) { + return; + } + $el = $dom->createElement('itunes:summary'); + $text = $dom->createTextNode($summary); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php b/library/vendor/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php new file mode 100644 index 000000000..7dd10dc17 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php @@ -0,0 +1,319 @@ +_setAuthors($this->_dom, $this->_base); + $this->_setBlock($this->_dom, $this->_base); + $this->_setCategories($this->_dom, $this->_base); + $this->_setImage($this->_dom, $this->_base); + $this->_setDuration($this->_dom, $this->_base); + $this->_setExplicit($this->_dom, $this->_base); + $this->_setKeywords($this->_dom, $this->_base); + $this->_setNewFeedUrl($this->_dom, $this->_base); + $this->_setOwners($this->_dom, $this->_base); + $this->_setSubtitle($this->_dom, $this->_base); + $this->_setSummary($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append feed namespaces + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:itunes', + 'http://www.itunes.com/dtds/podcast-1.0.dtd'); + } + + /** + * Set feed authors + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setAuthors(DOMDocument $dom, DOMElement $root) + { + $authors = $this->getDataContainer()->getItunesAuthors(); + if (!$authors || empty($authors)) { + return; + } + foreach ($authors as $author) { + $el = $dom->createElement('itunes:author'); + $text = $dom->createTextNode($author); + $el->appendChild($text); + $root->appendChild($el); + } + $this->_called = true; + } + + /** + * Set feed itunes block + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setBlock(DOMDocument $dom, DOMElement $root) + { + $block = $this->getDataContainer()->getItunesBlock(); + if ($block === null) { + return; + } + $el = $dom->createElement('itunes:block'); + $text = $dom->createTextNode($block); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set feed categories + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCategories(DOMDocument $dom, DOMElement $root) + { + $cats = $this->getDataContainer()->getItunesCategories(); + if (!$cats || empty($cats)) { + return; + } + foreach ($cats as $key=>$cat) { + if (!is_array($cat)) { + $el = $dom->createElement('itunes:category'); + $el->setAttribute('text', $cat); + $root->appendChild($el); + } else { + $el = $dom->createElement('itunes:category'); + $el->setAttribute('text', $key); + $root->appendChild($el); + foreach ($cat as $subcat) { + $el2 = $dom->createElement('itunes:category'); + $el2->setAttribute('text', $subcat); + $el->appendChild($el2); + } + } + } + $this->_called = true; + } + + /** + * Set feed image (icon) + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setImage(DOMDocument $dom, DOMElement $root) + { + $image = $this->getDataContainer()->getItunesImage(); + if (!$image) { + return; + } + $el = $dom->createElement('itunes:image'); + $el->setAttribute('href', $image); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set feed cumulative duration + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDuration(DOMDocument $dom, DOMElement $root) + { + $duration = $this->getDataContainer()->getItunesDuration(); + if (!$duration) { + return; + } + $el = $dom->createElement('itunes:duration'); + $text = $dom->createTextNode($duration); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set explicit flag + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setExplicit(DOMDocument $dom, DOMElement $root) + { + $explicit = $this->getDataContainer()->getItunesExplicit(); + if ($explicit === null) { + return; + } + $el = $dom->createElement('itunes:explicit'); + $text = $dom->createTextNode($explicit); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set feed keywords + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setKeywords(DOMDocument $dom, DOMElement $root) + { + $keywords = $this->getDataContainer()->getItunesKeywords(); + if (!$keywords || empty($keywords)) { + return; + } + $el = $dom->createElement('itunes:keywords'); + $text = $dom->createTextNode(implode(',', $keywords)); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set feed's new URL + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setNewFeedUrl(DOMDocument $dom, DOMElement $root) + { + $url = $this->getDataContainer()->getItunesNewFeedUrl(); + if (!$url) { + return; + } + $el = $dom->createElement('itunes:new-feed-url'); + $text = $dom->createTextNode($url); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set feed owners + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setOwners(DOMDocument $dom, DOMElement $root) + { + $owners = $this->getDataContainer()->getItunesOwners(); + if (!$owners || empty($owners)) { + return; + } + foreach ($owners as $owner) { + $el = $dom->createElement('itunes:owner'); + $name = $dom->createElement('itunes:name'); + $text = $dom->createTextNode($owner['name']); + $name->appendChild($text); + $email = $dom->createElement('itunes:email'); + $text = $dom->createTextNode($owner['email']); + $email->appendChild($text); + $root->appendChild($el); + $el->appendChild($name); + $el->appendChild($email); + } + $this->_called = true; + } + + /** + * Set feed subtitle + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setSubtitle(DOMDocument $dom, DOMElement $root) + { + $subtitle = $this->getDataContainer()->getItunesSubtitle(); + if (!$subtitle) { + return; + } + $el = $dom->createElement('itunes:subtitle'); + $text = $dom->createTextNode($subtitle); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } + + /** + * Set feed summary + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setSummary(DOMDocument $dom, DOMElement $root) + { + $summary = $this->getDataContainer()->getItunesSummary(); + if (!$summary) { + return; + } + $el = $dom->createElement('itunes:summary'); + $text = $dom->createTextNode($summary); + $el->appendChild($text); + $root->appendChild($el); + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/RendererAbstract.php b/library/vendor/Zend/Feed/Writer/Extension/RendererAbstract.php new file mode 100644 index 000000000..b1be96365 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/RendererAbstract.php @@ -0,0 +1,179 @@ +_container = $container; + } + + /** + * Set feed encoding + * + * @param string $enc + * @return Zend_Feed_Writer_Extension_RendererAbstract + */ + public function setEncoding($enc) + { + $this->_encoding = $enc; + return $this; + } + + /** + * Get feed encoding + * + * @return void + */ + public function getEncoding() + { + return $this->_encoding; + } + + /** + * Set DOMDocument and DOMElement on which to operate + * + * @param DOMDocument $dom + * @param DOMElement $base + * @return Zend_Feed_Writer_Extension_RendererAbstract + */ + public function setDomDocument(DOMDocument $dom, DOMElement $base) + { + $this->_dom = $dom; + $this->_base = $base; + return $this; + } + + /** + * Get data container being rendered + * + * @return mixed + */ + public function getDataContainer() + { + return $this->_container; + } + + /** + * Set feed type + * + * @param string $type + * @return Zend_Feed_Writer_Extension_RendererAbstract + */ + public function setType($type) + { + $this->_type = $type; + return $this; + } + + /** + * Get feedtype + * + * @return string + */ + public function getType() + { + return $this->_type; + } + + /** + * Set root element of document + * + * @param DOMElement $root + * @return Zend_Feed_Writer_Extension_RendererAbstract + */ + public function setRootElement(DOMElement $root) + { + $this->_rootElement = $root; + return $this; + } + + /** + * Get root element + * + * @return DOMElement + */ + public function getRootElement() + { + return $this->_rootElement; + } + + /** + * Append namespaces to feed + * + * @return void + */ + abstract protected function _appendNamespaces(); +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/RendererInterface.php b/library/vendor/Zend/Feed/Writer/Extension/RendererInterface.php new file mode 100644 index 000000000..4c4e9ccbb --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/RendererInterface.php @@ -0,0 +1,60 @@ +getType()) == 'atom') { + return; // RSS 2.0 only + } + $this->_setCommentCount($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append entry namespaces + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:slash', + 'http://purl.org/rss/1.0/modules/slash/'); + } + + /** + * Set entry comment count + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCommentCount(DOMDocument $dom, DOMElement $root) + { + $count = $this->getDataContainer()->getCommentCount(); + if (!$count) { + return; + } + $tcount = $this->_dom->createElement('slash:comments'); + $tcount->nodeValue = $count; + $root->appendChild($tcount); + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php b/library/vendor/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php new file mode 100644 index 000000000..87267140f --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php @@ -0,0 +1,144 @@ +getType()) == 'rss') { + return; // Atom 1.0 only + } + $this->_setCommentLink($this->_dom, $this->_base); + $this->_setCommentFeedLinks($this->_dom, $this->_base); + $this->_setCommentCount($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append entry namespaces + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:thr', + 'http://purl.org/syndication/thread/1.0'); + } + + /** + * Set comment link + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCommentLink(DOMDocument $dom, DOMElement $root) + { + $link = $this->getDataContainer()->getCommentLink(); + if (!$link) { + return; + } + $clink = $this->_dom->createElement('link'); + $clink->setAttribute('rel', 'replies'); + $clink->setAttribute('type', 'text/html'); + $clink->setAttribute('href', $link); + $count = $this->getDataContainer()->getCommentCount(); + if ($count !== null) { + $clink->setAttribute('thr:count', $count); + } + $root->appendChild($clink); + $this->_called = true; + } + + /** + * Set comment feed links + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root) + { + $links = $this->getDataContainer()->getCommentFeedLinks(); + if (!$links || empty($links)) { + return; + } + foreach ($links as $link) { + $flink = $this->_dom->createElement('link'); + $flink->setAttribute('rel', 'replies'); + $flink->setAttribute('type', 'application/'. $link['type'] .'+xml'); + $flink->setAttribute('href', $link['uri']); + $count = $this->getDataContainer()->getCommentCount(); + if ($count !== null) { + $flink->setAttribute('thr:count', $count); + } + $root->appendChild($flink); + $this->_called = true; + } + } + + /** + * Set entry comment count + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCommentCount(DOMDocument $dom, DOMElement $root) + { + $count = $this->getDataContainer()->getCommentCount(); + if ($count === null) { + return; + } + $tcount = $this->_dom->createElement('thr:total'); + $tcount->nodeValue = $count; + $root->appendChild($tcount); + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php b/library/vendor/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php new file mode 100644 index 000000000..13ad38b43 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php @@ -0,0 +1,95 @@ +getType()) == 'atom') { + return; // RSS 2.0 only + } + $this->_setCommentFeedLinks($this->_dom, $this->_base); + if ($this->_called) { + $this->_appendNamespaces(); + } + } + + /** + * Append entry namespaces + * + * @return void + */ + protected function _appendNamespaces() + { + $this->getRootElement()->setAttribute('xmlns:wfw', + 'http://wellformedweb.org/CommentAPI/'); + } + + /** + * Set entry comment feed links + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root) + { + $links = $this->getDataContainer()->getCommentFeedLinks(); + if (!$links || empty($links)) { + return; + } + foreach ($links as $link) { + if ($link['type'] == 'rss') { + $flink = $this->_dom->createElement('wfw:commentRss'); + $text = $dom->createTextNode($link['uri']); + $flink->appendChild($text); + $root->appendChild($flink); + } + } + $this->_called = true; + } +} diff --git a/library/vendor/Zend/Feed/Writer/Feed.php b/library/vendor/Zend/Feed/Writer/Feed.php new file mode 100644 index 000000000..6a9add942 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Feed.php @@ -0,0 +1,271 @@ +getEncoding()) { + $entry->setEncoding($this->getEncoding()); + } + $entry->setType($this->getType()); + return $entry; + } + + /** + * Appends a Zend_Feed_Writer_Deleted object representing a new entry tombstone + * to the feed data container's internal group of entries. + * + * @param Zend_Feed_Writer_Deleted $entry + */ + public function addTombstone(Zend_Feed_Writer_Deleted $deleted) + { + $this->_entries[] = $deleted; + } + + /** + * Creates a new Zend_Feed_Writer_Deleted data container for use. This is NOT + * added to the current feed automatically, but is necessary to create a + * container with some initial values preset based on the current feed data. + * + * @return Zend_Feed_Writer_Deleted + */ + public function createTombstone() + { + $deleted = new Zend_Feed_Writer_Deleted; + if ($this->getEncoding()) { + $deleted->setEncoding($this->getEncoding()); + } + $deleted->setType($this->getType()); + return $deleted; + } + + /** + * Appends a Zend_Feed_Writer_Entry object representing a new entry/item + * the feed data container's internal group of entries. + * + * @param Zend_Feed_Writer_Entry $entry + */ + public function addEntry(Zend_Feed_Writer_Entry $entry) + { + $this->_entries[] = $entry; + } + + /** + * Removes a specific indexed entry from the internal queue. Entries must be + * added to a feed container in order to be indexed. + * + * @param int $index + */ + public function removeEntry($index) + { + if (isset($this->_entries[$index])) { + unset($this->_entries[$index]); + } + throw new Zend_Feed_Exception('Undefined index: ' . $index . '. Entry does not exist.'); + } + + /** + * Retrieve a specific indexed entry from the internal queue. Entries must be + * added to a feed container in order to be indexed. + * + * @param int $index + */ + public function getEntry($index = 0) + { + if (isset($this->_entries[$index])) { + return $this->_entries[$index]; + } + throw new Zend_Feed_Exception('Undefined index: ' . $index . '. Entry does not exist.'); + } + + /** + * Orders all indexed entries by date, thus offering date ordered readable + * content where a parser (or Homo Sapien) ignores the generic rule that + * XML element order is irrelevant and has no intrinsic meaning. + * + * Using this method will alter the original indexation. + * + * @return void + */ + public function orderByDate() + { + /** + * Could do with some improvement for performance perhaps + */ + $timestamp = time(); + $entries = array(); + foreach ($this->_entries as $entry) { + if ($entry->getDateModified()) { + $timestamp = (int) $entry->getDateModified()->get(Zend_Date::TIMESTAMP); + } elseif ($entry->getDateCreated()) { + $timestamp = (int) $entry->getDateCreated()->get(Zend_Date::TIMESTAMP); + } + $entries[$timestamp] = $entry; + } + krsort($entries, SORT_NUMERIC); + $this->_entries = array_values($entries); + } + + /** + * Get the number of feed entries. + * Required by the Iterator interface. + * + * @return int + */ + public function count() + { + return count($this->_entries); + } + + /** + * Return the current entry + * + * @return Zend_Feed_Reader_Entry_Interface + */ + public function current() + { + return $this->_entries[$this->key()]; + } + + /** + * Return the current feed key + * + * @return unknown + */ + public function key() + { + return $this->_entriesKey; + } + + /** + * Move the feed pointer forward + * + * @return void + */ + public function next() + { + ++$this->_entriesKey; + } + + /** + * Reset the pointer in the feed object + * + * @return void + */ + public function rewind() + { + $this->_entriesKey = 0; + } + + /** + * Check to see if the iterator is still valid + * + * @return boolean + */ + public function valid() + { + return 0 <= $this->_entriesKey && $this->_entriesKey < $this->count(); + } + + /** + * Attempt to build and return the feed resulting from the data set + * + * @param string $type The feed type "rss" or "atom" to export as + * @param bool $ignoreExceptions + * @return string + */ + public function export($type, $ignoreExceptions = false) + { + $this->setType(strtolower($type)); + $type = ucfirst($this->getType()); + if ($type !== 'Rss' && $type !== 'Atom') { + throw new Zend_Feed_Exception('Invalid feed type specified: ' . $type . '.' + . ' Should be one of "rss" or "atom".'); + } + $renderClass = 'Zend_Feed_Writer_Renderer_Feed_' . $type; + $renderer = new $renderClass($this); + if ($ignoreExceptions) { + $renderer->ignoreExceptions(); + } + return $renderer->render()->saveXml(); + } + +} diff --git a/library/vendor/Zend/Feed/Writer/Feed/FeedAbstract.php b/library/vendor/Zend/Feed/Writer/Feed/FeedAbstract.php new file mode 100644 index 000000000..90023f39d --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Feed/FeedAbstract.php @@ -0,0 +1,834 @@ +_loadExtensions(); + } + + /** + * Set a single author + * + * @param int $index + * @return string|null + */ + public function addAuthor($name, $email = null, $uri = null) + { + $author = array(); + if (is_array($name)) { + if (!array_key_exists('name', $name) || empty($name['name']) || !is_string($name['name'])) { + throw new Zend_Feed_Exception('Invalid parameter: author array must include a "name" key with a non-empty string value'); + } + $author['name'] = $name['name']; + if (isset($name['email'])) { + if (empty($name['email']) || !is_string($name['email'])) { + throw new Zend_Feed_Exception('Invalid parameter: "email" array value must be a non-empty string'); + } + $author['email'] = $name['email']; + } + if (isset($name['uri'])) { + if (empty($name['uri']) || !is_string($name['uri']) || !Zend_Uri::check($name['uri'])) { + throw new Zend_Feed_Exception('Invalid parameter: "uri" array value must be a non-empty string and valid URI/IRI'); + } + $author['uri'] = $name['uri']; + } + } else { + if (empty($name) || !is_string($name)) { + throw new Zend_Feed_Exception('Invalid parameter: "name" must be a non-empty string value'); + } + $author['name'] = $name; + if (isset($email)) { + if (empty($email) || !is_string($email)) { + throw new Zend_Feed_Exception('Invalid parameter: "email" value must be a non-empty string'); + } + $author['email'] = $email; + } + if (isset($uri)) { + if (empty($uri) || !is_string($uri) || !Zend_Uri::check($uri)) { + throw new Zend_Feed_Exception('Invalid parameter: "uri" value must be a non-empty string and valid URI/IRI'); + } + $author['uri'] = $uri; + } + } + $this->_data['authors'][] = $author; + } + + /** + * Set an array with feed authors + * + * @return array + */ + public function addAuthors(array $authors) + { + foreach($authors as $author) { + $this->addAuthor($author); + } + } + + /** + * Set the copyright entry + * + * @return string|null + */ + public function setCopyright($copyright) + { + if (empty($copyright) || !is_string($copyright)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['copyright'] = $copyright; + } + + /** + * Set the feed creation date + * + * @param null|integer|Zend_Date + */ + public function setDateCreated($date = null) + { + $zdate = null; + if ($date === null) { + $zdate = new Zend_Date; + } elseif ($date instanceof Zend_Date) { + $zdate = $date; + } elseif (ctype_digit((string)$date)) { + $zdate = new Zend_Date($date, Zend_Date::TIMESTAMP); + } else { + throw new Zend_Feed_Exception('Invalid Zend_Date object or UNIX Timestamp passed as parameter'); + } + $this->_data['dateCreated'] = $zdate; + } + + /** + * Set the feed modification date + * + * @param null|integer|Zend_Date + */ + public function setDateModified($date = null) + { + $zdate = null; + if ($date === null) { + $zdate = new Zend_Date; + } elseif ($date instanceof Zend_Date) { + $zdate = $date; + } elseif (ctype_digit((string)$date)) { + $zdate = new Zend_Date($date, Zend_Date::TIMESTAMP); + } else { + throw new Zend_Feed_Exception('Invalid Zend_Date object or UNIX Timestamp passed as parameter'); + } + $this->_data['dateModified'] = $zdate; + } + + /** + * Set the feed last-build date. Ignored for Atom 1.0. + * + * @param null|integer|Zend_Date + */ + public function setLastBuildDate($date = null) + { + $zdate = null; + if ($date === null) { + $zdate = new Zend_Date; + } elseif ($date instanceof Zend_Date) { + $zdate = $date; + } elseif (ctype_digit((string)$date)) { + $zdate = new Zend_Date($date, Zend_Date::TIMESTAMP); + } else { + throw new Zend_Feed_Exception('Invalid Zend_Date object or UNIX Timestamp passed as parameter'); + } + $this->_data['lastBuildDate'] = $zdate; + } + + /** + * Set the feed description + * + * @return string|null + */ + public function setDescription($description) + { + if (empty($description) || !is_string($description)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['description'] = $description; + } + + /** + * Set the feed generator entry + * + * @return string|null + */ + public function setGenerator($name, $version = null, $uri = null) + { + if (is_array($name)) { + $data = $name; + if (empty($data['name']) || !is_string($data['name'])) { + throw new Zend_Feed_Exception('Invalid parameter: "name" must be a non-empty string'); + } + $generator = array('name' => $data['name']); + if (isset($data['version'])) { + if (empty($data['version']) || !is_string($data['version'])) { + throw new Zend_Feed_Exception('Invalid parameter: "version" must be a non-empty string'); + } + $generator['version'] = $data['version']; + } + if (isset($data['uri'])) { + if (empty($data['uri']) || !is_string($data['uri']) || !Zend_Uri::check($data['uri'])) { + throw new Zend_Feed_Exception('Invalid parameter: "uri" must be a non-empty string and a valid URI/IRI'); + } + $generator['uri'] = $data['uri']; + } + } else { + if (empty($name) || !is_string($name)) { + throw new Zend_Feed_Exception('Invalid parameter: "name" must be a non-empty string'); + } + $generator = array('name' => $name); + if (isset($version)) { + if (empty($version) || !is_string($version)) { + throw new Zend_Feed_Exception('Invalid parameter: "version" must be a non-empty string'); + } + $generator['version'] = $version; + } + if (isset($uri)) { + if (empty($uri) || !is_string($uri) || !Zend_Uri::check($uri)) { + throw new Zend_Feed_Exception('Invalid parameter: "uri" must be a non-empty string and a valid URI/IRI'); + } + $generator['uri'] = $uri; + } + } + $this->_data['generator'] = $generator; + } + + /** + * Set the feed ID - URI or URN (via PCRE pattern) supported + * + * @param string $id + */ + public function setId($id) + { + if ((empty($id) || !is_string($id) || !Zend_Uri::check($id)) && + !preg_match("#^urn:[a-zA-Z0-9][a-zA-Z0-9\-]{1,31}:([a-zA-Z0-9\(\)\+\,\.\:\=\@\;\$\_\!\*\-]|%[0-9a-fA-F]{2})*#", $id) + && !$this->_validateTagUri($id)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string and valid URI/IRI'); + } + $this->_data['id'] = $id; + } + + /** + * Validate a URI using the tag scheme (RFC 4151) + * + * @param string $id + * @return bool + */ + protected function _validateTagUri($id) + { + if (preg_match('/^tag:(?.*),(?\d{4}-?\d{0,2}-?\d{0,2}):(?.*)(.*:)*$/', $id, $matches)) { + $dvalid = false; + $nvalid = false; + $date = $matches['date']; + $d6 = strtotime($date); + if ((strlen($date) == 4) && $date <= date('Y')) { + $dvalid = true; + } elseif ((strlen($date) == 7) && ($d6 < strtotime("now"))) { + $dvalid = true; + } elseif ((strlen($date) == 10) && ($d6 < strtotime("now"))) { + $dvalid = true; + } + $validator = new Zend_Validate_EmailAddress; + if ($validator->isValid($matches['name'])) { + $nvalid = true; + } else { + $nvalid = $validator->isValid('info@' . $matches['name']); + } + return $dvalid && $nvalid; + + } + return false; + } + + /** + * Set a feed image (URI at minimum). Parameter is a single array with the + * required key 'uri'. When rendering as RSS, the required keys are 'uri', + * 'title' and 'link'. RSS also specifies three optional parameters 'width', + * 'height' and 'description'. Only 'uri' is required and used for Atom rendering. + * + * @param array $data + */ + public function setImage(array $data) + { + if (empty($data['uri']) || !is_string($data['uri']) + || !Zend_Uri::check($data['uri'])) { + throw new Zend_Feed_Exception('Invalid parameter: parameter \'uri\'' + . ' must be a non-empty string and valid URI/IRI'); + } + $this->_data['image'] = $data; + } + + /** + * Set a feed icon (URI at minimum). Parameter is a single array with the + * required key 'uri'. Only 'uri' is required and used for Atom rendering. + * RSS does not support an Icon tag except via Atom 1.0 as an extension. + * + * @param array $data + */ + public function setIcon(array $data) + { + if (empty($data['uri']) || !is_string($data['uri']) + || !Zend_Uri::check($data['uri'])) { + throw new Zend_Feed_Exception('Invalid parameter: parameter \'uri\'' + . ' must be a non-empty string and valid URI/IRI'); + } + $this->_data['icon'] = $data; + } + + /** + * Set the feed language + * + * @return string|null + */ + public function setLanguage($language) + { + if (empty($language) || !is_string($language)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['language'] = $language; + } + + /** + * Set a link to the HTML source + * + * @param string $link + */ + public function setLink($link) + { + if (empty($link) || !is_string($link) || !Zend_Uri::check($link)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string and valid URI/IRI'); + } + $this->_data['link'] = $link; + } + + /** + * Set a link to an XML feed for any feed type/version + * + * @return string|null + */ + public function setFeedLink($link, $type) + { + if (empty($link) || !is_string($link) || !Zend_Uri::check($link)) { + throw new Zend_Feed_Exception('Invalid parameter: "link"" must be a non-empty string and valid URI/IRI'); + } + if (!in_array(strtolower($type), array('rss', 'rdf', 'atom'))) { + throw new Zend_Feed_Exception('Invalid parameter: "type"; You must declare the type of feed the link points to, i.e. RSS, RDF or Atom'); + } + $this->_data['feedLinks'][strtolower($type)] = $link; + } + + /** + * Set the feed title + * + * @return string|null + */ + public function setTitle($title) + { + if (empty($title) || !is_string($title)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['title'] = $title; + } + + /** + * Set the feed character encoding + * + * @param string $encoding + */ + public function setEncoding($encoding) + { + if (empty($encoding) || !is_string($encoding)) { + throw new Zend_Feed_Exception('Invalid parameter: parameter must be a non-empty string'); + } + $this->_data['encoding'] = $encoding; + } + + /** + * Set the feed's base URL + * + * @param string $url + */ + public function setBaseUrl($url) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Exception('Invalid parameter: "url" array value' + . ' must be a non-empty string and valid URI/IRI'); + } + $this->_data['baseUrl'] = $url; + } + + /** + * Add a Pubsubhubbub hub endpoint URL + * + * @param string $url + */ + public function addHub($url) + { + if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) { + throw new Zend_Feed_Exception('Invalid parameter: "url" array value' + . ' must be a non-empty string and valid URI/IRI'); + } + if (!isset($this->_data['hubs'])) { + $this->_data['hubs'] = array(); + } + $this->_data['hubs'][] = $url; + } + + /** + * Add Pubsubhubbub hub endpoint URLs + * + * @param array $urls + */ + public function addHubs(array $urls) + { + foreach ($urls as $url) { + $this->addHub($url); + } + } + + /** + * Add a feed category + * + * @param string $category + */ + public function addCategory(array $category) + { + if (!isset($category['term'])) { + throw new Zend_Feed_Exception('Each category must be an array and ' + . 'contain at least a "term" element containing the machine ' + . ' readable category name'); + } + if (isset($category['scheme'])) { + if (empty($category['scheme']) + || !is_string($category['scheme']) + || !Zend_Uri::check($category['scheme']) + ) { + throw new Zend_Feed_Exception('The Atom scheme or RSS domain of' + . ' a category must be a valid URI'); + } + } + if (!isset($this->_data['categories'])) { + $this->_data['categories'] = array(); + } + $this->_data['categories'][] = $category; + } + + /** + * Set an array of feed categories + * + * @param array $categories + */ + public function addCategories(array $categories) + { + foreach ($categories as $category) { + $this->addCategory($category); + } + } + + /** + * Get a single author + * + * @param int $index + * @return string|null + */ + public function getAuthor($index = 0) + { + if (isset($this->_data['authors'][$index])) { + return $this->_data['authors'][$index]; + } else { + return null; + } + } + + /** + * Get an array with feed authors + * + * @return array + */ + public function getAuthors() + { + if (!array_key_exists('authors', $this->_data)) { + return null; + } + return $this->_data['authors']; + } + + /** + * Get the copyright entry + * + * @return string|null + */ + public function getCopyright() + { + if (!array_key_exists('copyright', $this->_data)) { + return null; + } + return $this->_data['copyright']; + } + + /** + * Get the feed creation date + * + * @return string|null + */ + public function getDateCreated() + { + if (!array_key_exists('dateCreated', $this->_data)) { + return null; + } + return $this->_data['dateCreated']; + } + + /** + * Get the feed modification date + * + * @return string|null + */ + public function getDateModified() + { + if (!array_key_exists('dateModified', $this->_data)) { + return null; + } + return $this->_data['dateModified']; + } + + /** + * Get the feed last-build date + * + * @return string|null + */ + public function getLastBuildDate() + { + if (!array_key_exists('lastBuildDate', $this->_data)) { + return null; + } + return $this->_data['lastBuildDate']; + } + + /** + * Get the feed description + * + * @return string|null + */ + public function getDescription() + { + if (!array_key_exists('description', $this->_data)) { + return null; + } + return $this->_data['description']; + } + + /** + * Get the feed generator entry + * + * @return string|null + */ + public function getGenerator() + { + if (!array_key_exists('generator', $this->_data)) { + return null; + } + return $this->_data['generator']; + } + + /** + * Get the feed ID + * + * @return string|null + */ + public function getId() + { + if (!array_key_exists('id', $this->_data)) { + return null; + } + return $this->_data['id']; + } + + /** + * Get the feed image URI + * + * @return array + */ + public function getImage() + { + if (!array_key_exists('image', $this->_data)) { + return null; + } + return $this->_data['image']; + } + + /** + * Get the feed icon URI + * + * @return array + */ + public function getIcon() + { + if (!array_key_exists('icon', $this->_data)) { + return null; + } + return $this->_data['icon']; + } + + /** + * Get the feed language + * + * @return string|null + */ + public function getLanguage() + { + if (!array_key_exists('language', $this->_data)) { + return null; + } + return $this->_data['language']; + } + + /** + * Get a link to the HTML source + * + * @return string|null + */ + public function getLink() + { + if (!array_key_exists('link', $this->_data)) { + return null; + } + return $this->_data['link']; + } + + /** + * Get a link to the XML feed + * + * @return string|null + */ + public function getFeedLinks() + { + if (!array_key_exists('feedLinks', $this->_data)) { + return null; + } + return $this->_data['feedLinks']; + } + + /** + * Get the feed title + * + * @return string|null + */ + public function getTitle() + { + if (!array_key_exists('title', $this->_data)) { + return null; + } + return $this->_data['title']; + } + + /** + * Get the feed character encoding + * + * @return string|null + */ + public function getEncoding() + { + if (!array_key_exists('encoding', $this->_data)) { + return 'UTF-8'; + } + return $this->_data['encoding']; + } + + /** + * Get the feed's base url + * + * @return string|null + */ + public function getBaseUrl() + { + if (!array_key_exists('baseUrl', $this->_data)) { + return null; + } + return $this->_data['baseUrl']; + } + + /** + * Get the URLs used as Pubsubhubbub hubs endpoints + * + * @return string|null + */ + public function getHubs() + { + if (!array_key_exists('hubs', $this->_data)) { + return null; + } + return $this->_data['hubs']; + } + + /** + * Get the feed categories + * + * @return string|null + */ + public function getCategories() + { + if (!array_key_exists('categories', $this->_data)) { + return null; + } + return $this->_data['categories']; + } + + /** + * Resets the instance and deletes all data + * + * @return void + */ + public function reset() + { + $this->_data = array(); + } + + /** + * Set the current feed type being exported to "rss" or "atom". This allows + * other objects to gracefully choose whether to execute or not, depending + * on their appropriateness for the current type, e.g. renderers. + * + * @param string $type + */ + public function setType($type) + { + $this->_type = $type; + } + + /** + * Retrieve the current or last feed type exported. + * + * @return string Value will be "rss" or "atom" + */ + public function getType() + { + return $this->_type; + } + + /** + * Unset a specific data point + * + * @param string $name + */ + public function remove($name) + { + if (isset($this->_data[$name])) { + unset($this->_data[$name]); + } + } + + /** + * Method overloading: call given method on first extension implementing it + * + * @param string $method + * @param array $args + * @return mixed + * @throws Zend_Feed_Exception if no extensions implements the method + */ + public function __call($method, $args) + { + foreach ($this->_extensions as $extension) { + try { + return call_user_func_array(array($extension, $method), $args); + } catch (Zend_Feed_Writer_Exception_InvalidMethodException $e) { + } + } + throw new Zend_Feed_Exception('Method: ' . $method + . ' does not exist and could not be located on a registered Extension'); + } + + /** + * Load extensions from Zend_Feed_Writer + * + * @return void + */ + protected function _loadExtensions() + { + $all = Zend_Feed_Writer::getExtensions(); + $exts = $all['feed']; + foreach ($exts as $ext) { + $className = Zend_Feed_Writer::getPluginLoader()->getClassName($ext); + $this->_extensions[$ext] = new $className(); + $this->_extensions[$ext]->setEncoding($this->getEncoding()); + } + } +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/Entry/Atom.php b/library/vendor/Zend/Feed/Writer/Renderer/Entry/Atom.php new file mode 100644 index 000000000..15506097a --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/Entry/Atom.php @@ -0,0 +1,440 @@ +_dom = new DOMDocument('1.0', $this->_container->getEncoding()); + $this->_dom->formatOutput = true; + $entry = $this->_dom->createElementNS(Zend_Feed_Writer::NAMESPACE_ATOM_10, 'entry'); + $this->_dom->appendChild($entry); + + $this->_setSource($this->_dom, $entry); + $this->_setTitle($this->_dom, $entry); + $this->_setDescription($this->_dom, $entry); + $this->_setDateCreated($this->_dom, $entry); + $this->_setDateModified($this->_dom, $entry); + $this->_setLink($this->_dom, $entry); + $this->_setId($this->_dom, $entry); + $this->_setAuthors($this->_dom, $entry); + $this->_setEnclosure($this->_dom, $entry); + $this->_setContent($this->_dom, $entry); + $this->_setCategories($this->_dom, $entry); + + foreach ($this->_extensions as $ext) { + $ext->setType($this->getType()); + $ext->setRootElement($this->getRootElement()); + $ext->setDomDocument($this->getDomDocument(), $entry); + $ext->render(); + } + + return $this; + } + + /** + * Set entry title + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setTitle(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getTitle()) { + $message = 'Atom 1.0 entry elements MUST contain exactly one' + . ' atom:title element but a title has not been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $title = $dom->createElement('title'); + $root->appendChild($title); + $title->setAttribute('type', 'html'); + $cdata = $dom->createCDATASection($this->getDataContainer()->getTitle()); + $title->appendChild($cdata); + } + + /** + * Set entry description + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDescription(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDescription()) { + return; // unless src content or base64 + } + $subtitle = $dom->createElement('summary'); + $root->appendChild($subtitle); + $subtitle->setAttribute('type', 'html'); + $cdata = $dom->createCDATASection( + $this->getDataContainer()->getDescription() + ); + $subtitle->appendChild($cdata); + } + + /** + * Set date entry was modified + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDateModified(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDateModified()) { + $message = 'Atom 1.0 entry elements MUST contain exactly one' + . ' atom:updated element but a modification date has not been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + + $updated = $dom->createElement('updated'); + $root->appendChild($updated); + $text = $dom->createTextNode( + $this->getDataContainer()->getDateModified()->get(Zend_Date::ISO_8601) + ); + $updated->appendChild($text); + } + + /** + * Set date entry was created + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDateCreated(DOMDocument $dom, DOMElement $root) + { + if (!$this->getDataContainer()->getDateCreated()) { + return; + } + $el = $dom->createElement('published'); + $root->appendChild($el); + $text = $dom->createTextNode( + $this->getDataContainer()->getDateCreated()->get(Zend_Date::ISO_8601) + ); + $el->appendChild($text); + } + + /** + * Set entry authors + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setAuthors(DOMDocument $dom, DOMElement $root) + { + $authors = $this->_container->getAuthors(); + if ((!$authors || empty($authors))) { + /** + * This will actually trigger an Exception at the feed level if + * a feed level author is not set. + */ + return; + } + foreach ($authors as $data) { + $author = $this->_dom->createElement('author'); + $name = $this->_dom->createElement('name'); + $author->appendChild($name); + $root->appendChild($author); + $text = $dom->createTextNode($data['name']); + $name->appendChild($text); + if (array_key_exists('email', $data)) { + $email = $this->_dom->createElement('email'); + $author->appendChild($email); + $text = $dom->createTextNode($data['email']); + $email->appendChild($text); + } + if (array_key_exists('uri', $data)) { + $uri = $this->_dom->createElement('uri'); + $author->appendChild($uri); + $text = $dom->createTextNode($data['uri']); + $uri->appendChild($text); + } + } + } + + /** + * Set entry enclosure + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setEnclosure(DOMDocument $dom, DOMElement $root) + { + $data = $this->_container->getEnclosure(); + if ((!$data || empty($data))) { + return; + } + $enclosure = $this->_dom->createElement('link'); + $enclosure->setAttribute('rel', 'enclosure'); + if (isset($data['type'])) { + $enclosure->setAttribute('type', $data['type']); + } + if (isset($data['length'])) { + $enclosure->setAttribute('length', $data['length']); + } + $enclosure->setAttribute('href', $data['uri']); + $root->appendChild($enclosure); + } + + protected function _setLink(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getLink()) { + return; + } + $link = $dom->createElement('link'); + $root->appendChild($link); + $link->setAttribute('rel', 'alternate'); + $link->setAttribute('type', 'text/html'); + $link->setAttribute('href', $this->getDataContainer()->getLink()); + } + + /** + * Set entry identifier + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setId(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getId() + && !$this->getDataContainer()->getLink()) { + $message = 'Atom 1.0 entry elements MUST contain exactly one ' + . 'atom:id element, or as an alternative, we can use the same ' + . 'value as atom:link however neither a suitable link nor an ' + . 'id have been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + + if (!$this->getDataContainer()->getId()) { + $this->getDataContainer()->setId( + $this->getDataContainer()->getLink()); + } + if (!Zend_Uri::check($this->getDataContainer()->getId()) && + !preg_match("#^urn:[a-zA-Z0-9][a-zA-Z0-9\-]{1,31}:([a-zA-Z0-9\(\)\+\,\.\:\=\@\;\$\_\!\*\-]|%[0-9a-fA-F]{2})*#", + $this->getDataContainer()->getId() + ) && !$this->_validateTagUri($this->getDataContainer()->getId())) { + throw new Zend_Feed_Exception('Atom 1.0 IDs must be a valid URI/IRI'); + } + $id = $dom->createElement('id'); + $root->appendChild($id); + $text = $dom->createTextNode($this->getDataContainer()->getId()); + $id->appendChild($text); + } + + /** + * Validate a URI using the tag scheme (RFC 4151) + * + * @param string $id + * @return bool + */ + protected function _validateTagUri($id) + { + if (preg_match('/^tag:(?.*),(?\d{4}-?\d{0,2}-?\d{0,2}):(?.*)(.*:)*$/', $id, $matches)) { + $dvalid = false; + $nvalid = false; + $date = $matches['date']; + $d6 = strtotime($date); + if ((strlen($date) == 4) && $date <= date('Y')) { + $dvalid = true; + } elseif ((strlen($date) == 7) && ($d6 < strtotime("now"))) { + $dvalid = true; + } elseif ((strlen($date) == 10) && ($d6 < strtotime("now"))) { + $dvalid = true; + } + $validator = new Zend_Validate_EmailAddress; + if ($validator->isValid($matches['name'])) { + $nvalid = true; + } else { + $nvalid = $validator->isValid('info@' . $matches['name']); + } + return $dvalid && $nvalid; + + } + return false; + } + + /** + * Set entry content + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setContent(DOMDocument $dom, DOMElement $root) + { + $content = $this->getDataContainer()->getContent(); + if (!$content && !$this->getDataContainer()->getLink()) { + $message = 'Atom 1.0 entry elements MUST contain exactly one ' + . 'atom:content element, or as an alternative, at least one link ' + . 'with a rel attribute of "alternate" to indicate an alternate ' + . 'method to consume the content.'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + if (!$content) { + return; + } + $element = $dom->createElement('content'); + $element->setAttribute('type', 'xhtml'); + $xhtmlElement = $this->_loadXhtml($content); + $xhtml = $dom->importNode($xhtmlElement, true); + $element->appendChild($xhtml); + $root->appendChild($element); + } + + /** + * Load a HTML string and attempt to normalise to XML + */ + protected function _loadXhtml($content) + { + $xhtml = ''; + if (class_exists('tidy', false)) { + $tidy = new tidy; + $config = array( + 'output-xhtml' => true, + 'show-body-only' => true, + 'quote-nbsp' => false + ); + $encoding = str_replace('-', '', $this->getEncoding()); + $tidy->parseString($content, $config, $encoding); + $tidy->cleanRepair(); + $xhtml = (string) $tidy; + } else { + $xhtml = $content; + } + $xhtml = preg_replace(array( + "/(<[\/]?)([a-zA-Z]+)/" + ), '$1xhtml:$2', $xhtml); + $dom = new DOMDocument('1.0', $this->getEncoding()); + + $dom = Zend_Xml_Security::scan('' + . $xhtml . '', $dom); + return $dom->documentElement; + } + + /** + * Set entry cateories + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCategories(DOMDocument $dom, DOMElement $root) + { + $categories = $this->getDataContainer()->getCategories(); + if (!$categories) { + return; + } + foreach ($categories as $cat) { + $category = $dom->createElement('category'); + $category->setAttribute('term', $cat['term']); + if (isset($cat['label'])) { + $category->setAttribute('label', $cat['label']); + } else { + $category->setAttribute('label', $cat['term']); + } + if (isset($cat['scheme'])) { + $category->setAttribute('scheme', $cat['scheme']); + } + $root->appendChild($category); + } + } + + /** + * Append Source element (Atom 1.0 Feed Metadata) + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setSource(DOMDocument $dom, DOMElement $root) + { + $source = $this->getDataContainer()->getSource(); + if (!$source) { + return; + } + $renderer = new Zend_Feed_Writer_Renderer_Feed_Atom_Source($source); + $renderer->setType($this->getType()); + $element = $renderer->render()->getElement(); + $imported = $dom->importNode($element, true); + $root->appendChild($imported); + } +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php b/library/vendor/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php new file mode 100644 index 000000000..32fc00d6a --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php @@ -0,0 +1,120 @@ +_dom = new DOMDocument('1.0', $this->_container->getEncoding()); + $this->_dom->formatOutput = true; + $entry = $this->_dom->createElement('at:deleted-entry'); + $this->_dom->appendChild($entry); + + $entry->setAttribute('ref', $this->_container->getReference()); + $entry->setAttribute('when', $this->_container->getWhen()->get(Zend_Date::ISO_8601)); + + $this->_setBy($this->_dom, $entry); + $this->_setComment($this->_dom, $entry); + + return $this; + } + + /** + * Set tombstone comment + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setComment(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getComment()) { + return; + } + $c = $dom->createElement('at:comment'); + $root->appendChild($c); + $c->setAttribute('type', 'html'); + $cdata = $dom->createCDATASection($this->getDataContainer()->getComment()); + $c->appendChild($cdata); + } + + /** + * Set entry authors + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setBy(DOMDocument $dom, DOMElement $root) + { + $data = $this->_container->getBy(); + if ((!$data || empty($data))) { + return; + } + $author = $this->_dom->createElement('at:by'); + $name = $this->_dom->createElement('name'); + $author->appendChild($name); + $root->appendChild($author); + $text = $dom->createTextNode($data['name']); + $name->appendChild($text); + if (array_key_exists('email', $data)) { + $email = $this->_dom->createElement('email'); + $author->appendChild($email); + $text = $dom->createTextNode($data['email']); + $email->appendChild($text); + } + if (array_key_exists('uri', $data)) { + $uri = $this->_dom->createElement('uri'); + $author->appendChild($uri); + $text = $dom->createTextNode($data['uri']); + $uri->appendChild($text); + } + } + +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/Entry/Rss.php b/library/vendor/Zend/Feed/Writer/Renderer/Entry/Rss.php new file mode 100644 index 000000000..5f5ee9cd9 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/Entry/Rss.php @@ -0,0 +1,340 @@ +_dom = new DOMDocument('1.0', $this->_container->getEncoding()); + $this->_dom->formatOutput = true; + $this->_dom->substituteEntities = false; + $entry = $this->_dom->createElement('item'); + $this->_dom->appendChild($entry); + + $this->_setTitle($this->_dom, $entry); + $this->_setDescription($this->_dom, $entry); + $this->_setDateCreated($this->_dom, $entry); + $this->_setDateModified($this->_dom, $entry); + $this->_setLink($this->_dom, $entry); + $this->_setId($this->_dom, $entry); + $this->_setAuthors($this->_dom, $entry); + $this->_setEnclosure($this->_dom, $entry); + $this->_setCommentLink($this->_dom, $entry); + $this->_setCategories($this->_dom, $entry); + foreach ($this->_extensions as $ext) { + $ext->setType($this->getType()); + $ext->setRootElement($this->getRootElement()); + $ext->setDomDocument($this->getDomDocument(), $entry); + $ext->render(); + } + + return $this; + } + + /** + * Set entry title + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setTitle(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDescription() + && !$this->getDataContainer()->getTitle()) { + $message = 'RSS 2.0 entry elements SHOULD contain exactly one' + . ' title element but a title has not been set. In addition, there' + . ' is no description as required in the absence of a title.'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $title = $dom->createElement('title'); + $root->appendChild($title); + $text = $dom->createTextNode($this->getDataContainer()->getTitle()); + $title->appendChild($text); + } + + /** + * Set entry description + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDescription(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDescription() + && !$this->getDataContainer()->getTitle()) { + $message = 'RSS 2.0 entry elements SHOULD contain exactly one' + . ' description element but a description has not been set. In' + . ' addition, there is no title element as required in the absence' + . ' of a description.'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + if (!$this->getDataContainer()->getDescription()) { + return; + } + $subtitle = $dom->createElement('description'); + $root->appendChild($subtitle); + $text = $dom->createCDATASection($this->getDataContainer()->getDescription()); + $subtitle->appendChild($text); + } + + /** + * Set date entry was last modified + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDateModified(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDateModified()) { + return; + } + + $updated = $dom->createElement('pubDate'); + $root->appendChild($updated); + $text = $dom->createTextNode( + $this->getDataContainer()->getDateModified()->get(Zend_Date::RSS) + ); + $updated->appendChild($text); + } + + /** + * Set date entry was created + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDateCreated(DOMDocument $dom, DOMElement $root) + { + if (!$this->getDataContainer()->getDateCreated()) { + return; + } + if (!$this->getDataContainer()->getDateModified()) { + $this->getDataContainer()->setDateModified( + $this->getDataContainer()->getDateCreated() + ); + } + } + + /** + * Set entry authors + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setAuthors(DOMDocument $dom, DOMElement $root) + { + $authors = $this->_container->getAuthors(); + if ((!$authors || empty($authors))) { + return; + } + foreach ($authors as $data) { + $author = $this->_dom->createElement('author'); + $name = $data['name']; + if (array_key_exists('email', $data)) { + $name = $data['email'] . ' (' . $data['name'] . ')'; + } + $text = $dom->createTextNode($name); + $author->appendChild($text); + $root->appendChild($author); + } + } + + /** + * Set entry enclosure + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setEnclosure(DOMDocument $dom, DOMElement $root) + { + $data = $this->_container->getEnclosure(); + if ((!$data || empty($data))) { + return; + } + if (!isset($data['type'])) { + $exception = new Zend_Feed_Exception('Enclosure "type" is not set'); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + if (!isset($data['length'])) { + $exception = new Zend_Feed_Exception('Enclosure "length" is not set'); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + if (isset($data['length']) && (int) $data['length'] <= 0) { + $exception = new Zend_Feed_Exception('Enclosure "length" must be an integer' + . ' indicating the content\'s length in bytes'); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $enclosure = $this->_dom->createElement('enclosure'); + $enclosure->setAttribute('type', $data['type']); + $enclosure->setAttribute('length', $data['length']); + $enclosure->setAttribute('url', $data['uri']); + $root->appendChild($enclosure); + } + + /** + * Set link to entry + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setLink(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getLink()) { + return; + } + $link = $dom->createElement('link'); + $root->appendChild($link); + $text = $dom->createTextNode($this->getDataContainer()->getLink()); + $link->appendChild($text); + } + + /** + * Set entry identifier + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setId(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getId() + && !$this->getDataContainer()->getLink()) { + return; + } + + $id = $dom->createElement('guid'); + $root->appendChild($id); + if (!$this->getDataContainer()->getId()) { + $this->getDataContainer()->setId( + $this->getDataContainer()->getLink()); + } + $text = $dom->createTextNode($this->getDataContainer()->getId()); + $id->appendChild($text); + if (!Zend_Uri::check($this->getDataContainer()->getId())) { + $id->setAttribute('isPermaLink', 'false'); + } + } + + /** + * Set link to entry comments + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCommentLink(DOMDocument $dom, DOMElement $root) + { + $link = $this->getDataContainer()->getCommentLink(); + if (!$link) { + return; + } + $clink = $this->_dom->createElement('comments'); + $text = $dom->createTextNode($link); + $clink->appendChild($text); + $root->appendChild($clink); + } + + /** + * Set entry categories + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCategories(DOMDocument $dom, DOMElement $root) + { + $categories = $this->getDataContainer()->getCategories(); + if (!$categories) { + return; + } + foreach ($categories as $cat) { + $category = $dom->createElement('category'); + if (isset($cat['scheme'])) { + $category->setAttribute('domain', $cat['scheme']); + } + $text = $dom->createCDATASection($cat['term']); + $category->appendChild($text); + $root->appendChild($category); + } + } +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom.php b/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom.php new file mode 100644 index 000000000..eebd8044d --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom.php @@ -0,0 +1,124 @@ +_container->getEncoding()) { + $this->_container->setEncoding('UTF-8'); + } + $this->_dom = new DOMDocument('1.0', $this->_container->getEncoding()); + $this->_dom->formatOutput = true; + $root = $this->_dom->createElementNS( + Zend_Feed_Writer::NAMESPACE_ATOM_10, 'feed' + ); + $this->setRootElement($root); + $this->_dom->appendChild($root); + $this->_setLanguage($this->_dom, $root); + $this->_setBaseUrl($this->_dom, $root); + $this->_setTitle($this->_dom, $root); + $this->_setDescription($this->_dom, $root); + $this->_setImage($this->_dom, $root); + $this->_setIcon($this->_dom, $root); + $this->_setDateCreated($this->_dom, $root); + $this->_setDateModified($this->_dom, $root); + $this->_setGenerator($this->_dom, $root); + $this->_setLink($this->_dom, $root); + $this->_setFeedLinks($this->_dom, $root); + $this->_setId($this->_dom, $root); + $this->_setAuthors($this->_dom, $root); + $this->_setCopyright($this->_dom, $root); + $this->_setCategories($this->_dom, $root); + $this->_setHubs($this->_dom, $root); + + foreach ($this->_extensions as $ext) { + $ext->setType($this->getType()); + $ext->setRootElement($this->getRootElement()); + $ext->setDomDocument($this->getDomDocument(), $root); + $ext->render(); + } + + foreach ($this->_container as $entry) { + if ($this->getDataContainer()->getEncoding()) { + $entry->setEncoding($this->getDataContainer()->getEncoding()); + } + if ($entry instanceof Zend_Feed_Writer_Entry) { + $renderer = new Zend_Feed_Writer_Renderer_Entry_Atom($entry); + } else { + if (!$this->_dom->documentElement->hasAttribute('xmlns:at')) { + $this->_dom->documentElement->setAttribute( + 'xmlns:at', 'http://purl.org/atompub/tombstones/1.0' + ); + } + $renderer = new Zend_Feed_Writer_Renderer_Entry_Atom_Deleted($entry); + } + if ($this->_ignoreExceptions === true) { + $renderer->ignoreExceptions(); + } + $renderer->setType($this->getType()); + $renderer->setRootElement($this->_dom->documentElement); + $renderer->render(); + $element = $renderer->getElement(); + $imported = $this->_dom->importNode($element, true); + $root->appendChild($imported); + } + return $this; + } + +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom/AtomAbstract.php b/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom/AtomAbstract.php new file mode 100644 index 000000000..bd3db6306 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom/AtomAbstract.php @@ -0,0 +1,437 @@ +getDataContainer()->getLanguage()) { + $root->setAttribute('xml:lang', $this->getDataContainer() + ->getLanguage()); + } + } + + /** + * Set feed title + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setTitle(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getTitle()) { + $message = 'Atom 1.0 feed elements MUST contain exactly one' + . ' atom:title element but a title has not been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + + $title = $dom->createElement('title'); + $root->appendChild($title); + $title->setAttribute('type', 'text'); + $text = $dom->createTextNode($this->getDataContainer()->getTitle()); + $title->appendChild($text); + } + + /** + * Set feed description + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDescription(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDescription()) { + return; + } + $subtitle = $dom->createElement('subtitle'); + $root->appendChild($subtitle); + $subtitle->setAttribute('type', 'text'); + $text = $dom->createTextNode($this->getDataContainer()->getDescription()); + $subtitle->appendChild($text); + } + + /** + * Set date feed was last modified + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDateModified(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDateModified()) { + $message = 'Atom 1.0 feed elements MUST contain exactly one' + . ' atom:updated element but a modification date has not been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + + $updated = $dom->createElement('updated'); + $root->appendChild($updated); + $text = $dom->createTextNode( + $this->getDataContainer()->getDateModified()->get(Zend_Date::ISO_8601) + ); + $updated->appendChild($text); + } + + /** + * Set feed generator string + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setGenerator(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getGenerator()) { + $this->getDataContainer()->setGenerator('Zend_Feed_Writer', + Zend_Version::VERSION, 'http://framework.zend.com'); + } + + $gdata = $this->getDataContainer()->getGenerator(); + $generator = $dom->createElement('generator'); + $root->appendChild($generator); + $text = $dom->createTextNode($gdata['name']); + $generator->appendChild($text); + if (array_key_exists('uri', $gdata)) { + $generator->setAttribute('uri', $gdata['uri']); + } + if (array_key_exists('version', $gdata)) { + $generator->setAttribute('version', $gdata['version']); + } + } + + /** + * Set link to feed + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setLink(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getLink()) { + return; + } + $link = $dom->createElement('link'); + $root->appendChild($link); + $link->setAttribute('rel', 'alternate'); + $link->setAttribute('type', 'text/html'); + $link->setAttribute('href', $this->getDataContainer()->getLink()); + } + + /** + * Set feed links + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setFeedLinks(DOMDocument $dom, DOMElement $root) + { + $flinks = $this->getDataContainer()->getFeedLinks(); + if(!$flinks || !array_key_exists('atom', $flinks)) { + $message = 'Atom 1.0 feed elements SHOULD contain one atom:link ' + . 'element with a rel attribute value of "self". This is the ' + . 'preferred URI for retrieving Atom Feed Documents representing ' + . 'this Atom feed but a feed link has not been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + + foreach ($flinks as $type => $href) { + $mime = 'application/' . strtolower($type) . '+xml'; + $flink = $dom->createElement('link'); + $root->appendChild($flink); + $flink->setAttribute('rel', 'self'); + $flink->setAttribute('type', $mime); + $flink->setAttribute('href', $href); + } + } + + /** + * Set feed authors + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setAuthors(DOMDocument $dom, DOMElement $root) + { + $authors = $this->_container->getAuthors(); + if (!$authors || empty($authors)) { + /** + * Technically we should defer an exception until we can check + * that all entries contain an author. If any entry is missing + * an author, then a missing feed author element is invalid + */ + return; + } + foreach ($authors as $data) { + $author = $this->_dom->createElement('author'); + $name = $this->_dom->createElement('name'); + $author->appendChild($name); + $root->appendChild($author); + $text = $dom->createTextNode($data['name']); + $name->appendChild($text); + if (array_key_exists('email', $data)) { + $email = $this->_dom->createElement('email'); + $author->appendChild($email); + $text = $dom->createTextNode($data['email']); + $email->appendChild($text); + } + if (array_key_exists('uri', $data)) { + $uri = $this->_dom->createElement('uri'); + $author->appendChild($uri); + $text = $dom->createTextNode($data['uri']); + $uri->appendChild($text); + } + } + } + + /** + * Set feed identifier + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setId(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getId() + && !$this->getDataContainer()->getLink()) { + $message = 'Atom 1.0 feed elements MUST contain exactly one ' + . 'atom:id element, or as an alternative, we can use the same ' + . 'value as atom:link however neither a suitable link nor an ' + . 'id have been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + + if (!$this->getDataContainer()->getId()) { + $this->getDataContainer()->setId( + $this->getDataContainer()->getLink()); + } + $id = $dom->createElement('id'); + $root->appendChild($id); + $text = $dom->createTextNode($this->getDataContainer()->getId()); + $id->appendChild($text); + } + + /** + * Set feed copyright + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCopyright(DOMDocument $dom, DOMElement $root) + { + $copyright = $this->getDataContainer()->getCopyright(); + if (!$copyright) { + return; + } + $copy = $dom->createElement('rights'); + $root->appendChild($copy); + $text = $dom->createTextNode($copyright); + $copy->appendChild($text); + } + + /** + * Set feed level logo (image) + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setImage(DOMDocument $dom, DOMElement $root) + { + $image = $this->getDataContainer()->getImage(); + if (!$image) { + return; + } + $img = $dom->createElement('logo'); + $root->appendChild($img); + $text = $dom->createTextNode($image['uri']); + $img->appendChild($text); + } + + /** + * Set feed level icon (image) + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setIcon(DOMDocument $dom, DOMElement $root) + { + $image = $this->getDataContainer()->getIcon(); + if (!$image) { + return; + } + $img = $dom->createElement('icon'); + $root->appendChild($img); + $text = $dom->createTextNode($image['uri']); + $img->appendChild($text); + } + + /** + * Set date feed was created + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDateCreated(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDateCreated()) { + return; + } + if(!$this->getDataContainer()->getDateModified()) { + $this->getDataContainer()->setDateModified( + $this->getDataContainer()->getDateCreated() + ); + } + } + + /** + * Set base URL to feed links + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setBaseUrl(DOMDocument $dom, DOMElement $root) + { + $baseUrl = $this->getDataContainer()->getBaseUrl(); + if (!$baseUrl) { + return; + } + $root->setAttribute('xml:base', $baseUrl); + } + + /** + * Set hubs to which this feed pushes + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setHubs(DOMDocument $dom, DOMElement $root) + { + $hubs = $this->getDataContainer()->getHubs(); + if (!$hubs) { + return; + } + foreach ($hubs as $hubUrl) { + $hub = $dom->createElement('link'); + $hub->setAttribute('rel', 'hub'); + $hub->setAttribute('href', $hubUrl); + $root->appendChild($hub); + } + } + + /** + * Set feed cateories + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCategories(DOMDocument $dom, DOMElement $root) + { + $categories = $this->getDataContainer()->getCategories(); + if (!$categories) { + return; + } + foreach ($categories as $cat) { + $category = $dom->createElement('category'); + $category->setAttribute('term', $cat['term']); + if (isset($cat['label'])) { + $category->setAttribute('label', $cat['label']); + } else { + $category->setAttribute('label', $cat['term']); + } + if (isset($cat['scheme'])) { + $category->setAttribute('scheme', $cat['scheme']); + } + $root->appendChild($category); + } + } +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php b/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php new file mode 100644 index 000000000..2b28085bc --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php @@ -0,0 +1,109 @@ +_container->getEncoding()) { + $this->_container->setEncoding('UTF-8'); + } + $this->_dom = new DOMDocument('1.0', $this->_container->getEncoding()); + $this->_dom->formatOutput = true; + $root = $this->_dom->createElement('source'); + $this->setRootElement($root); + $this->_dom->appendChild($root); + $this->_setLanguage($this->_dom, $root); + $this->_setBaseUrl($this->_dom, $root); + $this->_setTitle($this->_dom, $root); + $this->_setDescription($this->_dom, $root); + $this->_setDateCreated($this->_dom, $root); + $this->_setDateModified($this->_dom, $root); + $this->_setGenerator($this->_dom, $root); + $this->_setLink($this->_dom, $root); + $this->_setFeedLinks($this->_dom, $root); + $this->_setId($this->_dom, $root); + $this->_setAuthors($this->_dom, $root); + $this->_setCopyright($this->_dom, $root); + $this->_setCategories($this->_dom, $root); + + foreach ($this->_extensions as $ext) { + $ext->setType($this->getType()); + $ext->setRootElement($this->getRootElement()); + $ext->setDomDocument($this->getDomDocument(), $root); + $ext->render(); + } + return $this; + } + + /** + * Set feed generator string + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setGenerator(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getGenerator()) { + return; + } + + $gdata = $this->getDataContainer()->getGenerator(); + $generator = $dom->createElement('generator'); + $root->appendChild($generator); + $text = $dom->createTextNode($gdata['name']); + $generator->appendChild($text); + if (array_key_exists('uri', $gdata)) { + $generator->setAttribute('uri', $gdata['uri']); + } + if (array_key_exists('version', $gdata)) { + $generator->setAttribute('version', $gdata['version']); + } + } + +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/Feed/Rss.php b/library/vendor/Zend/Feed/Writer/Renderer/Feed/Rss.php new file mode 100644 index 000000000..79d0e5795 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/Feed/Rss.php @@ -0,0 +1,492 @@ +_container->getEncoding()) { + $this->_container->setEncoding('UTF-8'); + } + $this->_dom = new DOMDocument('1.0', $this->_container->getEncoding()); + $this->_dom->formatOutput = true; + $this->_dom->substituteEntities = false; + $rss = $this->_dom->createElement('rss'); + $this->setRootElement($rss); + $rss->setAttribute('version', '2.0'); + + $channel = $this->_dom->createElement('channel'); + $rss->appendChild($channel); + $this->_dom->appendChild($rss); + $this->_setLanguage($this->_dom, $channel); + $this->_setBaseUrl($this->_dom, $channel); + $this->_setTitle($this->_dom, $channel); + $this->_setDescription($this->_dom, $channel); + $this->_setImage($this->_dom, $channel); + $this->_setDateCreated($this->_dom, $channel); + $this->_setDateModified($this->_dom, $channel); + $this->_setLastBuildDate($this->_dom, $channel); + $this->_setGenerator($this->_dom, $channel); + $this->_setLink($this->_dom, $channel); + $this->_setAuthors($this->_dom, $channel); + $this->_setCopyright($this->_dom, $channel); + $this->_setCategories($this->_dom, $channel); + + foreach ($this->_extensions as $ext) { + $ext->setType($this->getType()); + $ext->setRootElement($this->getRootElement()); + $ext->setDomDocument($this->getDomDocument(), $channel); + $ext->render(); + } + + foreach ($this->_container as $entry) { + if ($this->getDataContainer()->getEncoding()) { + $entry->setEncoding($this->getDataContainer()->getEncoding()); + } + if ($entry instanceof Zend_Feed_Writer_Entry) { + $renderer = new Zend_Feed_Writer_Renderer_Entry_Rss($entry); + } else { + continue; + } + if ($this->_ignoreExceptions === true) { + $renderer->ignoreExceptions(); + } + $renderer->setType($this->getType()); + $renderer->setRootElement($this->_dom->documentElement); + $renderer->render(); + $element = $renderer->getElement(); + $imported = $this->_dom->importNode($element, true); + $channel->appendChild($imported); + } + return $this; + } + + /** + * Set feed language + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setLanguage(DOMDocument $dom, DOMElement $root) + { + $lang = $this->getDataContainer()->getLanguage(); + if (!$lang) { + return; + } + $language = $dom->createElement('language'); + $root->appendChild($language); + $language->nodeValue = $lang; + } + + /** + * Set feed title + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setTitle(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getTitle()) { + $message = 'RSS 2.0 feed elements MUST contain exactly one' + . ' title element but a title has not been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + + $title = $dom->createElement('title'); + $root->appendChild($title); + $text = $dom->createTextNode($this->getDataContainer()->getTitle()); + $title->appendChild($text); + } + + /** + * Set feed description + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDescription(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDescription()) { + $message = 'RSS 2.0 feed elements MUST contain exactly one' + . ' description element but one has not been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $subtitle = $dom->createElement('description'); + $root->appendChild($subtitle); + $text = $dom->createTextNode($this->getDataContainer()->getDescription()); + $subtitle->appendChild($text); + } + + /** + * Set date feed was last modified + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDateModified(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDateModified()) { + return; + } + + $updated = $dom->createElement('pubDate'); + $root->appendChild($updated); + $text = $dom->createTextNode( + $this->getDataContainer()->getDateModified()->get(Zend_Date::RSS) + ); + $updated->appendChild($text); + } + + /** + * Set feed generator string + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setGenerator(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getGenerator()) { + $this->getDataContainer()->setGenerator('Zend_Feed_Writer', + Zend_Version::VERSION, 'http://framework.zend.com'); + } + + $gdata = $this->getDataContainer()->getGenerator(); + $generator = $dom->createElement('generator'); + $root->appendChild($generator); + $name = $gdata['name']; + if (array_key_exists('version', $gdata)) { + $name .= ' ' . $gdata['version']; + } + if (array_key_exists('uri', $gdata)) { + $name .= ' (' . $gdata['uri'] . ')'; + } + $text = $dom->createTextNode($name); + $generator->appendChild($text); + } + + /** + * Set link to feed + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setLink(DOMDocument $dom, DOMElement $root) + { + $value = $this->getDataContainer()->getLink(); + if(!$value) { + $message = 'RSS 2.0 feed elements MUST contain exactly one' + . ' link element but one has not been set'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $link = $dom->createElement('link'); + $root->appendChild($link); + $text = $dom->createTextNode($value); + $link->appendChild($text); + if (!Zend_Uri::check($value)) { + $link->setAttribute('isPermaLink', 'false'); + } + } + + /** + * Set feed authors + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setAuthors(DOMDocument $dom, DOMElement $root) + { + $authors = $this->getDataContainer()->getAuthors(); + if (!$authors || empty($authors)) { + return; + } + foreach ($authors as $data) { + $author = $this->_dom->createElement('author'); + $name = $data['name']; + if (array_key_exists('email', $data)) { + $name = $data['email'] . ' (' . $data['name'] . ')'; + } + $text = $dom->createTextNode($name); + $author->appendChild($text); + $root->appendChild($author); + } + } + + /** + * Set feed copyright + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCopyright(DOMDocument $dom, DOMElement $root) + { + $copyright = $this->getDataContainer()->getCopyright(); + if (!$copyright) { + return; + } + $copy = $dom->createElement('copyright'); + $root->appendChild($copy); + $text = $dom->createTextNode($copyright); + $copy->appendChild($text); + } + + /** + * Set feed channel image + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setImage(DOMDocument $dom, DOMElement $root) + { + $image = $this->getDataContainer()->getImage(); + if (!$image) { + return; + } + if (!isset($image['title']) || empty($image['title']) + || !is_string($image['title'])) { + $message = 'RSS 2.0 feed images must include a title'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + if (empty($image['link']) || !is_string($image['link']) + || !Zend_Uri::check($image['link'])) { + $message = 'Invalid parameter: parameter \'link\'' + . ' must be a non-empty string and valid URI/IRI'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $img = $dom->createElement('image'); + $root->appendChild($img); + $url = $dom->createElement('url'); + $text = $dom->createTextNode($image['uri']); + $url->appendChild($text); + $title = $dom->createElement('title'); + $text = $dom->createTextNode($image['title']); + $title->appendChild($text); + $link = $dom->createElement('link'); + $text = $dom->createTextNode($image['link']); + $link->appendChild($text); + $img->appendChild($url); + $img->appendChild($title); + $img->appendChild($link); + if (isset($image['height'])) { + if (!ctype_digit((string) $image['height']) || $image['height'] > 400) { + $message = 'Invalid parameter: parameter \'height\'' + . ' must be an integer not exceeding 400'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $height = $dom->createElement('height'); + $text = $dom->createTextNode($image['height']); + $height->appendChild($text); + $img->appendChild($height); + } + if (isset($image['width'])) { + if (!ctype_digit((string) $image['width']) || $image['width'] > 144) { + $message = 'Invalid parameter: parameter \'width\'' + . ' must be an integer not exceeding 144'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $width = $dom->createElement('width'); + $text = $dom->createTextNode($image['width']); + $width->appendChild($text); + $img->appendChild($width); + } + if (isset($image['description'])) { + if (empty($image['description']) || !is_string($image['description'])) { + $message = 'Invalid parameter: parameter \'description\'' + . ' must be a non-empty string'; + $exception = new Zend_Feed_Exception($message); + if (!$this->_ignoreExceptions) { + throw $exception; + } else { + $this->_exceptions[] = $exception; + return; + } + } + $desc = $dom->createElement('description'); + $text = $dom->createTextNode($image['description']); + $desc->appendChild($text); + $img->appendChild($desc); + } + } + + /** + * Set date feed was created + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setDateCreated(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getDateCreated()) { + return; + } + if(!$this->getDataContainer()->getDateModified()) { + $this->getDataContainer()->setDateModified( + $this->getDataContainer()->getDateCreated() + ); + } + } + + /** + * Set date feed last build date + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setLastBuildDate(DOMDocument $dom, DOMElement $root) + { + if(!$this->getDataContainer()->getLastBuildDate()) { + return; + } + + $lastBuildDate = $dom->createElement('lastBuildDate'); + $root->appendChild($lastBuildDate); + $text = $dom->createTextNode( + $this->getDataContainer()->getLastBuildDate()->get(Zend_Date::RSS) + ); + $lastBuildDate->appendChild($text); + } + + /** + * Set base URL to feed links + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setBaseUrl(DOMDocument $dom, DOMElement $root) + { + $baseUrl = $this->getDataContainer()->getBaseUrl(); + if (!$baseUrl) { + return; + } + $root->setAttribute('xml:base', $baseUrl); + } + + /** + * Set feed categories + * + * @param DOMDocument $dom + * @param DOMElement $root + * @return void + */ + protected function _setCategories(DOMDocument $dom, DOMElement $root) + { + $categories = $this->getDataContainer()->getCategories(); + if (!$categories) { + return; + } + foreach ($categories as $cat) { + $category = $dom->createElement('category'); + if (isset($cat['scheme'])) { + $category->setAttribute('domain', $cat['scheme']); + } + $text = $dom->createTextNode($cat['term']); + $category->appendChild($text); + $root->appendChild($category); + } + } +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/RendererAbstract.php b/library/vendor/Zend/Feed/Writer/Renderer/RendererAbstract.php new file mode 100644 index 000000000..eade2e05d --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/RendererAbstract.php @@ -0,0 +1,247 @@ +_container = $container; + $this->setType($container->getType()); + $this->_loadExtensions(); + } + + /** + * Save XML to string + * + * @return string + */ + public function saveXml() + { + return $this->getDomDocument()->saveXml(); + } + + /** + * Get DOM document + * + * @return DOMDocument + */ + public function getDomDocument() + { + return $this->_dom; + } + + /** + * Get document element from DOM + * + * @return DOMElement + */ + public function getElement() + { + return $this->getDomDocument()->documentElement; + } + + /** + * Get data container of items being rendered + * + * @return mixed + */ + public function getDataContainer() + { + return $this->_container; + } + + /** + * Set feed encoding + * + * @param string $enc + * @return Zend_Feed_Writer_Renderer_RendererAbstract + */ + public function setEncoding($enc) + { + $this->_encoding = $enc; + return $this; + } + + /** + * Get feed encoding + * + * @return string + */ + public function getEncoding() + { + return $this->_encoding; + } + + /** + * Indicate whether or not to ignore exceptions + * + * @param bool $bool + * @return Zend_Feed_Writer_Renderer_RendererAbstract + */ + public function ignoreExceptions($bool = true) + { + if (!is_bool($bool)) { + throw new Zend_Feed_Exception('Invalid parameter: $bool. Should be TRUE or FALSE (defaults to TRUE if null)'); + } + $this->_ignoreExceptions = $bool; + return $this; + } + + /** + * Get exception list + * + * @return array + */ + public function getExceptions() + { + return $this->_exceptions; + } + + /** + * Set the current feed type being exported to "rss" or "atom". This allows + * other objects to gracefully choose whether to execute or not, depending + * on their appropriateness for the current type, e.g. renderers. + * + * @param string $type + */ + public function setType($type) + { + $this->_type = $type; + } + + /** + * Retrieve the current or last feed type exported. + * + * @return string Value will be "rss" or "atom" + */ + public function getType() + { + return $this->_type; + } + + /** + * Sets the absolute root element for the XML feed being generated. This + * helps simplify the appending of namespace declarations, but also ensures + * namespaces are added to the root element - not scattered across the entire + * XML file - may assist namespace unsafe parsers and looks pretty ;). + * + * @param DOMElement $root + */ + public function setRootElement(DOMElement $root) + { + $this->_rootElement = $root; + } + + /** + * Retrieve the absolute root element for the XML feed being generated. + * + * @return DOMElement + */ + public function getRootElement() + { + return $this->_rootElement; + } + + /** + * Load extensions from Zend_Feed_Writer + * + * @return void + */ + protected function _loadExtensions() + { + Zend_Feed_Writer::registerCoreExtensions(); + $all = Zend_Feed_Writer::getExtensions(); + if (stripos(get_class($this), 'entry')) { + $exts = $all['entryRenderer']; + } else { + $exts = $all['feedRenderer']; + } + foreach ($exts as $extension) { + $className = Zend_Feed_Writer::getPluginLoader()->getClassName($extension); + $this->_extensions[$extension] = new $className( + $this->getDataContainer() + ); + $this->_extensions[$extension]->setEncoding($this->getEncoding()); + } + } +} diff --git a/library/vendor/Zend/Feed/Writer/Renderer/RendererInterface.php b/library/vendor/Zend/Feed/Writer/Renderer/RendererInterface.php new file mode 100644 index 000000000..7bd04a012 --- /dev/null +++ b/library/vendor/Zend/Feed/Writer/Renderer/RendererInterface.php @@ -0,0 +1,111 @@ +getBelongsTo()) !== $eBelongTo) { $check = $this->_dissolveArrayValue($defaults, $belongsTo); } - if (array_key_exists($name, $check)) { + if (array_key_exists($name, (array)$check)) { $this->setDefault($name, $check[$name]); $defaults = $this->_dissolveArrayUnsetKey($defaults, $belongsTo, $name); } diff --git a/library/vendor/Zend/Form/Decorator/Abstract.php b/library/vendor/Zend/Form/Decorator/Abstract.php index 56a06c481..93c5a0535 100644 --- a/library/vendor/Zend/Form/Decorator/Abstract.php +++ b/library/vendor/Zend/Form/Decorator/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Callback.php b/library/vendor/Zend/Form/Decorator/Callback.php index 658a214d8..fb759fdbb 100644 --- a/library/vendor/Zend/Form/Decorator/Callback.php +++ b/library/vendor/Zend/Form/Decorator/Callback.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -43,7 +43,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Captcha.php b/library/vendor/Zend/Form/Decorator/Captcha.php index 1958886d9..914189e9e 100644 --- a/library/vendor/Zend/Form/Decorator/Captcha.php +++ b/library/vendor/Zend/Form/Decorator/Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Captcha/ReCaptcha.php b/library/vendor/Zend/Form/Decorator/Captcha/ReCaptcha.php index fb7237721..9d2833939 100644 --- a/library/vendor/Zend/Form/Decorator/Captcha/ReCaptcha.php +++ b/library/vendor/Zend/Form/Decorator/Captcha/ReCaptcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Form_Decorator_Captcha_ReCaptcha extends Zend_Form_Decorator_Abstract diff --git a/library/vendor/Zend/Form/Decorator/Captcha/Word.php b/library/vendor/Zend/Form/Decorator/Captcha/Word.php index 5c4650192..38332357b 100644 --- a/library/vendor/Zend/Form/Decorator/Captcha/Word.php +++ b/library/vendor/Zend/Form/Decorator/Captcha/Word.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Description.php b/library/vendor/Zend/Form/Decorator/Description.php index 714587c81..f5d693653 100644 --- a/library/vendor/Zend/Form/Decorator/Description.php +++ b/library/vendor/Zend/Form/Decorator/Description.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/DtDdWrapper.php b/library/vendor/Zend/Form/Decorator/DtDdWrapper.php index 854ee8a8f..b569fabe0 100644 --- a/library/vendor/Zend/Form/Decorator/DtDdWrapper.php +++ b/library/vendor/Zend/Form/Decorator/DtDdWrapper.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Errors.php b/library/vendor/Zend/Form/Decorator/Errors.php index 5f6b6fb3d..24fc3d938 100644 --- a/library/vendor/Zend/Form/Decorator/Errors.php +++ b/library/vendor/Zend/Form/Decorator/Errors.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Exception.php b/library/vendor/Zend/Form/Decorator/Exception.php index 438b34d1b..6d86f3254 100644 --- a/library/vendor/Zend/Form/Decorator/Exception.php +++ b/library/vendor/Zend/Form/Decorator/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Form_Decorator_Exception extends Zend_Form_Exception diff --git a/library/vendor/Zend/Form/Decorator/Fieldset.php b/library/vendor/Zend/Form/Decorator/Fieldset.php index 5fd981906..036df2c9d 100644 --- a/library/vendor/Zend/Form/Decorator/Fieldset.php +++ b/library/vendor/Zend/Form/Decorator/Fieldset.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/File.php b/library/vendor/Zend/Form/Decorator/File.php index caf078c63..d7141dec3 100644 --- a/library/vendor/Zend/Form/Decorator/File.php +++ b/library/vendor/Zend/Form/Decorator/File.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Form.php b/library/vendor/Zend/Form/Decorator/Form.php index 82e668b2b..c88573126 100644 --- a/library/vendor/Zend/Form/Decorator/Form.php +++ b/library/vendor/Zend/Form/Decorator/Form.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/FormElements.php b/library/vendor/Zend/Form/Decorator/FormElements.php index 8b5ee7f55..c2fb13640 100644 --- a/library/vendor/Zend/Form/Decorator/FormElements.php +++ b/library/vendor/Zend/Form/Decorator/FormElements.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/FormErrors.php b/library/vendor/Zend/Form/Decorator/FormErrors.php index e66a38a84..70c9353d3 100644 --- a/library/vendor/Zend/Form/Decorator/FormErrors.php +++ b/library/vendor/Zend/Form/Decorator/FormErrors.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/HtmlTag.php b/library/vendor/Zend/Form/Decorator/HtmlTag.php index 0e6cb6598..532a3e2c5 100644 --- a/library/vendor/Zend/Form/Decorator/HtmlTag.php +++ b/library/vendor/Zend/Form/Decorator/HtmlTag.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -42,7 +42,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Image.php b/library/vendor/Zend/Form/Decorator/Image.php index bc071d547..4ec01c1bd 100644 --- a/library/vendor/Zend/Form/Decorator/Image.php +++ b/library/vendor/Zend/Form/Decorator/Image.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Interface.php b/library/vendor/Zend/Form/Decorator/Interface.php index 7e721537f..5cc11717b 100644 --- a/library/vendor/Zend/Form/Decorator/Interface.php +++ b/library/vendor/Zend/Form/Decorator/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Label.php b/library/vendor/Zend/Form/Decorator/Label.php index 72619ac01..6648a569a 100644 --- a/library/vendor/Zend/Form/Decorator/Label.php +++ b/library/vendor/Zend/Form/Decorator/Label.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -39,7 +39,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Marker/File/Interface.php b/library/vendor/Zend/Form/Decorator/Marker/File/Interface.php index 1c5378c0e..40a4fe7dc 100644 --- a/library/vendor/Zend/Form/Decorator/Marker/File/Interface.php +++ b/library/vendor/Zend/Form/Decorator/Marker/File/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/PrepareElements.php b/library/vendor/Zend/Form/Decorator/PrepareElements.php index 3ca51b27f..52ed93cf5 100644 --- a/library/vendor/Zend/Form/Decorator/PrepareElements.php +++ b/library/vendor/Zend/Form/Decorator/PrepareElements.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/Tooltip.php b/library/vendor/Zend/Form/Decorator/Tooltip.php index e97bbca4c..2448b6116 100644 --- a/library/vendor/Zend/Form/Decorator/Tooltip.php +++ b/library/vendor/Zend/Form/Decorator/Tooltip.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Tooltip.php$ */ diff --git a/library/vendor/Zend/Form/Decorator/ViewHelper.php b/library/vendor/Zend/Form/Decorator/ViewHelper.php index 6d397810f..cf94e650e 100644 --- a/library/vendor/Zend/Form/Decorator/ViewHelper.php +++ b/library/vendor/Zend/Form/Decorator/ViewHelper.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Decorator/ViewScript.php b/library/vendor/Zend/Form/Decorator/ViewScript.php index b1e7bedc2..0a1a5a1c8 100644 --- a/library/vendor/Zend/Form/Decorator/ViewScript.php +++ b/library/vendor/Zend/Form/Decorator/ViewScript.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -45,7 +45,7 @@ * @category Zend * @package Zend_Form * @subpackage Decorator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/DisplayGroup.php b/library/vendor/Zend/Form/DisplayGroup.php index 4356bd417..4adc4f32d 100644 --- a/library/vendor/Zend/Form/DisplayGroup.php +++ b/library/vendor/Zend/Form/DisplayGroup.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element.php b/library/vendor/Zend/Form/Element.php index b00ea5392..f71d74038 100644 --- a/library/vendor/Zend/Form/Element.php +++ b/library/vendor/Zend/Form/Element.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Button.php b/library/vendor/Zend/Form/Element/Button.php index 85b9488b5..89de0565e 100644 --- a/library/vendor/Zend/Form/Element/Button.php +++ b/library/vendor/Zend/Form/Element/Button.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Captcha.php b/library/vendor/Zend/Form/Element/Captcha.php index 09afc98ef..09d738f81 100644 --- a/library/vendor/Zend/Form/Element/Captcha.php +++ b/library/vendor/Zend/Form/Element/Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Form_Element_Captcha extends Zend_Form_Element_Xhtml diff --git a/library/vendor/Zend/Form/Element/Checkbox.php b/library/vendor/Zend/Form/Element/Checkbox.php index 6290a720d..65cdccc90 100644 --- a/library/vendor/Zend/Form/Element/Checkbox.php +++ b/library/vendor/Zend/Form/Element/Checkbox.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Exception.php b/library/vendor/Zend/Form/Element/Exception.php index d7c0de352..b39e0538e 100644 --- a/library/vendor/Zend/Form/Element/Exception.php +++ b/library/vendor/Zend/Form/Element/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Form_Element_Exception extends Zend_Form_Exception diff --git a/library/vendor/Zend/Form/Element/File.php b/library/vendor/Zend/Form/Element/File.php index cc805fb99..1b336da77 100644 --- a/library/vendor/Zend/Form/Element/File.php +++ b/library/vendor/Zend/Form/Element/File.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Hash.php b/library/vendor/Zend/Form/Element/Hash.php index e761eac18..b807727f4 100644 --- a/library/vendor/Zend/Form/Element/Hash.php +++ b/library/vendor/Zend/Form/Element/Hash.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Hidden.php b/library/vendor/Zend/Form/Element/Hidden.php index 83d306a36..c5126842a 100644 --- a/library/vendor/Zend/Form/Element/Hidden.php +++ b/library/vendor/Zend/Form/Element/Hidden.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Image.php b/library/vendor/Zend/Form/Element/Image.php index 9d10eadf8..46c914a18 100644 --- a/library/vendor/Zend/Form/Element/Image.php +++ b/library/vendor/Zend/Form/Element/Image.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Multi.php b/library/vendor/Zend/Form/Element/Multi.php index a1634cc18..3de2033ae 100644 --- a/library/vendor/Zend/Form/Element/Multi.php +++ b/library/vendor/Zend/Form/Element/Multi.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/MultiCheckbox.php b/library/vendor/Zend/Form/Element/MultiCheckbox.php index 59a01cfde..24fe938bd 100644 --- a/library/vendor/Zend/Form/Element/MultiCheckbox.php +++ b/library/vendor/Zend/Form/Element/MultiCheckbox.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Multiselect.php b/library/vendor/Zend/Form/Element/Multiselect.php index 68886f248..5e94d56a9 100644 --- a/library/vendor/Zend/Form/Element/Multiselect.php +++ b/library/vendor/Zend/Form/Element/Multiselect.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Note.php b/library/vendor/Zend/Form/Element/Note.php index 38b485eb0..77dee5325 100644 --- a/library/vendor/Zend/Form/Element/Note.php +++ b/library/vendor/Zend/Form/Element/Note.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Password.php b/library/vendor/Zend/Form/Element/Password.php index 059699b87..8d84c72c9 100644 --- a/library/vendor/Zend/Form/Element/Password.php +++ b/library/vendor/Zend/Form/Element/Password.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Radio.php b/library/vendor/Zend/Form/Element/Radio.php index f387ed91b..883a00df7 100644 --- a/library/vendor/Zend/Form/Element/Radio.php +++ b/library/vendor/Zend/Form/Element/Radio.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Reset.php b/library/vendor/Zend/Form/Element/Reset.php index 1722e7d37..8a2780585 100644 --- a/library/vendor/Zend/Form/Element/Reset.php +++ b/library/vendor/Zend/Form/Element/Reset.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Select.php b/library/vendor/Zend/Form/Element/Select.php index 296e3e69f..acf009a52 100644 --- a/library/vendor/Zend/Form/Element/Select.php +++ b/library/vendor/Zend/Form/Element/Select.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Submit.php b/library/vendor/Zend/Form/Element/Submit.php index 0352527df..ad564e060 100644 --- a/library/vendor/Zend/Form/Element/Submit.php +++ b/library/vendor/Zend/Form/Element/Submit.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Text.php b/library/vendor/Zend/Form/Element/Text.php index a0c9ca850..1a99b8e90 100644 --- a/library/vendor/Zend/Form/Element/Text.php +++ b/library/vendor/Zend/Form/Element/Text.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Textarea.php b/library/vendor/Zend/Form/Element/Textarea.php index 58c8fcc53..ff4ddd57a 100644 --- a/library/vendor/Zend/Form/Element/Textarea.php +++ b/library/vendor/Zend/Form/Element/Textarea.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Element/Xhtml.php b/library/vendor/Zend/Form/Element/Xhtml.php index f3c051d4f..6ef15e91c 100644 --- a/library/vendor/Zend/Form/Element/Xhtml.php +++ b/library/vendor/Zend/Form/Element/Xhtml.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Form * @subpackage Element - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Form/Exception.php b/library/vendor/Zend/Form/Exception.php index 81ef51ee4..61a1bd570 100644 --- a/library/vendor/Zend/Form/Exception.php +++ b/library/vendor/Zend/Form/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Form_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Form/SubForm.php b/library/vendor/Zend/Form/SubForm.php index 2532f18ad..36d961e6f 100644 --- a/library/vendor/Zend/Form/SubForm.php +++ b/library/vendor/Zend/Form/SubForm.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_Form - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Gdata.php b/library/vendor/Zend/Gdata.php deleted file mode 100644 index 708aa5b13..000000000 --- a/library/vendor/Zend/Gdata.php +++ /dev/null @@ -1,238 +0,0 @@ -decodeRequest('GET', $uri); - $response = $app->performHttpRequest($requestData['method'], $requestData['url']); - - $feedContent = $response->getBody(); - - $feed = self::importString($feedContent, $className); - if ($client != null) { - $feed->setHttpClient($client); - } - return $feed; - } - - /** - * Retrieve feed as string or object - * - * @param mixed $location The location as string or Zend_Gdata_Query - * @param string $className The class type to use for returning the feed - * @throws Zend_Gdata_App_InvalidArgumentException - * @return string|Zend_Gdata_App_Feed Returns string only if the object - * mapping has been disabled explicitly - * by passing false to the - * useObjectMapping() function. - */ - public function getFeed($location, $className='Zend_Gdata_Feed') - { - if (is_string($location)) { - $uri = $location; - } elseif ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); - } else { - throw new Zend_Gdata_App_InvalidArgumentException( - 'You must specify the location as either a string URI ' . - 'or a child of Zend_Gdata_Query'); - } - return parent::getFeed($uri, $className); - } - - /** - * Retrieve entry as string or object - * - * @param mixed $location The location as string or Zend_Gdata_Query - * @throws Zend_Gdata_App_InvalidArgumentException - * @return string|Zend_Gdata_App_Entry Returns string only if the object - * mapping has been disabled explicitly - * by passing false to the - * useObjectMapping() function. - */ - public function getEntry($location, $className='Zend_Gdata_Entry') - { - if (is_string($location)) { - $uri = $location; - } elseif ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); - } else { - throw new Zend_Gdata_App_InvalidArgumentException( - 'You must specify the location as either a string URI ' . - 'or a child of Zend_Gdata_Query'); - } - return parent::getEntry($uri, $className); - } - - /** - * Performs a HTTP request using the specified method. - * - * Overrides the definition in the parent (Zend_Gdata_App) - * and uses the Zend_Gdata_HttpClient functionality - * to filter the HTTP requests and responses. - * - * @param string $method The HTTP method for the request - - * 'GET', 'POST', 'PUT', 'DELETE' - * @param string $url The URL to which this request is being performed, - * or null if found in $data - * @param array $headers An associative array of HTTP headers - * for this request - * @param string $body The body of the HTTP request - * @param string $contentType The value for the content type of the - * request body - * @param int $remainingRedirects Number of redirects to follow - * if requests results in one - * @return Zend_Http_Response The response object - */ - public function performHttpRequest($method, $url, $headers = array(), $body = null, $contentType = null, $remainingRedirects = null) - { - if ($this->_httpClient instanceof Zend_Gdata_HttpClient) { - $filterResult = $this->_httpClient->filterHttpRequest($method, $url, $headers, $body, $contentType); - $method = $filterResult['method']; - $url = $filterResult['url']; - $body = $filterResult['body']; - $headers = $filterResult['headers']; - $contentType = $filterResult['contentType']; - return $this->_httpClient->filterHttpResponse(parent::performHttpRequest($method, $url, $headers, $body, $contentType, $remainingRedirects)); - } else { - return parent::performHttpRequest($method, $url, $headers, $body, $contentType, $remainingRedirects); - } - } - - /** - * Determines whether service object is authenticated. - * - * @return boolean True if service object is authenticated, false otherwise. - */ - public function isAuthenticated() - { - $client = parent::getHttpClient(); - if ($client->getClientLoginToken() || - $client->getAuthSubToken()) { - return true; - } - - return false; - } - -} diff --git a/library/vendor/Zend/Http/Client.php b/library/vendor/Zend/Http/Client.php index 0a3d1bb5b..44f3c0961 100644 --- a/library/vendor/Zend/Http/Client.php +++ b/library/vendor/Zend/Http/Client.php @@ -17,7 +17,7 @@ * @package Zend_Http * @subpackage Client * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,6 +36,11 @@ */ +/** + * @see Zend_Http_Header_HeaderValue + */ + + /** * @see Zend_Http_Response */ @@ -55,7 +60,7 @@ * @package Zend_Http * @subpackage Client * @throws Zend_Http_Client_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Client @@ -423,38 +428,40 @@ class Zend_Http_Client foreach ($name as $k => $v) { if (is_string($k)) { $this->setHeaders($k, $v); - } else { - $this->setHeaders($v, null); + continue; } + $this->setHeaders($v, null); } - } else { - // Check if $name needs to be split - if ($value === null && (strpos($name, ':') > 0)) { - list($name, $value) = explode(':', $name, 2); - } - - // Make sure the name is valid if we are in strict mode - if ($this->config['strict'] && (! preg_match('/^[a-zA-Z0-9-]+$/', $name))) { - /** @see Zend_Http_Client_Exception */ - throw new Zend_Http_Client_Exception("{$name} is not a valid HTTP header name"); - } - - $normalized_name = strtolower($name); - - // If $value is null or false, unset the header - if ($value === null || $value === false) { - unset($this->headers[$normalized_name]); - - // Else, set the header - } else { - // Header names are stored lowercase internally. - if (is_string($value)) { - $value = trim($value); - } - $this->headers[$normalized_name] = array($name, $value); - } + return $this; } + // Check if $name needs to be split + if ($value === null && (strpos($name, ':') > 0)) { + list($name, $value) = explode(':', $name, 2); + } + + // Make sure the name is valid if we are in strict mode + if ($this->config['strict'] && (! preg_match('/^[a-zA-Z0-9-]+$/', $name))) { + throw new Zend_Http_Client_Exception("{$name} is not a valid HTTP header name"); + } + + $normalized_name = strtolower($name); + + // If $value is null or false, unset the header + if ($value === null || $value === false) { + unset($this->headers[$normalized_name]); + return $this; + } + + // Validate value + $this->_validateHeaderValue($value); + + // Header names are stored lowercase internally. + if (is_string($value)) { + $value = trim($value); + } + $this->headers[$normalized_name] = array($name, $value); + return $this; } @@ -1545,4 +1552,31 @@ class Zend_Http_Client return $parameters; } + /** + * Ensure a header value is valid per RFC 7230. + * + * @see http://tools.ietf.org/html/rfc7230#section-3.2 + * @param string|object|array $value + * @param bool $recurse + */ + protected function _validateHeaderValue($value, $recurse = true) + { + if (is_array($value) && $recurse) { + foreach ($value as $v) { + $this->_validateHeaderValue($v, false); + } + return; + } + + // Cast integers and floats to strings for purposes of header representation. + if (is_int($value) || is_float($value)) { + $value = (string) $value; + } + + if (! is_string($value) && (! is_object($value) || ! method_exists($value, '__toString'))) { + throw new Zend_Http_Exception('Invalid header value detected'); + } + + Zend_Http_Header_HeaderValue::assertValid($value); + } } diff --git a/library/vendor/Zend/Http/Client/Adapter/Curl.php b/library/vendor/Zend/Http/Client/Adapter/Curl.php index f870942be..1cf59e8da 100644 --- a/library/vendor/Zend/Http/Client/Adapter/Curl.php +++ b/library/vendor/Zend/Http/Client/Adapter/Curl.php @@ -17,7 +17,7 @@ * @package Zend_Http * @subpackage Client_Adapter * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -39,7 +39,7 @@ * @category Zend * @package Zend_Http * @subpackage Client_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Client_Adapter_Curl implements Zend_Http_Client_Adapter_Interface, Zend_Http_Client_Adapter_Stream @@ -216,17 +216,24 @@ class Zend_Http_Client_Adapter_Curl implements Zend_Http_Client_Adapter_Interfac curl_setopt($this->_curl, CURLOPT_PORT, intval($port)); } - // Set timeout + // Set connection timeout + $connectTimeout = $this->config['timeout']; + $constant = CURLOPT_CONNECTTIMEOUT; if (defined('CURLOPT_CONNECTTIMEOUT_MS')) { - curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT_MS, $this->_config['timeout'] * 1000); - } else { - curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT, $this->_config['timeout']); + $connectTimeout *= 1000; + $constant = constant('CURLOPT_CONNECTTIMEOUT_MS'); } + curl_setopt($this->_curl, $constant, $connectTimeout); - if (defined('CURLOPT_TIMEOUT_MS')) { - curl_setopt($this->_curl, CURLOPT_TIMEOUT_MS, $this->_config['timeout'] * 1000); - } else { - curl_setopt($this->_curl, CURLOPT_TIMEOUT, $this->_config['timeout']); + // Set request timeout (once connection is established) + if (array_key_exists('request_timeout', $this->_config)) { + $requestTimeout = $this->config['request_timeout']; + $constant = CURLOPT_TIMEOUT; + if (defined('CURLOPT_TIMEOUT_MS')) { + $requestTimeout *= 1000; + $constant = constant('CURLOPT_TIMEOUT_MS'); + } + curl_setopt($this->_curl, $constant, $requestTimeout); } // Set Max redirects diff --git a/library/vendor/Zend/Http/Client/Adapter/Exception.php b/library/vendor/Zend/Http/Client/Adapter/Exception.php index 6f8f9a3cd..3a10a0f31 100644 --- a/library/vendor/Zend/Http/Client/Adapter/Exception.php +++ b/library/vendor/Zend/Http/Client/Adapter/Exception.php @@ -16,7 +16,7 @@ * @package Zend_Http * @subpackage Client_Adapter_Exception * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Http * @subpackage Client_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Client_Adapter_Exception extends Zend_Http_Client_Exception diff --git a/library/vendor/Zend/Http/Client/Adapter/Interface.php b/library/vendor/Zend/Http/Client/Adapter/Interface.php index 5d1f81acb..3ed8a7772 100644 --- a/library/vendor/Zend/Http/Client/Adapter/Interface.php +++ b/library/vendor/Zend/Http/Client/Adapter/Interface.php @@ -17,7 +17,7 @@ * @package Zend_Http * @subpackage Client_Adapter * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Http * @subpackage Client_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Http_Client_Adapter_Interface diff --git a/library/vendor/Zend/Http/Client/Adapter/Proxy.php b/library/vendor/Zend/Http/Client/Adapter/Proxy.php index 3225c9b74..55834d0ea 100644 --- a/library/vendor/Zend/Http/Client/Adapter/Proxy.php +++ b/library/vendor/Zend/Http/Client/Adapter/Proxy.php @@ -17,7 +17,7 @@ * @package Zend_Http * @subpackage Client_Adapter * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -43,7 +43,7 @@ * @category Zend * @package Zend_Http * @subpackage Client_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket @@ -237,7 +237,7 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket ) { $request = "CONNECT $host:$port HTTP/$http_ver\r\n" . - "Host: " . $this->config['proxy_host'] . "\r\n"; + "Host: " . $host . "\r\n"; // Process provided headers, including important ones to CONNECT request foreach ($headers as $k => $v) { diff --git a/library/vendor/Zend/Http/Client/Adapter/Socket.php b/library/vendor/Zend/Http/Client/Adapter/Socket.php index 319419942..5122fc8aa 100644 --- a/library/vendor/Zend/Http/Client/Adapter/Socket.php +++ b/library/vendor/Zend/Http/Client/Adapter/Socket.php @@ -17,7 +17,7 @@ * @package Zend_Http * @subpackage Client_Adapter * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Http * @subpackage Client_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Client_Adapter_Socket implements Zend_Http_Client_Adapter_Interface, Zend_Http_Client_Adapter_Stream diff --git a/library/vendor/Zend/Http/Client/Adapter/Stream.php b/library/vendor/Zend/Http/Client/Adapter/Stream.php index aeb71b26f..f0eb17823 100644 --- a/library/vendor/Zend/Http/Client/Adapter/Stream.php +++ b/library/vendor/Zend/Http/Client/Adapter/Stream.php @@ -17,7 +17,7 @@ * @package Zend_Http * @subpackage Client_Adapter * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Http * @subpackage Client_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Http_Client_Adapter_Stream diff --git a/library/vendor/Zend/Http/Client/Adapter/Test.php b/library/vendor/Zend/Http/Client/Adapter/Test.php index cb490cbc8..a10a63425 100644 --- a/library/vendor/Zend/Http/Client/Adapter/Test.php +++ b/library/vendor/Zend/Http/Client/Adapter/Test.php @@ -16,7 +16,7 @@ * @package Zend_Http * @subpackage Client_Adapter * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -41,7 +41,7 @@ * @category Zend * @package Zend_Http * @subpackage Client_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Client_Adapter_Test implements Zend_Http_Client_Adapter_Interface diff --git a/library/vendor/Zend/Http/Client/Exception.php b/library/vendor/Zend/Http/Client/Exception.php index b7f753a9c..893f32cb6 100644 --- a/library/vendor/Zend/Http/Client/Exception.php +++ b/library/vendor/Zend/Http/Client/Exception.php @@ -16,7 +16,7 @@ * @package Zend_Http * @subpackage Client_Exception * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Http * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Client_Exception extends Zend_Http_Exception diff --git a/library/vendor/Zend/Http/Cookie.php b/library/vendor/Zend/Http/Cookie.php index c8ef3094e..033753614 100644 --- a/library/vendor/Zend/Http/Cookie.php +++ b/library/vendor/Zend/Http/Cookie.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_Http * @subpackage Cookie - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -40,7 +40,7 @@ * * @category Zend * @package Zend_Http - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Cookie diff --git a/library/vendor/Zend/Http/CookieJar.php b/library/vendor/Zend/Http/CookieJar.php index 94fcbebba..004ae9eba 100644 --- a/library/vendor/Zend/Http/CookieJar.php +++ b/library/vendor/Zend/Http/CookieJar.php @@ -16,7 +16,7 @@ * @package Zend_Http * @subpackage CookieJar * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -51,7 +51,7 @@ * @category Zend * @package Zend_Http * @subpackage CookieJar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_CookieJar implements Countable, IteratorAggregate diff --git a/library/vendor/Zend/Http/Exception.php b/library/vendor/Zend/Http/Exception.php index 696f19931..ece1891ac 100644 --- a/library/vendor/Zend/Http/Exception.php +++ b/library/vendor/Zend/Http/Exception.php @@ -16,7 +16,7 @@ * @package Zend_Http * @subpackage Exception * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Http * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Http/Header/Exception/InvalidArgumentException.php b/library/vendor/Zend/Http/Header/Exception/InvalidArgumentException.php index 5c47a1ca2..9841ffbc1 100644 --- a/library/vendor/Zend/Http/Header/Exception/InvalidArgumentException.php +++ b/library/vendor/Zend/Http/Header/Exception/InvalidArgumentException.php @@ -16,7 +16,7 @@ * @package Zend_Http * @subpackage Header_Exception * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Http * @subpackage Header_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Header_Exception_InvalidArgumentException extends Zend_Http_Exception diff --git a/library/vendor/Zend/Http/Header/Exception/RuntimeException.php b/library/vendor/Zend/Http/Header/Exception/RuntimeException.php index 1c894933a..40e28d319 100644 --- a/library/vendor/Zend/Http/Header/Exception/RuntimeException.php +++ b/library/vendor/Zend/Http/Header/Exception/RuntimeException.php @@ -16,7 +16,7 @@ * @package Zend_Http * @subpackage Header_Exception * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Http * @subpackage Header_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Header_Exception_RuntimeException extends Zend_Http_Exception diff --git a/library/vendor/Zend/Http/Header/HeaderValue.php b/library/vendor/Zend/Http/Header/HeaderValue.php new file mode 100644 index 000000000..d0d630733 --- /dev/null +++ b/library/vendor/Zend/Http/Header/HeaderValue.php @@ -0,0 +1,126 @@ + 254 + ) { + continue; + } + + $string .= $value[$i]; + } + + return $string; + } + + /** + * Validate a header value. + * + * Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal + * tabs are allowed in values; only one whitespace character is allowed + * between visible characters. + * + * @see http://en.wikipedia.org/wiki/HTTP_response_splitting + * @param string $value + * @return bool + */ + public static function isValid($value) + { + $value = (string) $value; + $length = strlen($value); + for ($i = 0; $i < $length; $i += 1) { + $ascii = ord($value[$i]); + + // Non-visible, non-whitespace characters + // 9 === horizontal tab + // 32-126, 128-254 === visible + // 127 === DEL + // 255 === null byte + if (($ascii < 32 && $ascii !== 9) + || $ascii === 127 + || $ascii > 254 + ) { + return false; + } + } + + return true; + } + + /** + * Assert a header value is valid. + * + * @param string $value + * @throws Exception\RuntimeException for invalid values + * @return void + */ + public static function assertValid($value) + { + if (! self::isValid($value)) { + throw new Zend_Http_Header_Exception_InvalidArgumentException('Invalid header value'); + } + } +} diff --git a/library/vendor/Zend/Http/Header/SetCookie.php b/library/vendor/Zend/Http/Header/SetCookie.php index 721f26f54..99102ba74 100644 --- a/library/vendor/Zend/Http/Header/SetCookie.php +++ b/library/vendor/Zend/Http/Header/SetCookie.php @@ -17,7 +17,7 @@ * @package Zend_Http * @subpackage Header * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,6 +29,10 @@ * @see Zend_Http_Header_Exception_RuntimeException */ +/** + * @see Zend_Http_Header_HeaderValue + */ + /** * Zend_Http_Client is an implementation of an HTTP client in PHP. The client * supports basic features like sending different HTTP requests and handling @@ -39,7 +43,7 @@ * @category Zend * @package Zend_Http * @subpackage Header - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Header_SetCookie @@ -309,6 +313,7 @@ class Zend_Http_Header_SetCookie */ public function setValue($value) { + Zend_Http_Header_HeaderValue::assertValid($value); $this->value = $value; return $this; } @@ -403,6 +408,7 @@ class Zend_Http_Header_SetCookie */ public function setDomain($domain) { + Zend_Http_Header_HeaderValue::assertValid($domain); $this->domain = $domain; return $this; } @@ -420,6 +426,7 @@ class Zend_Http_Header_SetCookie */ public function setPath($path) { + Zend_Http_Header_HeaderValue::assertValid($path); $this->path = $path; return $this; } diff --git a/library/vendor/Zend/Http/Response.php b/library/vendor/Zend/Http/Response.php index d166fd6a8..a2b422067 100644 --- a/library/vendor/Zend/Http/Response.php +++ b/library/vendor/Zend/Http/Response.php @@ -17,10 +17,14 @@ * @package Zend_Http * @subpackage Response * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ +/** + * @see Zend_Http_Header_HeaderValue + */ + /** * Zend_Http_Response represents an HTTP 1.0 / 1.1 response message. It * includes easy access to all the response's different elemts, as well as some @@ -28,7 +32,7 @@ * * @package Zend_Http * @subpackage Response - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Response @@ -391,7 +395,7 @@ class Zend_Http_Response * @param string $br Line breaks (eg. "\n", "\r\n", "
") * @return string */ - public function asString($br = "\n") + public function asString($br = "\r\n") { return $this->getHeadersAsString(true, $br) . $br . $this->getRawBody(); } @@ -493,44 +497,74 @@ class Zend_Http_Response { $headers = array(); - // First, split body and headers - $parts = preg_split('|(?:\r?\n){2}|m', $response_str, 2); - if (! $parts[0]) return $headers; + // First, split body and headers. Headers are separated from the + // message at exactly the sequence "\r\n\r\n" + $parts = preg_split('|(?:\r\n){2}|m', $response_str, 2); + if (! $parts[0]) { + return $headers; + } - // Split headers part to lines - $lines = explode("\n", $parts[0]); + // Split headers part to lines; "\r\n" is the only valid line separator. + $lines = explode("\r\n", $parts[0]); unset($parts); $last_header = null; - foreach($lines as $line) { - $line = trim($line, "\r\n"); - if ($line == "") break; + foreach($lines as $index => $line) { + if ($index === 0 && preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)) { + // Status line; ignore + continue; + } + + if ($line == "") { + // Done processing headers + break; + } // Locate headers like 'Location: ...' and 'Location:...' (note the missing space) - if (preg_match("|^([\w-]+):\s*(.+)|", $line, $m)) { + if (preg_match("|^([a-zA-Z0-9\'`#$%&*+.^_\|\~!-]+):\s*(.*)|s", $line, $m)) { unset($last_header); - $h_name = strtolower($m[1]); + $h_name = strtolower($m[1]); $h_value = $m[2]; + Zend_Http_Header_HeaderValue::assertValid($h_value); if (isset($headers[$h_name])) { if (! is_array($headers[$h_name])) { $headers[$h_name] = array($headers[$h_name]); } - $headers[$h_name][] = $h_value; - } else { - $headers[$h_name] = $h_value; + $headers[$h_name][] = ltrim($h_value); + $last_header = $h_name; + continue; } + + $headers[$h_name] = ltrim($h_value); $last_header = $h_name; - } elseif (preg_match("|^\s+(.+)$|", $line, $m) && $last_header !== null) { + continue; + } + + // Identify header continuations + if (preg_match("|^[ \t](.+)$|s", $line, $m) && $last_header !== null) { + $h_value = trim($m[1]); if (is_array($headers[$last_header])) { end($headers[$last_header]); $last_header_key = key($headers[$last_header]); - $headers[$last_header][$last_header_key] .= $m[1]; - } else { - $headers[$last_header] .= $m[1]; + + $h_value = $headers[$last_header][$last_header_key] . $h_value; + Zend_Http_Header_HeaderValue::assertValid($h_value); + + $headers[$last_header][$last_header_key] = $h_value; + continue; } + + $h_value = $headers[$last_header] . $h_value; + Zend_Http_Header_HeaderValue::assertValid($h_value); + + $headers[$last_header] = $h_value; + continue; } + + // Anything else is an error condition + throw new Zend_Http_Exception('Invalid header line detected'); } return $headers; @@ -544,7 +578,7 @@ class Zend_Http_Response */ public static function extractBody($response_str) { - $parts = preg_split('|(?:\r?\n){2}|m', $response_str, 2); + $parts = preg_split('|(?:\r\n){2}|m', $response_str, 2); if (isset($parts[1])) { return $parts[1]; } diff --git a/library/vendor/Zend/Http/Response/Stream.php b/library/vendor/Zend/Http/Response/Stream.php index b77df8016..0a154c4ee 100644 --- a/library/vendor/Zend/Http/Response/Stream.php +++ b/library/vendor/Zend/Http/Response/Stream.php @@ -17,7 +17,7 @@ * @package Zend_Http * @subpackage Response * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * * @package Zend_Http * @subpackage Response - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Response_Stream extends Zend_Http_Response diff --git a/library/vendor/Zend/Http/UserAgent.php b/library/vendor/Zend/Http/UserAgent.php index 52a1c591b..84b4fc3aa 100644 --- a/library/vendor/Zend/Http/UserAgent.php +++ b/library/vendor/Zend/Http/UserAgent.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http_UserAgent * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Http_UserAgent * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent implements Serializable diff --git a/library/vendor/Zend/Http/UserAgent/AbstractDevice.php b/library/vendor/Zend/Http/UserAgent/AbstractDevice.php index 1efd85953..1b0a984bc 100644 --- a/library/vendor/Zend/Http/UserAgent/AbstractDevice.php +++ b/library/vendor/Zend/Http/UserAgent/AbstractDevice.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Http_UserAgent_AbstractDevice @@ -508,7 +508,9 @@ abstract class Zend_Http_UserAgent_AbstractDevice } $result['browser_version'] = '??'; } - } elseif ($product == 'mozilla' && $result['browser_version'] < 5.0) { + } elseif ($product == 'mozilla' && isset($result['browser_version']) + && $result['browser_version'] < 5.0 + ) { // handles the real Mozilla (or old Netscape if version < 5.0) $result['browser_name'] = 'Netscape'; } diff --git a/library/vendor/Zend/Http/UserAgent/Bot.php b/library/vendor/Zend/Http/UserAgent/Bot.php index 013bfc017..30e06b23e 100644 --- a/library/vendor/Zend/Http/UserAgent/Bot.php +++ b/library/vendor/Zend/Http/UserAgent/Bot.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Http/UserAgent/Checker.php b/library/vendor/Zend/Http/UserAgent/Checker.php index d397d4bb3..b0b93f61c 100644 --- a/library/vendor/Zend/Http/UserAgent/Checker.php +++ b/library/vendor/Zend/Http/UserAgent/Checker.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Http/UserAgent/Console.php b/library/vendor/Zend/Http/UserAgent/Console.php index 15d0275ff..29ce0ac1f 100644 --- a/library/vendor/Zend/Http/UserAgent/Console.php +++ b/library/vendor/Zend/Http/UserAgent/Console.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Console extends Zend_Http_UserAgent_Desktop diff --git a/library/vendor/Zend/Http/UserAgent/Desktop.php b/library/vendor/Zend/Http/UserAgent/Desktop.php index 0381cb361..6e83b4bbb 100644 --- a/library/vendor/Zend/Http/UserAgent/Desktop.php +++ b/library/vendor/Zend/Http/UserAgent/Desktop.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_Browser - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Desktop extends Zend_Http_UserAgent_AbstractDevice diff --git a/library/vendor/Zend/Http/UserAgent/Device.php b/library/vendor/Zend/Http/UserAgent/Device.php index 15db3230a..5df661a6f 100644 --- a/library/vendor/Zend/Http/UserAgent/Device.php +++ b/library/vendor/Zend/Http/UserAgent/Device.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Http_UserAgent_Device extends Serializable diff --git a/library/vendor/Zend/Http/UserAgent/Email.php b/library/vendor/Zend/Http/UserAgent/Email.php index 5769bd56c..11da1c313 100644 --- a/library/vendor/Zend/Http/UserAgent/Email.php +++ b/library/vendor/Zend/Http/UserAgent/Email.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Email extends Zend_Http_UserAgent_Desktop diff --git a/library/vendor/Zend/Http/UserAgent/Exception.php b/library/vendor/Zend/Http/UserAgent/Exception.php index 996044788..2adf8ad97 100644 --- a/library/vendor/Zend/Http/UserAgent/Exception.php +++ b/library/vendor/Zend/Http/UserAgent/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Http/UserAgent/Features/Adapter.php b/library/vendor/Zend/Http/UserAgent/Features/Adapter.php index ade0916e1..57de4e410 100644 --- a/library/vendor/Zend/Http/UserAgent/Features/Adapter.php +++ b/library/vendor/Zend/Http/UserAgent/Features/Adapter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Http_UserAgent_Features_Adapter diff --git a/library/vendor/Zend/Http/UserAgent/Features/Adapter/Browscap.php b/library/vendor/Zend/Http/UserAgent/Features/Adapter/Browscap.php index becf5885c..777ae2d18 100644 --- a/library/vendor/Zend/Http/UserAgent/Features/Adapter/Browscap.php +++ b/library/vendor/Zend/Http/UserAgent/Features/Adapter/Browscap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Features_Adapter_Browscap diff --git a/library/vendor/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php b/library/vendor/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php index 3794e4ca6..5fa64f6cf 100644 --- a/library/vendor/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php +++ b/library/vendor/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Features_Adapter_DeviceAtlas implements Zend_Http_UserAgent_Features_Adapter diff --git a/library/vendor/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php b/library/vendor/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php index 9af1cfe82..626d41dbd 100644 --- a/library/vendor/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php +++ b/library/vendor/Zend/Http/UserAgent/Features/Adapter/TeraWurfl.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Features_Adapter_TeraWurfl implements Zend_Http_UserAgent_Features_Adapter diff --git a/library/vendor/Zend/Http/UserAgent/Features/Exception.php b/library/vendor/Zend/Http/UserAgent/Features/Exception.php index 7ed46eeb8..a5d55c2e9 100644 --- a/library/vendor/Zend/Http/UserAgent/Features/Exception.php +++ b/library/vendor/Zend/Http/UserAgent/Features/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Features_Exception extends Zend_Http_UserAgent_Exception diff --git a/library/vendor/Zend/Http/UserAgent/Feed.php b/library/vendor/Zend/Http/UserAgent/Feed.php index b912943bb..169579daf 100644 --- a/library/vendor/Zend/Http/UserAgent/Feed.php +++ b/library/vendor/Zend/Http/UserAgent/Feed.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Feed extends Zend_Http_UserAgent_AbstractDevice diff --git a/library/vendor/Zend/Http/UserAgent/Mobile.php b/library/vendor/Zend/Http/UserAgent/Mobile.php index e65a10822..8078f4dc4 100644 --- a/library/vendor/Zend/Http/UserAgent/Mobile.php +++ b/library/vendor/Zend/Http/UserAgent/Mobile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Mobile extends Zend_Http_UserAgent_AbstractDevice diff --git a/library/vendor/Zend/Http/UserAgent/Offline.php b/library/vendor/Zend/Http/UserAgent/Offline.php index 452c2dba3..caba8a38e 100644 --- a/library/vendor/Zend/Http/UserAgent/Offline.php +++ b/library/vendor/Zend/Http/UserAgent/Offline.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Offline extends Zend_Http_UserAgent_Desktop diff --git a/library/vendor/Zend/Http/UserAgent/Probe.php b/library/vendor/Zend/Http/UserAgent/Probe.php index 7673a238d..7575504ce 100644 --- a/library/vendor/Zend/Http/UserAgent/Probe.php +++ b/library/vendor/Zend/Http/UserAgent/Probe.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Probe extends Zend_Http_UserAgent_AbstractDevice diff --git a/library/vendor/Zend/Http/UserAgent/Spam.php b/library/vendor/Zend/Http/UserAgent/Spam.php index 678b2ec11..782436ffc 100644 --- a/library/vendor/Zend/Http/UserAgent/Spam.php +++ b/library/vendor/Zend/Http/UserAgent/Spam.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Spam extends Zend_Http_UserAgent_AbstractDevice diff --git a/library/vendor/Zend/Http/UserAgent/Storage.php b/library/vendor/Zend/Http/UserAgent/Storage.php index 452693693..d28211a91 100644 --- a/library/vendor/Zend/Http/UserAgent/Storage.php +++ b/library/vendor/Zend/Http/UserAgent/Storage.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Http_UserAgent_Storage diff --git a/library/vendor/Zend/Http/UserAgent/Storage/Exception.php b/library/vendor/Zend/Http/UserAgent/Storage/Exception.php index 70fafba39..b53dd5a42 100644 --- a/library/vendor/Zend/Http/UserAgent/Storage/Exception.php +++ b/library/vendor/Zend/Http/UserAgent/Storage/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ /** * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Storage_Exception extends Zend_Http_UserAgent_Exception diff --git a/library/vendor/Zend/Http/UserAgent/Storage/NonPersistent.php b/library/vendor/Zend/Http/UserAgent/Storage/NonPersistent.php index 485329d40..042d69412 100644 --- a/library/vendor/Zend/Http/UserAgent/Storage/NonPersistent.php +++ b/library/vendor/Zend/Http/UserAgent/Storage/NonPersistent.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: NonPersistent.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -35,7 +35,7 @@ * * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Storage_NonPersistent diff --git a/library/vendor/Zend/Http/UserAgent/Storage/Session.php b/library/vendor/Zend/Http/UserAgent/Storage/Session.php index 14b3cdab7..5b449b7cd 100644 --- a/library/vendor/Zend/Http/UserAgent/Storage/Session.php +++ b/library/vendor/Zend/Http/UserAgent/Storage/Session.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ /** * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Storage_Session implements Zend_Http_UserAgent_Storage diff --git a/library/vendor/Zend/Http/UserAgent/Text.php b/library/vendor/Zend/Http/UserAgent/Text.php index c9e37f78e..b89a0d1e0 100644 --- a/library/vendor/Zend/Http/UserAgent/Text.php +++ b/library/vendor/Zend/Http/UserAgent/Text.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Text extends Zend_Http_UserAgent_AbstractDevice diff --git a/library/vendor/Zend/Http/UserAgent/Validator.php b/library/vendor/Zend/Http/UserAgent/Validator.php index 78ade5e54..76b84f912 100644 --- a/library/vendor/Zend/Http/UserAgent/Validator.php +++ b/library/vendor/Zend/Http/UserAgent/Validator.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Validator extends Zend_Http_UserAgent_Desktop diff --git a/library/vendor/Zend/Json.php b/library/vendor/Zend/Json.php index 2287b6f55..b7b97f284 100644 --- a/library/vendor/Zend/Json.php +++ b/library/vendor/Zend/Json.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Json * @uses Zend_Json_Expr - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json diff --git a/library/vendor/Zend/Json/Decoder.php b/library/vendor/Zend/Json/Decoder.php index 7a9709374..bc4e9369e 100644 --- a/library/vendor/Zend/Json/Decoder.php +++ b/library/vendor/Zend/Json/Decoder.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Decoder diff --git a/library/vendor/Zend/Json/Encoder.php b/library/vendor/Zend/Json/Encoder.php index fe581cdff..443bf50e3 100644 --- a/library/vendor/Zend/Json/Encoder.php +++ b/library/vendor/Zend/Json/Encoder.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Encoder diff --git a/library/vendor/Zend/Json/Exception.php b/library/vendor/Zend/Json/Exception.php index a970631a6..5b4a0dba8 100644 --- a/library/vendor/Zend/Json/Exception.php +++ b/library/vendor/Zend/Json/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Json/Expr.php b/library/vendor/Zend/Json/Expr.php index 631ae8980..1fd5f23ff 100644 --- a/library/vendor/Zend/Json/Expr.php +++ b/library/vendor/Zend/Json/Expr.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Json * @subpackage Expr - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -45,7 +45,7 @@ * @category Zend * @package Zend_Json * @subpackage Expr - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Expr diff --git a/library/vendor/Zend/Json/Server.php b/library/vendor/Zend/Json/Server.php index 88df7b895..2bdbed7d1 100644 --- a/library/vendor/Zend/Json/Server.php +++ b/library/vendor/Zend/Json/Server.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server extends Zend_Server_Abstract @@ -538,7 +538,7 @@ class Zend_Json_Server extends Zend_Server_Abstract $orderedParams[ $refParam->getName() ] = $refParam->getDefaultValue(); } else { throw new Zend_Server_Exception( - 'Missing required parameter: ' . $refParam->getName() + 'Method ' . $request->getMethod() . ' is missing required parameter: ' . $refParam->getName() ); } } diff --git a/library/vendor/Zend/Json/Server/Cache.php b/library/vendor/Zend/Json/Server/Cache.php index 164396dae..d1dae32ed 100644 --- a/library/vendor/Zend/Json/Server/Cache.php +++ b/library/vendor/Zend/Json/Server/Cache.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Cache extends Zend_Server_Cache diff --git a/library/vendor/Zend/Json/Server/Error.php b/library/vendor/Zend/Json/Server/Error.php index df0b09e13..a793944df 100644 --- a/library/vendor/Zend/Json/Server/Error.php +++ b/library/vendor/Zend/Json/Server/Error.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Error diff --git a/library/vendor/Zend/Json/Server/Exception.php b/library/vendor/Zend/Json/Server/Exception.php index 932044ca2..fce74b4c0 100644 --- a/library/vendor/Zend/Json/Server/Exception.php +++ b/library/vendor/Zend/Json/Server/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * @uses Zend_Json_Exception * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Exception extends Zend_Json_Exception diff --git a/library/vendor/Zend/Json/Server/Request.php b/library/vendor/Zend/Json/Server/Request.php index e91c24ad5..b65e58a44 100644 --- a/library/vendor/Zend/Json/Server/Request.php +++ b/library/vendor/Zend/Json/Server/Request.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Request diff --git a/library/vendor/Zend/Json/Server/Request/Http.php b/library/vendor/Zend/Json/Server/Request/Http.php index 880d47f84..a5126cfa4 100644 --- a/library/vendor/Zend/Json/Server/Request/Http.php +++ b/library/vendor/Zend/Json/Server/Request/Http.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Request_Http extends Zend_Json_Server_Request diff --git a/library/vendor/Zend/Json/Server/Response.php b/library/vendor/Zend/Json/Server/Response.php index c073ba5c6..0f5302ad8 100644 --- a/library/vendor/Zend/Json/Server/Response.php +++ b/library/vendor/Zend/Json/Server/Response.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Response diff --git a/library/vendor/Zend/Json/Server/Response/Http.php b/library/vendor/Zend/Json/Server/Response/Http.php index dbae9bb18..8db969609 100644 --- a/library/vendor/Zend/Json/Server/Response/Http.php +++ b/library/vendor/Zend/Json/Server/Response/Http.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Response_Http extends Zend_Json_Server_Response diff --git a/library/vendor/Zend/Json/Server/Smd.php b/library/vendor/Zend/Json/Server/Smd.php index a9181d661..534d4c769 100644 --- a/library/vendor/Zend/Json/Server/Smd.php +++ b/library/vendor/Zend/Json/Server/Smd.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Json * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Smd diff --git a/library/vendor/Zend/Json/Server/Smd/Service.php b/library/vendor/Zend/Json/Server/Smd/Service.php index 6fca73e20..6d01412a7 100644 --- a/library/vendor/Zend/Json/Server/Smd/Service.php +++ b/library/vendor/Zend/Json/Server/Smd/Service.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Json - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @package Zend_Json * @subpackage Server * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Json_Server_Smd_Service diff --git a/library/vendor/Zend/LICENSE b/library/vendor/Zend/LICENSE deleted file mode 100644 index 5ad81e922..000000000 --- a/library/vendor/Zend/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2005-2014, Zend Technologies USA, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of Zend Technologies USA, Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/library/vendor/Zend/Layout.php b/library/vendor/Zend/Layout.php index f62c8ecf5..a123e44ad 100644 --- a/library/vendor/Zend/Layout.php +++ b/library/vendor/Zend/Layout.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Layout - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Layout - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Layout diff --git a/library/vendor/Zend/Layout/Controller/Action/Helper/Layout.php b/library/vendor/Zend/Layout/Controller/Action/Helper/Layout.php index fff066c44..cd3f48c56 100644 --- a/library/vendor/Zend/Layout/Controller/Action/Helper/Layout.php +++ b/library/vendor/Zend/Layout/Controller/Action/Helper/Layout.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Controller * @subpackage Zend_Controller_Action - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Layout_Controller_Action_Helper_Layout extends Zend_Controller_Action_Helper_Abstract diff --git a/library/vendor/Zend/Layout/Controller/Plugin/Layout.php b/library/vendor/Zend/Layout/Controller/Plugin/Layout.php index 6831d4ff2..d4855e79f 100644 --- a/library/vendor/Zend/Layout/Controller/Plugin/Layout.php +++ b/library/vendor/Zend/Layout/Controller/Plugin/Layout.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Controller * @subpackage Plugins - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Layout/Exception.php b/library/vendor/Zend/Layout/Exception.php index 9acf06626..c589e1a5f 100644 --- a/library/vendor/Zend/Layout/Exception.php +++ b/library/vendor/Zend/Layout/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Layout - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Layout - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Layout_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Ldap.php b/library/vendor/Zend/Ldap.php new file mode 100644 index 000000000..68cf2c47c --- /dev/null +++ b/library/vendor/Zend/Ldap.php @@ -0,0 +1,1560 @@ +setOptions($options); + } + + /** + * Destructor. + * + * @return void + */ + public function __destruct() + { + $this->disconnect(); + } + + /** + * @return resource The raw LDAP extension resource. + */ + public function getResource() + { + if (!is_resource($this->_resource) || $this->_boundUser === false) { + $this->bind(); + } + return $this->_resource; + } + + /** + * Return the LDAP error number of the last LDAP command + * + * @return int + */ + public function getLastErrorCode() + { + $ret = @ldap_get_option($this->_resource, LDAP_OPT_ERROR_NUMBER, $err); + if ($ret === true) { + if ($err <= -1 && $err >= -17) { + /** + * @see Zend_Ldap_Exception + */ + /* For some reason draft-ietf-ldapext-ldap-c-api-xx.txt error + * codes in OpenLDAP are negative values from -1 to -17. + */ + $err = Zend_Ldap_Exception::LDAP_SERVER_DOWN + (-$err - 1); + } + return $err; + } + return 0; + } + + /** + * Return the LDAP error message of the last LDAP command + * + * @param int $errorCode + * @param array $errorMessages + * @return string + */ + public function getLastError(&$errorCode = null, array &$errorMessages = null) + { + $errorCode = $this->getLastErrorCode(); + $errorMessages = array(); + + /* The various error retrieval functions can return + * different things so we just try to collect what we + * can and eliminate dupes. + */ + $estr1 = @ldap_error($this->_resource); + if ($errorCode !== 0 && $estr1 === 'Success') { + $estr1 = @ldap_err2str($errorCode); + } + if (!empty($estr1)) { + $errorMessages[] = $estr1; + } + + @ldap_get_option($this->_resource, LDAP_OPT_ERROR_STRING, $estr2); + if (!empty($estr2) && !in_array($estr2, $errorMessages)) { + $errorMessages[] = $estr2; + } + + $message = ''; + if ($errorCode > 0) { + $message = '0x' . dechex($errorCode) . ' '; + } else { + $message = ''; + } + if (count($errorMessages) > 0) { + $message .= '(' . implode('; ', $errorMessages) . ')'; + } else { + $message .= '(no error message from LDAP)'; + } + return $message; + } + + /** + * Get the currently bound user + * + * FALSE if no user is bound to the LDAP resource + * NULL if there has been an anonymous bind + * username of the currently bound user + * + * @return false|null|string + */ + public function getBoundUser() + { + return $this->_boundUser; + } + + /** + * Sets the options used in connecting, binding, etc. + * + * Valid option keys: + * host + * port + * useSsl + * username + * password + * bindRequiresDn + * baseDn + * accountCanonicalForm + * accountDomainName + * accountDomainNameShort + * accountFilterFormat + * allowEmptyPassword + * useStartTls + * optRefferals + * tryUsernameSplit + * + * @param array|Zend_Config $options Options used in connecting, binding, etc. + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function setOptions($options) + { + if ($options instanceof Zend_Config) { + $options = $options->toArray(); + } + + $permittedOptions = array( + 'host' => null, + 'port' => 0, + 'useSsl' => false, + 'username' => null, + 'password' => null, + 'bindRequiresDn' => false, + 'baseDn' => null, + 'accountCanonicalForm' => null, + 'accountDomainName' => null, + 'accountDomainNameShort' => null, + 'accountFilterFormat' => null, + 'allowEmptyPassword' => false, + 'useStartTls' => false, + 'optReferrals' => false, + 'tryUsernameSplit' => true, + ); + + foreach ($permittedOptions as $key => $val) { + if (array_key_exists($key, $options)) { + $val = $options[$key]; + unset($options[$key]); + /* Enforce typing. This eliminates issues like Zend_Config_Ini + * returning '1' as a string (ZF-3163). + */ + switch ($key) { + case 'port': + case 'accountCanonicalForm': + $permittedOptions[$key] = (int)$val; + break; + case 'useSsl': + case 'bindRequiresDn': + case 'allowEmptyPassword': + case 'useStartTls': + case 'optReferrals': + case 'tryUsernameSplit': + $permittedOptions[$key] = ($val === true || + $val === '1' || strcasecmp($val, 'true') == 0); + break; + default: + $permittedOptions[$key] = trim($val); + break; + } + } + } + if (count($options) > 0) { + $key = key($options); + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, "Unknown Zend_Ldap option: $key"); + } + $this->_options = $permittedOptions; + return $this; + } + + /** + * @return array The current options. + */ + public function getOptions() + { + return $this->_options; + } + + /** + * @return string The hostname of the LDAP server being used to authenticate accounts + */ + protected function _getHost() + { + return $this->_options['host']; + } + + /** + * @return int The port of the LDAP server or 0 to indicate that no port value is set + */ + protected function _getPort() + { + return $this->_options['port']; + } + + /** + * @return boolean The default SSL / TLS encrypted transport control + */ + protected function _getUseSsl() + { + return $this->_options['useSsl']; + } + + /** + * @return string The default acctname for binding + */ + protected function _getUsername() + { + return $this->_options['username']; + } + + /** + * @return string The default password for binding + */ + protected function _getPassword() + { + return $this->_options['password']; + } + + /** + * @return boolean Bind requires DN + */ + protected function _getBindRequiresDn() + { + return $this->_options['bindRequiresDn']; + } + + /** + * Gets the base DN under which objects of interest are located + * + * @return string + */ + public function getBaseDn() + { + return $this->_options['baseDn']; + } + + /** + * @return integer Either ACCTNAME_FORM_BACKSLASH, ACCTNAME_FORM_PRINCIPAL or + * ACCTNAME_FORM_USERNAME indicating the form usernames should be canonicalized to. + */ + protected function _getAccountCanonicalForm() + { + /* Account names should always be qualified with a domain. In some scenarios + * using non-qualified account names can lead to security vulnerabilities. If + * no account canonical form is specified, we guess based in what domain + * names have been supplied. + */ + + $accountCanonicalForm = $this->_options['accountCanonicalForm']; + if (!$accountCanonicalForm) { + $accountDomainName = $this->_getAccountDomainName(); + $accountDomainNameShort = $this->_getAccountDomainNameShort(); + if ($accountDomainNameShort) { + $accountCanonicalForm = Zend_Ldap::ACCTNAME_FORM_BACKSLASH; + } else if ($accountDomainName) { + $accountCanonicalForm = Zend_Ldap::ACCTNAME_FORM_PRINCIPAL; + } else { + $accountCanonicalForm = Zend_Ldap::ACCTNAME_FORM_USERNAME; + } + } + + return $accountCanonicalForm; + } + + /** + * @return string The account domain name + */ + protected function _getAccountDomainName() + { + return $this->_options['accountDomainName']; + } + + /** + * @return string The short account domain name + */ + protected function _getAccountDomainNameShort() + { + return $this->_options['accountDomainNameShort']; + } + + /** + * @return string A format string for building an LDAP search filter to match + * an account + */ + protected function _getAccountFilterFormat() + { + return $this->_options['accountFilterFormat']; + } + + /** + * @return boolean Allow empty passwords + */ + protected function _getAllowEmptyPassword() + { + return $this->_options['allowEmptyPassword']; + } + + /** + * @return boolean The default SSL / TLS encrypted transport control + */ + protected function _getUseStartTls() + { + return $this->_options['useStartTls']; + } + + /** + * @return boolean Opt. Referrals + */ + protected function _getOptReferrals() + { + return $this->_options['optReferrals']; + } + + /** + * @return boolean Try splitting the username into username and domain + */ + protected function _getTryUsernameSplit() + { + return $this->_options['tryUsernameSplit']; + } + + /** + * @return string The LDAP search filter for matching directory accounts + */ + protected function _getAccountFilter($acctname) + { + /** + * @see Zend_Ldap_Filter_Abstract + */ + $this->_splitName($acctname, $dname, $aname); + $accountFilterFormat = $this->_getAccountFilterFormat(); + $aname = Zend_Ldap_Filter_Abstract::escapeValue($aname); + if ($accountFilterFormat) { + return sprintf($accountFilterFormat, $aname); + } + if (!$this->_getBindRequiresDn()) { + // is there a better way to detect this? + return sprintf("(&(objectClass=user)(sAMAccountName=%s))", $aname); + } + return sprintf("(&(objectClass=posixAccount)(uid=%s))", $aname); + } + + /** + * @param string $name The name to split + * @param string $dname The resulting domain name (this is an out parameter) + * @param string $aname The resulting account name (this is an out parameter) + * @return void + */ + protected function _splitName($name, &$dname, &$aname) + { + $dname = null; + $aname = $name; + + if (!$this->_getTryUsernameSplit()) { + return; + } + + $pos = strpos($name, '@'); + if ($pos) { + $dname = substr($name, $pos + 1); + $aname = substr($name, 0, $pos); + } else { + $pos = strpos($name, '\\'); + if ($pos) { + $dname = substr($name, 0, $pos); + $aname = substr($name, $pos + 1); + } + } + } + + /** + * @param string $acctname The name of the account + * @return string The DN of the specified account + * @throws Zend_Ldap_Exception + */ + protected function _getAccountDn($acctname) + { + /** + * @see Zend_Ldap_Dn + */ + if (Zend_Ldap_Dn::checkDn($acctname)) return $acctname; + $acctname = $this->getCanonicalAccountName($acctname, Zend_Ldap::ACCTNAME_FORM_USERNAME); + $acct = $this->_getAccount($acctname, array('dn')); + return $acct['dn']; + } + + /** + * @param string $dname The domain name to check + * @return boolean + */ + protected function _isPossibleAuthority($dname) + { + if ($dname === null) { + return true; + } + $accountDomainName = $this->_getAccountDomainName(); + $accountDomainNameShort = $this->_getAccountDomainNameShort(); + if ($accountDomainName === null && $accountDomainNameShort === null) { + return true; + } + if (strcasecmp($dname, $accountDomainName) == 0) { + return true; + } + if (strcasecmp($dname, $accountDomainNameShort) == 0) { + return true; + } + return false; + } + + /** + * @param string $acctname The name to canonicalize + * @param int $type The desired form of canonicalization + * @return string The canonicalized name in the desired form + * @throws Zend_Ldap_Exception + */ + public function getCanonicalAccountName($acctname, $form = 0) + { + $this->_splitName($acctname, $dname, $uname); + + if (!$this->_isPossibleAuthority($dname)) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, + "Binding domain is not an authority for user: $acctname", + Zend_Ldap_Exception::LDAP_X_DOMAIN_MISMATCH); + } + + if (!$uname) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, "Invalid account name syntax: $acctname"); + } + + if (function_exists('mb_strtolower')) { + $uname = mb_strtolower($uname, 'UTF-8'); + } else { + $uname = strtolower($uname); + } + + if ($form === 0) { + $form = $this->_getAccountCanonicalForm(); + } + + switch ($form) { + case Zend_Ldap::ACCTNAME_FORM_DN: + return $this->_getAccountDn($acctname); + case Zend_Ldap::ACCTNAME_FORM_USERNAME: + return $uname; + case Zend_Ldap::ACCTNAME_FORM_BACKSLASH: + $accountDomainNameShort = $this->_getAccountDomainNameShort(); + if (!$accountDomainNameShort) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Option required: accountDomainNameShort'); + } + return "$accountDomainNameShort\\$uname"; + case Zend_Ldap::ACCTNAME_FORM_PRINCIPAL: + $accountDomainName = $this->_getAccountDomainName(); + if (!$accountDomainName) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Option required: accountDomainName'); + } + return "$uname@$accountDomainName"; + default: + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, "Unknown canonical name form: $form"); + } + } + + /** + * @param array $attrs An array of names of desired attributes + * @return array An array of the attributes representing the account + * @throws Zend_Ldap_Exception + */ + protected function _getAccount($acctname, array $attrs = null) + { + $baseDn = $this->getBaseDn(); + if (!$baseDn) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Base DN not set'); + } + + $accountFilter = $this->_getAccountFilter($acctname); + if (!$accountFilter) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Invalid account filter'); + } + + if (!is_resource($this->getResource())) { + $this->bind(); + } + + $accounts = $this->search($accountFilter, $baseDn, self::SEARCH_SCOPE_SUB, $attrs); + $count = $accounts->count(); + if ($count === 1) { + $acct = $accounts->getFirst(); + $accounts->close(); + return $acct; + } else if ($count === 0) { + /** + * @see Zend_Ldap_Exception + */ + $code = Zend_Ldap_Exception::LDAP_NO_SUCH_OBJECT; + $str = "No object found for: $accountFilter"; + } else { + /** + * @see Zend_Ldap_Exception + */ + $code = Zend_Ldap_Exception::LDAP_OPERATIONS_ERROR; + $str = "Unexpected result count ($count) for: $accountFilter"; + } + $accounts->close(); + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this, $str, $code); + } + + /** + * @return Zend_Ldap Provides a fluent interface + */ + public function disconnect() + { + if (is_resource($this->_resource)) { + @ldap_unbind($this->_resource); + } + $this->_resource = null; + $this->_boundUser = false; + return $this; + } + + /** + * To connect using SSL it seems the client tries to verify the server + * certificate by default. One way to disable this behavior is to set + * 'TLS_REQCERT never' in OpenLDAP's ldap.conf and restarting Apache. Or, + * if you really care about the server's cert you can put a cert on the + * web server. + * + * @param string $host The hostname of the LDAP server to connect to + * @param int $port The port number of the LDAP server to connect to + * @param boolean $useSsl Use SSL + * @param boolean $useStartTls Use STARTTLS + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function connect($host = null, $port = null, $useSsl = null, $useStartTls = null) + { + if ($host === null) { + $host = $this->_getHost(); + } + if ($port === null) { + $port = $this->_getPort(); + } else { + $port = (int)$port; + } + if ($useSsl === null) { + $useSsl = $this->_getUseSsl(); + } else { + $useSsl = (bool)$useSsl; + } + if ($useStartTls === null) { + $useStartTls = $this->_getUseStartTls(); + } else { + $useStartTls = (bool)$useStartTls; + } + + if (!$host) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'A host parameter is required'); + } + + $useUri = false; + /* Because ldap_connect doesn't really try to connect, any connect error + * will actually occur during the ldap_bind call. Therefore, we save the + * connect string here for reporting it in error handling in bind(). + */ + $hosts = array(); + if (preg_match_all('~ldap(?:i|s)?://~', $host, $hosts, PREG_SET_ORDER) > 0) { + $this->_connectString = $host; + $useUri = true; + $useSsl = false; + } else { + if ($useSsl) { + $this->_connectString = 'ldaps://' . $host; + $useUri = true; + } else { + $this->_connectString = 'ldap://' . $host; + } + if ($port) { + $this->_connectString .= ':' . $port; + } + } + + $this->disconnect(); + + /* Only OpenLDAP 2.2 + supports URLs so if SSL is not requested, just + * use the old form. + */ + $resource = ($useUri) ? @ldap_connect($this->_connectString) : @ldap_connect($host, $port); + + if (is_resource($resource) === true) { + $this->_resource = $resource; + $this->_boundUser = false; + + $optReferrals = ($this->_getOptReferrals()) ? 1 : 0; + if (@ldap_set_option($resource, LDAP_OPT_PROTOCOL_VERSION, 3) && + @ldap_set_option($resource, LDAP_OPT_REFERRALS, $optReferrals)) { + if ($useSsl || !$useStartTls || @ldap_start_tls($resource)) { + return $this; + } + } + + /** + * @see Zend_Ldap_Exception + */ + $zle = new Zend_Ldap_Exception($this, "$host:$port"); + $this->disconnect(); + throw $zle; + } + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, "Failed to connect to LDAP server: $host:$port"); + } + + /** + * @param string $username The username for authenticating the bind + * @param string $password The password for authenticating the bind + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function bind($username = null, $password = null) + { + $moreCreds = true; + + // Security check: remove null bytes in password + // @see https://net.educause.edu/ir/library/pdf/csd4875.pdf + $password = str_replace("\0", '', $password); + + if ($username === null) { + $username = $this->_getUsername(); + $password = $this->_getPassword(); + $moreCreds = false; + } + + if (empty($username)) { + /* Perform anonymous bind + */ + $username = null; + $password = null; + } else { + /* Check to make sure the username is in DN form. + */ + /** + * @see Zend_Ldap_Dn + */ + if (!Zend_Ldap_Dn::checkDn($username)) { + if ($this->_getBindRequiresDn()) { + /* moreCreds stops an infinite loop if _getUsername does not + * return a DN and the bind requires it + */ + if ($moreCreds) { + try { + $username = $this->_getAccountDn($username); + } catch (Zend_Ldap_Exception $zle) { + switch ($zle->getCode()) { + case Zend_Ldap_Exception::LDAP_NO_SUCH_OBJECT: + case Zend_Ldap_Exception::LDAP_X_DOMAIN_MISMATCH: + case Zend_Ldap_Exception::LDAP_X_EXTENSION_NOT_LOADED: + throw $zle; + } + throw new Zend_Ldap_Exception(null, + 'Failed to retrieve DN for account: ' . $username . + ' [' . $zle->getMessage() . ']', + Zend_Ldap_Exception::LDAP_OPERATIONS_ERROR); + } + } else { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Binding requires username in DN form'); + } + } else { + $username = $this->getCanonicalAccountName($username, + $this->_getAccountCanonicalForm()); + } + } + } + + if (!is_resource($this->_resource)) { + $this->connect(); + } + + if ($username !== null && $password === '' && $this->_getAllowEmptyPassword() !== true) { + /** + * @see Zend_Ldap_Exception + */ + $zle = new Zend_Ldap_Exception(null, + 'Empty password not allowed - see allowEmptyPassword option.'); + } else { + if (@ldap_bind($this->_resource, $username, $password)) { + $this->_boundUser = $username; + return $this; + } + + $message = ($username === null) ? $this->_connectString : $username; + /** + * @see Zend_Ldap_Exception + */ + switch ($this->getLastErrorCode()) { + case Zend_Ldap_Exception::LDAP_SERVER_DOWN: + /* If the error is related to establishing a connection rather than binding, + * the connect string is more informative than the username. + */ + $message = $this->_connectString; + } + + $zle = new Zend_Ldap_Exception($this, $message); + } + $this->disconnect(); + throw $zle; + } + + /** + * A global LDAP search routine for finding information. + * + * Options can be either passed as single parameters according to the + * method signature or as an array with one or more of the following keys + * - filter + * - baseDn + * - scope + * - attributes + * - sort + * - collectionClass + * - sizelimit + * - timelimit + * + * @param string|Zend_Ldap_Filter_Abstract|array $filter + * @param string|Zend_Ldap_Dn|null $basedn + * @param integer $scope + * @param array $attributes + * @param string|null $sort + * @param string|null $collectionClass + * @param integer $sizelimit + * @param integer $timelimit + * @return Zend_Ldap_Collection + * @throws Zend_Ldap_Exception + */ + public function search($filter, $basedn = null, $scope = self::SEARCH_SCOPE_SUB, array $attributes = array(), + $sort = null, $collectionClass = null, $sizelimit = 0, $timelimit = 0) + { + if (is_array($filter)) { + $options = array_change_key_case($filter, CASE_LOWER); + foreach ($options as $key => $value) { + switch ($key) { + case 'filter': + case 'basedn': + case 'scope': + case 'sort': + $$key = $value; + break; + case 'attributes': + if (is_array($value)) { + $attributes = $value; + } + break; + case 'collectionclass': + $collectionClass = $value; + break; + case 'sizelimit': + case 'timelimit': + $$key = (int)$value; + } + } + } + + if ($basedn === null) { + $basedn = $this->getBaseDn(); + } + else if ($basedn instanceof Zend_Ldap_Dn) { + $basedn = $basedn->toString(); + } + + if ($filter instanceof Zend_Ldap_Filter_Abstract) { + $filter = $filter->toString(); + } + + switch ($scope) { + case self::SEARCH_SCOPE_ONE: + $search = @ldap_list($this->getResource(), $basedn, $filter, $attributes, 0, $sizelimit, $timelimit); + break; + case self::SEARCH_SCOPE_BASE: + $search = @ldap_read($this->getResource(), $basedn, $filter, $attributes, 0, $sizelimit, $timelimit); + break; + case self::SEARCH_SCOPE_SUB: + default: + $search = @ldap_search($this->getResource(), $basedn, $filter, $attributes, 0, $sizelimit, $timelimit); + break; + } + + if($search === false) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this, 'searching: ' . $filter); + } + if ($sort !== null && is_string($sort)) { + $isSorted = @ldap_sort($this->getResource(), $search, $sort); + if($isSorted === false) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this, 'sorting: ' . $sort); + } + } + + /** + * Zend_Ldap_Collection_Iterator_Default + */ + $iterator = new Zend_Ldap_Collection_Iterator_Default($this, $search); + return $this->_createCollection($iterator, $collectionClass); + } + + /** + * Extension point for collection creation + * + * @param Zend_Ldap_Collection_Iterator_Default $iterator + * @param string|null $collectionClass + * @return Zend_Ldap_Collection + * @throws Zend_Ldap_Exception + */ + protected function _createCollection(Zend_Ldap_Collection_Iterator_Default $iterator, $collectionClass) + { + if ($collectionClass === null) { + /** + * Zend_Ldap_Collection + */ + return new Zend_Ldap_Collection($iterator); + } else { + $collectionClass = (string)$collectionClass; + if (!class_exists($collectionClass)) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, + "Class '$collectionClass' can not be found"); + } + if (!is_subclass_of($collectionClass, 'Zend_Ldap_Collection')) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, + "Class '$collectionClass' must subclass 'Zend_Ldap_Collection'"); + } + return new $collectionClass($iterator); + } + } + + /** + * Count items found by given filter. + * + * @param string|Zend_Ldap_Filter_Abstract $filter + * @param string|Zend_Ldap_Dn|null $basedn + * @param integer $scope + * @return integer + * @throws Zend_Ldap_Exception + */ + public function count($filter, $basedn = null, $scope = self::SEARCH_SCOPE_SUB) + { + try { + $result = $this->search($filter, $basedn, $scope, array('dn'), null); + } catch (Zend_Ldap_Exception $e) { + if ($e->getCode() === Zend_Ldap_Exception::LDAP_NO_SUCH_OBJECT) return 0; + else throw $e; + } + return $result->count(); + } + + /** + * Count children for a given DN. + * + * @param string|Zend_Ldap_Dn $dn + * @return integer + * @throws Zend_Ldap_Exception + */ + public function countChildren($dn) + { + return $this->count('(objectClass=*)', $dn, self::SEARCH_SCOPE_ONE); + } + + /** + * Check if a given DN exists. + * + * @param string|Zend_Ldap_Dn $dn + * @return boolean + * @throws Zend_Ldap_Exception + */ + public function exists($dn) + { + return ($this->count('(objectClass=*)', $dn, self::SEARCH_SCOPE_BASE) == 1); + } + + /** + * Search LDAP registry for entries matching filter and optional attributes + * + * Options can be either passed as single parameters according to the + * method signature or as an array with one or more of the following keys + * - filter + * - baseDn + * - scope + * - attributes + * - sort + * - reverseSort + * - sizelimit + * - timelimit + * + * @param string|Zend_Ldap_Filter_Abstract|array $filter + * @param string|Zend_Ldap_Dn|null $basedn + * @param integer $scope + * @param array $attributes + * @param string|null $sort + * @param boolean $reverseSort + * @param integer $sizelimit + * @param integer $timelimit + * @return array + * @throws Zend_Ldap_Exception + */ + public function searchEntries($filter, $basedn = null, $scope = self::SEARCH_SCOPE_SUB, + array $attributes = array(), $sort = null, $reverseSort = false, $sizelimit = 0, $timelimit = 0) + { + if (is_array($filter)) { + $filter = array_change_key_case($filter, CASE_LOWER); + if (isset($filter['collectionclass'])) { + unset($filter['collectionclass']); + } + if (isset($filter['reversesort'])) { + $reverseSort = $filter['reversesort']; + unset($filter['reversesort']); + } + } + $result = $this->search($filter, $basedn, $scope, $attributes, $sort, null, $sizelimit, $timelimit); + $items = $result->toArray(); + if ((bool)$reverseSort === true) { + $items = array_reverse($items, false); + } + return $items; + } + + /** + * Get LDAP entry by DN + * + * @param string|Zend_Ldap_Dn $dn + * @param array $attributes + * @param boolean $throwOnNotFound + * @return array + * @throws Zend_Ldap_Exception + */ + public function getEntry($dn, array $attributes = array(), $throwOnNotFound = false) + { + try { + $result = $this->search("(objectClass=*)", $dn, self::SEARCH_SCOPE_BASE, + $attributes, null); + return $result->getFirst(); + } catch (Zend_Ldap_Exception $e){ + if ($throwOnNotFound !== false) throw $e; + } + return null; + } + + /** + * Prepares an ldap data entry array for insert/update operation + * + * @param array $entry + * @return void + * @throws InvalidArgumentException + */ + public static function prepareLdapEntryArray(array &$entry) + { + if (array_key_exists('dn', $entry)) unset($entry['dn']); + foreach ($entry as $key => $value) { + if (is_array($value)) { + foreach ($value as $i => $v) { + if ($v === null) unset($value[$i]); + else if (!is_scalar($v)) { + throw new InvalidArgumentException('Only scalar values allowed in LDAP data'); + } else { + $v = (string)$v; + if (strlen($v) == 0) { + unset($value[$i]); + } else { + $value[$i] = $v; + } + } + } + $entry[$key] = array_values($value); + } else { + if ($value === null) $entry[$key] = array(); + else if (!is_scalar($value)) { + throw new InvalidArgumentException('Only scalar values allowed in LDAP data'); + } else { + $value = (string)$value; + if (strlen($value) == 0) { + $entry[$key] = array(); + } else { + $entry[$key] = array($value); + } + } + } + } + $entry = array_change_key_case($entry, CASE_LOWER); + } + + /** + * Add new information to the LDAP repository + * + * @param string|Zend_Ldap_Dn $dn + * @param array $entry + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function add($dn, array $entry) + { + if (!($dn instanceof Zend_Ldap_Dn)) { + $dn = Zend_Ldap_Dn::factory($dn, null); + } + self::prepareLdapEntryArray($entry); + foreach ($entry as $key => $value) { + if (is_array($value) && count($value) === 0) { + unset($entry[$key]); + } + } + + $rdnParts = $dn->getRdn(Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER); + foreach ($rdnParts as $key => $value) { + $value = Zend_Ldap_Dn::unescapeValue($value); + if (!array_key_exists($key, $entry)) { + $entry[$key] = array($value); + } else if (!in_array($value, $entry[$key])) { + $entry[$key] = array_merge(array($value), $entry[$key]); + } + } + $adAttributes = array('distinguishedname', 'instancetype', 'name', 'objectcategory', + 'objectguid', 'usnchanged', 'usncreated', 'whenchanged', 'whencreated'); + foreach ($adAttributes as $attr) { + if (array_key_exists($attr, $entry)) { + unset($entry[$attr]); + } + } + + $isAdded = @ldap_add($this->getResource(), $dn->toString(), $entry); + if($isAdded === false) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this, 'adding: ' . $dn->toString()); + } + return $this; + } + + /** + * Update LDAP registry + * + * @param string|Zend_Ldap_Dn $dn + * @param array $entry + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function update($dn, array $entry) + { + if (!($dn instanceof Zend_Ldap_Dn)) { + $dn = Zend_Ldap_Dn::factory($dn, null); + } + self::prepareLdapEntryArray($entry); + + $rdnParts = $dn->getRdn(Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER); + foreach ($rdnParts as $key => $value) { + $value = Zend_Ldap_Dn::unescapeValue($value); + if (array_key_exists($key, $entry) && !in_array($value, $entry[$key])) { + $entry[$key] = array_merge(array($value), $entry[$key]); + } + } + + $adAttributes = array('distinguishedname', 'instancetype', 'name', 'objectcategory', + 'objectguid', 'usnchanged', 'usncreated', 'whenchanged', 'whencreated'); + foreach ($adAttributes as $attr) { + if (array_key_exists($attr, $entry)) { + unset($entry[$attr]); + } + } + + if (count($entry) > 0) { + $isModified = @ldap_modify($this->getResource(), $dn->toString(), $entry); + if($isModified === false) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this, 'updating: ' . $dn->toString()); + } + } + return $this; + } + + /** + * Save entry to LDAP registry. + * + * Internally decides if entry will be updated to added by calling + * {@link exists()}. + * + * @param string|Zend_Ldap_Dn $dn + * @param array $entry + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function save($dn, array $entry) + { + if ($dn instanceof Zend_Ldap_Dn) { + $dn = $dn->toString(); + } + if ($this->exists($dn)) $this->update($dn, $entry); + else $this->add($dn, $entry); + return $this; + } + + /** + * Delete an LDAP entry + * + * @param string|Zend_Ldap_Dn $dn + * @param boolean $recursively + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function delete($dn, $recursively = false) + { + if ($dn instanceof Zend_Ldap_Dn) { + $dn = $dn->toString(); + } + if ($recursively === true) { + if ($this->countChildren($dn)>0) { + $children = $this->_getChildrenDns($dn); + foreach ($children as $c) { + $this->delete($c, true); + } + } + } + $isDeleted = @ldap_delete($this->getResource(), $dn); + if($isDeleted === false) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this, 'deleting: ' . $dn); + } + return $this; + } + + /** + * Retrieve the immediate children DNs of the given $parentDn + * + * This method is used in recursive methods like {@see delete()} + * or {@see copy()} + * + * @param string|Zend_Ldap_Dn $parentDn + * @return array of DNs + */ + protected function _getChildrenDns($parentDn) + { + if ($parentDn instanceof Zend_Ldap_Dn) { + $parentDn = $parentDn->toString(); + } + $children = array(); + $search = @ldap_list($this->getResource(), $parentDn, '(objectClass=*)', array('dn')); + for ($entry = @ldap_first_entry($this->getResource(), $search); + $entry !== false; + $entry = @ldap_next_entry($this->getResource(), $entry)) { + $childDn = @ldap_get_dn($this->getResource(), $entry); + if ($childDn === false) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this, 'getting dn'); + } + $children[] = $childDn; + } + @ldap_free_result($search); + return $children; + } + + /** + * Moves a LDAP entry from one DN to another subtree. + * + * @param string|Zend_Ldap_Dn $from + * @param string|Zend_Ldap_Dn $to + * @param boolean $recursively + * @param boolean $alwaysEmulate + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function moveToSubtree($from, $to, $recursively = false, $alwaysEmulate = false) + { + if ($from instanceof Zend_Ldap_Dn) { + $orgDnParts = $from->toArray(); + } else { + $orgDnParts = Zend_Ldap_Dn::explodeDn($from); + } + + if ($to instanceof Zend_Ldap_Dn) { + $newParentDnParts = $to->toArray(); + } else { + $newParentDnParts = Zend_Ldap_Dn::explodeDn($to); + } + + $newDnParts = array_merge(array(array_shift($orgDnParts)), $newParentDnParts); + $newDn = Zend_Ldap_Dn::fromArray($newDnParts); + return $this->rename($from, $newDn, $recursively, $alwaysEmulate); + } + + /** + * Moves a LDAP entry from one DN to another DN. + * + * This is an alias for {@link rename()} + * + * @param string|Zend_Ldap_Dn $from + * @param string|Zend_Ldap_Dn $to + * @param boolean $recursively + * @param boolean $alwaysEmulate + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function move($from, $to, $recursively = false, $alwaysEmulate = false) + { + return $this->rename($from, $to, $recursively, $alwaysEmulate); + } + + /** + * Renames a LDAP entry from one DN to another DN. + * + * This method implicitely moves the entry to another location within the tree. + * + * @param string|Zend_Ldap_Dn $from + * @param string|Zend_Ldap_Dn $to + * @param boolean $recursively + * @param boolean $alwaysEmulate + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function rename($from, $to, $recursively = false, $alwaysEmulate = false) + { + $emulate = (bool)$alwaysEmulate; + if (!function_exists('ldap_rename')) $emulate = true; + else if ($recursively) $emulate = true; + + if ($emulate === false) { + if ($from instanceof Zend_Ldap_Dn) { + $from = $from->toString(); + } + + if ($to instanceof Zend_Ldap_Dn) { + $newDnParts = $to->toArray(); + } else { + $newDnParts = Zend_Ldap_Dn::explodeDn($to); + } + + $newRdn = Zend_Ldap_Dn::implodeRdn(array_shift($newDnParts)); + $newParent = Zend_Ldap_Dn::implodeDn($newDnParts); + $isOK = @ldap_rename($this->getResource(), $from, $newRdn, $newParent, true); + if($isOK === false) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this, 'renaming ' . $from . ' to ' . $to); + } + else if (!$this->exists($to)) $emulate = true; + } + if ($emulate) { + $this->copy($from, $to, $recursively); + $this->delete($from, $recursively); + } + return $this; + } + + /** + * Copies a LDAP entry from one DN to another subtree. + * + * @param string|Zend_Ldap_Dn $from + * @param string|Zend_Ldap_Dn $to + * @param boolean $recursively + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function copyToSubtree($from, $to, $recursively = false) + { + if ($from instanceof Zend_Ldap_Dn) { + $orgDnParts = $from->toArray(); + } else { + $orgDnParts = Zend_Ldap_Dn::explodeDn($from); + } + + if ($to instanceof Zend_Ldap_Dn) { + $newParentDnParts = $to->toArray(); + } else { + $newParentDnParts = Zend_Ldap_Dn::explodeDn($to); + } + + $newDnParts = array_merge(array(array_shift($orgDnParts)), $newParentDnParts); + $newDn = Zend_Ldap_Dn::fromArray($newDnParts); + return $this->copy($from, $newDn, $recursively); + } + + /** + * Copies a LDAP entry from one DN to another DN. + * + * @param string|Zend_Ldap_Dn $from + * @param string|Zend_Ldap_Dn $to + * @param boolean $recursively + * @return Zend_Ldap Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function copy($from, $to, $recursively = false) + { + $entry = $this->getEntry($from, array(), true); + + if ($to instanceof Zend_Ldap_Dn) { + $toDnParts = $to->toArray(); + } else { + $toDnParts = Zend_Ldap_Dn::explodeDn($to); + } + $this->add($to, $entry); + + if ($recursively === true && $this->countChildren($from)>0) { + $children = $this->_getChildrenDns($from); + foreach ($children as $c) { + $cDnParts = Zend_Ldap_Dn::explodeDn($c); + $newChildParts = array_merge(array(array_shift($cDnParts)), $toDnParts); + $newChild = Zend_Ldap_Dn::implodeDn($newChildParts); + $this->copy($c, $newChild, true); + } + } + return $this; + } + + /** + * Returns the specified DN as a Zend_Ldap_Node + * + * @param string|Zend_Ldap_Dn $dn + * @return Zend_Ldap_Node|null + * @throws Zend_Ldap_Exception + */ + public function getNode($dn) + { + /** + * Zend_Ldap_Node + */ + return Zend_Ldap_Node::fromLdap($dn, $this); + } + + /** + * Returns the base node as a Zend_Ldap_Node + * + * @return Zend_Ldap_Node + * @throws Zend_Ldap_Exception + */ + public function getBaseNode() + { + return $this->getNode($this->getBaseDn(), $this); + } + + /** + * Returns the RootDSE + * + * @return Zend_Ldap_Node_RootDse + * @throws Zend_Ldap_Exception + */ + public function getRootDse() + { + if ($this->_rootDse === null) { + /** + * @see Zend_Ldap_Node_Schema + */ + $this->_rootDse = Zend_Ldap_Node_RootDse::create($this); + } + return $this->_rootDse; + } + + /** + * Returns the schema + * + * @return Zend_Ldap_Node_Schema + * @throws Zend_Ldap_Exception + */ + public function getSchema() + { + if ($this->_schema === null) { + /** + * @see Zend_Ldap_Node_Schema + */ + $this->_schema = Zend_Ldap_Node_Schema::create($this); + } + return $this->_schema; + } +} diff --git a/library/vendor/Zend/Ldap/Attribute.php b/library/vendor/Zend/Ldap/Attribute.php new file mode 100644 index 000000000..6210d7bba --- /dev/null +++ b/library/vendor/Zend/Ldap/Attribute.php @@ -0,0 +1,416 @@ += 0 && $indexformat('U'); + } else if (is_string($value)) { + try { + return Zend_Ldap_Converter::fromLdapDateTime($value, false)->format('U'); + } catch (InvalidArgumentException $e) { + return null; + } + } else return null; + } +} diff --git a/library/vendor/Zend/Ldap/Collection.php b/library/vendor/Zend/Ldap/Collection.php new file mode 100644 index 000000000..f23c4cebc --- /dev/null +++ b/library/vendor/Zend/Ldap/Collection.php @@ -0,0 +1,239 @@ +_iterator = $iterator; + } + + public function __destruct() + { + $this->close(); + } + + /** + * Closes the current result set + * + * @return boolean + */ + public function close() + { + return $this->_iterator->close(); + } + + /** + * Get all entries as an array + * + * @return array + */ + public function toArray() + { + $data = array(); + foreach ($this as $item) { + $data[] = $item; + } + return $data; + } + + /** + * Get first entry + * + * @return array + */ + public function getFirst() + { + if ($this->count() > 0) { + $this->rewind(); + return $this->current(); + } else { + return null; + } + } + + /** + * Returns the underlying iterator + * + * @return Zend_Ldap_Collection_Iterator_Default + */ + public function getInnerIterator() + { + return $this->_iterator; + } + + /** + * Returns the number of items in current result + * Implements Countable + * + * @return int + */ + public function count() + { + return $this->_iterator->count(); + } + + /** + * Return the current result item + * Implements Iterator + * + * @return array|null + * @throws Zend_Ldap_Exception + */ + public function current() + { + if ($this->count() > 0) { + if ($this->_current < 0) { + $this->rewind(); + } + if (!array_key_exists($this->_current, $this->_cache)) { + $current = $this->_iterator->current(); + if ($current === null) { + return null; + } + $this->_cache[$this->_current] = $this->_createEntry($current); + } + return $this->_cache[$this->_current]; + } else { + return null; + } + } + + /** + * Creates the data structure for the given entry data + * + * @param array $data + * @return array + */ + protected function _createEntry(array $data) + { + return $data; + } + + /** + * Return the current result item DN + * + * @return string|null + */ + public function dn() + { + if ($this->count() > 0) { + if ($this->_current < 0) { + $this->rewind(); + } + return $this->_iterator->key(); + } else { + return null; + } + } + + /** + * Return the current result item key + * Implements Iterator + * + * @return int|null + */ + public function key() + { + if ($this->count() > 0) { + if ($this->_current < 0) { + $this->rewind(); + } + return $this->_current; + } else { + return null; + } + } + + /** + * Move forward to next result item + * Implements Iterator + * + * @throws Zend_Ldap_Exception + */ + public function next() + { + $this->_iterator->next(); + $this->_current++; + } + + /** + * Rewind the Iterator to the first result item + * Implements Iterator + * + * @throws Zend_Ldap_Exception + */ + public function rewind() + { + $this->_iterator->rewind(); + $this->_current = 0; + } + + /** + * Check if there is a current result item + * after calls to rewind() or next() + * Implements Iterator + * + * @return boolean + */ + public function valid() + { + if (isset($this->_cache[$this->_current])) { + return true; + } else { + return $this->_iterator->valid(); + } + } +} diff --git a/library/vendor/Zend/Ldap/Collection/Iterator/Default.php b/library/vendor/Zend/Ldap/Collection/Iterator/Default.php new file mode 100644 index 000000000..8fb7a3489 --- /dev/null +++ b/library/vendor/Zend/Ldap/Collection/Iterator/Default.php @@ -0,0 +1,308 @@ +_ldap = $ldap; + $this->_resultId = $resultId; + $this->_itemCount = @ldap_count_entries($ldap->getResource(), $resultId); + if ($this->_itemCount === false) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception($this->_ldap, 'counting entries'); + } + } + + public function __destruct() + { + $this->close(); + } + + /** + * Closes the current result set + * + * @return bool + */ + public function close() + { + $isClosed = false; + if (is_resource($this->_resultId)) { + $isClosed = @ldap_free_result($this->_resultId); + $this->_resultId = null; + $this->_current = null; + } + return $isClosed; + } + + /** + * Gets the current LDAP connection. + * + * @return Zend_Ldap + */ + public function getLdap() + { + return $this->_ldap; + } + + /** + * Sets the attribute name treatment. + * + * Can either be one of the following constants + * - Zend_Ldap_Collection_Iterator_Default::ATTRIBUTE_TO_LOWER + * - Zend_Ldap_Collection_Iterator_Default::ATTRIBUTE_TO_UPPER + * - Zend_Ldap_Collection_Iterator_Default::ATTRIBUTE_NATIVE + * or a valid callback accepting the attribute's name as it's only + * argument and returning the new attribute's name. + * + * @param integer|callback $attributeNameTreatment + * @return Zend_Ldap_Collection_Iterator_Default Provides a fluent interface + */ + public function setAttributeNameTreatment($attributeNameTreatment) + { + if (is_callable($attributeNameTreatment)) { + if (is_string($attributeNameTreatment) && !function_exists($attributeNameTreatment)) { + $this->_attributeNameTreatment = self::ATTRIBUTE_TO_LOWER; + } else if (is_array($attributeNameTreatment) && + !method_exists($attributeNameTreatment[0], $attributeNameTreatment[1])) { + $this->_attributeNameTreatment = self::ATTRIBUTE_TO_LOWER; + } else { + $this->_attributeNameTreatment = $attributeNameTreatment; + } + } else { + $attributeNameTreatment = (int)$attributeNameTreatment; + switch ($attributeNameTreatment) { + case self::ATTRIBUTE_TO_LOWER: + case self::ATTRIBUTE_TO_UPPER: + case self::ATTRIBUTE_NATIVE: + $this->_attributeNameTreatment = $attributeNameTreatment; + break; + default: + $this->_attributeNameTreatment = self::ATTRIBUTE_TO_LOWER; + break; + } + } + return $this; + } + + /** + * Returns the currently set attribute name treatment + * + * @return integer|callback + */ + public function getAttributeNameTreatment() + { + return $this->_attributeNameTreatment; + } + + /** + * Returns the number of items in current result + * Implements Countable + * + * @return int + */ + public function count() + { + return $this->_itemCount; + } + + /** + * Return the current result item + * Implements Iterator + * + * @return array|null + * @throws Zend_Ldap_Exception + */ + public function current() + { + if (!is_resource($this->_current)) { + $this->rewind(); + } + if (!is_resource($this->_current)) { + return null; + } + + $entry = array('dn' => $this->key()); + $ber_identifier = null; + $name = @ldap_first_attribute($this->_ldap->getResource(), $this->_current, + $ber_identifier); + while ($name) { + $data = @ldap_get_values_len($this->_ldap->getResource(), $this->_current, $name); + unset($data['count']); + + switch($this->_attributeNameTreatment) { + case self::ATTRIBUTE_TO_LOWER: + $attrName = strtolower($name); + break; + case self::ATTRIBUTE_TO_UPPER: + $attrName = strtoupper($name); + break; + case self::ATTRIBUTE_NATIVE: + $attrName = $name; + break; + default: + $attrName = call_user_func($this->_attributeNameTreatment, $name); + break; + } + $entry[$attrName] = $data; + $name = @ldap_next_attribute($this->_ldap->getResource(), $this->_current, + $ber_identifier); + } + ksort($entry, SORT_LOCALE_STRING); + return $entry; + } + + /** + * Return the result item key + * Implements Iterator + * + * @return string|null + */ + public function key() + { + if (!is_resource($this->_current)) { + $this->rewind(); + } + if (is_resource($this->_current)) { + $currentDn = @ldap_get_dn($this->_ldap->getResource(), $this->_current); + if ($currentDn === false) { + /** @see Zend_Ldap_Exception */ + throw new Zend_Ldap_Exception($this->_ldap, 'getting dn'); + } + return $currentDn; + } else { + return null; + } + } + + /** + * Move forward to next result item + * Implements Iterator + * + * @throws Zend_Ldap_Exception + */ + public function next() + { + if (is_resource($this->_current) && $this->_itemCount > 0) { + $this->_current = @ldap_next_entry($this->_ldap->getResource(), $this->_current); + /** @see Zend_Ldap_Exception */ + if ($this->_current === false) { + $msg = $this->_ldap->getLastError($code); + if ($code === Zend_Ldap_Exception::LDAP_SIZELIMIT_EXCEEDED) { + // we have reached the size limit enforced by the server + return; + } else if ($code > Zend_Ldap_Exception::LDAP_SUCCESS) { + throw new Zend_Ldap_Exception($this->_ldap, 'getting next entry (' . $msg . ')'); + } + } + } else { + $this->_current = false; + } + } + + /** + * Rewind the Iterator to the first result item + * Implements Iterator + * + * @throws Zend_Ldap_Exception + */ + public function rewind() + { + if (is_resource($this->_resultId)) { + $this->_current = @ldap_first_entry($this->_ldap->getResource(), $this->_resultId); + /** @see Zend_Ldap_Exception */ + if ($this->_current === false && + $this->_ldap->getLastErrorCode() > Zend_Ldap_Exception::LDAP_SUCCESS) { + throw new Zend_Ldap_Exception($this->_ldap, 'getting first entry'); + } + } + } + + /** + * Check if there is a current result item + * after calls to rewind() or next() + * Implements Iterator + * + * @return boolean + */ + public function valid() + { + return (is_resource($this->_current)); + } + +} diff --git a/library/vendor/Zend/Ldap/Converter.php b/library/vendor/Zend/Ldap/Converter.php new file mode 100644 index 000000000..e8677e1f1 --- /dev/null +++ b/library/vendor/Zend/Ldap/Converter.php @@ -0,0 +1,410 @@ + + * @link http://pear.php.net/package/Net_LDAP2 + * @author Benedikt Hallinger + * + * @param string $string String to convert + * @return string + */ + public static function ascToHex32($string) + { + for ($i = 0; $i, + * heavily based on work from DavidSmith@byu.net + * @link http://pear.php.net/package/Net_LDAP2 + * @author Benedikt Hallinger , heavily based on work from DavidSmith@byu.net + * + * @param string $string String to convert + * @return string + */ + public static function hex32ToAsc($string) + { + // Using a callback, since PHP 5.5 has deprecated the /e modifier in preg_replace. + $string = preg_replace_callback("/\\\([0-9A-Fa-f]{2})/", array('Zend_Ldap_Converter', '_charHex32ToAsc'), $string); + return $string; + } + + /** + * Convert a single slash-prefixed character from Hex32 to ASCII. + * Used as a callback in @see hex32ToAsc() + * @param array $matches + * + * @return string + */ + private static function _charHex32ToAsc(array $matches) + { + return chr(hexdec($matches[0])); + } + + /** + * Convert any value to an LDAP-compatible value. + * + * By setting the $type-parameter the conversion of a certain + * type can be forced + * + * @todo write more tests + * + * @param mixed $value The value to convert + * @param int $ytpe The conversion type to use + * @return string + * @throws Zend_Ldap_Converter_Exception + */ + public static function toLdap($value, $type = self::STANDARD) + { + try { + switch ($type) { + case self::BOOLEAN: + return self::toldapBoolean($value); + break; + case self::GENERALIZED_TIME: + return self::toLdapDatetime($value); + break; + default: + if (is_string($value)) { + return $value; + } else if (is_int($value) || is_float($value)) { + return (string)$value; + } else if (is_bool($value)) { + return self::toldapBoolean($value); + } else if (is_object($value)) { + if ($value instanceof DateTime) { + return self::toLdapDatetime($value); + } else if ($value instanceof Zend_Date) { + return self::toLdapDatetime($value); + } else { + return self::toLdapSerialize($value); + } + } else if (is_array($value)) { + return self::toLdapSerialize($value); + } else if (is_resource($value) && get_resource_type($value) === 'stream') { + return stream_get_contents($value); + } else { + return null; + } + break; + } + } catch (Exception $e) { + throw new Zend_Ldap_Converter_Exception($e->getMessage(), $e->getCode(), $e); + } + } + + /** + * Converts a date-entity to an LDAP-compatible date-string + * + * The date-entity $date can be either a timestamp, a + * DateTime Object, a string that is parseable by strtotime() or a Zend_Date + * Object. + * + * @param integer|string|DateTimt|Zend_Date $date The date-entity + * @param boolean $asUtc Whether to return the LDAP-compatible date-string + * as UTC or as local value + * @return string + * @throws InvalidArgumentException + */ + public static function toLdapDateTime($date, $asUtc = true) + { + if (!($date instanceof DateTime)) { + if (is_int($date)) { + $date = new DateTime('@' . $date); + $date->setTimezone(new DateTimeZone(date_default_timezone_get())); + } else if (is_string($date)) { + $date = new DateTime($date); + } else if ($date instanceof Zend_Date) { + $date = new DateTime($date->get(Zend_Date::ISO_8601)); + } else { + throw new InvalidArgumentException('Parameter $date is not of the expected type'); + } + } + $timezone = $date->format('O'); + if (true === $asUtc) { + $date->setTimezone(new DateTimeZone('UTC')); + $timezone = 'Z'; + } + if ( '+0000' === $timezone ) { + $timezone = 'Z'; + } + return $date->format('YmdHis') . $timezone; + } + + /** + * Convert a boolean value to an LDAP-compatible string + * + * This converts a boolean value of TRUE, an integer-value of 1 and a + * case-insensitive string 'true' to an LDAP-compatible 'TRUE'. All other + * other values are converted to an LDAP-compatible 'FALSE'. + * + * @param boolean|integer|string $value The boolean value to encode + * @return string + */ + public static function toLdapBoolean($value) + { + $return = 'FALSE'; + if (!is_scalar($value)) { + return $return; + } + if (true === $value || 'true' === strtolower($value) || 1 === $value) { + $return = 'TRUE'; + } + return $return; + } + + /** + * Serialize any value for storage in LDAP + * + * @param mixed $value The value to serialize + * @return string + */ + public static function toLdapSerialize($value) + { + return serialize($value); + } + + /** + * Convert an LDAP-compatible value to a corresponding PHP-value. + * + * By setting the $type-parameter the conversion of a certain + * type can be forced + * . + * @param string $value The value to convert + * @param int $ytpe The conversion type to use + * @param boolean $dateTimeAsUtc Return DateTime values in UTC timezone + * @return mixed + * @throws Zend_Ldap_Converter_Exception + */ + public static function fromLdap($value, $type = self::STANDARD, $dateTimeAsUtc = true) + { + switch ($type) { + case self::BOOLEAN: + return self::fromldapBoolean($value); + break; + case self::GENERALIZED_TIME: + return self::fromLdapDateTime($value); + break; + default: + if (is_numeric($value)) { + // prevent numeric values to be treated as date/time + return $value; + } else if ('TRUE' === $value || 'FALSE' === $value) { + return self::fromLdapBoolean($value); + } + if (preg_match('/^\d{4}[\d\+\-Z\.]*$/', $value)) { + return self::fromLdapDateTime($value, $dateTimeAsUtc); + } + try { + return self::fromLdapUnserialize($value); + } catch (UnexpectedValueException $e) { } + break; + } + return $value; + } + + /** + * Convert an LDAP-Generalized-Time-entry into a DateTime-Object + * + * CAVEAT: The DateTime-Object returned will alwasy be set to UTC-Timezone. + * + * @param string $date The generalized-Time + * @param boolean $asUtc Return the DateTime with UTC timezone + * @return DateTime + * @throws InvalidArgumentException if a non-parseable-format is given + */ + public static function fromLdapDateTime($date, $asUtc = true) + { + $datepart = array (); + if (!preg_match('/^(\d{4})/', $date, $datepart) ) { + throw new InvalidArgumentException('Invalid date format found'); + } + + if ($datepart[1] < 4) { + throw new InvalidArgumentException('Invalid date format found (too short)'); + } + + $time = array ( + // The year is mandatory! + 'year' => $datepart[1], + 'month' => 1, + 'day' => 1, + 'hour' => 0, + 'minute' => 0, + 'second' => 0, + 'offdir' => '+', + 'offsethours' => 0, + 'offsetminutes' => 0 + ); + + $length = strlen($date); + + // Check for month. + if ($length >= 6) { + $month = substr($date, 4, 2); + if ($month < 1 || $month > 12) { + throw new InvalidArgumentException('Invalid date format found (invalid month)'); + } + $time['month'] = $month; + } + + // Check for day + if ($length >= 8) { + $day = substr($date, 6, 2); + if ($day < 1 || $day > 31) { + throw new InvalidArgumentException('Invalid date format found (invalid day)'); + } + $time['day'] = $day; + } + + // Check for Hour + if ($length >= 10) { + $hour = substr($date, 8, 2); + if ($hour < 0 || $hour > 23) { + throw new InvalidArgumentException('Invalid date format found (invalid hour)'); + } + $time['hour'] = $hour; + } + + // Check for minute + if ($length >= 12) { + $minute = substr($date, 10, 2); + if ($minute < 0 || $minute > 59) { + throw new InvalidArgumentException('Invalid date format found (invalid minute)'); + } + $time['minute'] = $minute; + } + + // Check for seconds + if ($length >= 14) { + $second = substr($date, 12, 2); + if ($second < 0 || $second > 59) { + throw new InvalidArgumentException('Invalid date format found (invalid second)'); + } + $time['second'] = $second; + } + + // Set Offset + $offsetRegEx = '/([Z\-\+])(\d{2}\'?){0,1}(\d{2}\'?){0,1}$/'; + $off = array (); + if (preg_match($offsetRegEx, $date, $off)) { + $offset = $off[1]; + if ($offset == '+' || $offset == '-') { + $time['offdir'] = $offset; + // we have an offset, so lets calculate it. + if (isset($off[2])) { + $offsetHours = substr($off[2], 0, 2); + if ($offsetHours < 0 || $offsetHours > 12) { + throw new InvalidArgumentException('Invalid date format found (invalid offset hour)'); + } + $time['offsethours'] = $offsetHours; + } + if (isset($off[3])) { + $offsetMinutes = substr($off[3], 0, 2); + if ($offsetMinutes < 0 || $offsetMinutes > 59) { + throw new InvalidArgumentException('Invalid date format found (invalid offset minute)'); + } + $time['offsetminutes'] = $offsetMinutes; + } + } + } + + // Raw-Data is present, so lets create a DateTime-Object from it. + $offset = $time['offdir'] + . str_pad($time['offsethours'],2,'0',STR_PAD_LEFT) + . str_pad($time['offsetminutes'],2,'0',STR_PAD_LEFT); + $timestring = $time['year'] . '-' + . str_pad($time['month'], 2, '0', STR_PAD_LEFT) . '-' + . str_pad($time['day'], 2, '0', STR_PAD_LEFT) . ' ' + . str_pad($time['hour'], 2, '0', STR_PAD_LEFT) . ':' + . str_pad($time['minute'], 2, '0', STR_PAD_LEFT) . ':' + . str_pad($time['second'], 2, '0', STR_PAD_LEFT) + . $time['offdir'] + . str_pad($time['offsethours'], 2, '0', STR_PAD_LEFT) + . str_pad($time['offsetminutes'], 2, '0', STR_PAD_LEFT); + $date = new DateTime($timestring); + if ($asUtc) { + $date->setTimezone(new DateTimeZone('UTC')); + } + return $date; + } + + /** + * Convert an LDAP-compatible boolean value into a PHP-compatible one + * + * @param string $value The value to convert + * @return boolean + * @throws InvalidArgumentException + */ + public static function fromLdapBoolean($value) + { + if ( 'TRUE' === $value ) { + return true; + } else if ( 'FALSE' === $value ) { + return false; + } else { + throw new InvalidArgumentException('The given value is not a boolean value'); + } + } + + /** + * Unserialize a serialized value to return the corresponding object + * + * @param string $value The value to convert + * @return mixed + * @throws UnexpectedValueException + */ + public static function fromLdapUnserialize($value) + { + $v = @unserialize($value); + if (false===$v && $value != 'b:0;') { + throw new UnexpectedValueException('The given value could not be unserialized'); + } + return $v; + } +} diff --git a/library/vendor/Zend/Ldap/Converter/Exception.php b/library/vendor/Zend/Ldap/Converter/Exception.php new file mode 100644 index 000000000..091018efa --- /dev/null +++ b/library/vendor/Zend/Ldap/Converter/Exception.php @@ -0,0 +1,34 @@ +_dn = $dn; + $this->setCaseFold($caseFold); + } + + /** + * Gets the RDN of the current DN + * + * @param string $caseFold + * @return array + * @throws Zend_Ldap_Exception if DN has no RDN (empty array) + */ + public function getRdn($caseFold = null) + { + $caseFold = self::_sanitizeCaseFold($caseFold, $this->_caseFold); + return self::_caseFoldRdn($this->get(0, 1, $caseFold), null); + } + + /** + * Gets the RDN of the current DN as a string + * + * @param string $caseFold + * @return string + * @throws Zend_Ldap_Exception if DN has no RDN (empty array) + */ + public function getRdnString($caseFold = null) + { + $caseFold = self::_sanitizeCaseFold($caseFold, $this->_caseFold); + return self::implodeRdn($this->getRdn(), $caseFold); + } + + /** + * Get the parent DN $levelUp levels up the tree + * + * @param int $levelUp + * @return Zend_Ldap_Dn + */ + public function getParentDn($levelUp = 1) + { + $levelUp = (int)$levelUp; + if ($levelUp < 1 || $levelUp >= count($this->_dn)) { + /** + * Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Cannot retrieve parent DN with given $levelUp'); + } + $newDn = array_slice($this->_dn, $levelUp); + return new self($newDn, $this->_caseFold); + } + + /** + * Get a DN part + * + * @param int $index + * @param int $length + * @param string $caseFold + * @return array + * @throws Zend_Ldap_Exception if index is illegal + */ + public function get($index, $length = 1, $caseFold = null) + { + $caseFold = self::_sanitizeCaseFold($caseFold, $this->_caseFold); + $this->_assertIndex($index); + $length = (int)$length; + if ($length <= 0) { + $length = 1; + } + if ($length === 1) { + return self::_caseFoldRdn($this->_dn[$index], $caseFold); + } + else { + return self::_caseFoldDn(array_slice($this->_dn, $index, $length, false), $caseFold); + } + } + + /** + * Set a DN part + * + * @param int $index + * @param array $value + * @return Zend_Ldap_Dn Provides a fluent interface + * @throws Zend_Ldap_Exception if index is illegal + */ + public function set($index, array $value) + { + $this->_assertIndex($index); + self::_assertRdn($value); + $this->_dn[$index] = $value; + return $this; + } + + /** + * Remove a DN part + * + * @param int $index + * @param int $length + * @return Zend_Ldap_Dn Provides a fluent interface + * @throws Zend_Ldap_Exception if index is illegal + */ + public function remove($index, $length = 1) + { + $this->_assertIndex($index); + $length = (int)$length; + if ($length <= 0) { + $length = 1; + } + array_splice($this->_dn, $index, $length, null); + return $this; + } + + /** + * Append a DN part + * + * @param array $value + * @return Zend_Ldap_Dn Provides a fluent interface + */ + public function append(array $value) + { + self::_assertRdn($value); + $this->_dn[] = $value; + return $this; + } + + /** + * Prepend a DN part + * + * @param array $value + * @return Zend_Ldap_Dn Provides a fluent interface + */ + public function prepend(array $value) + { + self::_assertRdn($value); + array_unshift($this->_dn, $value); + return $this; + } + + /** + * Insert a DN part + * + * @param int $index + * @param array $value + * @return Zend_Ldap_Dn Provides a fluent interface + * @throws Zend_Ldap_Exception if index is illegal + */ + public function insert($index, array $value) + { + $this->_assertIndex($index); + self::_assertRdn($value); + $first = array_slice($this->_dn, 0, $index + 1); + $second = array_slice($this->_dn, $index + 1); + $this->_dn = array_merge($first, array($value), $second); + return $this; + } + + /** + * Assert index is correct and usable + * + * @param mixed $index + * @return boolean + * @throws Zend_Ldap_Exception + */ + protected function _assertIndex($index) + { + if (!is_int($index)) { + /** + * Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Parameter $index must be an integer'); + } + if ($index < 0 || $index >= count($this->_dn)) { + /** + * Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Parameter $index out of bounds'); + } + return true; + } + + /** + * Assert if value is in a correct RDN format + * + * @param array $value + * @return boolean + * @throws Zend_Ldap_Exception + */ + protected static function _assertRdn(array $value) + { + if (count($value)<1) { + /** + * Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'RDN Array is malformed: it must have at least one item'); + } + + foreach (array_keys($value) as $key) { + if (!is_string($key)) { + /** + * Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'RDN Array is malformed: it must use string keys'); + } + } + } + + /** + * Sets the case fold + * + * @param string|null $caseFold + */ + public function setCaseFold($caseFold) + { + $this->_caseFold = self::_sanitizeCaseFold($caseFold, self::$_defaultCaseFold); + } + + /** + * Return DN as a string + * + * @param string $caseFold + * @return string + * @throws Zend_Ldap_Exception + */ + public function toString($caseFold = null) + { + $caseFold = self::_sanitizeCaseFold($caseFold, $this->_caseFold); + return self::implodeDn($this->_dn, $caseFold); + } + + /** + * Return DN as an array + * + * @param string $caseFold + * @return array + */ + public function toArray($caseFold = null) + { + $caseFold = self::_sanitizeCaseFold($caseFold, $this->_caseFold); + + if ($caseFold === self::ATTR_CASEFOLD_NONE) { + return $this->_dn; + } else { + return self::_caseFoldDn($this->_dn, $caseFold); + } + } + + /** + * Do a case folding on a RDN + * + * @param array $part + * @param string $caseFold + * @return array + */ + protected static function _caseFoldRdn(array $part, $caseFold) + { + switch ($caseFold) { + case self::ATTR_CASEFOLD_UPPER: + return array_change_key_case($part, CASE_UPPER); + case self::ATTR_CASEFOLD_LOWER: + return array_change_key_case($part, CASE_LOWER); + case self::ATTR_CASEFOLD_NONE: + default: + return $part; + } + } + + /** + * Do a case folding on a DN ort part of it + * + * @param array $dn + * @param string $caseFold + * @return array + */ + protected static function _caseFoldDn(array $dn, $caseFold) + { + $return = array(); + foreach ($dn as $part) { + $return[] = self::_caseFoldRdn($part, $caseFold); + } + return $return; + } + + /** + * Cast to string representation {@see toString()} + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Required by the ArrayAccess implementation + * + * @param int $offset + * @return boolean + */ + public function offsetExists($offset) + { + $offset = (int)$offset; + if ($offset < 0 || $offset >= count($this->_dn)) { + return false; + } else { + return true; + } + } + + /** + * Proxy to {@see get()} + * Required by the ArrayAccess implementation + * + * @param int $offset + * @return array + */ + public function offsetGet($offset) + { + return $this->get($offset, 1, null); + } + + /** + * Proxy to {@see set()} + * Required by the ArrayAccess implementation + * + * @param int $offset + * @param array $value + */ + public function offsetSet($offset, $value) + { + $this->set($offset, $value); + } + + /** + * Proxy to {@see remove()} + * Required by the ArrayAccess implementation + * + * @param int $offset + */ + public function offsetUnset($offset) + { + $this->remove($offset, 1); + } + + /** + * Sets the default case fold + * + * @param string $caseFold + */ + public static function setDefaultCaseFold($caseFold) + { + self::$_defaultCaseFold = self::_sanitizeCaseFold($caseFold, self::ATTR_CASEFOLD_NONE); + } + + /** + * Sanitizes the case fold + * + * @param string $caseFold + * @return string + */ + protected static function _sanitizeCaseFold($caseFold, $default) + { + switch ($caseFold) { + case self::ATTR_CASEFOLD_NONE: + case self::ATTR_CASEFOLD_UPPER: + case self::ATTR_CASEFOLD_LOWER: + return $caseFold; + break; + default: + return $default; + break; + } + } + + /** + * Escapes a DN value according to RFC 2253 + * + * Escapes the given VALUES according to RFC 2253 so that they can be safely used in LDAP DNs. + * The characters ",", "+", """, "\", "<", ">", ";", "#", " = " with a special meaning in RFC 2252 + * are preceeded by ba backslash. Control characters with an ASCII code < 32 are represented as \hexpair. + * Finally all leading and trailing spaces are converted to sequences of \20. + * @see Net_LDAP2_Util::escape_dn_value() from Benedikt Hallinger + * @link http://pear.php.net/package/Net_LDAP2 + * @author Benedikt Hallinger + * + * @param string|array $values An array containing the DN values that should be escaped + * @return array The array $values, but escaped + */ + public static function escapeValue($values = array()) + { + /** + * @see Zend_Ldap_Converter + */ + + if (!is_array($values)) $values = array($values); + foreach ($values as $key => $val) { + // Escaping of filter meta characters + $val = str_replace(array('\\', ',', '+', '"', '<', '>', ';', '#', '=', ), + array('\\\\', '\,', '\+', '\"', '\<', '\>', '\;', '\#', '\='), $val); + $val = Zend_Ldap_Converter::ascToHex32($val); + + // Convert all leading and trailing spaces to sequences of \20. + if (preg_match('/^(\s*)(.+?)(\s*)$/', $val, $matches)) { + $val = $matches[2]; + for ($i = 0; $i + * @link http://pear.php.net/package/Net_LDAP2 + * @author Benedikt Hallinger + * + * @param string|array $values Array of DN Values + * @return array Same as $values, but unescaped + */ + public static function unescapeValue($values = array()) + { + /** + * @see Zend_Ldap_Converter + */ + + if (!is_array($values)) $values = array($values); + foreach ($values as $key => $val) { + // strip slashes from special chars + $val = str_replace(array('\\\\', '\,', '\+', '\"', '\<', '\>', '\;', '\#', '\='), + array('\\', ',', '+', '"', '<', '>', ';', '#', '=', ), $val); + $values[$key] = Zend_Ldap_Converter::hex32ToAsc($val); + } + return (count($values) == 1) ? $values[0] : $values; + } + + /** + * Creates an array containing all parts of the given DN. + * + * Array will be of type + * array( + * array("cn" => "name1", "uid" => "user"), + * array("cn" => "name2"), + * array("dc" => "example"), + * array("dc" => "org") + * ) + * for a DN of cn=name1+uid=user,cn=name2,dc=example,dc=org. + * + * @param string $dn + * @param array $keys An optional array to receive DN keys (e.g. CN, OU, DC, ...) + * @param array $vals An optional array to receive DN values + * @param string $caseFold + * @return array + * @throws Zend_Ldap_Exception + */ + public static function explodeDn($dn, array &$keys = null, array &$vals = null, + $caseFold = self::ATTR_CASEFOLD_NONE) + { + $k = array(); + $v = array(); + if (!self::checkDn($dn, $k, $v, $caseFold)) { + /** + * Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'DN is malformed'); + } + $ret = array(); + for ($i = 0; $i < count($k); $i++) { + if (is_array($k[$i]) && is_array($v[$i]) && (count($k[$i]) === count($v[$i]))) { + $multi = array(); + for ($j = 0; $j < count($k[$i]); $j++) { + $key=$k[$i][$j]; + $val=$v[$i][$j]; + $multi[$key] = $val; + } + $ret[] = $multi; + } else if (is_string($k[$i]) && is_string($v[$i])) { + $ret[] = array($k[$i] => $v[$i]); + } + } + if ($keys !== null) $keys = $k; + if ($vals !== null) $vals = $v; + return $ret; + } + + /** + * @param string $dn The DN to parse + * @param array $keys An optional array to receive DN keys (e.g. CN, OU, DC, ...) + * @param array $vals An optional array to receive DN values + * @param string $caseFold + * @return boolean True if the DN was successfully parsed or false if the string is not a valid DN. + */ + public static function checkDn($dn, array &$keys = null, array &$vals = null, + $caseFold = self::ATTR_CASEFOLD_NONE) + { + /* This is a classic state machine parser. Each iteration of the + * loop processes one character. State 1 collects the key. When equals ( = ) + * is encountered the state changes to 2 where the value is collected + * until a comma (,) or semicolon (;) is encountered after which we switch back + * to state 1. If a backslash (\) is encountered, state 3 is used to collect the + * following character without engaging the logic of other states. + */ + $key = null; + $value = null; + $slen = strlen($dn); + $state = 1; + $ko = $vo = 0; + $multi = false; + $ka = array(); + $va = array(); + for ($di = 0; $di <= $slen; $di++) { + $ch = ($di == $slen) ? 0 : $dn[$di]; + switch ($state) { + case 1: // collect key + if ($ch === '=') { + $key = trim(substr($dn, $ko, $di - $ko)); + if ($caseFold == self::ATTR_CASEFOLD_LOWER) $key = strtolower($key); + else if ($caseFold == self::ATTR_CASEFOLD_UPPER) $key = strtoupper($key); + if (is_array($multi)) { + $keyId = strtolower($key); + if (in_array($keyId, $multi)) { + return false; + } + $ka[count($ka)-1][] = $key; + $multi[] = $keyId; + } else { + $ka[] = $key; + } + $state = 2; + $vo = $di + 1; + } else if ($ch === ',' || $ch === ';' || $ch === '+') { + return false; + } + break; + case 2: // collect value + if ($ch === '\\') { + $state = 3; + } else if ($ch === ',' || $ch === ';' || $ch === 0 || $ch === '+') { + $value = self::unescapeValue(trim(substr($dn, $vo, $di - $vo))); + if (is_array($multi)) { + $va[count($va)-1][] = $value; + } else { + $va[] = $value; + } + $state = 1; + $ko = $di + 1; + if ($ch === '+' && $multi === false) { + $lastKey = array_pop($ka); + $lastVal = array_pop($va); + $ka[] = array($lastKey); + $va[] = array($lastVal); + $multi = array(strtolower($lastKey)); + } else if ($ch === ','|| $ch === ';' || $ch === 0) { + $multi = false; + } + } else if ($ch === '=') { + return false; + } + break; + case 3: // escaped + $state = 2; + break; + } + } + + if ($keys !== null) { + $keys = $ka; + } + if ($vals !== null) { + $vals = $va; + } + + return ($state === 1 && $ko > 0); + } + + /** + * Returns a DN part in the form $attribute = $value + * + * This method supports the creation of multi-valued RDNs + * $part must contain an even number of elemets. + * + * @param array $attribute + * @param string $caseFold + * @return string + * @throws Zend_Ldap_Exception + */ + public static function implodeRdn(array $part, $caseFold = null) + { + self::_assertRdn($part); + $part = self::_caseFoldRdn($part, $caseFold); + $rdnParts = array(); + foreach ($part as $key => $value) { + $value = self::escapeValue($value); + $keyId = strtolower($key); + $rdnParts[$keyId] = implode('=', array($key, $value)); + } + ksort($rdnParts, SORT_STRING); + return implode('+', $rdnParts); + } + + /** + * Implodes an array in the form delivered by {@link explodeDn()} + * to a DN string. + * + * $dnArray must be of type + * array( + * array("cn" => "name1", "uid" => "user"), + * array("cn" => "name2"), + * array("dc" => "example"), + * array("dc" => "org") + * ) + * + * @param array $dnArray + * @param string $caseFold + * @param string $separator + * @return string + * @throws Zend_Ldap_Exception + */ + public static function implodeDn(array $dnArray, $caseFold = null, $separator = ',') + { + $parts = array(); + foreach ($dnArray as $p) { + $parts[] = self::implodeRdn($p, $caseFold); + } + return implode($separator, $parts); + } + + /** + * Checks if given $childDn is beneath $parentDn subtree. + * + * @param string|Zend_Ldap_Dn $childDn + * @param string|Zend_Ldap_Dn $parentDn + * @return boolean + */ + public static function isChildOf($childDn, $parentDn) + { + try { + $keys = array(); + $vals = array(); + if ($childDn instanceof Zend_Ldap_Dn) { + $cdn = $childDn->toArray(Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER); + } else { + $cdn = self::explodeDn($childDn, $keys, $vals, Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER); + } + if ($parentDn instanceof Zend_Ldap_Dn) { + $pdn = $parentDn->toArray(Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER); + } else { + $pdn = self::explodeDn($parentDn, $keys, $vals, Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER); + } + } + catch (Zend_Ldap_Exception $e) { + return false; + } + + $startIndex = count($cdn)-count($pdn); + if ($startIndex<0) return false; + for ($i = 0; $igetLastError($code, $errorMessages) . ': '; + if ($code === 0) { + $message = ''; + $code = $oldCode; + } + } + if (empty($message)) { + if ($code > 0) { + $message = '0x' . dechex($code) . ': '; + } + } + + if (!empty($str)) { + $message .= $str; + } else { + $message .= 'no exception message'; + } + + parent::__construct($message, $code); + } + + + /** + * @deprecated not necessary any more - will be removed + * @param Zend_Ldap $ldap A Zend_Ldap object + * @return int The current error code for the resource + */ + public static function getLdapCode(Zend_Ldap $ldap = null) + { + if ($ldap !== null) { + return $ldap->getLastErrorCode(); + } + return 0; + } + + /** + * @deprecated will be removed + * @return int The current error code for this exception + */ + public function getErrorCode() + { + return $this->getCode(); + } +} diff --git a/library/vendor/Zend/Ldap/Filter.php b/library/vendor/Zend/Ldap/Filter.php new file mode 100644 index 000000000..01fba8ab0 --- /dev/null +++ b/library/vendor/Zend/Ldap/Filter.php @@ -0,0 +1,261 @@ +'; + const TYPE_GREATEROREQUAL = '>='; + const TYPE_LESS = '<'; + const TYPE_LESSOREQUAL = '<='; + const TYPE_APPROX = '~='; + + /** + * Creates an 'equals' filter. + * (attr=value) + * + * @param string $attr + * @param string $value + * @return Zend_Ldap_Filter + */ + public static function equals($attr, $value) + { + return new self($attr, $value, self::TYPE_EQUALS, null, null); + } + + /** + * Creates a 'begins with' filter. + * (attr=value*) + * + * @param string $attr + * @param string $value + * @return Zend_Ldap_Filter + */ + public static function begins($attr, $value) + { + return new self($attr, $value, self::TYPE_EQUALS, null, '*'); + } + + /** + * Creates an 'ends with' filter. + * (attr=*value) + * + * @param string $attr + * @param string $value + * @return Zend_Ldap_Filter + */ + public static function ends($attr, $value) + { + return new self($attr, $value, self::TYPE_EQUALS, '*', null); + } + + /** + * Creates a 'contains' filter. + * (attr=*value*) + * + * @param string $attr + * @param string $value + * @return Zend_Ldap_Filter + */ + public static function contains($attr, $value) + { + return new self($attr, $value, self::TYPE_EQUALS, '*', '*'); + } + + /** + * Creates a 'greater' filter. + * (attr>value) + * + * @param string $attr + * @param string $value + * @return Zend_Ldap_Filter + */ + public static function greater($attr, $value) + { + return new self($attr, $value, self::TYPE_GREATER, null, null); + } + + /** + * Creates a 'greater or equal' filter. + * (attr>=value) + * + * @param string $attr + * @param string $value + * @return Zend_Ldap_Filter + */ + public static function greaterOrEqual($attr, $value) + { + return new self($attr, $value, self::TYPE_GREATEROREQUAL, null, null); + } + + /** + * Creates a 'less' filter. + * (attrtoString(); + } + + /** + * Negates the filter. + * + * @return Zend_Ldap_Filter_Abstract + */ + public function negate() + { + /** + * Zend_Ldap_Filter_Not + */ + return new Zend_Ldap_Filter_Not($this); + } + + /** + * Creates an 'and' filter. + * + * @param Zend_Ldap_Filter_Abstract $filter,... + * @return Zend_Ldap_Filter_And + */ + public function addAnd($filter) + { + /** + * Zend_Ldap_Filter_And + */ + $fa = func_get_args(); + $args = array_merge(array($this), $fa); + return new Zend_Ldap_Filter_And($args); + } + + /** + * Creates an 'or' filter. + * + * @param Zend_Ldap_Filter_Abstract $filter,... + * @return Zend_Ldap_Filter_Or + */ + public function addOr($filter) + { + /** + * Zend_Ldap_Filter_Or + */ + $fa = func_get_args(); + $args = array_merge(array($this), $fa); + return new Zend_Ldap_Filter_Or($args); + } + + /** + * Escapes the given VALUES according to RFC 2254 so that they can be safely used in LDAP filters. + * + * Any control characters with an ACII code < 32 as well as the characters with special meaning in + * LDAP filters "*", "(", ")", and "\" (the backslash) are converted into the representation of a + * backslash followed by two hex digits representing the hexadecimal value of the character. + * @see Net_LDAP2_Util::escape_filter_value() from Benedikt Hallinger + * @link http://pear.php.net/package/Net_LDAP2 + * @author Benedikt Hallinger + * + * @param string|array $values Array of values to escape + * @return array Array $values, but escaped + */ + public static function escapeValue($values = array()) + { + /** + * @see Zend_Ldap_Converter + */ + + if (!is_array($values)) $values = array($values); + foreach ($values as $key => $val) { + // Escaping of filter meta characters + $val = str_replace(array('\\', '*', '(', ')'), array('\5c', '\2a', '\28', '\29'), $val); + // ASCII < 32 escaping + $val = Zend_Ldap_Converter::ascToHex32($val); + if (null === $val) $val = '\0'; // apply escaped "null" if string is empty + $values[$key] = $val; + } + return (count($values) == 1) ? $values[0] : $values; + } + + /** + * Undoes the conversion done by {@link escapeValue()}. + * + * Converts any sequences of a backslash followed by two hex digits into the corresponding character. + * @see Net_LDAP2_Util::escape_filter_value() from Benedikt Hallinger + * @link http://pear.php.net/package/Net_LDAP2 + * @author Benedikt Hallinger + * + * @param string|array $values Array of values to escape + * @return array Array $values, but unescaped + */ + public static function unescapeValue($values = array()) + { + /** + * @see Zend_Ldap_Converter + */ + + if (!is_array($values)) $values = array($values); + foreach ($values as $key => $value) { + // Translate hex code into ascii + $values[$key] = Zend_Ldap_Converter::hex32ToAsc($value); + } + return (count($values) == 1) ? $values[0] : $values; + } +} diff --git a/library/vendor/Zend/Ldap/Filter/And.php b/library/vendor/Zend/Ldap/Filter/And.php new file mode 100644 index 000000000..4136632f6 --- /dev/null +++ b/library/vendor/Zend/Ldap/Filter/And.php @@ -0,0 +1,47 @@ + $s) { + if (is_string($s)) $subfilters[$key] = new Zend_Ldap_Filter_String($s); + else if (!($s instanceof Zend_Ldap_Filter_Abstract)) { + /** + * @see Zend_Ldap_Filter_Exception + */ + throw new Zend_Ldap_Filter_Exception('Only strings or Zend_Ldap_Filter_Abstract allowed.'); + } + } + $this->_subfilters = $subfilters; + $this->_symbol = $symbol; + } + + /** + * Adds a filter to this grouping filter. + * + * @param Zend_Ldap_Filter_Abstract $filter + * @return Zend_Ldap_Filter_Logical + */ + public function addFilter(Zend_Ldap_Filter_Abstract $filter) + { + $new = clone $this; + $new->_subfilters[] = $filter; + return $new; + } + + /** + * Returns a string representation of the filter. + * + * @return string + */ + public function toString() + { + $return = '(' . $this->_symbol; + foreach ($this->_subfilters as $sub) $return .= $sub->toString(); + $return .= ')'; + return $return; + } +} diff --git a/library/vendor/Zend/Ldap/Filter/Mask.php b/library/vendor/Zend/Ldap/Filter/Mask.php new file mode 100644 index 000000000..ca57fd4d0 --- /dev/null +++ b/library/vendor/Zend/Ldap/Filter/Mask.php @@ -0,0 +1,65 @@ +_filter; + } +} diff --git a/library/vendor/Zend/Ldap/Filter/Not.php b/library/vendor/Zend/Ldap/Filter/Not.php new file mode 100644 index 000000000..a45200fea --- /dev/null +++ b/library/vendor/Zend/Ldap/Filter/Not.php @@ -0,0 +1,74 @@ +_filter = $filter; + } + + /** + * Negates the filter. + * + * @return Zend_Ldap_Filter_Abstract + */ + public function negate() + { + return $this->_filter; + } + + /** + * Returns a string representation of the filter. + * + * @return string + */ + public function toString() + { + return '(!' . $this->_filter->toString() . ')'; + } +} diff --git a/library/vendor/Zend/Amf/Parse/Resource/Stream.php b/library/vendor/Zend/Ldap/Filter/Or.php similarity index 56% rename from library/vendor/Zend/Amf/Parse/Resource/Stream.php rename to library/vendor/Zend/Ldap/Filter/Or.php index c1b361b73..f9c13199a 100644 --- a/library/vendor/Zend/Amf/Parse/Resource/Stream.php +++ b/library/vendor/Zend/Ldap/Filter/Or.php @@ -13,30 +13,35 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Amf - * @subpackage Parse - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Ldap + * @subpackage Filter + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** - * This class will convert stream resource to string by just reading it + * @see Zend_Ldap_Filter_Logical + */ + +/** + * Zend_Ldap_Filter_Or provides an 'or' filter. * - * @package Zend_Amf - * @subpackage Parse - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @category Zend + * @package Zend_Ldap + * @subpackage Filter + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Amf_Parse_Resource_Stream +class Zend_Ldap_Filter_Or extends Zend_Ldap_Filter_Logical { /** - * Parse resource into string + * Creates an 'or' grouping filter. * - * @param resource $resource Stream resource - * @return array + * @param array $subfilters */ - public function parse($resource) { - return stream_get_contents($resource); + public function __construct(array $subfilters) + { + parent::__construct($subfilters, self::TYPE_OR); } } diff --git a/library/vendor/Zend/CodeGenerator/Php/Body.php b/library/vendor/Zend/Ldap/Filter/String.php similarity index 53% rename from library/vendor/Zend/CodeGenerator/Php/Body.php rename to library/vendor/Zend/Ldap/Filter/String.php index 2779580bd..d1ddcddbf 100644 --- a/library/vendor/Zend/CodeGenerator/Php/Body.php +++ b/library/vendor/Zend/Ldap/Filter/String.php @@ -13,60 +13,52 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_CodeGenerator - * @subpackage PHP - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Ldap + * @subpackage Filter + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** - * @see Zend_CodeGenerator_Abstract + * @see Zend_Ldap_Filter_Abstract */ /** + * Zend_Ldap_Filter_String provides a simple custom string filter. + * * @category Zend - * @package Zend_CodeGenerator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Ldap + * @subpackage Filter + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_CodeGenerator_Php_Body extends Zend_CodeGenerator_Abstract +class Zend_Ldap_Filter_String extends Zend_Ldap_Filter_Abstract { - /** + * The filter. + * * @var string */ - protected $_content = null; + protected $_filter; /** - * setContent() + * Creates a Zend_Ldap_Filter_String. * - * @param string $content - * @return Zend_CodeGenerator_Php_Body + * @param string $filter */ - public function setContent($content) + public function __construct($filter) { - $this->_content = $content; - return $this; + $this->_filter = $filter; } /** - * getContent() + * Returns a string representation of the filter. * * @return string */ - public function getContent() + public function toString() { - return (string) $this->_content; - } - - /** - * generate() - * - * @return string - */ - public function generate() - { - return $this->getContent(); + return '(' . $this->_filter . ')'; } } diff --git a/library/vendor/Zend/Ldap/Ldif/Encoder.php b/library/vendor/Zend/Ldap/Ldif/Encoder.php new file mode 100644 index 000000000..d8e04cb9f --- /dev/null +++ b/library/vendor/Zend/Ldap/Ldif/Encoder.php @@ -0,0 +1,304 @@ + true, + 'version' => 1, + 'wrap' => 78 + ); + + /** + * @var boolean + */ + protected $_versionWritten = false; + + /** + * Constructor. + * + * @param array $options Additional options used during encoding + * @return void + */ + protected function __construct(array $options = array()) + { + $this->_options = array_merge($this->_options, $options); + } + + /** + * Decodes the string $string into an array of LDIF items + * + * @param string $string + * @return array + */ + public static function decode($string) + { + $encoder = new self(array()); + return $encoder->_decode($string); + } + + /** + * Decodes the string $string into an array of LDIF items + * + * @param string $string + * @return array + */ + protected function _decode($string) + { + $items = array(); + $item = array(); + $last = null; + foreach (explode("\n", $string) as $line) { + $line = rtrim($line, "\x09\x0A\x0D\x00\x0B"); + $matches = array(); + if (substr($line, 0, 1) === ' ' && $last !== null) { + $last[2] .= substr($line, 1); + } else if (substr($line, 0, 1) === '#') { + continue; + } else if (preg_match('/^([a-z0-9;-]+)(:[:<]?\s*)([^:<]*)$/i', $line, $matches)) { + $name = strtolower($matches[1]); + $type = trim($matches[2]); + $value = $matches[3]; + if ($last !== null) { + $this->_pushAttribute($last, $item); + } + if ($name === 'version') { + continue; + } else if (count($item) > 0 && $name === 'dn') { + $items[] = $item; + $item = array(); + $last = null; + } + $last = array($name, $type, $value); + } else if (trim($line) === '') { + continue; + } + } + if ($last !== null) { + $this->_pushAttribute($last, $item); + } + $items[] = $item; + return (count($items)>1) ? $items : $items[0]; + } + + /** + * Pushes a decoded attribute to the stack + * + * @param array $attribute + * @param array $entry + */ + protected function _pushAttribute(array $attribute, array &$entry) + { + $name = $attribute[0]; + $type = $attribute[1]; + $value = $attribute[2]; + if ($type === '::') { + $value = base64_decode($value); + } + if ($name === 'dn') { + $entry[$name] = $value; + } else if (isset($entry[$name]) && $value !== '') { + $entry[$name][] = $value; + } else { + $entry[$name] = ($value !== '') ? array($value) : array(); + } + } + + /** + * Encode $value into a LDIF representation + * + * @param mixed $value The value to be encoded + * @param array $options Additional options used during encoding + * @return string The encoded value + */ + public static function encode($value, array $options = array()) + { + $encoder = new self($options); + return $encoder->_encode($value); + } + + /** + * Recursive driver which determines the type of value to be encoded + * and then dispatches to the appropriate method. + * + * @param mixed $value The value to be encoded + * @return string Encoded value + */ + protected function _encode($value) + { + if (is_scalar($value)) { + return $this->_encodeString($value); + } else if (is_array($value)) { + return $this->_encodeAttributes($value); + } else if ($value instanceof Zend_Ldap_Node) { + return $value->toLdif($this->_options); + } + return null; + } + + /** + * Encodes $string according to RFC2849 + * + * @link http://www.faqs.org/rfcs/rfc2849.html + * + * @param string $string + * @param boolen $base64 + * @return string + */ + protected function _encodeString($string, &$base64 = null) + { + $string = (string)$string; + if (!is_numeric($string) && empty($string)) { + return ''; + } + + /* + * SAFE-INIT-CHAR = %x01-09 / %x0B-0C / %x0E-1F / + * %x21-39 / %x3B / %x3D-7F + * ; any value <= 127 except NUL, LF, CR, + * ; SPACE, colon (":", ASCII 58 decimal) + * ; and less-than ("<" , ASCII 60 decimal) + * + */ + $unsafe_init_char = array(0, 10, 13, 32, 58, 60); + /* + * SAFE-CHAR = %x01-09 / %x0B-0C / %x0E-7F + * ; any value <= 127 decimal except NUL, LF, + * ; and CR + */ + $unsafe_char = array(0, 10, 13); + + $base64 = false; + for ($i = 0; $i < strlen($string); $i++) { + $char = ord(substr($string, $i, 1)); + if ($char >= 127) { + $base64 = true; + break; + } else if ($i === 0 && in_array($char, $unsafe_init_char)) { + $base64 = true; + break; + } else if (in_array($char, $unsafe_char)) { + $base64 = true; + break; + } + } + // Test for ending space + if (substr($string, -1) == ' ') { + $base64 = true; + } + + if ($base64 === true) { + $string = base64_encode($string); + } + + return $string; + } + + /** + * Encodes an attribute with $name and $value according to RFC2849 + * + * @link http://www.faqs.org/rfcs/rfc2849.html + * + * @param string $name + * @param array|string $value + * @return string + */ + protected function _encodeAttribute($name, $value) + { + if (!is_array($value)) { + $value = array($value); + } + + $output = ''; + + if (count($value) < 1) { + return $name . ': '; + } + + foreach ($value as $v) { + $base64 = null; + $v = $this->_encodeString($v, $base64); + $attribute = $name . ':'; + if ($base64 === true) { + $attribute .= ': ' . $v; + } else { + $attribute .= ' ' . $v; + } + if (isset($this->_options['wrap']) && strlen($attribute) > $this->_options['wrap']) { + $attribute = trim(chunk_split($attribute, $this->_options['wrap'], PHP_EOL . ' ')); + } + $output .= $attribute . PHP_EOL; + } + return trim($output, PHP_EOL); + } + + /** + * Encodes a collection of attributes according to RFC2849 + * + * @link http://www.faqs.org/rfcs/rfc2849.html + * + * @param array $attributes + * @return string + */ + protected function _encodeAttributes(array $attributes) + { + $string = ''; + $attributes = array_change_key_case($attributes, CASE_LOWER); + if (!$this->_versionWritten && array_key_exists('dn', $attributes) && isset($this->_options['version']) + && array_key_exists('objectclass', $attributes)) { + $string .= sprintf('version: %d', $this->_options['version']) . PHP_EOL; + $this->_versionWritten = true; + } + + if (isset($this->_options['sort']) && $this->_options['sort'] === true) { + ksort($attributes, SORT_STRING); + if (array_key_exists('objectclass', $attributes)) { + $oc = $attributes['objectclass']; + unset($attributes['objectclass']); + $attributes = array_merge(array('objectclass' => $oc), $attributes); + } + if (array_key_exists('dn', $attributes)) { + $dn = $attributes['dn']; + unset($attributes['dn']); + $attributes = array_merge(array('dn' => $dn), $attributes); + } + } + foreach ($attributes as $key => $value) { + $string .= $this->_encodeAttribute($key, $value) . PHP_EOL; + } + return trim($string, PHP_EOL); + } +} diff --git a/library/vendor/Zend/Ldap/Node.php b/library/vendor/Zend/Ldap/Node.php new file mode 100644 index 000000000..350b6f786 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node.php @@ -0,0 +1,1170 @@ +attachLdap($ldap); + else $this->detachLdap(); + } + + /** + * Serialization callback + * + * Only DN and attributes will be serialized. + * + * @return array + */ + public function __sleep() + { + return array('_dn', '_currentData', '_newDn', '_originalData', + '_new', '_delete', '_children'); + } + + /** + * Deserialization callback + * + * Enforces a detached node. + * + * @return null + */ + public function __wakeup() + { + $this->detachLdap(); + } + + /** + * Gets the current LDAP connection. + * + * @return Zend_Ldap + * @throws Zend_Ldap_Exception + */ + public function getLdap() + { + if ($this->_ldap === null) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'No LDAP connection specified.', Zend_Ldap_Exception::LDAP_OTHER); + } + else return $this->_ldap; + } + + /** + * Attach node to an LDAP connection + * + * This is an offline method. + * + * @uses Zend_Ldap_Dn::isChildOf() + * @param Zend_Ldap $ldap + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function attachLdap(Zend_Ldap $ldap) + { + if (!Zend_Ldap_Dn::isChildOf($this->_getDn(), $ldap->getBaseDn())) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'LDAP connection is not responsible for given node.', + Zend_Ldap_Exception::LDAP_OTHER); + } + + if ($ldap !== $this->_ldap) { + $this->_ldap = $ldap; + if (is_array($this->_children)) { + foreach ($this->_children as $child) { + /* @var Zend_Ldap_Node $child */ + $child->attachLdap($ldap); + } + } + } + return $this; + } + + /** + * Detach node from LDAP connection + * + * This is an offline method. + * + * @return Zend_Ldap_Node Provides a fluent interface + */ + public function detachLdap() + { + $this->_ldap = null; + if (is_array($this->_children)) { + foreach ($this->_children as $child) { + /* @var Zend_Ldap_Node $child */ + $child->detachLdap(); + } + } + return $this; + } + + /** + * Checks if the current node is attached to a LDAP server. + * + * This is an offline method. + * + * @return boolean + */ + public function isAttached() + { + return ($this->_ldap !== null); + } + + /** + * @param array $data + * @param boolean $fromDataSource + * @throws Zend_Ldap_Exception + */ + protected function _loadData(array $data, $fromDataSource) + { + parent::_loadData($data, $fromDataSource); + if ($fromDataSource === true) { + $this->_originalData = $data; + } else { + $this->_originalData = array(); + } + $this->_children = null; + $this->_markAsNew(($fromDataSource === true) ? false : true); + $this->_markAsToBeDeleted(false); + } + + /** + * Factory method to create a new detached Zend_Ldap_Node for a given DN. + * + * @param string|array|Zend_Ldap_Dn $dn + * @param array $objectClass + * @return Zend_Ldap_Node + * @throws Zend_Ldap_Exception + */ + public static function create($dn, array $objectClass = array()) + { + if (is_string($dn) || is_array($dn)) { + $dn = Zend_Ldap_Dn::factory($dn); + } else if ($dn instanceof Zend_Ldap_Dn) { + $dn = clone $dn; + } else { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, '$dn is of a wrong data type.'); + } + $new = new self($dn, array(), false, null); + $new->_ensureRdnAttributeValues(); + $new->setAttribute('objectClass', $objectClass); + return $new; + } + + /** + * Factory method to create an attached Zend_Ldap_Node for a given DN. + * + * @param string|array|Zend_Ldap_Dn $dn + * @param Zend_Ldap $ldap + * @return Zend_Ldap_Node|null + * @throws Zend_Ldap_Exception + */ + public static function fromLdap($dn, Zend_Ldap $ldap) + { + if (is_string($dn) || is_array($dn)) { + $dn = Zend_Ldap_Dn::factory($dn); + } else if ($dn instanceof Zend_Ldap_Dn) { + $dn = clone $dn; + } else { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, '$dn is of a wrong data type.'); + } + $data = $ldap->getEntry($dn, array('*', '+'), true); + if ($data === null) { + return null; + } + $entry = new self($dn, $data, true, $ldap); + return $entry; + } + + /** + * Factory method to create a detached Zend_Ldap_Node from array data. + * + * @param array $data + * @param boolean $fromDataSource + * @return Zend_Ldap_Node + * @throws Zend_Ldap_Exception + */ + public static function fromArray(array $data, $fromDataSource = false) + { + if (!array_key_exists('dn', $data)) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, '\'dn\' key is missing in array.'); + } + if (is_string($data['dn']) || is_array($data['dn'])) { + $dn = Zend_Ldap_Dn::factory($data['dn']); + } else if ($data['dn'] instanceof Zend_Ldap_Dn) { + $dn = clone $data['dn']; + } else { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, '\'dn\' key is of a wrong data type.'); + } + $fromDataSource = ($fromDataSource === true) ? true : false; + $new = new self($dn, $data, $fromDataSource, null); + $new->_ensureRdnAttributeValues(); + return $new; + } + + /** + * Ensures that teh RDN attributes are correctly set. + * + * @param boolean $overwrite True to overwrite the RDN attributes + * @return void + */ + protected function _ensureRdnAttributeValues($overwrite = false) + { + foreach ($this->getRdnArray() as $key => $value) { + if (!array_key_exists($key, $this->_currentData) || $overwrite) { + Zend_Ldap_Attribute::setAttribute($this->_currentData, $key, $value, false); + } else if (!in_array($value, $this->_currentData[$key])) { + Zend_Ldap_Attribute::setAttribute($this->_currentData, $key, $value, true); + } + } + } + + /** + * Marks this node as new. + * + * Node will be added (instead of updated) on calling update() if $new is true. + * + * @param boolean $new + */ + protected function _markAsNew($new) + { + $this->_new = ($new === false) ? false : true; + } + + /** + * Tells if the node is consiedered as new (not present on the server) + * + * Please note, that this doesn't tell you if the node is present on the server. + * Use {@link exits()} to see if a node is already there. + * + * @return boolean + */ + public function isNew() + { + return $this->_new; + } + + /** + * Marks this node as to be deleted. + * + * Node will be deleted on calling update() if $delete is true. + * + * @param boolean $delete + */ + protected function _markAsToBeDeleted($delete) + { + $this->_delete = ($delete === true) ? true : false; + } + + + /** + * Is this node going to be deleted once update() is called? + * + * @return boolean + */ + public function willBeDeleted() + { + return $this->_delete; + } + + /** + * Marks this node as to be deleted + * + * Node will be deleted on calling update() if $delete is true. + * + * @return Zend_Ldap_Node Provides a fluent interface + */ + public function delete() + { + $this->_markAsToBeDeleted(true); + return $this; + } + + /** + * Is this node going to be moved once update() is called? + * + * @return boolean + */ + public function willBeMoved() + { + if ($this->isNew() || $this->willBeDeleted()) { + return false; + } else if ($this->_newDn !== null) { + return ($this->_dn != $this->_newDn); + } else { + return false; + } + } + + /** + * Sends all pending changes to the LDAP server + * + * @param Zend_Ldap $ldap + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function update(Zend_Ldap $ldap = null) + { + if ($ldap !== null) { + $this->attachLdap($ldap); + } + $ldap = $this->getLdap(); + if (!($ldap instanceof Zend_Ldap)) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'No LDAP connection available'); + } + + if ($this->willBeDeleted()) { + if ($ldap->exists($this->_dn)) { + $this->_preDelete(); + $ldap->delete($this->_dn); + $this->_postDelete(); + } + return $this; + } + + if ($this->isNew()) { + $this->_preAdd(); + $data = $this->getData(); + $ldap->add($this->_getDn(), $data); + $this->_loadData($data, true); + $this->_postAdd(); + return $this; + } + + $changedData = $this->getChangedData(); + if ($this->willBeMoved()) { + $this->_preRename(); + $recursive = $this->hasChildren(); + $ldap->rename($this->_dn, $this->_newDn, $recursive, false); + foreach ($this->_newDn->getRdn() as $key => $value) { + if (array_key_exists($key, $changedData)) { + unset($changedData[$key]); + } + } + $this->_dn = $this->_newDn; + $this->_newDn = null; + $this->_postRename(); + } + if (count($changedData) > 0) { + $this->_preUpdate(); + $ldap->update($this->_getDn(), $changedData); + $this->_postUpdate(); + } + $this->_originalData = $this->_currentData; + return $this; + } + + /** + * Gets the DN of the current node as a Zend_Ldap_Dn. + * + * This is an offline method. + * + * @return Zend_Ldap_Dn + */ + protected function _getDn() + { + return ($this->_newDn === null) ? parent::_getDn() : $this->_newDn; + } + + /** + * Gets the current DN of the current node as a Zend_Ldap_Dn. + * The method returns a clone of the node's DN to prohibit modification. + * + * This is an offline method. + * + * @return Zend_Ldap_Dn + */ + public function getCurrentDn() + { + $dn = clone parent::_getDn(); + return $dn; + } + + /** + * Sets the new DN for this node + * + * This is an offline method. + * + * @param Zend_Ldap_Dn|string|array $newDn + * @throws Zend_Ldap_Exception + * @return Zend_Ldap_Node Provides a fluent interface + */ + public function setDn($newDn) + { + if ($newDn instanceof Zend_Ldap_Dn) { + $this->_newDn = clone $newDn; + } else { + $this->_newDn = Zend_Ldap_Dn::factory($newDn); + } + $this->_ensureRdnAttributeValues(true); + return $this; + } + + /** + * {@see setDn()} + * + * This is an offline method. + * + * @param Zend_Ldap_Dn|string|array $newDn + * @throws Zend_Ldap_Exception + * @return Zend_Ldap_Node Provides a fluent interface + */ + public function move($newDn) + { + return $this->setDn($newDn); + } + + /** + * {@see setDn()} + * + * This is an offline method. + * + * @param Zend_Ldap_Dn|string|array $newDn + * @throws Zend_Ldap_Exception + * @return Zend_Ldap_Node Provides a fluent interface + */ + public function rename($newDn) + { + return $this->setDn($newDn); + } + + /** + * Sets the objectClass. + * + * This is an offline method. + * + * @param array|string $value + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function setObjectClass($value) + { + $this->setAttribute('objectClass', $value); + return $this; + } + + /** + * Appends to the objectClass. + * + * This is an offline method. + * + * @param array|string $value + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function appendObjectClass($value) + { + $this->appendToAttribute('objectClass', $value); + return $this; + } + + /** + * Returns a LDIF representation of the current node + * + * @param array $options Additional options used during encoding + * @return string + */ + public function toLdif(array $options = array()) + { + $attributes = array_merge(array('dn' => $this->getDnString()), $this->getData(false)); + /** + * Zend_Ldap_Ldif_Encoder + */ + return Zend_Ldap_Ldif_Encoder::encode($attributes, $options); + } + + /** + * Gets changed node data. + * + * The array contains all changed attributes. + * This format can be used in {@link Zend_Ldap::add()} and {@link Zend_Ldap::update()}. + * + * This is an offline method. + * + * @return array + */ + public function getChangedData() + { + $changed = array(); + foreach ($this->_currentData as $key => $value) { + if (!array_key_exists($key, $this->_originalData) && !empty($value)) { + $changed[$key] = $value; + } else if ($this->_originalData[$key] !== $this->_currentData[$key]) { + $changed[$key] = $value; + } + } + return $changed; + } + + /** + * Returns all changes made. + * + * This is an offline method. + * + * @return array + */ + public function getChanges() + { + $changes = array( + 'add' => array(), + 'delete' => array(), + 'replace' => array()); + foreach ($this->_currentData as $key => $value) { + if (!array_key_exists($key, $this->_originalData) && !empty($value)) { + $changes['add'][$key] = $value; + } else if (count($this->_originalData[$key]) === 0 && !empty($value)) { + $changes['add'][$key] = $value; + } else if ($this->_originalData[$key] !== $this->_currentData[$key]) { + if (empty($value)) { + $changes['delete'][$key] = $value; + } else { + $changes['replace'][$key] = $value; + } + } + } + return $changes; + } + + /** + * Sets a LDAP attribute. + * + * This is an offline method. + * + * @param string $name + * @param mixed $value + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function setAttribute($name, $value) + { + $this->_setAttribute($name, $value, false); + return $this; + } + + /** + * Appends to a LDAP attribute. + * + * This is an offline method. + * + * @param string $name + * @param mixed $value + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function appendToAttribute($name, $value) + { + $this->_setAttribute($name, $value, true); + return $this; + } + + /** + * Checks if the attribute can be set and sets it accordingly. + * + * @param string $name + * @param mixed $value + * @param boolean $append + * @throws Zend_Ldap_Exception + */ + protected function _setAttribute($name, $value, $append) + { + $this->_assertChangeableAttribute($name); + Zend_Ldap_Attribute::setAttribute($this->_currentData, $name, $value, $append); + } + + /** + * Sets a LDAP date/time attribute. + * + * This is an offline method. + * + * @param string $name + * @param integer|array $value + * @param boolean $utc + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function setDateTimeAttribute($name, $value, $utc = false) + { + $this->_setDateTimeAttribute($name, $value, $utc, false); + return $this; + } + + /** + * Appends to a LDAP date/time attribute. + * + * This is an offline method. + * + * @param string $name + * @param integer|array $value + * @param boolean $utc + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function appendToDateTimeAttribute($name, $value, $utc = false) + { + $this->_setDateTimeAttribute($name, $value, $utc, true); + return $this; + } + + /** + * Checks if the attribute can be set and sets it accordingly. + * + * @param string $name + * @param integer|array $value + * @param boolean $utc + * @param boolean $append + * @throws Zend_Ldap_Exception + */ + protected function _setDateTimeAttribute($name, $value, $utc, $append) + { + $this->_assertChangeableAttribute($name); + Zend_Ldap_Attribute::setDateTimeAttribute($this->_currentData, $name, $value, $utc, $append); + } + + /** + * Sets a LDAP password. + * + * @param string $password + * @param string $hashType + * @param string $attribName + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function setPasswordAttribute($password, $hashType = Zend_Ldap_Attribute::PASSWORD_HASH_MD5, + $attribName = 'userPassword') + { + $this->_assertChangeableAttribute($attribName); + Zend_Ldap_Attribute::setPassword($this->_currentData, $password, $hashType, $attribName); + return $this; + } + + /** + * Deletes a LDAP attribute. + * + * This method deletes the attribute. + * + * This is an offline method. + * + * @param string $name + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function deleteAttribute($name) + { + if ($this->existsAttribute($name, true)) { + $this->_setAttribute($name, null, false); + } + return $this; + } + + /** + * Removes duplicate values from a LDAP attribute + * + * @param string $attribName + * @return void + */ + public function removeDuplicatesFromAttribute($attribName) + { + Zend_Ldap_Attribute::removeDuplicatesFromAttribute($this->_currentData, $attribName); + } + + /** + * Remove given values from a LDAP attribute + * + * @param string $attribName + * @param mixed|array $value + * @return void + */ + public function removeFromAttribute($attribName, $value) + { + Zend_Ldap_Attribute::removeFromAttribute($this->_currentData, $attribName, $value); + } + + /** + * @param string $name + * @return boolean + * @throws Zend_Ldap_Exception + */ + protected function _assertChangeableAttribute($name) + { + $name = strtolower($name); + $rdn = $this->getRdnArray(Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER); + if ($name == 'dn') { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'DN cannot be changed.'); + } + else if (array_key_exists($name, $rdn)) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Cannot change attribute because it\'s part of the RDN'); + } else if (in_array($name, self::$_systemAttributes)) { + /** + * @see Zend_Ldap_Exception + */ + throw new Zend_Ldap_Exception(null, 'Cannot change attribute because it\'s read-only'); + } + else return true; + } + + /** + * Sets a LDAP attribute. + * + * This is an offline method. + * + * @param string $name + * @param mixed $value + * @return null + * @throws Zend_Ldap_Exception + */ + public function __set($name, $value) + { + $this->setAttribute($name, $value); + } + + /** + * Deletes a LDAP attribute. + * + * This method deletes the attribute. + * + * This is an offline method. + * + * @param string $name + * @return null + * @throws Zend_Ldap_Exception + */ + public function __unset($name) + { + $this->deleteAttribute($name); + } + + /** + * Sets a LDAP attribute. + * Implements ArrayAccess. + * + * This is an offline method. + * + * @param string $name + * @param mixed $value + * @return null + * @throws Zend_Ldap_Exception + */ + public function offsetSet($name, $value) + { + $this->setAttribute($name, $value); + } + + /** + * Deletes a LDAP attribute. + * Implements ArrayAccess. + * + * This method deletes the attribute. + * + * This is an offline method. + * + * @param string $name + * @return null + * @throws Zend_Ldap_Exception + */ + public function offsetUnset($name) + { + $this->deleteAttribute($name); + } + + /** + * Check if node exists on LDAP. + * + * This is an online method. + * + * @param Zend_Ldap $ldap + * @return boolean + * @throws Zend_Ldap_Exception + */ + public function exists(Zend_Ldap $ldap = null) + { + if ($ldap !== null) { + $this->attachLdap($ldap); + } + $ldap = $this->getLdap(); + return $ldap->exists($this->_getDn()); + } + + /** + * Reload node attributes from LDAP. + * + * This is an online method. + * + * @param Zend_Ldap $ldap + * @return Zend_Ldap_Node Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function reload(Zend_Ldap $ldap = null) + { + if ($ldap !== null) { + $this->attachLdap($ldap); + } + $ldap = $this->getLdap(); + parent::reload($ldap); + return $this; + } + + /** + * Search current subtree with given options. + * + * This is an online method. + * + * @param string|Zend_Ldap_Filter_Abstract $filter + * @param integer $scope + * @param string $sort + * @return Zend_Ldap_Node_Collection + * @throws Zend_Ldap_Exception + */ + public function searchSubtree($filter, $scope = Zend_Ldap::SEARCH_SCOPE_SUB, $sort = null) + { + /** + * @see Zend_Ldap_Node_Collection + */ + return $this->getLdap()->search($filter, $this->_getDn(), $scope, array('*', '+'), $sort, + 'Zend_Ldap_Node_Collection'); + } + + /** + * Count items in current subtree found by given filter. + * + * This is an online method. + * + * @param string|Zend_Ldap_Filter_Abstract $filter + * @param integer $scope + * @return integer + * @throws Zend_Ldap_Exception + */ + public function countSubtree($filter, $scope = Zend_Ldap::SEARCH_SCOPE_SUB) + { + return $this->getLdap()->count($filter, $this->_getDn(), $scope); + } + + /** + * Count children of current node. + * + * This is an online method. + * + * @return integer + * @throws Zend_Ldap_Exception + */ + public function countChildren() + { + return $this->countSubtree('(objectClass=*)', Zend_Ldap::SEARCH_SCOPE_ONE); + } + + /** + * Gets children of current node. + * + * This is an online method. + * + * @param string|Zend_Ldap_Filter_Abstract $filter + * @param string $sort + * @return Zend_Ldap_Node_Collection + * @throws Zend_Ldap_Exception + */ + public function searchChildren($filter, $sort = null) + { + return $this->searchSubtree($filter, Zend_Ldap::SEARCH_SCOPE_ONE, $sort); + } + + /** + * Checks if current node has children. + * Returns whether the current element has children. + * + * Can be used offline but returns false if children have not been retrieved yet. + * + * @return boolean + * @throws Zend_Ldap_Exception + */ + public function hasChildren() + { + if (!is_array($this->_children)) { + if ($this->isAttached()) { + return ($this->countChildren() > 0); + } else { + return false; + } + } else { + return (count($this->_children) > 0); + } + } + + /** + * Returns the children for the current node. + * + * Can be used offline but returns an empty array if children have not been retrieved yet. + * + * @return Zend_Ldap_Node_ChildrenIterator + * @throws Zend_Ldap_Exception + */ + public function getChildren() + { + if (!is_array($this->_children)) { + $this->_children = array(); + if ($this->isAttached()) { + $children = $this->searchChildren('(objectClass=*)', null); + foreach ($children as $child) { + /* @var Zend_Ldap_Node $child */ + $this->_children[$child->getRdnString(Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER)] = $child; + } + } + } + /** + * @see Zend_Ldap_Node_ChildrenIterator + */ + return new Zend_Ldap_Node_ChildrenIterator($this->_children); + } + + /** + * Returns the parent of the current node. + * + * @param Zend_Ldap $ldap + * @return Zend_Ldap_Node + * @throws Zend_Ldap_Exception + */ + public function getParent(Zend_Ldap $ldap = null) + { + if ($ldap !== null) { + $this->attachLdap($ldap); + } + $ldap = $this->getLdap(); + $parentDn = $this->_getDn()->getParentDn(1); + return self::fromLdap($parentDn, $ldap); + } + + /** + * Return the current attribute. + * Implements Iterator + * + * @return array + */ + public function current() + { + return $this; + } + + /** + * Return the attribute name. + * Implements Iterator + * + * @return string + */ + public function key() + { + return $this->getRdnString(); + } + + /** + * Move forward to next attribute. + * Implements Iterator + */ + public function next() + { + $this->_iteratorRewind = false; + } + + /** + * Rewind the Iterator to the first attribute. + * Implements Iterator + */ + public function rewind() + { + $this->_iteratorRewind = true; + } + + /** + * Check if there is a current attribute + * after calls to rewind() or next(). + * Implements Iterator + * + * @return boolean + */ + public function valid() + { + return $this->_iteratorRewind; + } + + #################################################### + # Empty method bodies for overriding in subclasses # + #################################################### + + /** + * Allows pre-delete logic to be applied to node. + * Subclasses may override this method. + * + * @return void + */ + protected function _preDelete() { } + + /** + * Allows post-delete logic to be applied to node. + * Subclasses may override this method. + * + * @return void + */ + protected function _postDelete() { } + + /** + * Allows pre-add logic to be applied to node. + * Subclasses may override this method. + * + * @return void + */ + protected function _preAdd() { } + + /** + * Allows post-add logic to be applied to node. + * Subclasses may override this method. + * + * @return void + */ + protected function _postAdd() { } + + /** + * Allows pre-rename logic to be applied to node. + * Subclasses may override this method. + * + * @return void + */ + protected function _preRename() { } + + /** + * Allows post-rename logic to be applied to node. + * Subclasses may override this method. + * + * @return void + */ + protected function _postRename() { } + + /** + * Allows pre-update logic to be applied to node. + * Subclasses may override this method. + * + * @return void + */ + protected function _preUpdate() { } + + /** + * Allows post-update logic to be applied to node. + * Subclasses may override this method. + * + * @return void + */ + protected function _postUpdate() { } +} diff --git a/library/vendor/Zend/Ldap/Node/Abstract.php b/library/vendor/Zend/Ldap/Node/Abstract.php new file mode 100644 index 000000000..85d13b859 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Abstract.php @@ -0,0 +1,483 @@ +_dn = $dn; + $this->_loadData($data, $fromDataSource); + } + + /** + * @param array $data + * @param boolean $fromDataSource + * @throws Zend_Ldap_Exception + */ + protected function _loadData(array $data, $fromDataSource) + { + if (array_key_exists('dn', $data)) { + unset($data['dn']); + } + ksort($data, SORT_STRING); + $this->_currentData = $data; + } + + /** + * Reload node attributes from LDAP. + * + * This is an online method. + * + * @param Zend_Ldap $ldap + * @return Zend_Ldap_Node_Abstract Provides a fluent interface + * @throws Zend_Ldap_Exception + */ + public function reload(Zend_Ldap $ldap = null) + { + if ($ldap !== null) { + $data = $ldap->getEntry($this->_getDn(), array('*', '+'), true); + $this->_loadData($data, true); + } + return $this; + } + + /** + * Gets the DN of the current node as a Zend_Ldap_Dn. + * + * This is an offline method. + * + * @return Zend_Ldap_Dn + */ + protected function _getDn() + { + return $this->_dn; + } + + /** + * Gets the DN of the current node as a Zend_Ldap_Dn. + * The method returns a clone of the node's DN to prohibit modification. + * + * This is an offline method. + * + * @return Zend_Ldap_Dn + */ + public function getDn() + { + $dn = clone $this->_getDn(); + return $dn; + } + + /** + * Gets the DN of the current node as a string. + * + * This is an offline method. + * + * @param string $caseFold + * @return string + */ + public function getDnString($caseFold = null) + { + return $this->_getDn()->toString($caseFold); + } + + /** + * Gets the DN of the current node as an array. + * + * This is an offline method. + * + * @param string $caseFold + * @return array + */ + public function getDnArray($caseFold = null) + { + return $this->_getDn()->toArray($caseFold); + } + + /** + * Gets the RDN of the current node as a string. + * + * This is an offline method. + * + * @param string $caseFold + * @return string + */ + public function getRdnString($caseFold = null) + { + return $this->_getDn()->getRdnString($caseFold); + } + + /** + * Gets the RDN of the current node as an array. + * + * This is an offline method. + * + * @param string $caseFold + * @return array + */ + public function getRdnArray($caseFold = null) + { + return $this->_getDn()->getRdn($caseFold); + } + + /** + * Gets the objectClass of the node + * + * @return array + */ + public function getObjectClass() + { + return $this->getAttribute('objectClass', null); + } + + /** + * Gets all attributes of node. + * + * The collection contains all attributes. + * + * This is an offline method. + * + * @param boolean $includeSystemAttributes + * @return array + */ + public function getAttributes($includeSystemAttributes = true) + { + $data = array(); + foreach ($this->getData($includeSystemAttributes) as $name => $value) { + $data[$name] = $this->getAttribute($name, null); + } + return $data; + } + + /** + * Returns the DN of the current node. {@see getDnString()} + * + * @return string + */ + public function toString() + { + return $this->getDnString(); + } + + /** + * Cast to string representation {@see toString()} + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Returns an array representation of the current node + * + * @param boolean $includeSystemAttributes + * @return array + */ + public function toArray($includeSystemAttributes = true) + { + $attributes = $this->getAttributes($includeSystemAttributes); + return array_merge(array('dn' => $this->getDnString()), $attributes); + } + + /** + * Returns a JSON representation of the current node + * + * @param boolean $includeSystemAttributes + * @return string + */ + public function toJson($includeSystemAttributes = true) + { + return json_encode($this->toArray($includeSystemAttributes)); + } + + /** + * Gets node attributes. + * + * The array contains all attributes in its internal format (no conversion). + * + * This is an offline method. + * + * @param boolean $includeSystemAttributes + * @return array + */ + public function getData($includeSystemAttributes = true) + { + if ($includeSystemAttributes === false) { + $data = array(); + foreach ($this->_currentData as $key => $value) { + if (!in_array($key, self::$_systemAttributes)) { + $data[$key] = $value; + } + } + return $data; + } else { + return $this->_currentData; + } + } + + /** + * Checks whether a given attribute exists. + * + * If $emptyExists is false empty attributes (containing only array()) are + * treated as non-existent returning false. + * If $emptyExists is true empty attributes are treated as existent returning + * true. In this case method returns false only if the attribute name is + * missing in the key-collection. + * + * @param string $name + * @param boolean $emptyExists + * @return boolean + */ + public function existsAttribute($name, $emptyExists = false) + { + $name = strtolower($name); + if (isset($this->_currentData[$name])) { + if ($emptyExists) return true; + return count($this->_currentData[$name])>0; + } + else return false; + } + + /** + * Checks if the given value(s) exist in the attribute + * + * @param string $attribName + * @param mixed|array $value + * @return boolean + */ + public function attributeHasValue($attribName, $value) + { + return Zend_Ldap_Attribute::attributeHasValue($this->_currentData, $attribName, $value); + } + + /** + * Gets a LDAP attribute. + * + * This is an offline method. + * + * @param string $name + * @param integer $index + * @return mixed + * @throws Zend_Ldap_Exception + */ + public function getAttribute($name, $index = null) + { + if ($name == 'dn') { + return $this->getDnString(); + } + else { + return Zend_Ldap_Attribute::getAttribute($this->_currentData, $name, $index); + } + } + + /** + * Gets a LDAP date/time attribute. + * + * This is an offline method. + * + * @param string $name + * @param integer $index + * @return array|integer + * @throws Zend_Ldap_Exception + */ + public function getDateTimeAttribute($name, $index = null) + { + return Zend_Ldap_Attribute::getDateTimeAttribute($this->_currentData, $name, $index); + } + + /** + * Sets a LDAP attribute. + * + * This is an offline method. + * + * @param string $name + * @param mixed $value + * @return null + * @throws BadMethodCallException + */ + public function __set($name, $value) + { + throw new BadMethodCallException(); + } + + /** + * Gets a LDAP attribute. + * + * This is an offline method. + * + * @param string $name + * @return array + * @throws Zend_Ldap_Exception + */ + public function __get($name) + { + return $this->getAttribute($name, null); + } + + /** + * Deletes a LDAP attribute. + * + * This method deletes the attribute. + * + * This is an offline method. + * + * @param string $name + * @return null + * @throws BadMethodCallException + */ + public function __unset($name) + { + throw new BadMethodCallException(); + } + + /** + * Checks whether a given attribute exists. + * + * Empty attributes will be treated as non-existent. + * + * @param string $name + * @return boolean + */ + public function __isset($name) + { + return $this->existsAttribute($name, false); + } + + /** + * Sets a LDAP attribute. + * Implements ArrayAccess. + * + * This is an offline method. + * + * @param string $name + * @param mixed $value + * @return null + * @throws BadMethodCallException + */ + public function offsetSet($name, $value) + { + throw new BadMethodCallException(); + } + + /** + * Gets a LDAP attribute. + * Implements ArrayAccess. + * + * This is an offline method. + * + * @param string $name + * @return array + * @throws Zend_Ldap_Exception + */ + public function offsetGet($name) + { + return $this->getAttribute($name, null); + } + + /** + * Deletes a LDAP attribute. + * Implements ArrayAccess. + * + * This method deletes the attribute. + * + * This is an offline method. + * + * @param string $name + * @return null + * @throws BadMethodCallException + */ + public function offsetUnset($name) + { + throw new BadMethodCallException(); + } + + /** + * Checks whether a given attribute exists. + * Implements ArrayAccess. + * + * Empty attributes will be treated as non-existent. + * + * @param string $name + * @return boolean + */ + public function offsetExists($name) + { + return $this->existsAttribute($name, false); + } + + /** + * Returns the number of attributes in node. + * Implements Countable + * + * @return int + */ + public function count() + { + return count($this->_currentData); + } +} diff --git a/library/vendor/Zend/Ldap/Node/ChildrenIterator.php b/library/vendor/Zend/Ldap/Node/ChildrenIterator.php new file mode 100644 index 000000000..f69a21078 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/ChildrenIterator.php @@ -0,0 +1,208 @@ +_data = $data; + } + + /** + * Returns the number of child nodes. + * Implements Countable + * + * @return int + */ + public function count() + { + return count($this->_data); + } + + /** + * Return the current child. + * Implements Iterator + * + * @return Zend_Ldap_Node + */ + public function current() + { + return current($this->_data); + } + + /** + * Return the child'd RDN. + * Implements Iterator + * + * @return string + */ + public function key() + { + return key($this->_data); + } + + /** + * Move forward to next child. + * Implements Iterator + */ + public function next() + { + next($this->_data); + } + + /** + * Rewind the Iterator to the first child. + * Implements Iterator + */ + public function rewind() + { + reset($this->_data); + } + + /** + * Check if there is a current child + * after calls to rewind() or next(). + * Implements Iterator + * + * @return boolean + */ + public function valid() + { + return (current($this->_data)!==false); + } + + /** + * Checks if current node has children. + * Returns whether the current element has children. + * + * @return boolean + */ + public function hasChildren() + { + if ($this->current() instanceof Zend_Ldap_Node) { + return $this->current()->hasChildren(); + } else { + return false; + } + } + + /** + * Returns the children for the current node. + * + * @return Zend_Ldap_Node_ChildrenIterator + */ + public function getChildren() + { + if ($this->current() instanceof Zend_Ldap_Node) { + return $this->current()->getChildren(); + } else { + return null; + } + } + + /** + * Returns a child with a given RDN. + * Implements ArrayAccess. + * + * @param string $rdn + * @return Zend_Ldap_node + */ + public function offsetGet($rdn) + { + if ($this->offsetExists($rdn)) { + return $this->_data[$rdn]; + } else { + return null; + } + } + + /** + * Checks whether a given rdn exists. + * Implements ArrayAccess. + * + * @param string $rdn + * @return boolean + */ + public function offsetExists($rdn) + { + return (array_key_exists($rdn, $this->_data)); + } + + /** + * Does nothing. + * Implements ArrayAccess. + * + * @param string $name + * @return null + */ + public function offsetUnset($name) { } + + /** + * Does nothing. + * Implements ArrayAccess. + * + * @param string $name + * @param mixed $value + * @return null + */ + public function offsetSet($name, $value) { } + + /** + * Get all children as an array + * + * @return array + */ + public function toArray() + { + $data = array(); + foreach ($this as $rdn => $node) { + $data[$rdn] = $node; + } + return $data; + } +} diff --git a/library/vendor/Zend/Ldap/Node/Collection.php b/library/vendor/Zend/Ldap/Node/Collection.php new file mode 100644 index 000000000..465204570 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Collection.php @@ -0,0 +1,65 @@ +attachLdap($this->_iterator->getLdap()); + return $node; + } + + /** + * Return the child key (DN). + * Implements Iterator and RecursiveIterator + * + * @return string + */ + public function key() + { + return $this->_iterator->key(); + } +} diff --git a/library/vendor/Zend/Ldap/Node/RootDse.php b/library/vendor/Zend/Ldap/Node/RootDse.php new file mode 100644 index 000000000..68930cbf1 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/RootDse.php @@ -0,0 +1,153 @@ +getEntry($dn, array('*', '+'), true); + if (isset($data['domainfunctionality'])) { + /** + * @see Zend_Ldap_Node_RootDse_ActiveDirectory + */ + return new Zend_Ldap_Node_RootDse_ActiveDirectory($dn, $data); + } else if (isset($data['dsaname'])) { + /** + * @see Zend_Ldap_Node_RootDse_ActiveDirectory + */ + return new Zend_Ldap_Node_RootDse_eDirectory($dn, $data); + } else if (isset($data['structuralobjectclass']) && + $data['structuralobjectclass'][0] === 'OpenLDAProotDSE') { + /** + * @see Zend_Ldap_Node_RootDse_OpenLdap + */ + return new Zend_Ldap_Node_RootDse_OpenLdap($dn, $data); + } else { + return new self($dn, $data); + } + } + + /** + * Constructor. + * + * Constructor is protected to enforce the use of factory methods. + * + * @param Zend_Ldap_Dn $dn + * @param array $data + */ + protected function __construct(Zend_Ldap_Dn $dn, array $data) + { + parent::__construct($dn, $data, true); + } + + /** + * Gets the namingContexts. + * + * @return array + */ + public function getNamingContexts() + { + return $this->getAttribute('namingContexts', null); + } + + /** + * Gets the subschemaSubentry. + * + * @return string|null + */ + public function getSubschemaSubentry() + { + return $this->getAttribute('subschemaSubentry', 0); + } + + /** + * Determines if the version is supported + * + * @param string|int|array $versions version(s) to check + * @return boolean + */ + public function supportsVersion($versions) + { + return $this->attributeHasValue('supportedLDAPVersion', $versions); + } + + /** + * Determines if the sasl mechanism is supported + * + * @param string|array $mechlist SASL mechanisms to check + * @return boolean + */ + public function supportsSaslMechanism($mechlist) + { + return $this->attributeHasValue('supportedSASLMechanisms', $mechlist); + } + + /** + * Gets the server type + * + * @return int + */ + public function getServerType() + { + return self::SERVER_TYPE_GENERIC; + } + + /** + * Returns the schema DN + * + * @return Zend_Ldap_Dn + */ + public function getSchemaDn() + { + $schemaDn = $this->getSubschemaSubentry(); + /** + * @see Zend_Ldap_Dn + */ + return Zend_Ldap_Dn::fromString($schemaDn); + } +} diff --git a/library/vendor/Zend/Ldap/Node/RootDse/ActiveDirectory.php b/library/vendor/Zend/Ldap/Node/RootDse/ActiveDirectory.php new file mode 100644 index 000000000..6da3f165e --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/RootDse/ActiveDirectory.php @@ -0,0 +1,245 @@ +getAttribute('configurationNamingContext', 0); + } + + /** + * Gets the currentTime. + * + * @return string|null + */ + public function getCurrentTime() + { + return $this->getAttribute('currentTime', 0); + } + + /** + * Gets the defaultNamingContext. + * + * @return string|null + */ + public function getDefaultNamingContext() + { + return $this->getAttribute('defaultNamingContext', 0); + } + + /** + * Gets the dnsHostName. + * + * @return string|null + */ + public function getDnsHostName() + { + return $this->getAttribute('dnsHostName', 0); + } + + /** + * Gets the domainControllerFunctionality. + * + * @return string|null + */ + public function getDomainControllerFunctionality() + { + return $this->getAttribute('domainControllerFunctionality', 0); + } + + /** + * Gets the domainFunctionality. + * + * @return string|null + */ + public function getDomainFunctionality() + { + return $this->getAttribute('domainFunctionality', 0); + } + + /** + * Gets the dsServiceName. + * + * @return string|null + */ + public function getDsServiceName() + { + return $this->getAttribute('dsServiceName', 0); + } + + /** + * Gets the forestFunctionality. + * + * @return string|null + */ + public function getForestFunctionality() + { + return $this->getAttribute('forestFunctionality', 0); + } + + /** + * Gets the highestCommittedUSN. + * + * @return string|null + */ + public function getHighestCommittedUSN() + { + return $this->getAttribute('highestCommittedUSN', 0); + } + + /** + * Gets the isGlobalCatalogReady. + * + * @return string|null + */ + public function getIsGlobalCatalogReady() + { + return $this->getAttribute('isGlobalCatalogReady', 0); + } + + /** + * Gets the isSynchronized. + * + * @return string|null + */ + public function getIsSynchronized() + { + return $this->getAttribute('isSynchronized', 0); + } + + /** + * Gets the ldapServiceName. + * + * @return string|null + */ + public function getLdapServiceName() + { + return $this->getAttribute('ldapServiceName', 0); + } + + /** + * Gets the rootDomainNamingContext. + * + * @return string|null + */ + public function getRootDomainNamingContext() + { + return $this->getAttribute('rootDomainNamingContext', 0); + } + + /** + * Gets the schemaNamingContext. + * + * @return string|null + */ + public function getSchemaNamingContext() + { + return $this->getAttribute('schemaNamingContext', 0); + } + + /** + * Gets the serverName. + * + * @return string|null + */ + public function getServerName() + { + return $this->getAttribute('serverName', 0); + } + + /** + * Determines if the capability is supported + * + * @param string|string|array $oids capability(s) to check + * @return boolean + */ + public function supportsCapability($oids) + { + return $this->attributeHasValue('supportedCapabilities', $oids); + } + + /** + * Determines if the control is supported + * + * @param string|array $oids control oid(s) to check + * @return boolean + */ + public function supportsControl($oids) + { + return $this->attributeHasValue('supportedControl', $oids); + } + + /** + * Determines if the version is supported + * + * @param string|array $policies policy(s) to check + * @return boolean + */ + public function supportsPolicy($policies) + { + return $this->attributeHasValue('supportedLDAPPolicies', $policies); + } + + /** + * Gets the server type + * + * @return int + */ + public function getServerType() + { + return self::SERVER_TYPE_ACTIVEDIRECTORY; + } + + /** + * Returns the schema DN + * + * @return Zend_Ldap_Dn + */ + public function getSchemaDn() + { + $schemaDn = $this->getSchemaNamingContext(); + /** + * @see Zend_Ldap_Dn + */ + return Zend_Ldap_Dn::fromString($schemaDn); + } +} diff --git a/library/vendor/Zend/Ldap/Node/RootDse/OpenLdap.php b/library/vendor/Zend/Ldap/Node/RootDse/OpenLdap.php new file mode 100644 index 000000000..3f6cf20fa --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/RootDse/OpenLdap.php @@ -0,0 +1,101 @@ +getAttribute('configContext', 0); + } + + /** + * Gets the monitorContext. + * + * @return string|null + */ + public function getMonitorContext() + { + return $this->getAttribute('monitorContext', 0); + } + + /** + * Determines if the control is supported + * + * @param string|array $oids control oid(s) to check + * @return boolean + */ + public function supportsControl($oids) + { + return $this->attributeHasValue('supportedControl', $oids); + } + + /** + * Determines if the extension is supported + * + * @param string|array $oids oid(s) to check + * @return boolean + */ + public function supportsExtension($oids) + { + return $this->attributeHasValue('supportedExtension', $oids); + } + + /** + * Determines if the feature is supported + * + * @param string|array $oids feature oid(s) to check + * @return boolean + */ + public function supportsFeature($oids) + { + return $this->attributeHasValue('supportedFeatures', $oids); + } + + /** + * Gets the server type + * + * @return int + */ + public function getServerType() + { + return self::SERVER_TYPE_OPENLDAP; + } +} diff --git a/library/vendor/Zend/Ldap/Node/RootDse/eDirectory.php b/library/vendor/Zend/Ldap/Node/RootDse/eDirectory.php new file mode 100644 index 000000000..8fb45b7ae --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/RootDse/eDirectory.php @@ -0,0 +1,159 @@ +attributeHasValue('supportedExtension', $oids); + } + + /** + * Gets the vendorName. + * + * @return string|null + */ + public function getVendorName() + { + return $this->getAttribute('vendorName', 0); + } + + /** + * Gets the vendorVersion. + * + * @return string|null + */ + public function getVendorVersion() + { + return $this->getAttribute('vendorVersion', 0); + } + + /** + * Gets the dsaName. + * + * @return string|null + */ + public function getDsaName() + { + return $this->getAttribute('dsaName', 0); + } + + /** + * Gets the server statistics "errors". + * + * @return string|null + */ + public function getStatisticsErrors() + { + return $this->getAttribute('errors', 0); + } + + /** + * Gets the server statistics "securityErrors". + * + * @return string|null + */ + public function getStatisticsSecurityErrors() + { + return $this->getAttribute('securityErrors', 0); + } + + /** + * Gets the server statistics "chainings". + * + * @return string|null + */ + public function getStatisticsChainings() + { + return $this->getAttribute('chainings', 0); + } + + /** + * Gets the server statistics "referralsReturned". + * + * @return string|null + */ + public function getStatisticsReferralsReturned() + { + return $this->getAttribute('referralsReturned', 0); + } + + /** + * Gets the server statistics "extendedOps". + * + * @return string|null + */ + public function getStatisticsExtendedOps() + { + return $this->getAttribute('extendedOps', 0); + } + + /** + * Gets the server statistics "abandonOps". + * + * @return string|null + */ + public function getStatisticsAbandonOps() + { + return $this->getAttribute('abandonOps', 0); + } + + /** + * Gets the server statistics "wholeSubtreeSearchOps". + * + * @return string|null + */ + public function getStatisticsWholeSubtreeSearchOps() + { + return $this->getAttribute('wholeSubtreeSearchOps', 0); + } + + /** + * Gets the server type + * + * @return int + */ + public function getServerType() + { + return self::SERVER_TYPE_EDIRECTORY; + } +} diff --git a/library/vendor/Zend/Ldap/Node/Schema.php b/library/vendor/Zend/Ldap/Node/Schema.php new file mode 100644 index 000000000..1971a74b4 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Schema.php @@ -0,0 +1,117 @@ +getRootDse()->getSchemaDn(); + $data = $ldap->getEntry($dn, array('*', '+'), true); + switch ($ldap->getRootDse()->getServerType()) { + case Zend_Ldap_Node_RootDse::SERVER_TYPE_ACTIVEDIRECTORY: + /** + * @see Zend_Ldap_Node_Schema_ActiveDirectory + */ + return new Zend_Ldap_Node_Schema_ActiveDirectory($dn, $data, $ldap); + case Zend_Ldap_Node_RootDse::SERVER_TYPE_OPENLDAP: + /** + * @see Zend_Ldap_Node_RootDse_ActiveDirectory + */ + return new Zend_Ldap_Node_Schema_OpenLdap($dn, $data, $ldap); + case Zend_Ldap_Node_RootDse::SERVER_TYPE_EDIRECTORY: + default: + return new self($dn, $data, $ldap); + } + } + + /** + * Constructor. + * + * Constructor is protected to enforce the use of factory methods. + * + * @param Zend_Ldap_Dn $dn + * @param array $data + * @param Zend_Ldap $ldap + */ + protected function __construct(Zend_Ldap_Dn $dn, array $data, Zend_Ldap $ldap) + { + parent::__construct($dn, $data, true); + $this->_parseSchema($dn, $ldap); + } + + /** + * Parses the schema + * + * @param Zend_Ldap_Dn $dn + * @param Zend_Ldap $ldap + * @return Zend_Ldap_Node_Schema Provides a fluent interface + */ + protected function _parseSchema(Zend_Ldap_Dn $dn, Zend_Ldap $ldap) + { + return $this; + } + + /** + * Gets the attribute Types + * + * @return array + */ + public function getAttributeTypes() + { + return array(); + } + + /** + * Gets the object classes + * + * @return array + */ + public function getObjectClasses() + { + return array(); + } +} diff --git a/library/vendor/Zend/Ldap/Node/Schema/ActiveDirectory.php b/library/vendor/Zend/Ldap/Node/Schema/ActiveDirectory.php new file mode 100644 index 000000000..63469e955 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Schema/ActiveDirectory.php @@ -0,0 +1,100 @@ +search('(objectClass=classSchema)', $dn, + Zend_Ldap::SEARCH_SCOPE_ONE) as $node) { + $val = new Zend_Ldap_Node_Schema_ObjectClass_ActiveDirectory($node); + $this->_objectClasses[$val->getName()] = $val; + } + foreach ($ldap->search('(objectClass=attributeSchema)', $dn, + Zend_Ldap::SEARCH_SCOPE_ONE) as $node) { + $val = new Zend_Ldap_Node_Schema_AttributeType_ActiveDirectory($node); + $this->_attributeTypes[$val->getName()] = $val; + } + return $this; + } + + /** + * Gets the attribute Types + * + * @return array + */ + public function getAttributeTypes() + { + return $this->_attributeTypes; + } + + /** + * Gets the object classes + * + * @return array + */ + public function getObjectClasses() + { + return $this->_objectClasses; + } +} diff --git a/library/vendor/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php b/library/vendor/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php new file mode 100644 index 000000000..0987daabf --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php @@ -0,0 +1,102 @@ +ldapdisplayname[0]; + } + + /** + * Gets the attribute OID + * + * @return string + */ + public function getOid() + { + + } + + /** + * Gets the attribute syntax + * + * @return string + */ + public function getSyntax() + { + + } + + /** + * Gets the attribute maximum length + * + * @return int|null + */ + public function getMaxLength() + { + + } + + /** + * Returns if the attribute is single-valued. + * + * @return boolean + */ + public function isSingleValued() + { + + } + + /** + * Gets the attribute description + * + * @return string + */ + public function getDescription() + { + + } +} diff --git a/library/vendor/Zend/Ldap/Node/Schema/AttributeType/Interface.php b/library/vendor/Zend/Ldap/Node/Schema/AttributeType/Interface.php new file mode 100644 index 000000000..59226635e --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Schema/AttributeType/Interface.php @@ -0,0 +1,75 @@ +name; + } + + /** + * Gets the attribute OID + * + * @return string + */ + public function getOid() + { + return $this->oid; + } + + /** + * Gets the attribute syntax + * + * @return string + */ + public function getSyntax() + { + if ($this->syntax === null) { + $parent = $this->getParent(); + if ($parent === null) return null; + else return $parent->getSyntax(); + } else { + return $this->syntax; + } + } + + /** + * Gets the attribute maximum length + * + * @return int|null + */ + public function getMaxLength() + { + $maxLength = $this->{'max-length'}; + if ($maxLength === null) { + $parent = $this->getParent(); + if ($parent === null) return null; + else return $parent->getMaxLength(); + } else { + return (int)$maxLength; + } + } + + /** + * Returns if the attribute is single-valued. + * + * @return boolean + */ + public function isSingleValued() + { + return $this->{'single-value'}; + } + + /** + * Gets the attribute description + * + * @return string + */ + public function getDescription() + { + return $this->desc; + } + + /** + * Returns the parent attribute type in the inhertitance tree if one exists + * + * @return Zend_Ldap_Node_Schema_AttributeType_OpenLdap|null + */ + public function getParent() + { + if (count($this->_parents) === 1) { + return $this->_parents[0]; + } + } +} diff --git a/library/vendor/Zend/Ldap/Node/Schema/Item.php b/library/vendor/Zend/Ldap/Node/Schema/Item.php new file mode 100644 index 000000000..4404f1dcb --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Schema/Item.php @@ -0,0 +1,163 @@ +setData($data); + } + + /** + * Sets the data + * + * @param array $data + * @return Zend_Ldap_Node_Schema_Item Provides a fluent interface + */ + public function setData(array $data) + { + $this->_data = $data; + return $this; + } + + /** + * Gets the data + * + * @return array + */ + public function getData() + { + return $this->_data; + } + + /** + * Gets a specific attribute from this item + * + * @param string $name + * @return mixed + */ + public function __get($name) + { + if (array_key_exists($name, $this->_data)) { + return $this->_data[$name]; + } else { + return null; + } + } + + /** + * Checks whether a specific attribute exists. + * + * @param string $name + * @return boolean + */ + public function __isset($name) + { + return (array_key_exists($name, $this->_data)); + } + + /** + * Always throws BadMethodCallException + * Implements ArrayAccess. + * + * This method is needed for a full implementation of ArrayAccess + * + * @param string $name + * @param mixed $value + * @return null + * @throws BadMethodCallException + */ + public function offsetSet($name, $value) + { + throw new BadMethodCallException(); + } + + /** + * Gets a specific attribute from this item + * + * @param string $name + * @return mixed + */ + public function offsetGet($name) + { + return $this->__get($name); + } + + /** + * Always throws BadMethodCallException + * Implements ArrayAccess. + * + * This method is needed for a full implementation of ArrayAccess + * + * @param string $name + * @return null + * @throws BadMethodCallException + */ + public function offsetUnset($name) + { + throw new BadMethodCallException(); + } + + /** + * Checks whether a specific attribute exists. + * + * @param string $name + * @return boolean + */ + public function offsetExists($name) + { + return $this->__isset($name); + } + + /** + * Returns the number of attributes. + * Implements Countable + * + * @return int + */ + public function count() + { + return count($this->_data); + } +} diff --git a/library/vendor/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php b/library/vendor/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php new file mode 100644 index 000000000..252be6d94 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php @@ -0,0 +1,113 @@ +ldapdisplayname[0]; + } + + /** + * Gets the objectClass OID + * + * @return string + */ + public function getOid() + { + + } + + /** + * Gets the attributes that this objectClass must contain + * + * @return array + */ + public function getMustContain() + { + + } + + /** + * Gets the attributes that this objectClass may contain + * + * @return array + */ + public function getMayContain() + { + + } + + /** + * Gets the objectClass description + * + * @return string + */ + public function getDescription() + { + + } + + /** + * Gets the objectClass type + * + * @return integer + */ + public function getType() + { + + } + + /** + * Returns the parent objectClasses of this class. + * This includes structural, abstract and auxiliary objectClasses + * + * @return array + */ + public function getParentClasses() + { + + } +} diff --git a/library/vendor/Zend/Ldap/Node/Schema/ObjectClass/Interface.php b/library/vendor/Zend/Ldap/Node/Schema/ObjectClass/Interface.php new file mode 100644 index 000000000..f73519026 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Schema/ObjectClass/Interface.php @@ -0,0 +1,83 @@ +name; + } + + /** + * Gets the objectClass OID + * + * @return string + */ + public function getOid() + { + return $this->oid; + } + + /** + * Gets the attributes that this objectClass must contain + * + * @return array + */ + public function getMustContain() + { + if ($this->_inheritedMust === null) { + $this->_resolveInheritance(); + } + return $this->_inheritedMust; + } + + /** + * Gets the attributes that this objectClass may contain + * + * @return array + */ + public function getMayContain() + { + if ($this->_inheritedMay === null) { + $this->_resolveInheritance(); + } + return $this->_inheritedMay; + } + + /** + * Resolves the inheritance tree + * + * @return void + */ + protected function _resolveInheritance() + { + $must = $this->must; + $may = $this->may; + foreach ($this->getParents() as $p) { + $must = array_merge($must, $p->getMustContain()); + $may = array_merge($may, $p->getMayContain()); + } + $must = array_unique($must); + $may = array_unique($may); + $may = array_diff($may, $must); + sort($must, SORT_STRING); + sort($may, SORT_STRING); + $this->_inheritedMust = $must; + $this->_inheritedMay = $may; + } + + /** + * Gets the objectClass description + * + * @return string + */ + public function getDescription() + { + return $this->desc; + } + + /** + * Gets the objectClass type + * + * @return integer + */ + public function getType() + { + if ($this->structural) { + return Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_STRUCTURAL; + } else if ($this->abstract) { + return Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_ABSTRACT; + } else if ($this->auxiliary) { + return Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_AUXILIARY; + } else { + return Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_UNKNOWN; + } + } + + /** + * Returns the parent objectClasses of this class. + * This includes structural, abstract and auxiliary objectClasses + * + * @return array + */ + public function getParentClasses() + { + return $this->sup; + } + + /** + * Returns the parent object classes in the inhertitance tree if one exists + * + * @return array of Zend_Ldap_Node_Schema_ObjectClass_OpenLdap + */ + public function getParents() + { + return $this->_parents; + } +} diff --git a/library/vendor/Zend/Ldap/Node/Schema/OpenLdap.php b/library/vendor/Zend/Ldap/Node/Schema/OpenLdap.php new file mode 100644 index 000000000..df49d9884 --- /dev/null +++ b/library/vendor/Zend/Ldap/Node/Schema/OpenLdap.php @@ -0,0 +1,499 @@ +_loadAttributeTypes(); + $this->_loadLdapSyntaxes(); + $this->_loadMatchingRules(); + $this->_loadMatchingRuleUse(); + $this->_loadObjectClasses(); + return $this; + } + + /** + * Gets the attribute Types + * + * @return array + */ + public function getAttributeTypes() + { + return $this->_attributeTypes; + } + + /** + * Gets the object classes + * + * @return array + */ + public function getObjectClasses() + { + return $this->_objectClasses; + } + + /** + * Gets the LDAP syntaxes + * + * @return array + */ + public function getLdapSyntaxes() + { + return $this->_ldapSyntaxes; + } + + /** + * Gets the matching rules + * + * @return array + */ + public function getMatchingRules() + { + return $this->_matchingRules; + } + + /** + * Gets the matching rule use + * + * @return array + */ + public function getMatchingRuleUse() + { + return $this->_matchingRuleUse; + } + + /** + * Loads the attribute Types + * + * @return void + */ + protected function _loadAttributeTypes() + { + $this->_attributeTypes = array(); + foreach ($this->getAttribute('attributeTypes') as $value) { + $val = $this->_parseAttributeType($value); + $val = new Zend_Ldap_Node_Schema_AttributeType_OpenLdap($val); + $this->_attributeTypes[$val->getName()] = $val; + + } + foreach ($this->_attributeTypes as $val) { + if (count($val->sup) > 0) { + $this->_resolveInheritance($val, $this->_attributeTypes); + } + foreach ($val->aliases as $alias) { + $this->_attributeTypes[$alias] = $val; + } + } + ksort($this->_attributeTypes, SORT_STRING); + } + + /** + * Parses an attributeType value + * + * @param string $value + * @return array + */ + protected function _parseAttributeType($value) + { + $attributeType = array( + 'oid' => null, + 'name' => null, + 'desc' => null, + 'obsolete' => false, + 'sup' => null, + 'equality' => null, + 'ordering' => null, + 'substr' => null, + 'syntax' => null, + 'max-length' => null, + 'single-value' => false, + 'collective' => false, + 'no-user-modification' => false, + 'usage' => 'userApplications', + '_string' => $value, + '_parents' => array()); + + $tokens = $this->_tokenizeString($value); + $attributeType['oid'] = array_shift($tokens); // first token is the oid + $this->_parseLdapSchemaSyntax($attributeType, $tokens); + + if (array_key_exists('syntax', $attributeType)) { + // get max length from syntax + if (preg_match('/^(.+){(\d+)}$/', $attributeType['syntax'], $matches)) { + $attributeType['syntax'] = $matches[1]; + $attributeType['max-length'] = $matches[2]; + } + } + + $this->_ensureNameAttribute($attributeType); + + return $attributeType; + } + + /** + * Loads the object classes + * + * @return void + */ + protected function _loadObjectClasses() + { + $this->_objectClasses = array(); + foreach ($this->getAttribute('objectClasses') as $value) { + $val = $this->_parseObjectClass($value); + $val = new Zend_Ldap_Node_Schema_ObjectClass_OpenLdap($val); + $this->_objectClasses[$val->getName()] = $val; + } + foreach ($this->_objectClasses as $val) { + if (count($val->sup) > 0) { + $this->_resolveInheritance($val, $this->_objectClasses); + } + foreach ($val->aliases as $alias) { + $this->_objectClasses[$alias] = $val; + } + } + ksort($this->_objectClasses, SORT_STRING); + } + + /** + * Parses an objectClasses value + * + * @param string $value + * @return array + */ + protected function _parseObjectClass($value) + { + $objectClass = array( + 'oid' => null, + 'name' => null, + 'desc' => null, + 'obsolete' => false, + 'sup' => array(), + 'abstract' => false, + 'structural' => false, + 'auxiliary' => false, + 'must' => array(), + 'may' => array(), + '_string' => $value, + '_parents' => array()); + + $tokens = $this->_tokenizeString($value); + $objectClass['oid'] = array_shift($tokens); // first token is the oid + $this->_parseLdapSchemaSyntax($objectClass, $tokens); + + $this->_ensureNameAttribute($objectClass); + + return $objectClass; + } + + /** + * Resolves inheritance in objectClasses and attributes + * + * @param Zend_Ldap_Node_Schema_Item $node + * @param array $repository + */ + protected function _resolveInheritance(Zend_Ldap_Node_Schema_Item $node, array $repository) + { + $data = $node->getData(); + $parents = $data['sup']; + if ($parents === null || !is_array($parents) || count($parents) < 1) return; + foreach ($parents as $parent) { + if (!array_key_exists($parent, $repository)) continue; + if (!array_key_exists('_parents', $data) || !is_array($data['_parents'])) { + $data['_parents'] = array(); + } + $data['_parents'][] = $repository[$parent]; + } + $node->setData($data); + } + + /** + * Loads the LDAP syntaxes + * + * @return void + */ + protected function _loadLdapSyntaxes() + { + $this->_ldapSyntaxes = array(); + foreach ($this->getAttribute('ldapSyntaxes') as $value) { + $val = $this->_parseLdapSyntax($value); + $this->_ldapSyntaxes[$val['oid']] = $val; + } + ksort($this->_ldapSyntaxes, SORT_STRING); + } + + /** + * Parses an ldapSyntaxes value + * + * @param string $value + * @return array + */ + protected function _parseLdapSyntax($value) + { + $ldapSyntax = array( + 'oid' => null, + 'desc' => null, + '_string' => $value); + + $tokens = $this->_tokenizeString($value); + $ldapSyntax['oid'] = array_shift($tokens); // first token is the oid + $this->_parseLdapSchemaSyntax($ldapSyntax, $tokens); + + return $ldapSyntax; + } + + /** + * Loads the matching rules + * + * @return void + */ + protected function _loadMatchingRules() + { + $this->_matchingRules = array(); + foreach ($this->getAttribute('matchingRules') as $value) { + $val = $this->_parseMatchingRule($value); + $this->_matchingRules[$val['name']] = $val; + } + ksort($this->_matchingRules, SORT_STRING); + } + + /** + * Parses an matchingRules value + * + * @param string $value + * @return array + */ + protected function _parseMatchingRule($value) + { + $matchingRule = array( + 'oid' => null, + 'name' => null, + 'desc' => null, + 'obsolete' => false, + 'syntax' => null, + '_string' => $value); + + $tokens = $this->_tokenizeString($value); + $matchingRule['oid'] = array_shift($tokens); // first token is the oid + $this->_parseLdapSchemaSyntax($matchingRule, $tokens); + + $this->_ensureNameAttribute($matchingRule); + + return $matchingRule; + } + + /** + * Loads the matching rule use + * + * @return void + */ + protected function _loadMatchingRuleUse() + { + $this->_matchingRuleUse = array(); + foreach ($this->getAttribute('matchingRuleUse') as $value) { + $val = $this->_parseMatchingRuleUse($value); + $this->_matchingRuleUse[$val['name']] = $val; + } + ksort($this->_matchingRuleUse, SORT_STRING); + } + + /** + * Parses an matchingRuleUse value + * + * @param string $value + * @return array + */ + protected function _parseMatchingRuleUse($value) + { + $matchingRuleUse = array( + 'oid' => null, + 'name' => null, + 'desc' => null, + 'obsolete' => false, + 'applies' => array(), + '_string' => $value); + + $tokens = $this->_tokenizeString($value); + $matchingRuleUse['oid'] = array_shift($tokens); // first token is the oid + $this->_parseLdapSchemaSyntax($matchingRuleUse, $tokens); + + $this->_ensureNameAttribute($matchingRuleUse); + + return $matchingRuleUse; + } + + /** + * Ensures that a name element is present and that it is single-values. + * + * @param array $data + */ + protected function _ensureNameAttribute(array &$data) + { + if (!array_key_exists('name', $data) || empty($data['name'])) { + // force a name + $data['name'] = $data['oid']; + } + if (is_array($data['name'])) { + // make one name the default and put the other ones into aliases + $aliases = $data['name']; + $data['name'] = array_shift($aliases); + $data['aliases'] = $aliases; + } else { + $data['aliases'] = array(); + } + } + + /** + * Parse the given tokens into a data structure + * + * @param array $data + * @param array $tokens + * @return void + */ + protected function _parseLdapSchemaSyntax(array &$data, array $tokens) + { + // tokens that have no value associated + $noValue = array('single-value', + 'obsolete', + 'collective', + 'no-user-modification', + 'abstract', + 'structural', + 'auxiliary'); + // tokens that can have multiple values + $multiValue = array('must', 'may', 'sup'); + + while (count($tokens) > 0) { + $token = strtolower(array_shift($tokens)); + if (in_array($token, $noValue)) { + $data[$token] = true; // single value token + } else { + $data[$token] = array_shift($tokens); + // this one follows a string or a list if it is multivalued + if ($data[$token] == '(') { + // this creates the list of values and cycles through the tokens + // until the end of the list is reached ')' + $data[$token] = array(); + while ($tmp = array_shift($tokens)) { + if ($tmp == ')') break; + if ($tmp != '$') { + $data[$token][] = Zend_Ldap_Attribute::convertFromLdapValue($tmp); + } + } + } else { + $data[$token] = Zend_Ldap_Attribute::convertFromLdapValue($data[$token]); + } + // create a array if the value should be multivalued but was not + if (in_array($token, $multiValue) && !is_array($data[$token])) { + $data[$token] = array($data[$token]); + } + } + } + } + + /** + * Tokenizes the given value into an array + * + * @param string $value + * @return array tokens + */ + protected function _tokenizeString($value) + { + $tokens = array(); + $matches = array(); + // this one is taken from PEAR::Net_LDAP2 + $pattern = "/\s* (?:([()]) | ([^'\s()]+) | '((?:[^']+|'[^\s)])*)') \s*/x"; + preg_match_all($pattern, $value, $matches); + $cMatches = count($matches[0]); + $cPattern = count($matches); + for ($i = 0; $i < $cMatches; $i++) { // number of tokens (full pattern match) + for ($j = 1; $j < $cPattern; $j++) { // each subpattern + $tok = trim($matches[$j][$i]); + if (!empty($tok)) { // pattern match in this subpattern + $tokens[$i] = $tok; // this is the token + } + } + } + if ($tokens[0] == '(') array_shift($tokens); + if ($tokens[count($tokens) - 1] == ')') array_pop($tokens); + return $tokens; + } +} diff --git a/library/vendor/Zend/Loader.php b/library/vendor/Zend/Loader.php index 8084e1281..2952e811c 100644 --- a/library/vendor/Zend/Loader.php +++ b/library/vendor/Zend/Loader.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Loader diff --git a/library/vendor/Zend/Loader/Autoloader.php b/library/vendor/Zend/Loader/Autoloader.php index ed5a2c43d..06e70232f 100644 --- a/library/vendor/Zend/Loader/Autoloader.php +++ b/library/vendor/Zend/Loader/Autoloader.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Loader * @subpackage Autoloader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ require_once 'Zend/Loader.php'; * @uses Zend_Loader_Autoloader * @package Zend_Loader * @subpackage Autoloader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Loader_Autoloader diff --git a/library/vendor/Zend/Loader/Autoloader/Interface.php b/library/vendor/Zend/Loader/Autoloader/Interface.php index 768b734fe..64985e26e 100644 --- a/library/vendor/Zend/Loader/Autoloader/Interface.php +++ b/library/vendor/Zend/Loader/Autoloader/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Loader * @subpackage Autoloader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * * @package Zend_Loader * @subpackage Autoloader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Loader_Autoloader_Interface diff --git a/library/vendor/Zend/Loader/Autoloader/Resource.php b/library/vendor/Zend/Loader/Autoloader/Resource.php index dd579f2ef..964517881 100644 --- a/library/vendor/Zend/Loader/Autoloader/Resource.php +++ b/library/vendor/Zend/Loader/Autoloader/Resource.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Loader * @subpackage Autoloader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @uses Zend_Loader_Autoloader_Interface * @package Zend_Loader * @subpackage Autoloader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Loader_Autoloader_Resource implements Zend_Loader_Autoloader_Interface diff --git a/library/vendor/Zend/Loader/AutoloaderFactory.php b/library/vendor/Zend/Loader/AutoloaderFactory.php index 8c638900b..9b0e976f7 100644 --- a/library/vendor/Zend/Loader/AutoloaderFactory.php +++ b/library/vendor/Zend/Loader/AutoloaderFactory.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,12 +23,13 @@ if (class_exists('Zend_Loader_AutoloaderFactory')) return; /** * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Loader_AutoloaderFactory { - const STANDARD_AUTOLOADER = 'Zend_Loader_StandardAutoloader'; + const STANDARD_AUTOLOADER = 'Zend_Loader_StandardAutoloader'; + const CLASS_MAP_AUTOLOADER = 'Zend_Loader_ClassMapAutoloader'; /** * @var array All autoloaders registered using the factory @@ -87,6 +88,18 @@ abstract class Zend_Loader_AutoloaderFactory foreach ($options as $class => $options) { if (!isset(self::$loaders[$class])) { + // Check class map autoloader + if ($class == self::CLASS_MAP_AUTOLOADER) { + if (!class_exists(self::CLASS_MAP_AUTOLOADER)) { + // Extract the filename from the classname + $classMapLoader = substr( + strrchr(self::CLASS_MAP_AUTOLOADER, '_'), 1 + ); + + } + } + + // Autoload with standard autoloader $autoloader = self::getStandardAutoloader(); if (!class_exists($class) && !$autoloader->autoload($class)) { throw new Zend_Loader_Exception_InvalidArgumentException(sprintf( diff --git a/library/vendor/Zend/Loader/ClassMapAutoloader.php b/library/vendor/Zend/Loader/ClassMapAutoloader.php index 7e6615c01..c72a49221 100644 --- a/library/vendor/Zend/Loader/ClassMapAutoloader.php +++ b/library/vendor/Zend/Loader/ClassMapAutoloader.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * Utilizes class-map files to lookup classfile locations. * * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license New BSD {@link http://framework.zend.com/license/new-bsd} */ class Zend_Loader_ClassMapAutoloader implements Zend_Loader_SplAutoloader diff --git a/library/vendor/Zend/Loader/Exception.php b/library/vendor/Zend/Loader/Exception.php index 00d9194f3..c170e2136 100644 --- a/library/vendor/Zend/Loader/Exception.php +++ b/library/vendor/Zend/Loader/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Loader * @uses Zend_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Loader_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Loader/Exception/InvalidArgumentException.php b/library/vendor/Zend/Loader/Exception/InvalidArgumentException.php index a5007232c..0c9e09b3a 100644 --- a/library/vendor/Zend/Loader/Exception/InvalidArgumentException.php +++ b/library/vendor/Zend/Loader/Exception/InvalidArgumentException.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Loader * @subpackage Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Loader * @subpackage Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Loader_Exception_InvalidArgumentException diff --git a/library/vendor/Zend/Loader/PluginLoader.php b/library/vendor/Zend/Loader/PluginLoader.php index 344744911..5e985b0b1 100644 --- a/library/vendor/Zend/Loader/PluginLoader.php +++ b/library/vendor/Zend/Loader/PluginLoader.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Loader * @subpackage PluginLoader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Loader * @subpackage PluginLoader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Loader_PluginLoader implements Zend_Loader_PluginLoader_Interface diff --git a/library/vendor/Zend/Loader/PluginLoader/Exception.php b/library/vendor/Zend/Loader/PluginLoader/Exception.php index 1eb32b88d..313839117 100644 --- a/library/vendor/Zend/Loader/PluginLoader/Exception.php +++ b/library/vendor/Zend/Loader/PluginLoader/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Loader * @subpackage PluginLoader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Loader * @subpackage PluginLoader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Loader_PluginLoader_Exception extends Zend_Loader_Exception diff --git a/library/vendor/Zend/Loader/PluginLoader/Interface.php b/library/vendor/Zend/Loader/PluginLoader/Interface.php index 7f4008344..2733191bb 100644 --- a/library/vendor/Zend/Loader/PluginLoader/Interface.php +++ b/library/vendor/Zend/Loader/PluginLoader/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Loader * @subpackage PluginLoader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Loader * @subpackage PluginLoader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Loader_PluginLoader_Interface diff --git a/library/vendor/Zend/Loader/SplAutoloader.php b/library/vendor/Zend/Loader/SplAutoloader.php index 03dd67674..f502f8f03 100644 --- a/library/vendor/Zend/Loader/SplAutoloader.php +++ b/library/vendor/Zend/Loader/SplAutoloader.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ if (interface_exists('Zend_Loader_SplAutoloader')) return; * registry * * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Loader_SplAutoloader diff --git a/library/vendor/Zend/Loader/StandardAutoloader.php b/library/vendor/Zend/Loader/StandardAutoloader.php index b360f8f64..95c97ba85 100644 --- a/library/vendor/Zend/Loader/StandardAutoloader.php +++ b/library/vendor/Zend/Loader/StandardAutoloader.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * class is not found, a PHP warning will be raised by include(). * * @package Zend_Loader - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license New BSD {@link http://framework.zend.com/license/new-bsd} */ class Zend_Loader_StandardAutoloader implements Zend_Loader_SplAutoloader diff --git a/library/vendor/Zend/Locale.php b/library/vendor/Zend/Locale.php index 3f7e38542..94a77b39c 100644 --- a/library/vendor/Zend/Locale.php +++ b/library/vendor/Zend/Locale.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Locale diff --git a/library/vendor/Zend/Locale/Data.php b/library/vendor/Zend/Locale/Data.php index 614a799eb..a6a435a54 100644 --- a/library/vendor/Zend/Locale/Data.php +++ b/library/vendor/Zend/Locale/Data.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Locale * @subpackage Data - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Locale * @subpackage Data - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Locale_Data @@ -40,8 +40,7 @@ class Zend_Locale_Data /** * Locale files * - * @var ressource - * @access private + * @var array */ private static $_ldml = array(); @@ -49,7 +48,6 @@ class Zend_Locale_Data * List of values which are collected * * @var array - * @access private */ private static $_list = array(); @@ -57,7 +55,6 @@ class Zend_Locale_Data * Internal cache for ldml values * * @var Zend_Cache_Core - * @access private */ private static $_cache = null; @@ -71,8 +68,7 @@ class Zend_Locale_Data /** * Internal option, cache disabled * - * @var boolean - * @access private + * @var boolean */ private static $_cacheDisabled = false; @@ -145,8 +141,8 @@ class Zend_Locale_Data * @param string $attribute * @param string $value * @param array $temp + * @return bool * @throws Zend_Locale_Exception - * @access private */ private static function _findRoute($locale, $path, $attribute, $value, &$temp) { @@ -220,11 +216,13 @@ class Zend_Locale_Data /** * Read the right LDML file * - * @param string $locale - * @param string $path - * @param string $attribute - * @param string $value - * @access private + * @param string $locale + * @param string $path + * @param string|bool $attribute + * @param string|bool $value + * @param array $temp + * @return array + * @throws Zend_Locale_Exception */ private static function _getFile($locale, $path, $attribute = false, $value = false, $temp = array()) { @@ -240,6 +238,14 @@ class Zend_Locale_Data // 3. -> zh // 4. -> root if (($locale != 'root') && ($result)) { + // Search for parent locale + if (false !== strpos($locale, '_')) { + $parentLocale = self::getContent($locale, 'parentlocale'); + if ($parentLocale) { + $temp = self::_getFile($parentLocale, $path, $attribute, $value, $temp); + } + } + $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); if (!empty($locale)) { $temp = self::_getFile($locale, $path, $attribute, $value, $temp); @@ -275,8 +281,9 @@ class Zend_Locale_Data /** * Internal function for checking the locale * - * @param string|Zend_Locale $locale Locale to check + * @param string|Zend_Locale $locale Locale to check * @return string + * @throws Zend_Locale_Exception */ private static function _checkLocale($locale) { @@ -298,11 +305,11 @@ class Zend_Locale_Data /** * Read the LDML file, get a array of multipath defined value * - * @param string $locale - * @param string $path - * @param string $value + * @param string $locale + * @param string $path + * @param bool|string $value * @return array - * @access public + * @throws Zend_Locale_Exception */ public static function getList($locale, $path, $value = false) { @@ -322,7 +329,7 @@ class Zend_Locale_Data } $val = urlencode($val); - $id = strtr('Zend_LocaleL_' . $locale . '_' . $path . '_' . $val, array('-' => '_', '%' => '_', '+' => '_')); + $id = self::_filterCacheId('Zend_LocaleL_' . $locale . '_' . $path . '_' . $val); if (!self::$_cacheDisabled && ($result = self::$_cache->load($id))) { return unserialize($result); } @@ -946,11 +953,11 @@ class Zend_Locale_Data /** * Read the LDML file, get a single path defined value * - * @param string $locale - * @param string $path - * @param string $value + * @param string $locale + * @param string $path + * @param bool|string $value * @return string - * @access public + * @throws Zend_Locale_Exception */ public static function getContent($locale, $path, $value = false) { @@ -969,7 +976,7 @@ class Zend_Locale_Data $val = implode('_' , $value); } $val = urlencode($val); - $id = strtr('Zend_LocaleC_' . $locale . '_' . $path . '_' . $val, array('-' => '_', '%' => '_', '+' => '_')); + $id = self::_filterCacheId('Zend_LocaleC_' . $locale . '_' . $path . '_' . $val); if (!self::$_cacheDisabled && ($result = self::$_cache->load($id))) { return unserialize($result); } @@ -1468,6 +1475,13 @@ class Zend_Locale_Data $temp = self::_getFile($locale, '/ldml/units/unitLength/unit[@type=\'' . $value[0] . '\']/unitPattern[@count=\'' . $value[1] . '\']', ''); break; + case 'parentlocale': + if (false === $value) { + $value = $locale; + } + $temp = self::_getFile('supplementalData', "/supplementalData/parentLocales/parentLocale[contains(@locales, '" . $value . "')]", 'parent', 'parent'); + break; + default : throw new Zend_Locale_Exception("Unknown detail ($path) for parsing locale data."); break; @@ -1549,7 +1563,7 @@ class Zend_Locale_Data /** * Disables the cache * - * @param unknown_type $flag + * @param bool $flag */ public static function disableCache($flag) { @@ -1559,7 +1573,7 @@ class Zend_Locale_Data /** * Internal method to check if the given cache supports tags * - * @param Zend_Cache $cache + * @return bool */ private static function _getTagSupportForCache() { @@ -1573,4 +1587,23 @@ class Zend_Locale_Data return self::$_cacheTags; } + + /** + * Filter an ID to only allow valid variable characters + * + * @param string $value + * @return string + */ + protected static function _filterCacheId($value) + { + return strtr( + $value, + array( + '-' => '_', + '%' => '_', + '+' => '_', + '.' => '_', + ) + ); + } } diff --git a/library/vendor/Zend/Locale/Data/Translation.php b/library/vendor/Zend/Locale/Data/Translation.php index 1845d5de8..ceb16a9bf 100644 --- a/library/vendor/Zend/Locale/Data/Translation.php +++ b/library/vendor/Zend/Locale/Data/Translation.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Locale_Data_Translation diff --git a/library/vendor/Zend/Locale/Exception.php b/library/vendor/Zend/Locale/Exception.php index 864fdb7de..05c543f68 100644 --- a/library/vendor/Zend/Locale/Exception.php +++ b/library/vendor/Zend/Locale/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Locale_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Locale/Format.php b/library/vendor/Zend/Locale/Format.php index 50851bdfb..a1baf6e4b 100644 --- a/library/vendor/Zend/Locale/Format.php +++ b/library/vendor/Zend/Locale/Format.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Locale * @subpackage Format - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Locale * @subpackage Format - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Locale_Format diff --git a/library/vendor/Zend/Locale/Math.php b/library/vendor/Zend/Locale/Math.php index a82814c38..1b61b078c 100644 --- a/library/vendor/Zend/Locale/Math.php +++ b/library/vendor/Zend/Locale/Math.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Locale/Math/Exception.php b/library/vendor/Zend/Locale/Math/Exception.php index 0c9662cc6..fbf6c558a 100644 --- a/library/vendor/Zend/Locale/Math/Exception.php +++ b/library/vendor/Zend/Locale/Math/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Locale_Math_Exception extends Zend_Locale_Exception diff --git a/library/vendor/Zend/Locale/Math/PhpMath.php b/library/vendor/Zend/Locale/Math/PhpMath.php index 82025f2b0..6d774c298 100644 --- a/library/vendor/Zend/Locale/Math/PhpMath.php +++ b/library/vendor/Zend/Locale/Math/PhpMath.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Locale_Math_PhpMath extends Zend_Locale_Math diff --git a/library/vendor/Zend/Log.php b/library/vendor/Zend/Log.php index d2d6bc692..b2ad2b0ca 100644 --- a/library/vendor/Zend/Log.php +++ b/library/vendor/Zend/Log.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Log - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Log - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Exception.php b/library/vendor/Zend/Log/Exception.php index 5dbf39cdb..84c7633a5 100644 --- a/library/vendor/Zend/Log/Exception.php +++ b/library/vendor/Zend/Log/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Log - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Log - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/FactoryInterface.php b/library/vendor/Zend/Log/FactoryInterface.php index 1ca1a4218..eb67e2c21 100644 --- a/library/vendor/Zend/Log/FactoryInterface.php +++ b/library/vendor/Zend/Log/FactoryInterface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Log - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Log - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Filter/Abstract.php b/library/vendor/Zend/Log/Filter/Abstract.php index 0e2a61ef7..53cd40c8d 100644 --- a/library/vendor/Zend/Log/Filter/Abstract.php +++ b/library/vendor/Zend/Log/Filter/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Filter/Interface.php b/library/vendor/Zend/Log/Filter/Interface.php index 5b232bdc1..dc0cbad9a 100644 --- a/library/vendor/Zend/Log/Filter/Interface.php +++ b/library/vendor/Zend/Log/Filter/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Filter/Message.php b/library/vendor/Zend/Log/Filter/Message.php index c8ef242b0..3b98f9273 100644 --- a/library/vendor/Zend/Log/Filter/Message.php +++ b/library/vendor/Zend/Log/Filter/Message.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Filter/Priority.php b/library/vendor/Zend/Log/Filter/Priority.php index eeb086f72..f1dbd9323 100644 --- a/library/vendor/Zend/Log/Filter/Priority.php +++ b/library/vendor/Zend/Log/Filter/Priority.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Filter/Suppress.php b/library/vendor/Zend/Log/Filter/Suppress.php index e60a46416..37660771e 100644 --- a/library/vendor/Zend/Log/Filter/Suppress.php +++ b/library/vendor/Zend/Log/Filter/Suppress.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Filter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Formatter/Abstract.php b/library/vendor/Zend/Log/Formatter/Abstract.php index ab858464d..6fa402ace 100644 --- a/library/vendor/Zend/Log/Formatter/Abstract.php +++ b/library/vendor/Zend/Log/Formatter/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Formatter/Firebug.php b/library/vendor/Zend/Log/Formatter/Firebug.php index 501ecf5b8..332d0d807 100644 --- a/library/vendor/Zend/Log/Formatter/Firebug.php +++ b/library/vendor/Zend/Log/Formatter/Firebug.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Log_Formatter_Firebug extends Zend_Log_Formatter_Abstract diff --git a/library/vendor/Zend/Log/Formatter/Interface.php b/library/vendor/Zend/Log/Formatter/Interface.php index f7123650f..9b21fa7e2 100644 --- a/library/vendor/Zend/Log/Formatter/Interface.php +++ b/library/vendor/Zend/Log/Formatter/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Formatter/Simple.php b/library/vendor/Zend/Log/Formatter/Simple.php index fa2a24711..b2c237698 100644 --- a/library/vendor/Zend/Log/Formatter/Simple.php +++ b/library/vendor/Zend/Log/Formatter/Simple.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Formatter/Xml.php b/library/vendor/Zend/Log/Formatter/Xml.php index 162db6ce3..21fddb65a 100644 --- a/library/vendor/Zend/Log/Formatter/Xml.php +++ b/library/vendor/Zend/Log/Formatter/Xml.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Formatter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Writer/Abstract.php b/library/vendor/Zend/Log/Writer/Abstract.php index 019ad1524..c39be130d 100644 --- a/library/vendor/Zend/Log/Writer/Abstract.php +++ b/library/vendor/Zend/Log/Writer/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -47,8 +47,10 @@ abstract class Zend_Log_Writer_Abstract implements Zend_Log_FactoryInterface /** * Add a filter specific to this writer. * - * @param Zend_Log_Filter_Interface $filter + * @param Zend_Log_Filter_Interface|int $filter Filter class or filter + * priority * @return Zend_Log_Writer_Abstract + * @throws Zend_Log_Exception */ public function addFilter($filter) { @@ -73,8 +75,9 @@ abstract class Zend_Log_Writer_Abstract implements Zend_Log_FactoryInterface */ public function write($event) { + /** @var Zend_Log_Filter_Interface $filter */ foreach ($this->_filters as $filter) { - if (! $filter->accept($event)) { + if (!$filter->accept($event)) { return; } } @@ -106,7 +109,7 @@ abstract class Zend_Log_Writer_Abstract implements Zend_Log_FactoryInterface /** * Write a message to the log. * - * @param array $event log data event + * @param array $event log data event * @return void */ abstract protected function _write($event); diff --git a/library/vendor/Zend/Log/Writer/Db.php b/library/vendor/Zend/Log/Writer/Db.php index bd5c28faa..1c61c129d 100644 --- a/library/vendor/Zend/Log/Writer/Db.php +++ b/library/vendor/Zend/Log/Writer/Db.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Writer/Firebug.php b/library/vendor/Zend/Log/Writer/Firebug.php index 1458bfc82..c2250f030 100644 --- a/library/vendor/Zend/Log/Writer/Firebug.php +++ b/library/vendor/Zend/Log/Writer/Firebug.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Log_Writer_Firebug extends Zend_Log_Writer_Abstract diff --git a/library/vendor/Zend/Log/Writer/Mail.php b/library/vendor/Zend/Log/Writer/Mail.php index 23520355c..571d89379 100644 --- a/library/vendor/Zend/Log/Writer/Mail.php +++ b/library/vendor/Zend/Log/Writer/Mail.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Writer/Mock.php b/library/vendor/Zend/Log/Writer/Mock.php index 7999ab593..85511230c 100644 --- a/library/vendor/Zend/Log/Writer/Mock.php +++ b/library/vendor/Zend/Log/Writer/Mock.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Writer/Null.php b/library/vendor/Zend/Log/Writer/Null.php index f8510ed7a..2dc31034c 100644 --- a/library/vendor/Zend/Log/Writer/Null.php +++ b/library/vendor/Zend/Log/Writer/Null.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Writer/Stream.php b/library/vendor/Zend/Log/Writer/Stream.php index 58adb85aa..95771e835 100644 --- a/library/vendor/Zend/Log/Writer/Stream.php +++ b/library/vendor/Zend/Log/Writer/Stream.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Log/Writer/Syslog.php b/library/vendor/Zend/Log/Writer/Syslog.php index a96951100..7a569d792 100644 --- a/library/vendor/Zend/Log/Writer/Syslog.php +++ b/library/vendor/Zend/Log/Writer/Syslog.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Log_Writer_Syslog extends Zend_Log_Writer_Abstract diff --git a/library/vendor/Zend/Log/Writer/ZendMonitor.php b/library/vendor/Zend/Log/Writer/ZendMonitor.php index cc0d24b99..b59db9358 100644 --- a/library/vendor/Zend/Log/Writer/ZendMonitor.php +++ b/library/vendor/Zend/Log/Writer/ZendMonitor.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Log * @subpackage Writer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mail.php b/library/vendor/Zend/Mail.php index 518e89831..6d393d06b 100644 --- a/library/vendor/Zend/Mail.php +++ b/library/vendor/Zend/Mail.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -42,7 +42,7 @@ * * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail extends Zend_Mime_Message diff --git a/library/vendor/Zend/Mail/Exception.php b/library/vendor/Zend/Mail/Exception.php index 33a68f186..eeae2abd1 100644 --- a/library/vendor/Zend/Mail/Exception.php +++ b/library/vendor/Zend/Mail/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Mail/Header/HeaderName.php b/library/vendor/Zend/Mail/Header/HeaderName.php new file mode 100644 index 000000000..1284c3cb2 --- /dev/null +++ b/library/vendor/Zend/Mail/Header/HeaderName.php @@ -0,0 +1,91 @@ + 32 && $ord < 127 && $ord !== 58) { + $result .= $name[$i]; + } + } + return $result; + } + + /** + * Determine if the header name contains any invalid characters. + * + * @param string $name + * @return bool + */ + public static function isValid($name) + { + $tot = strlen($name); + for ($i = 0; $i < $tot; $i += 1) { + $ord = ord($name[$i]); + if ($ord < 33 || $ord > 126 || $ord === 58) { + return false; + } + } + return true; + } + + /** + * Assert that the header name is valid. + * + * Raises an exception if invalid. + * + * @param string $name + * @throws Exception\RuntimeException + * @return void + */ + public static function assertValid($name) + { + if (! self::isValid($name)) { + throw new Zend_Mail_Exception('Invalid header name detected'); + } + } +} diff --git a/library/vendor/Zend/Mail/Header/HeaderValue.php b/library/vendor/Zend/Mail/Header/HeaderValue.php new file mode 100644 index 000000000..7828e8b0a --- /dev/null +++ b/library/vendor/Zend/Mail/Header/HeaderValue.php @@ -0,0 +1,135 @@ + 126) + && $ord !== 13 + ) { + continue; + } + + if ($ord === 13) { + if ($i + 2 >= $tot) { + continue; + } + + $lf = ord($value[$i + 1]); + $sp = ord($value[$i + 2]); + + if ($lf !== 10 || $sp !== 32) { + continue; + } + + $result .= "\r\n "; + $i += 2; + continue; + } + + $result .= $value[$i]; + } + + return $result; + } + + /** + * Determine if the header value contains any invalid characters. + * + * @see http://www.rfc-base.org/txt/rfc-2822.txt (section 2.2) + * @param string $value + * @return bool + */ + public static function isValid($value) + { + $tot = strlen($value); + for ($i = 0; $i < $tot; $i += 1) { + $ord = ord($value[$i]); + if (($ord < 32 || $ord > 126) + && $ord !== 13 + ) { + return false; + } + + if ($ord === 13) { + if ($i + 2 >= $tot) { + return false; + } + + $lf = ord($value[$i + 1]); + $sp = ord($value[$i + 2]); + + if ($lf !== 10 || $sp !== 32) { + return false; + } + + $i += 2; + } + } + + return true; + } + + /** + * Assert that the header value is valid. + * + * Raises an exception if invalid. + * + * @param string $value + * @throws Exception\RuntimeException + * @return void + */ + public static function assertValid($value) + { + if (! self::isValid($value)) { + throw new Zend_Mail_Exception('Invalid header value detected'); + } + } +} diff --git a/library/vendor/Zend/Mail/Message.php b/library/vendor/Zend/Mail/Message.php index 3f819d102..b9ac013df 100644 --- a/library/vendor/Zend/Mail/Message.php +++ b/library/vendor/Zend/Mail/Message.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ /** * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Message extends Zend_Mail_Part implements Zend_Mail_Message_Interface @@ -66,6 +66,7 @@ class Zend_Mail_Message extends Zend_Mail_Part implements Zend_Mail_Message_Inte } else { $params['raw'] = stream_get_contents($params['file']); } + $params['raw'] = preg_replace("/(?_headers, $this->_content); + Zend_Mime_Decode::splitMessage($params['raw'], $this->_headers, $this->_content, "\r\n"); } else if (isset($params['headers'])) { if (is_array($params['headers'])) { $this->_headers = $params['headers']; + $this->_validateHeaders($this->_headers); } else { if (!empty($params['noToplines'])) { - Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $null); + Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $null, "\r\n"); } else { - Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $this->_topLines); + Zend_Mime_Decode::splitMessage($params['headers'], $this->_headers, $this->_topLines, "\r\n"); } } + if (isset($params['content'])) { $this->_content = $params['content']; } @@ -555,4 +565,26 @@ class Zend_Mail_Part implements RecursiveIterator, Zend_Mail_Part_Interface $this->countParts(); $this->_iterationPos = 1; } + + /** + * Ensure headers do not contain invalid characters + * + * @param array $headers + * @param bool $assertNames + */ + protected function _validateHeaders(array $headers, $assertNames = true) + { + foreach ($headers as $name => $value) { + if ($assertNames) { + Zend_Mail_Header_HeaderName::assertValid($name); + } + + if (is_array($value)) { + $this->_validateHeaders($value, false); + continue; + } + + Zend_Mail_Header_HeaderValue::assertValid($value); + } + } } diff --git a/library/vendor/Zend/Mail/Part/File.php b/library/vendor/Zend/Mail/Part/File.php index 76b4a51b8..da81b7de5 100644 --- a/library/vendor/Zend/Mail/Part/File.php +++ b/library/vendor/Zend/Mail/Part/File.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ /** * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Part_File extends Zend_Mail_Part diff --git a/library/vendor/Zend/Mail/Part/Interface.php b/library/vendor/Zend/Mail/Part/Interface.php index f2f6d461e..0d9275db6 100644 --- a/library/vendor/Zend/Mail/Part/Interface.php +++ b/library/vendor/Zend/Mail/Part/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Mail/Protocol/Abstract.php b/library/vendor/Zend/Mail/Protocol/Abstract.php index f7784d7bb..57c59999b 100644 --- a/library/vendor/Zend/Mail/Protocol/Abstract.php +++ b/library/vendor/Zend/Mail/Protocol/Abstract.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -40,7 +40,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ * @todo Implement proxy settings diff --git a/library/vendor/Zend/Mail/Protocol/Exception.php b/library/vendor/Zend/Mail/Protocol/Exception.php index 17f223cda..c7f565dfa 100644 --- a/library/vendor/Zend/Mail/Protocol/Exception.php +++ b/library/vendor/Zend/Mail/Protocol/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Exception extends Zend_Mail_Exception diff --git a/library/vendor/Zend/Mail/Protocol/Imap.php b/library/vendor/Zend/Mail/Protocol/Imap.php index 55f5f6254..067e04f5e 100644 --- a/library/vendor/Zend/Mail/Protocol/Imap.php +++ b/library/vendor/Zend/Mail/Protocol/Imap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Imap diff --git a/library/vendor/Zend/Mail/Protocol/Pop3.php b/library/vendor/Zend/Mail/Protocol/Pop3.php index 5d6496f6c..d6c6e26fc 100644 --- a/library/vendor/Zend/Mail/Protocol/Pop3.php +++ b/library/vendor/Zend/Mail/Protocol/Pop3.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Pop3 diff --git a/library/vendor/Zend/Mail/Protocol/Smtp.php b/library/vendor/Zend/Mail/Protocol/Smtp.php index 3dcc8a611..403ae82bd 100644 --- a/library/vendor/Zend/Mail/Protocol/Smtp.php +++ b/library/vendor/Zend/Mail/Protocol/Smtp.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -40,7 +40,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Smtp extends Zend_Mail_Protocol_Abstract diff --git a/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php b/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php index 7bd276bca..2a5ca3de8 100644 --- a/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php +++ b/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Smtp_Auth_Crammd5 extends Zend_Mail_Protocol_Smtp diff --git a/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Login.php b/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Login.php index 3d68f0270..5295b6554 100644 --- a/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Login.php +++ b/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Login.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Smtp_Auth_Login extends Zend_Mail_Protocol_Smtp diff --git a/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Plain.php b/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Plain.php index 063244f86..abd788e1b 100644 --- a/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Plain.php +++ b/library/vendor/Zend/Mail/Protocol/Smtp/Auth/Plain.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Mail * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Protocol_Smtp_Auth_Plain extends Zend_Mail_Protocol_Smtp diff --git a/library/vendor/Zend/Mail/Storage.php b/library/vendor/Zend/Mail/Storage.php index 44e29366a..b0eed1213 100644 --- a/library/vendor/Zend/Mail/Storage.php +++ b/library/vendor/Zend/Mail/Storage.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Mail - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage @@ -31,6 +31,7 @@ class Zend_Mail_Storage // system flags and other flags const FLAG_PASSED = 'Passed'; const FLAG_SEEN = '\Seen'; + const FLAG_UNSEEN = '\Unseen'; const FLAG_ANSWERED = '\Answered'; const FLAG_FLAGGED = '\Flagged'; const FLAG_DELETED = '\Deleted'; diff --git a/library/vendor/Zend/Mail/Storage/Abstract.php b/library/vendor/Zend/Mail/Storage/Abstract.php index 228da9965..d522789f6 100644 --- a/library/vendor/Zend/Mail/Storage/Abstract.php +++ b/library/vendor/Zend/Mail/Storage/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Mail_Storage_Abstract implements Countable, ArrayAccess, SeekableIterator diff --git a/library/vendor/Zend/Mail/Storage/Exception.php b/library/vendor/Zend/Mail/Storage/Exception.php index 39f201e7e..a9c902150 100644 --- a/library/vendor/Zend/Mail/Storage/Exception.php +++ b/library/vendor/Zend/Mail/Storage/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Exception extends Zend_Mail_Exception diff --git a/library/vendor/Zend/Mail/Storage/Folder.php b/library/vendor/Zend/Mail/Storage/Folder.php index 26ca89923..19d026904 100644 --- a/library/vendor/Zend/Mail/Storage/Folder.php +++ b/library/vendor/Zend/Mail/Storage/Folder.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Folder implements RecursiveIterator diff --git a/library/vendor/Zend/Mail/Storage/Folder/Interface.php b/library/vendor/Zend/Mail/Storage/Folder/Interface.php index cce711e86..dc092051c 100644 --- a/library/vendor/Zend/Mail/Storage/Folder/Interface.php +++ b/library/vendor/Zend/Mail/Storage/Folder/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Mail_Storage_Folder_Interface diff --git a/library/vendor/Zend/Mail/Storage/Folder/Maildir.php b/library/vendor/Zend/Mail/Storage/Folder/Maildir.php index 8f63f87c4..9c9838e58 100644 --- a/library/vendor/Zend/Mail/Storage/Folder/Maildir.php +++ b/library/vendor/Zend/Mail/Storage/Folder/Maildir.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Folder_Maildir extends Zend_Mail_Storage_Maildir implements Zend_Mail_Storage_Folder_Interface diff --git a/library/vendor/Zend/Mail/Storage/Folder/Mbox.php b/library/vendor/Zend/Mail/Storage/Folder/Mbox.php index dd91595ba..670a6ff04 100644 --- a/library/vendor/Zend/Mail/Storage/Folder/Mbox.php +++ b/library/vendor/Zend/Mail/Storage/Folder/Mbox.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Folder_Mbox extends Zend_Mail_Storage_Mbox implements Zend_Mail_Storage_Folder_Interface diff --git a/library/vendor/Zend/Mail/Storage/Imap.php b/library/vendor/Zend/Mail/Storage/Imap.php index e1864461c..2678025d5 100644 --- a/library/vendor/Zend/Mail/Storage/Imap.php +++ b/library/vendor/Zend/Mail/Storage/Imap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -53,7 +53,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract @@ -81,6 +81,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract protected static $_knownFlags = array('\Passed' => Zend_Mail_Storage::FLAG_PASSED, '\Answered' => Zend_Mail_Storage::FLAG_ANSWERED, '\Seen' => Zend_Mail_Storage::FLAG_SEEN, + '\Unseen' => Zend_Mail_Storage::FLAG_UNSEEN, '\Deleted' => Zend_Mail_Storage::FLAG_DELETED, '\Draft' => Zend_Mail_Storage::FLAG_DRAFT, '\Flagged' => Zend_Mail_Storage::FLAG_FLAGGED); @@ -92,6 +93,7 @@ class Zend_Mail_Storage_Imap extends Zend_Mail_Storage_Abstract protected static $_searchFlags = array('\Recent' => 'RECENT', '\Answered' => 'ANSWERED', '\Seen' => 'SEEN', + '\Unseen' => 'UNSEEN', '\Deleted' => 'DELETED', '\Draft' => 'DRAFT', '\Flagged' => 'FLAGGED'); diff --git a/library/vendor/Zend/Mail/Storage/Maildir.php b/library/vendor/Zend/Mail/Storage/Maildir.php index 47c791c7c..78c983b14 100644 --- a/library/vendor/Zend/Mail/Storage/Maildir.php +++ b/library/vendor/Zend/Mail/Storage/Maildir.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Maildir extends Zend_Mail_Storage_Abstract diff --git a/library/vendor/Zend/Mail/Storage/Mbox.php b/library/vendor/Zend/Mail/Storage/Mbox.php index 4778f1fec..840ca94ae 100644 --- a/library/vendor/Zend/Mail/Storage/Mbox.php +++ b/library/vendor/Zend/Mail/Storage/Mbox.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -39,7 +39,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Mbox extends Zend_Mail_Storage_Abstract diff --git a/library/vendor/Zend/Mail/Storage/Pop3.php b/library/vendor/Zend/Mail/Storage/Pop3.php index aa8f7dd70..5da697403 100644 --- a/library/vendor/Zend/Mail/Storage/Pop3.php +++ b/library/vendor/Zend/Mail/Storage/Pop3.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Pop3 extends Zend_Mail_Storage_Abstract diff --git a/library/vendor/Zend/Mail/Storage/Writable/Interface.php b/library/vendor/Zend/Mail/Storage/Writable/Interface.php index 24b49f47a..aad8e5e03 100644 --- a/library/vendor/Zend/Mail/Storage/Writable/Interface.php +++ b/library/vendor/Zend/Mail/Storage/Writable/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Mail/Storage/Writable/Maildir.php b/library/vendor/Zend/Mail/Storage/Writable/Maildir.php index 35c559cd5..e4f468e5f 100644 --- a/library/vendor/Zend/Mail/Storage/Writable/Maildir.php +++ b/library/vendor/Zend/Mail/Storage/Writable/Maildir.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Mail * @subpackage Storage - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Storage_Writable_Maildir extends Zend_Mail_Storage_Folder_Maildir diff --git a/library/vendor/Zend/Mail/Transport/Abstract.php b/library/vendor/Zend/Mail/Transport/Abstract.php index 44ddc1f40..3656060c7 100644 --- a/library/vendor/Zend/Mail/Transport/Abstract.php +++ b/library/vendor/Zend/Mail/Transport/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Mail_Transport_Abstract diff --git a/library/vendor/Zend/Mail/Transport/Exception.php b/library/vendor/Zend/Mail/Transport/Exception.php index 077e120c9..655a07eb8 100644 --- a/library/vendor/Zend/Mail/Transport/Exception.php +++ b/library/vendor/Zend/Mail/Transport/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Transport_Exception extends Zend_Mail_Exception diff --git a/library/vendor/Zend/Mail/Transport/File.php b/library/vendor/Zend/Mail/Transport/File.php index 666562fec..3584a8988 100644 --- a/library/vendor/Zend/Mail/Transport/File.php +++ b/library/vendor/Zend/Mail/Transport/File.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Transport_File extends Zend_Mail_Transport_Abstract diff --git a/library/vendor/Zend/Mail/Transport/Sendmail.php b/library/vendor/Zend/Mail/Transport/Sendmail.php index 6de19d540..30d601160 100644 --- a/library/vendor/Zend/Mail/Transport/Sendmail.php +++ b/library/vendor/Zend/Mail/Transport/Sendmail.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Transport_Sendmail extends Zend_Mail_Transport_Abstract diff --git a/library/vendor/Zend/Mail/Transport/Smtp.php b/library/vendor/Zend/Mail/Transport/Smtp.php index 6b856c629..b9c0ac941 100644 --- a/library/vendor/Zend/Mail/Transport/Smtp.php +++ b/library/vendor/Zend/Mail/Transport/Smtp.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -42,7 +42,7 @@ * @category Zend * @package Zend_Mail * @subpackage Transport - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mail_Transport_Smtp extends Zend_Mail_Transport_Abstract diff --git a/library/vendor/Zend/Markup.php b/library/vendor/Zend/Markup.php index 671ca1d92..ab60dcbb7 100644 --- a/library/vendor/Zend/Markup.php +++ b/library/vendor/Zend/Markup.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Markup - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Markup - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup diff --git a/library/vendor/Zend/Markup/Exception.php b/library/vendor/Zend/Markup/Exception.php index 45ce1bb7d..4a685a34a 100644 --- a/library/vendor/Zend/Markup/Exception.php +++ b/library/vendor/Zend/Markup/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Markup - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @uses Zend_Exception * @package Zend_Markup - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Markup/Parser/Bbcode.php b/library/vendor/Zend/Markup/Parser/Bbcode.php index 43f15b62f..975898f5d 100644 --- a/library/vendor/Zend/Markup/Parser/Bbcode.php +++ b/library/vendor/Zend/Markup/Parser/Bbcode.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Parser - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Markup * @subpackage Parser - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Parser_Bbcode implements Zend_Markup_Parser_ParserInterface diff --git a/library/vendor/Zend/Markup/Parser/Exception.php b/library/vendor/Zend/Markup/Parser/Exception.php index d6d103a2e..d1ecfad7a 100644 --- a/library/vendor/Zend/Markup/Parser/Exception.php +++ b/library/vendor/Zend/Markup/Parser/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Parser - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @uses Zend_Markup_Exception * @package Zend_Markup * @subpackage Parser - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Parser_Exception extends Zend_Markup_Exception diff --git a/library/vendor/Zend/Markup/Parser/ParserInterface.php b/library/vendor/Zend/Markup/Parser/ParserInterface.php index 0e67cafe5..9eb626a83 100644 --- a/library/vendor/Zend/Markup/Parser/ParserInterface.php +++ b/library/vendor/Zend/Markup/Parser/ParserInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Parser - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Markup * @subpackage Parser - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Markup_Parser_ParserInterface diff --git a/library/vendor/Zend/Markup/Renderer/Exception.php b/library/vendor/Zend/Markup/Renderer/Exception.php index 981d18708..f97a0f09b 100644 --- a/library/vendor/Zend/Markup/Renderer/Exception.php +++ b/library/vendor/Zend/Markup/Renderer/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @uses Zend_Markup_Exception * @package Zend_Markup * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Renderer_Exception extends Zend_Markup_Exception diff --git a/library/vendor/Zend/Markup/Renderer/Html.php b/library/vendor/Zend/Markup/Renderer/Html.php index 1a5aaf5bd..9a5560345 100644 --- a/library/vendor/Zend/Markup/Renderer/Html.php +++ b/library/vendor/Zend/Markup/Renderer/Html.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -39,7 +39,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Renderer_Html extends Zend_Markup_Renderer_RendererAbstract diff --git a/library/vendor/Zend/Markup/Renderer/Html/Code.php b/library/vendor/Zend/Markup/Renderer/Html/Code.php index 3a7a73ed7..86958742a 100644 --- a/library/vendor/Zend/Markup/Renderer/Html/Code.php +++ b/library/vendor/Zend/Markup/Renderer/Html/Code.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Renderer_Html_Code extends Zend_Markup_Renderer_Html_HtmlAbstract diff --git a/library/vendor/Zend/Markup/Renderer/Html/HtmlAbstract.php b/library/vendor/Zend/Markup/Renderer/Html/HtmlAbstract.php index 6796e8679..d2506af3a 100644 --- a/library/vendor/Zend/Markup/Renderer/Html/HtmlAbstract.php +++ b/library/vendor/Zend/Markup/Renderer/Html/HtmlAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Markup_Renderer_Html_HtmlAbstract implements Zend_Markup_Renderer_TokenConverterInterface diff --git a/library/vendor/Zend/Markup/Renderer/Html/Img.php b/library/vendor/Zend/Markup/Renderer/Html/Img.php index 47f6d5e5c..109957125 100644 --- a/library/vendor/Zend/Markup/Renderer/Html/Img.php +++ b/library/vendor/Zend/Markup/Renderer/Html/Img.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Renderer_Html_Img extends Zend_Markup_Renderer_Html_HtmlAbstract diff --git a/library/vendor/Zend/Markup/Renderer/Html/List.php b/library/vendor/Zend/Markup/Renderer/Html/List.php index b896d4800..3726060be 100644 --- a/library/vendor/Zend/Markup/Renderer/Html/List.php +++ b/library/vendor/Zend/Markup/Renderer/Html/List.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Renderer_Html_List extends Zend_Markup_Renderer_Html_HtmlAbstract diff --git a/library/vendor/Zend/Markup/Renderer/Html/Url.php b/library/vendor/Zend/Markup/Renderer/Html/Url.php index e19352078..f58dfbd1c 100644 --- a/library/vendor/Zend/Markup/Renderer/Html/Url.php +++ b/library/vendor/Zend/Markup/Renderer/Html/Url.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -33,7 +33,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer_Html - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Renderer_Html_Url extends Zend_Markup_Renderer_Html_HtmlAbstract diff --git a/library/vendor/Zend/Markup/Renderer/RendererAbstract.php b/library/vendor/Zend/Markup/Renderer/RendererAbstract.php index f4b3f42d8..55856122c 100644 --- a/library/vendor/Zend/Markup/Renderer/RendererAbstract.php +++ b/library/vendor/Zend/Markup/Renderer/RendererAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Markup_Renderer_RendererAbstract diff --git a/library/vendor/Zend/Markup/Renderer/TokenConverterInterface.php b/library/vendor/Zend/Markup/Renderer/TokenConverterInterface.php index f899c97a2..253c0c8a3 100644 --- a/library/vendor/Zend/Markup/Renderer/TokenConverterInterface.php +++ b/library/vendor/Zend/Markup/Renderer/TokenConverterInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Markup * @subpackage Renderer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Markup_Renderer_TokenConverterInterface diff --git a/library/vendor/Zend/Markup/Token.php b/library/vendor/Zend/Markup/Token.php index 859d2df20..21289c1bd 100644 --- a/library/vendor/Zend/Markup/Token.php +++ b/library/vendor/Zend/Markup/Token.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Markup * @subpackage Parser - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Markup - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Token diff --git a/library/vendor/Zend/Markup/TokenList.php b/library/vendor/Zend/Markup/TokenList.php index aa9bf6515..97679b824 100644 --- a/library/vendor/Zend/Markup/TokenList.php +++ b/library/vendor/Zend/Markup/TokenList.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Markup - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Markup - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_TokenList implements RecursiveIterator diff --git a/library/vendor/Zend/Measure/Abstract.php b/library/vendor/Zend/Measure/Abstract.php index 1664fa0c2..7f48ef503 100644 --- a/library/vendor/Zend/Measure/Abstract.php +++ b/library/vendor/Zend/Measure/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -37,7 +37,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Abstract - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Acceleration.php b/library/vendor/Zend/Measure/Acceleration.php index ae0969feb..ec36eaba4 100644 --- a/library/vendor/Zend/Measure/Acceleration.php +++ b/library/vendor/Zend/Measure/Acceleration.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Acceleration - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Acceleration extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Angle.php b/library/vendor/Zend/Measure/Angle.php index 712b9645a..882c5ea19 100644 --- a/library/vendor/Zend/Measure/Angle.php +++ b/library/vendor/Zend/Measure/Angle.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Angle - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Angle extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Area.php b/library/vendor/Zend/Measure/Area.php index 927733521..688dfbde5 100644 --- a/library/vendor/Zend/Measure/Area.php +++ b/library/vendor/Zend/Measure/Area.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Area - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Area extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Binary.php b/library/vendor/Zend/Measure/Binary.php index c1147aaeb..61148d3e3 100644 --- a/library/vendor/Zend/Measure/Binary.php +++ b/library/vendor/Zend/Measure/Binary.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Binary - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Binary extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Capacitance.php b/library/vendor/Zend/Measure/Capacitance.php index 75064f2c0..d10e9bae1 100644 --- a/library/vendor/Zend/Measure/Capacitance.php +++ b/library/vendor/Zend/Measure/Capacitance.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Capacitance - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Capacitance extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Cooking/Volume.php b/library/vendor/Zend/Measure/Cooking/Volume.php index fbe59e6ad..20bd9fad0 100644 --- a/library/vendor/Zend/Measure/Cooking/Volume.php +++ b/library/vendor/Zend/Measure/Cooking/Volume.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Cooking_Volume - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Cooking_Volume extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Cooking/Weight.php b/library/vendor/Zend/Measure/Cooking/Weight.php index 2c4fd3f6a..213d81440 100644 --- a/library/vendor/Zend/Measure/Cooking/Weight.php +++ b/library/vendor/Zend/Measure/Cooking/Weight.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Cooking_Weight - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Cooking_Weight extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Current.php b/library/vendor/Zend/Measure/Current.php index 8ae37f258..5caa505fa 100644 --- a/library/vendor/Zend/Measure/Current.php +++ b/library/vendor/Zend/Measure/Current.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Current - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Current extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Density.php b/library/vendor/Zend/Measure/Density.php index 98d3e82c3..348691680 100644 --- a/library/vendor/Zend/Measure/Density.php +++ b/library/vendor/Zend/Measure/Density.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Density - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Density extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Energy.php b/library/vendor/Zend/Measure/Energy.php index 987c3b1ae..59925835b 100644 --- a/library/vendor/Zend/Measure/Energy.php +++ b/library/vendor/Zend/Measure/Energy.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Energy - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Energy extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Exception.php b/library/vendor/Zend/Measure/Exception.php index 00eb5bdc2..eaac4e544 100644 --- a/library/vendor/Zend/Measure/Exception.php +++ b/library/vendor/Zend/Measure/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Measure/Flow/Mass.php b/library/vendor/Zend/Measure/Flow/Mass.php index 087caa0e4..d69001965 100644 --- a/library/vendor/Zend/Measure/Flow/Mass.php +++ b/library/vendor/Zend/Measure/Flow/Mass.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Flow_Mass - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Flow_Mass extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Flow/Mole.php b/library/vendor/Zend/Measure/Flow/Mole.php index 5c0ffc737..a315d6d17 100644 --- a/library/vendor/Zend/Measure/Flow/Mole.php +++ b/library/vendor/Zend/Measure/Flow/Mole.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Flow_Mole - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Flow_Mole extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Flow/Volume.php b/library/vendor/Zend/Measure/Flow/Volume.php index 01420d287..2d7a6ab88 100644 --- a/library/vendor/Zend/Measure/Flow/Volume.php +++ b/library/vendor/Zend/Measure/Flow/Volume.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Flow_Volume - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Flow_Volume extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Force.php b/library/vendor/Zend/Measure/Force.php index 18dc3b0ac..1247cbd3c 100644 --- a/library/vendor/Zend/Measure/Force.php +++ b/library/vendor/Zend/Measure/Force.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Force - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Force extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Frequency.php b/library/vendor/Zend/Measure/Frequency.php index a5630364f..57343f41d 100644 --- a/library/vendor/Zend/Measure/Frequency.php +++ b/library/vendor/Zend/Measure/Frequency.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Frequency - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Frequency extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Illumination.php b/library/vendor/Zend/Measure/Illumination.php index b87ac9a0c..cb5192d9d 100644 --- a/library/vendor/Zend/Measure/Illumination.php +++ b/library/vendor/Zend/Measure/Illumination.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Illumination - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Illumination extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Length.php b/library/vendor/Zend/Measure/Length.php index c4434a4e7..f13fb9a46 100644 --- a/library/vendor/Zend/Measure/Length.php +++ b/library/vendor/Zend/Measure/Length.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Length - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Length extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Lightness.php b/library/vendor/Zend/Measure/Lightness.php index 1f9ddf065..ee9cb8e6f 100644 --- a/library/vendor/Zend/Measure/Lightness.php +++ b/library/vendor/Zend/Measure/Lightness.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Lightness - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Lightness extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Number.php b/library/vendor/Zend/Measure/Number.php index 5431eb50c..33ce660c8 100644 --- a/library/vendor/Zend/Measure/Number.php +++ b/library/vendor/Zend/Measure/Number.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Number - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Number extends Zend_Measure_Abstract @@ -406,6 +406,12 @@ class Zend_Measure_Number extends Zend_Measure_Abstract public function convertTo($type, $round = 0, $locale = null) { $this->setType($type); + + // Roman numerals do not need a formatting + if ($this->getType() === self::ROMAN) { + return $this->_value; + } + return $this->toString($round, $locale); } } diff --git a/library/vendor/Zend/Measure/Power.php b/library/vendor/Zend/Measure/Power.php index 9009a3533..d619162eb 100644 --- a/library/vendor/Zend/Measure/Power.php +++ b/library/vendor/Zend/Measure/Power.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Power - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Power extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Pressure.php b/library/vendor/Zend/Measure/Pressure.php index 44399f500..3a6c5de67 100644 --- a/library/vendor/Zend/Measure/Pressure.php +++ b/library/vendor/Zend/Measure/Pressure.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Pressure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Pressure extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Speed.php b/library/vendor/Zend/Measure/Speed.php index ab1457656..1e67be6ab 100644 --- a/library/vendor/Zend/Measure/Speed.php +++ b/library/vendor/Zend/Measure/Speed.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Speed - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Speed extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Temperature.php b/library/vendor/Zend/Measure/Temperature.php index f1062d7da..06a355015 100644 --- a/library/vendor/Zend/Measure/Temperature.php +++ b/library/vendor/Zend/Measure/Temperature.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Temperature - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Temperature extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Time.php b/library/vendor/Zend/Measure/Time.php index 05dad3f05..a9aab219b 100644 --- a/library/vendor/Zend/Measure/Time.php +++ b/library/vendor/Zend/Measure/Time.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Time - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Time extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Torque.php b/library/vendor/Zend/Measure/Torque.php index aa5870cc1..be2ef7596 100644 --- a/library/vendor/Zend/Measure/Torque.php +++ b/library/vendor/Zend/Measure/Torque.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Torque - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Torque extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Viscosity/Dynamic.php b/library/vendor/Zend/Measure/Viscosity/Dynamic.php index 6733464c6..fb28fcd7c 100644 --- a/library/vendor/Zend/Measure/Viscosity/Dynamic.php +++ b/library/vendor/Zend/Measure/Viscosity/Dynamic.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Viscosity_Dynamic - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Viscosity_Dynamic extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Viscosity/Kinematic.php b/library/vendor/Zend/Measure/Viscosity/Kinematic.php index b89da976e..b76cce146 100644 --- a/library/vendor/Zend/Measure/Viscosity/Kinematic.php +++ b/library/vendor/Zend/Measure/Viscosity/Kinematic.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Viscosity_Kinematic - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Viscosity_Kinematic extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Volume.php b/library/vendor/Zend/Measure/Volume.php index fbcfc8e34..12a5c3a32 100644 --- a/library/vendor/Zend/Measure/Volume.php +++ b/library/vendor/Zend/Measure/Volume.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Volume - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Volume extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Measure/Weight.php b/library/vendor/Zend/Measure/Weight.php index ca97e9555..bba0ee759 100644 --- a/library/vendor/Zend/Measure/Weight.php +++ b/library/vendor/Zend/Measure/Weight.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Measure - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Measure * @subpackage Zend_Measure_Weigth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Measure_Weight extends Zend_Measure_Abstract diff --git a/library/vendor/Zend/Memory.php b/library/vendor/Zend/Memory.php index 31724e72c..c98f4b0d1 100644 --- a/library/vendor/Zend/Memory.php +++ b/library/vendor/Zend/Memory.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ /** * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Memory diff --git a/library/vendor/Zend/Memory/AccessController.php b/library/vendor/Zend/Memory/AccessController.php index c1d67efac..8ba1a44d0 100644 --- a/library/vendor/Zend/Memory/AccessController.php +++ b/library/vendor/Zend/Memory/AccessController.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -37,7 +37,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Memory_AccessController implements Zend_Memory_Container_Interface diff --git a/library/vendor/Zend/Memory/Container.php b/library/vendor/Zend/Memory/Container.php index 90980b5f3..56d06cff5 100644 --- a/library/vendor/Zend/Memory/Container.php +++ b/library/vendor/Zend/Memory/Container.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Memory_Container implements Zend_Memory_Container_Interface diff --git a/library/vendor/Zend/Memory/Container/Interface.php b/library/vendor/Zend/Memory/Container/Interface.php index 472536e8a..2c61d35c1 100644 --- a/library/vendor/Zend/Memory/Container/Interface.php +++ b/library/vendor/Zend/Memory/Container/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Memory_Container_Interface diff --git a/library/vendor/Zend/Memory/Container/Locked.php b/library/vendor/Zend/Memory/Container/Locked.php index 297b819fe..07a9fd15c 100644 --- a/library/vendor/Zend/Memory/Container/Locked.php +++ b/library/vendor/Zend/Memory/Container/Locked.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Memory_Container_Locked extends Zend_Memory_Container diff --git a/library/vendor/Zend/Memory/Container/Movable.php b/library/vendor/Zend/Memory/Container/Movable.php index 5a3c9f961..e8c7bf34d 100644 --- a/library/vendor/Zend/Memory/Container/Movable.php +++ b/library/vendor/Zend/Memory/Container/Movable.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Memory_Container_Movable extends Zend_Memory_Container { diff --git a/library/vendor/Zend/Memory/Exception.php b/library/vendor/Zend/Memory/Exception.php index 78aa640c5..f8d39cf16 100644 --- a/library/vendor/Zend/Memory/Exception.php +++ b/library/vendor/Zend/Memory/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Memory_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Memory/Manager.php b/library/vendor/Zend/Memory/Manager.php index a203812c6..2e417194c 100644 --- a/library/vendor/Zend/Memory/Manager.php +++ b/library/vendor/Zend/Memory/Manager.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -35,7 +35,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Memory_Manager diff --git a/library/vendor/Zend/Memory/Value.php b/library/vendor/Zend/Memory/Value.php index 3f89cd3f8..99950fb5b 100644 --- a/library/vendor/Zend/Memory/Value.php +++ b/library/vendor/Zend/Memory/Value.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Memory - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @todo also implement Countable for PHP 5.1 but not yet to stay 5.0 compatible */ diff --git a/library/vendor/Zend/Mime.php b/library/vendor/Zend/Mime.php index 2229377f7..5530b6cb5 100644 --- a/library/vendor/Zend/Mime.php +++ b/library/vendor/Zend/Mime.php @@ -14,91 +14,389 @@ * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ - /** * Support class for MultiPart Mime Messages * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mime { - const TYPE_OCTETSTREAM = 'application/octet-stream'; - const TYPE_TEXT = 'text/plain'; - const TYPE_HTML = 'text/html'; - const ENCODING_7BIT = '7bit'; - const ENCODING_8BIT = '8bit'; + const TYPE_OCTETSTREAM = 'application/octet-stream'; + const TYPE_TEXT = 'text/plain'; + const TYPE_HTML = 'text/html'; + const ENCODING_7BIT = '7bit'; + const ENCODING_8BIT = '8bit'; const ENCODING_QUOTEDPRINTABLE = 'quoted-printable'; - const ENCODING_BASE64 = 'base64'; - const DISPOSITION_ATTACHMENT = 'attachment'; - const DISPOSITION_INLINE = 'inline'; - const LINELENGTH = 72; - const LINEEND = "\n"; - const MULTIPART_ALTERNATIVE = 'multipart/alternative'; - const MULTIPART_MIXED = 'multipart/mixed'; - const MULTIPART_RELATED = 'multipart/related'; + const ENCODING_BASE64 = 'base64'; + const DISPOSITION_ATTACHMENT = 'attachment'; + const DISPOSITION_INLINE = 'inline'; + const LINELENGTH = 72; + const LINEEND = "\n"; + const MULTIPART_ALTERNATIVE = 'multipart/alternative'; + const MULTIPART_MIXED = 'multipart/mixed'; + const MULTIPART_RELATED = 'multipart/related'; + /** + * Boundary + * + * @var null|string + */ protected $_boundary; + + /** + * @var int + */ protected static $makeUnique = 0; - // lookup-Tables for QuotedPrintable + /** + * Lookup-Tables for QuotedPrintable + * + * @var array + */ public static $qpKeys = array( - "\x00","\x01","\x02","\x03","\x04","\x05","\x06","\x07", - "\x08","\x09","\x0A","\x0B","\x0C","\x0D","\x0E","\x0F", - "\x10","\x11","\x12","\x13","\x14","\x15","\x16","\x17", - "\x18","\x19","\x1A","\x1B","\x1C","\x1D","\x1E","\x1F", - "\x7F","\x80","\x81","\x82","\x83","\x84","\x85","\x86", - "\x87","\x88","\x89","\x8A","\x8B","\x8C","\x8D","\x8E", - "\x8F","\x90","\x91","\x92","\x93","\x94","\x95","\x96", - "\x97","\x98","\x99","\x9A","\x9B","\x9C","\x9D","\x9E", - "\x9F","\xA0","\xA1","\xA2","\xA3","\xA4","\xA5","\xA6", - "\xA7","\xA8","\xA9","\xAA","\xAB","\xAC","\xAD","\xAE", - "\xAF","\xB0","\xB1","\xB2","\xB3","\xB4","\xB5","\xB6", - "\xB7","\xB8","\xB9","\xBA","\xBB","\xBC","\xBD","\xBE", - "\xBF","\xC0","\xC1","\xC2","\xC3","\xC4","\xC5","\xC6", - "\xC7","\xC8","\xC9","\xCA","\xCB","\xCC","\xCD","\xCE", - "\xCF","\xD0","\xD1","\xD2","\xD3","\xD4","\xD5","\xD6", - "\xD7","\xD8","\xD9","\xDA","\xDB","\xDC","\xDD","\xDE", - "\xDF","\xE0","\xE1","\xE2","\xE3","\xE4","\xE5","\xE6", - "\xE7","\xE8","\xE9","\xEA","\xEB","\xEC","\xED","\xEE", - "\xEF","\xF0","\xF1","\xF2","\xF3","\xF4","\xF5","\xF6", - "\xF7","\xF8","\xF9","\xFA","\xFB","\xFC","\xFD","\xFE", + "\x00", + "\x01", + "\x02", + "\x03", + "\x04", + "\x05", + "\x06", + "\x07", + "\x08", + "\x09", + "\x0A", + "\x0B", + "\x0C", + "\x0D", + "\x0E", + "\x0F", + "\x10", + "\x11", + "\x12", + "\x13", + "\x14", + "\x15", + "\x16", + "\x17", + "\x18", + "\x19", + "\x1A", + "\x1B", + "\x1C", + "\x1D", + "\x1E", + "\x1F", + "\x7F", + "\x80", + "\x81", + "\x82", + "\x83", + "\x84", + "\x85", + "\x86", + "\x87", + "\x88", + "\x89", + "\x8A", + "\x8B", + "\x8C", + "\x8D", + "\x8E", + "\x8F", + "\x90", + "\x91", + "\x92", + "\x93", + "\x94", + "\x95", + "\x96", + "\x97", + "\x98", + "\x99", + "\x9A", + "\x9B", + "\x9C", + "\x9D", + "\x9E", + "\x9F", + "\xA0", + "\xA1", + "\xA2", + "\xA3", + "\xA4", + "\xA5", + "\xA6", + "\xA7", + "\xA8", + "\xA9", + "\xAA", + "\xAB", + "\xAC", + "\xAD", + "\xAE", + "\xAF", + "\xB0", + "\xB1", + "\xB2", + "\xB3", + "\xB4", + "\xB5", + "\xB6", + "\xB7", + "\xB8", + "\xB9", + "\xBA", + "\xBB", + "\xBC", + "\xBD", + "\xBE", + "\xBF", + "\xC0", + "\xC1", + "\xC2", + "\xC3", + "\xC4", + "\xC5", + "\xC6", + "\xC7", + "\xC8", + "\xC9", + "\xCA", + "\xCB", + "\xCC", + "\xCD", + "\xCE", + "\xCF", + "\xD0", + "\xD1", + "\xD2", + "\xD3", + "\xD4", + "\xD5", + "\xD6", + "\xD7", + "\xD8", + "\xD9", + "\xDA", + "\xDB", + "\xDC", + "\xDD", + "\xDE", + "\xDF", + "\xE0", + "\xE1", + "\xE2", + "\xE3", + "\xE4", + "\xE5", + "\xE6", + "\xE7", + "\xE8", + "\xE9", + "\xEA", + "\xEB", + "\xEC", + "\xED", + "\xEE", + "\xEF", + "\xF0", + "\xF1", + "\xF2", + "\xF3", + "\xF4", + "\xF5", + "\xF6", + "\xF7", + "\xF8", + "\xF9", + "\xFA", + "\xFB", + "\xFC", + "\xFD", + "\xFE", "\xFF" - ); + ); + /** + * @var array + */ public static $qpReplaceValues = array( - "=00","=01","=02","=03","=04","=05","=06","=07", - "=08","=09","=0A","=0B","=0C","=0D","=0E","=0F", - "=10","=11","=12","=13","=14","=15","=16","=17", - "=18","=19","=1A","=1B","=1C","=1D","=1E","=1F", - "=7F","=80","=81","=82","=83","=84","=85","=86", - "=87","=88","=89","=8A","=8B","=8C","=8D","=8E", - "=8F","=90","=91","=92","=93","=94","=95","=96", - "=97","=98","=99","=9A","=9B","=9C","=9D","=9E", - "=9F","=A0","=A1","=A2","=A3","=A4","=A5","=A6", - "=A7","=A8","=A9","=AA","=AB","=AC","=AD","=AE", - "=AF","=B0","=B1","=B2","=B3","=B4","=B5","=B6", - "=B7","=B8","=B9","=BA","=BB","=BC","=BD","=BE", - "=BF","=C0","=C1","=C2","=C3","=C4","=C5","=C6", - "=C7","=C8","=C9","=CA","=CB","=CC","=CD","=CE", - "=CF","=D0","=D1","=D2","=D3","=D4","=D5","=D6", - "=D7","=D8","=D9","=DA","=DB","=DC","=DD","=DE", - "=DF","=E0","=E1","=E2","=E3","=E4","=E5","=E6", - "=E7","=E8","=E9","=EA","=EB","=EC","=ED","=EE", - "=EF","=F0","=F1","=F2","=F3","=F4","=F5","=F6", - "=F7","=F8","=F9","=FA","=FB","=FC","=FD","=FE", + "=00", + "=01", + "=02", + "=03", + "=04", + "=05", + "=06", + "=07", + "=08", + "=09", + "=0A", + "=0B", + "=0C", + "=0D", + "=0E", + "=0F", + "=10", + "=11", + "=12", + "=13", + "=14", + "=15", + "=16", + "=17", + "=18", + "=19", + "=1A", + "=1B", + "=1C", + "=1D", + "=1E", + "=1F", + "=7F", + "=80", + "=81", + "=82", + "=83", + "=84", + "=85", + "=86", + "=87", + "=88", + "=89", + "=8A", + "=8B", + "=8C", + "=8D", + "=8E", + "=8F", + "=90", + "=91", + "=92", + "=93", + "=94", + "=95", + "=96", + "=97", + "=98", + "=99", + "=9A", + "=9B", + "=9C", + "=9D", + "=9E", + "=9F", + "=A0", + "=A1", + "=A2", + "=A3", + "=A4", + "=A5", + "=A6", + "=A7", + "=A8", + "=A9", + "=AA", + "=AB", + "=AC", + "=AD", + "=AE", + "=AF", + "=B0", + "=B1", + "=B2", + "=B3", + "=B4", + "=B5", + "=B6", + "=B7", + "=B8", + "=B9", + "=BA", + "=BB", + "=BC", + "=BD", + "=BE", + "=BF", + "=C0", + "=C1", + "=C2", + "=C3", + "=C4", + "=C5", + "=C6", + "=C7", + "=C8", + "=C9", + "=CA", + "=CB", + "=CC", + "=CD", + "=CE", + "=CF", + "=D0", + "=D1", + "=D2", + "=D3", + "=D4", + "=D5", + "=D6", + "=D7", + "=D8", + "=D9", + "=DA", + "=DB", + "=DC", + "=DD", + "=DE", + "=DF", + "=E0", + "=E1", + "=E2", + "=E3", + "=E4", + "=E5", + "=E6", + "=E7", + "=E8", + "=E9", + "=EA", + "=EB", + "=EC", + "=ED", + "=EE", + "=EF", + "=F0", + "=F1", + "=F2", + "=F3", + "=F4", + "=F5", + "=F6", + "=F7", + "=F8", + "=F9", + "=FA", + "=FB", + "=FC", + "=FD", + "=FE", "=FF" - ); + ); + /** + * @var string + */ public static $qpKeysString = - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"; + "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"; /** * Check if the given string is "printable" @@ -117,20 +415,22 @@ class Zend_Mime /** * Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines. * - * @param string $str - * @param int $lineLength Defaults to {@link LINELENGTH} - * @param int $lineEnd Defaults to {@link LINEEND} + * @param string $str + * @param int $lineLength Line length; defaults to {@link LINELENGTH} + * @param string $lineEnd Line end; defaults to {@link LINEEND} * @return string */ - public static function encodeQuotedPrintable($str, + public static function encodeQuotedPrintable( + $str, $lineLength = self::LINELENGTH, - $lineEnd = self::LINEEND) + $lineEnd = self::LINEEND + ) { $out = ''; $str = self::_encodeQuotedPrintable($str); // Split encoded text into separate lines - while(strlen($str) > 0) { + while (strlen($str) > 0) { $ptr = strlen($str); if ($ptr > $lineLength) { $ptr = $lineLength; @@ -154,6 +454,7 @@ class Zend_Mime $out = rtrim($out, $lineEnd); $out = rtrim($out, '='); + return $out; } @@ -168,6 +469,7 @@ class Zend_Mime $str = str_replace('=', '=3D', $str); $str = str_replace(self::$qpKeys, self::$qpReplaceValues, $str); $str = rtrim($str); + return $str; } @@ -177,57 +479,60 @@ class Zend_Mime * Mail headers depend on an extended quoted printable algorithm otherwise * a range of bugs can occur. * - * @param string $str - * @param string $charset - * @param int $lineLength Defaults to {@link LINELENGTH} - * @param int $lineEnd Defaults to {@link LINEEND} + * @param string $str + * @param string $charset + * @param int $lineLength Line length; defaults to {@link LINELENGTH} + * @param string $lineEnd Line end; defaults to {@link LINEEND} * @return string */ - public static function encodeQuotedPrintableHeader($str, $charset, - $lineLength = self::LINELENGTH, - $lineEnd = self::LINEEND) + public static function encodeQuotedPrintableHeader( + $str, $charset, $lineLength = self::LINELENGTH, $lineEnd = self::LINEEND + ) { // Reduce line-length by the length of the required delimiter, charsets and encoding - $prefix = sprintf('=?%s?Q?', $charset); - $lineLength = $lineLength-strlen($prefix)-3; + $prefix = sprintf('=?%s?Q?', $charset); + $lineLength = $lineLength - strlen($prefix) - 3; $str = self::_encodeQuotedPrintable($str); // Mail-Header required chars have to be encoded also: - $str = str_replace(array('?', ' ', '_', ','), array('=3F', '=20', '=5F', '=2C'), $str); + $str = str_replace( + array('?', ' ', '_', ','), array('=3F', '=20', '=5F', '=2C'), $str + ); // initialize first line, we need it anyways $lines = array(0 => ""); // Split encoded text into separate lines $tmp = ""; - while(strlen($str) > 0) { - $currentLine = max(count($lines)-1, 0); + while (strlen($str) > 0) { + $currentLine = max(count($lines) - 1, 0); $token = self::getNextQuotedPrintableToken($str); $str = substr($str, strlen($token)); $tmp .= $token; - if($token == '=20') { + if ($token == '=20') { // only if we have a single char token or space, we can append the // tempstring it to the current line or start a new line if necessary. - if(strlen($lines[$currentLine].$tmp) > $lineLength) { - $lines[$currentLine+1] = $tmp; + if (strlen($lines[$currentLine] . $tmp) > $lineLength) { + $lines[$currentLine + 1] = $tmp; } else { $lines[$currentLine] .= $tmp; } $tmp = ""; } // don't forget to append the rest to the last line - if(strlen($str) == 0) { + if (strlen($str) == 0) { $lines[$currentLine] .= $tmp; } } // assemble the lines together by pre- and appending delimiters, charset, encoding. - for($i = 0; $i < count($lines); $i++) { - $lines[$i] = " ".$prefix.$lines[$i]."?="; + for ($i = 0; $i < count($lines); $i++) { + $lines[$i] = " " . $prefix . $lines[$i] . "?="; } $str = trim(implode($lineEnd, $lines)); + return $str; } @@ -239,35 +544,38 @@ class Zend_Mime */ private static function getNextQuotedPrintableToken($str) { - if(substr($str, 0, 1) == "=") { + if (substr($str, 0, 1) == "=") { $token = substr($str, 0, 3); } else { $token = substr($str, 0, 1); } + return $token; } /** * Encode a given string in mail header compatible base64 encoding. * - * @param string $str - * @param string $charset - * @param int $lineLength Defaults to {@link LINELENGTH} - * @param int $lineEnd Defaults to {@link LINEEND} + * @param string $str + * @param string $charset + * @param int $lineLength Line length; defaults to {@link LINELENGTH} + * @param string $lineEnd Line end; defaults to {@link LINEEND} * @return string */ - public static function encodeBase64Header($str, - $charset, - $lineLength = self::LINELENGTH, - $lineEnd = self::LINEEND) + public static function encodeBase64Header( + $str, $charset, $lineLength = self::LINELENGTH, $lineEnd = self::LINEEND + ) { - $prefix = '=?' . $charset . '?B?'; - $suffix = '?='; + $prefix = '=?' . $charset . '?B?'; + $suffix = '?='; $remainingLength = $lineLength - strlen($prefix) - strlen($suffix); $encodedValue = self::encodeBase64($str, $remainingLength, $lineEnd); - $encodedValue = str_replace($lineEnd, $suffix . $lineEnd . ' ' . $prefix, $encodedValue); + $encodedValue = str_replace( + $lineEnd, $suffix . $lineEnd . ' ' . $prefix, $encodedValue + ); $encodedValue = $prefix . $encodedValue . $suffix; + return $encodedValue; } @@ -275,14 +583,14 @@ class Zend_Mime * Encode a given string in base64 encoding and break lines * according to the maximum linelength. * - * @param string $str - * @param int $lineLength Defaults to {@link LINELENGTH} - * @param int $lineEnd Defaults to {@link LINEEND} + * @param string $str + * @param int $lineLength Line length; defaults to {@link LINELENGTH} + * @param string $lineEnd Line end; defaults to {@link LINEEND} * @return string */ - public static function encodeBase64($str, - $lineLength = self::LINELENGTH, - $lineEnd = self::LINEEND) + public static function encodeBase64( + $str, $lineLength = self::LINELENGTH, $lineEnd = self::LINEEND + ) { return rtrim(chunk_split(base64_encode($str), $lineLength, $lineEnd)); } @@ -291,8 +599,6 @@ class Zend_Mime * Constructor * * @param null|string $boundary - * @access public - * @return void */ public function __construct($boundary = null) { @@ -309,7 +615,7 @@ class Zend_Mime * * @param string $str * @param string $encoding - * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} + * @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND} * @return string */ public static function encode($str, $encoding, $EOL = self::LINEEND) @@ -343,8 +649,7 @@ class Zend_Mime /** * Return a MIME boundary line * - * @param mixed $EOL Defaults to {@link LINEEND} - * @access public + * @param string $EOL Line end; defaults to {@link LINEEND} * @return string */ public function boundaryLine($EOL = self::LINEEND) @@ -355,7 +660,7 @@ class Zend_Mime /** * Return MIME ending * - * @access public + * @param string $EOL Line end; defaults to {@link LINEEND} * @return string */ public function mimeEnd($EOL = self::LINEEND) diff --git a/library/vendor/Zend/Mime/Decode.php b/library/vendor/Zend/Mime/Decode.php index 2c631e83f..a63f861e5 100644 --- a/library/vendor/Zend/Mime/Decode.php +++ b/library/vendor/Zend/Mime/Decode.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mime_Decode @@ -47,7 +47,7 @@ class Zend_Mime_Decode $body = str_replace("\r", '', $body); $start = 0; - $res = array(); + $res = array(); // find every mime part limiter and cut out the // string before it. // the part before the first boundary string is discarded: @@ -67,12 +67,13 @@ class Zend_Mime_Decode // no more parts, find end boundary $p = strpos($body, '--' . $boundary . '--', $start); - if ($p===false) { + if ($p === false) { throw new Zend_Exception('Not a valid Mime Message: End Missing'); } // the remaining part also needs to be parsed: - $res[] = substr($body, $start, $p-$start); + $res[] = substr($body, $start, $p - $start); + return $res; } @@ -82,11 +83,13 @@ class Zend_Mime_Decode * * @param string $message raw message content * @param string $boundary boundary as found in content-type - * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} + * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} * @return array|null parts as array('header' => array(name => value), 'body' => content), null if no parts found * @throws Zend_Exception */ - public static function splitMessageStruct($message, $boundary, $EOL = Zend_Mime::LINEEND) + public static function splitMessageStruct( + $message, $boundary, $EOL = Zend_Mime::LINEEND + ) { $parts = self::splitMime($message, $boundary); if (count($parts) <= 0) { @@ -95,9 +98,12 @@ class Zend_Mime_Decode $result = array(); foreach ($parts as $part) { self::splitMessage($part, $headers, $body, $EOL); - $result[] = array('header' => $headers, - 'body' => $body ); + $result[] = array( + 'header' => $headers, + 'body' => $body + ); } + return $result; } @@ -110,17 +116,28 @@ class Zend_Mime_Decode * @param string $message raw message with header and optional content * @param array $headers output param, array with headers as array(name => value) * @param string $body output param, content of message - * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} + * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} * @return null */ - public static function splitMessage($message, &$headers, &$body, $EOL = Zend_Mime::LINEEND) + public static function splitMessage( + $message, &$headers, &$body, $EOL = Zend_Mime::LINEEND + ) { // check for valid header at first line $firstline = strtok($message, "\n"); if (!preg_match('%^[^\s]+[^:]*:%', $firstline)) { $headers = array(); // TODO: we're ignoring \r for now - is this function fast enough and is it safe to asume noone needs \r? - $body = str_replace(array("\r", "\n"), array('', $EOL), $message); + $body = str_replace( + array( + "\r", + "\n" + ), array( + '', + $EOL + ), $message + ); + return; } @@ -128,20 +145,27 @@ class Zend_Mime_Decode // default is set new line if (strpos($message, $EOL . $EOL)) { list($headers, $body) = explode($EOL . $EOL, $message, 2); - // next is the standard new line - } else if ($EOL != "\r\n" && strpos($message, "\r\n\r\n")) { - list($headers, $body) = explode("\r\n\r\n", $message, 2); - // next is the other "standard" new line - } else if ($EOL != "\n" && strpos($message, "\n\n")) { - list($headers, $body) = explode("\n\n", $message, 2); - // at last resort find anything that looks like a new line + // next is the standard new line } else { - @list($headers, $body) = @preg_split("%([\r\n]+)\\1%U", $message, 2); + if ($EOL != "\r\n" && strpos($message, "\r\n\r\n")) { + list($headers, $body) = explode("\r\n\r\n", $message, 2); + // next is the other "standard" new line + } else { + if ($EOL != "\n" && strpos($message, "\n\n")) { + list($headers, $body) = explode("\n\n", $message, 2); + // at last resort find anything that looks like a new line + } else { + @list($headers, $body) = + @preg_split("%([\r\n]+)\\1%U", $message, 2); + } + } } - $headers = iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR); + $headers = iconv_mime_decode_headers( + $headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR + ); - if ($headers === false ) { + if ($headers === false) { // an error occurs during the decoding return; } @@ -161,7 +185,10 @@ class Zend_Mime_Decode $headers[$lower][] = $header; continue; } - $headers[$lower] = array($headers[$lower], $header); + $headers[$lower] = array( + $headers[$lower], + $header + ); } } @@ -180,20 +207,23 @@ class Zend_Mime_Decode /** * split a header field like content type in its different parts * - * @param string $type header field - * @param string $wantedPart the wanted part, else an array with all parts is returned - * @param string $firstName key name for the first part - * @return string|array wanted part or all parts as array($firstName => firstPart, partname => value) + * @param string $field + * @param string $wantedPart the wanted part, else an array with all parts is returned + * @param int|string $firstName key name for the first part * @throws Zend_Exception + * @return string|array wanted part or all parts as array($firstName => firstPart, partname => value) */ - public static function splitHeaderField($field, $wantedPart = null, $firstName = 0) + public static function splitHeaderField( + $field, $wantedPart = null, $firstName = 0 + ) { $wantedPart = strtolower($wantedPart); - $firstName = strtolower($firstName); + $firstName = strtolower($firstName); // special case - a bit optimized if ($firstName === $wantedPart) { $field = strtok($field, ';'); + return $field[0] == '"' ? substr($field, 1, -1) : $field; } @@ -210,8 +240,10 @@ class Zend_Mime_Decode if ($matches[2][$key][0] != '"') { return $matches[2][$key]; } + return substr($matches[2][$key], 1, -1); } + return null; } @@ -233,8 +265,8 @@ class Zend_Mime_Decode * * The charset of the returned string depends on your iconv settings. * - * @param string encoded string - * @return string decoded string + * @param string $string Encoded string + * @return string Decoded string */ public static function decodeQuotedPrintable($string) { diff --git a/library/vendor/Zend/Mime/Exception.php b/library/vendor/Zend/Mime/Exception.php index 3e032867f..a803058b4 100644 --- a/library/vendor/Zend/Mime/Exception.php +++ b/library/vendor/Zend/Mime/Exception.php @@ -14,23 +14,22 @@ * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ - /** * Zend_Exception */ - /** * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mime_Exception extends Zend_Exception -{} +{ +} diff --git a/library/vendor/Zend/Mime/Message.php b/library/vendor/Zend/Mime/Message.php index 1df1df3ea..608289041 100644 --- a/library/vendor/Zend/Mime/Message.php +++ b/library/vendor/Zend/Mime/Message.php @@ -14,12 +14,11 @@ * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ - /** * Zend_Mime */ @@ -28,17 +27,26 @@ * Zend_Mime_Part */ - /** * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mime_Message { - + /** + * The Zend_Mime_Parts of the message + * + * @var array + */ protected $_parts = array(); + + /** + * The Zend_Mime object for the message + * + * @var Zend_Mime|null + */ protected $_mime = null; /** @@ -132,7 +140,7 @@ class Zend_Mime_Message */ public function generateMessage($EOL = Zend_Mime::LINEEND) { - if (! $this->isMultiPart()) { + if (!$this->isMultiPart()) { $body = array_shift($this->_parts); $body = $body->getContent($EOL); } else { @@ -144,9 +152,9 @@ class Zend_Mime_Message foreach (array_keys($this->_parts) as $p) { $body .= $boundaryLine - . $this->getPartHeaders($p, $EOL) - . $EOL - . $this->getPartContent($p, $EOL); + . $this->getPartHeaders($p, $EOL) + . $EOL + . $this->getPartContent($p, $EOL); } $body .= $mime->mimeEnd($EOL); @@ -169,7 +177,8 @@ class Zend_Mime_Message /** * Get the headers of a given part as a string * - * @param int $partnum + * @param int $partnum + * @param string $EOL * @return string */ public function getPartHeaders($partnum, $EOL = Zend_Mime::LINEEND) @@ -180,7 +189,8 @@ class Zend_Mime_Message /** * Get the (encoded) content of a given part as a string * - * @param int $partnum + * @param int $partnum + * @param string $EOL * @return string */ public function getPartContent($partnum, $EOL = Zend_Mime::LINEEND) @@ -193,18 +203,19 @@ class Zend_Mime_Message * * Parts consist of the header and the body of each MIME part. * - * @param string $body - * @param string $boundary + * @param string $body + * @param string $boundary + * @throws Zend_Exception * @return array */ protected static function _disassembleMime($body, $boundary) { $start = 0; - $res = array(); + $res = array(); // find every mime part limiter and cut out the // string before it. // the part before the first boundary string is discarded: - $p = strpos($body, '--'.$boundary."\n", $start); + $p = strpos($body, '--' . $boundary . "\n", $start); if ($p === false) { // no parts found! return array(); @@ -213,19 +224,21 @@ class Zend_Mime_Message // position after first boundary line $start = $p + 3 + strlen($boundary); - while (($p = strpos($body, '--' . $boundary . "\n", $start)) !== false) { - $res[] = substr($body, $start, $p-$start); + while (($p = strpos($body, '--' . $boundary . "\n", $start)) + !== false) { + $res[] = substr($body, $start, $p - $start); $start = $p + 3 + strlen($boundary); } // no more parts, find end boundary $p = strpos($body, '--' . $boundary . '--', $start); - if ($p===false) { + if ($p === false) { throw new Zend_Exception('Not a valid Mime Message: End Missing'); } // the remaining part also needs to be parsed: - $res[] = substr($body, $start, $p-$start); + $res[] = substr($body, $start, $p - $start); + return $res; } @@ -233,12 +246,15 @@ class Zend_Mime_Message * Decodes a MIME encoded string and returns a Zend_Mime_Message object with * all the MIME parts set according to the given string * - * @param string $message - * @param string $boundary - * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} + * @param string $message + * @param string $boundary + * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} + * @throws Zend_Exception * @return Zend_Mime_Message */ - public static function createFromMessage($message, $boundary, $EOL = Zend_Mime::LINEEND) + public static function createFromMessage( + $message, $boundary, $EOL = Zend_Mime::LINEEND + ) { $parts = Zend_Mime_Decode::splitMessageStruct($message, $boundary, $EOL); @@ -250,7 +266,7 @@ class Zend_Mime_Message /** * @todo check for characterset and filename */ - switch(strtolower($key)) { + switch (strtolower($key)) { case 'content-type': $newPart->type = $value; break; @@ -258,7 +274,7 @@ class Zend_Mime_Message $newPart->encoding = $value; break; case 'content-id': - $newPart->id = trim($value,'<>'); + $newPart->id = trim($value, '<>'); break; case 'content-disposition': $newPart->disposition = $value; @@ -273,11 +289,14 @@ class Zend_Mime_Message $newPart->language = $value; break; default: - throw new Zend_Exception('Unknown header ignored for MimePart:' . $key); + throw new Zend_Exception( + 'Unknown header ignored for MimePart:' . $key + ); } } $res->addPart($newPart); } + return $res; } } diff --git a/library/vendor/Zend/Mime/Part.php b/library/vendor/Zend/Mime/Part.php index 3628a9825..852fb5661 100644 --- a/library/vendor/Zend/Mime/Part.php +++ b/library/vendor/Zend/Mime/Part.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,31 +28,100 @@ * * @category Zend * @package Zend_Mime - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Mime_Part { +class Zend_Mime_Part +{ + /** + * Type + * + * @var string + */ public $type = Zend_Mime::TYPE_OCTETSTREAM; - public $encoding = Zend_Mime::ENCODING_8BIT; - public $id; - public $disposition; - public $filename; - public $description; - public $charset; - public $boundary; - public $location; - public $language; - protected $_content; - protected $_isStream = false; + /** + * Encoding + * + * @var string + */ + public $encoding = Zend_Mime::ENCODING_8BIT; + + /** + * ID + * + * @var string + */ + public $id; + + /** + * Disposition + * + * @var string + */ + public $disposition; + + /** + * Filename + * + * @var string + */ + public $filename; + + /** + * Description + * + * @var string + */ + public $description; + + /** + * Character set + * + * @var string + */ + public $charset; + + /** + * Boundary + * + * @var string + */ + public $boundary; + + /** + * Location + * + * @var string + */ + public $location; + + /** + * Language + * + * @var string + */ + public $language; + + /** + * Content + * + * @var mixed + */ + protected $_content; + + /** + * @var bool + */ + protected $_isStream = false; /** * create a new Mime Part. * The (unencoded) content of the Part as passed * as a string or stream * - * @param mixed $content String or Stream containing the content + * @param mixed $content String or Stream containing the content */ public function __construct($content) { @@ -78,20 +147,22 @@ class Zend_Mime_Part { */ public function isStream() { - return $this->_isStream; + return $this->_isStream; } /** * if this was created with a stream, return a filtered stream for * reading the content. very useful for large file attachments. * - * @return stream + * @return mixed Stream * @throws Zend_Mime_Exception if not a stream or unable to append filter */ public function getEncodedStream() { if (!$this->_isStream) { - throw new Zend_Mime_Exception('Attempt to get a stream from a string part'); + throw new Zend_Mime_Exception( + 'Attempt to get a stream from a string part' + ); } //stream_filter_remove(); // ??? is that right? @@ -107,9 +178,12 @@ class Zend_Mime_Part { ) ); if (!is_resource($filter)) { - throw new Zend_Mime_Exception('Failed to append quoted-printable filter'); + throw new Zend_Mime_Exception( + 'Failed to append quoted-printable filter' + ); } break; + case Zend_Mime::ENCODING_BASE64: $filter = stream_filter_append( $this->_content, @@ -121,18 +195,24 @@ class Zend_Mime_Part { ) ); if (!is_resource($filter)) { - throw new Zend_Mime_Exception('Failed to append base64 filter'); + throw new Zend_Mime_Exception( + 'Failed to append base64 filter' + ); } break; + default: } + return $this->_content; } /** * Get the Content of the current Mime Part in the given encoding. * - * @return String + * @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND} + * @throws Zend_Mime_Exception + * @return string */ public function getContent($EOL = Zend_Mime::LINEEND) { @@ -142,9 +222,10 @@ class Zend_Mime_Part { return Zend_Mime::encode($this->_content, $this->encoding, $EOL); } } - + /** * Get the RAW unencoded content from this part + * * @return string */ public function getRawContent() @@ -159,7 +240,7 @@ class Zend_Mime_Part { /** * Create and return the array of headers for this MIME part * - * @access public + * @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND} * @return array */ public function getHeadersArray($EOL = Zend_Mime::LINEEND) @@ -173,17 +254,26 @@ class Zend_Mime_Part { if ($this->boundary) { $contentType .= ';' . $EOL - . " boundary=\"" . $this->boundary . '"'; + . " boundary=\"" . $this->boundary . '"'; } - $headers[] = array('Content-Type', $contentType); + $headers[] = array( + 'Content-Type', + $contentType + ); if ($this->encoding) { - $headers[] = array('Content-Transfer-Encoding', $this->encoding); + $headers[] = array( + 'Content-Transfer-Encoding', + $this->encoding + ); } if ($this->id) { - $headers[] = array('Content-ID', '<' . $this->id . '>'); + $headers[] = array( + 'Content-ID', + '<' . $this->id . '>' + ); } if ($this->disposition) { @@ -191,19 +281,31 @@ class Zend_Mime_Part { if ($this->filename) { $disposition .= '; filename="' . $this->filename . '"'; } - $headers[] = array('Content-Disposition', $disposition); + $headers[] = array( + 'Content-Disposition', + $disposition + ); } if ($this->description) { - $headers[] = array('Content-Description', $this->description); + $headers[] = array( + 'Content-Description', + $this->description + ); } if ($this->location) { - $headers[] = array('Content-Location', $this->location); + $headers[] = array( + 'Content-Location', + $this->location + ); } - if ($this->language){ - $headers[] = array('Content-Language', $this->language); + if ($this->language) { + $headers[] = array( + 'Content-Language', + $this->language + ); } return $headers; @@ -212,7 +314,8 @@ class Zend_Mime_Part { /** * Return the headers for this part as a string * - * @return String + * @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND} + * @return string */ public function getHeaders($EOL = Zend_Mime::LINEEND) { diff --git a/library/vendor/Zend/Mobile/Exception.php b/library/vendor/Zend/Mobile/Exception.php index c092c9a5f..5ea0f8cc4 100644 --- a/library/vendor/Zend/Mobile/Exception.php +++ b/library/vendor/Zend/Mobile/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Mobile - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Mobile - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Abstract.php b/library/vendor/Zend/Mobile/Push/Abstract.php index c63595ff3..af30d7838 100644 --- a/library/vendor/Zend/Mobile/Push/Abstract.php +++ b/library/vendor/Zend/Mobile/Push/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Apns.php b/library/vendor/Zend/Mobile/Push/Apns.php index bb50958d6..d9f62c0ea 100644 --- a/library/vendor/Zend/Mobile/Push/Apns.php +++ b/library/vendor/Zend/Mobile/Push/Apns.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -206,10 +206,10 @@ class Zend_Mobile_Push_Apns extends Zend_Mobile_Push_Abstract /** * Connect to the Push Server * - * @param string $env - * @return Zend_Mobile_Push_Abstract + * @param int|string $env * @throws Zend_Mobile_Push_Exception * @throws Zend_Mobile_Push_Exception_ServerUnavailable + * @return Zend_Mobile_Push_Abstract */ public function connect($env = self::SERVER_PRODUCTION_URI) { @@ -268,13 +268,13 @@ class Zend_Mobile_Push_Apns extends Zend_Mobile_Push_Abstract /** * Send Message * - * @param Zend_Mobile_Push_Message_Apns $message - * @return boolean + * @param Zend_Mobile_Push_Message_Abstract $message * @throws Zend_Mobile_Push_Exception - * @throws Zend_Mobile_Push_Exception_ServerUnavailable + * @throws Zend_Mobile_Push_Exception_InvalidPayload * @throws Zend_Mobile_Push_Exception_InvalidToken * @throws Zend_Mobile_Push_Exception_InvalidTopic - * @throws Zend_Mobile_Push_Exception_InvalidPayload + * @throws Zend_Mobile_Push_Exception_ServerUnavailable + * @return bool */ public function send(Zend_Mobile_Push_Message_Abstract $message) { @@ -302,7 +302,10 @@ class Zend_Mobile_Push_Apns extends Zend_Mobile_Push_Abstract if (!is_null($message->getBadge())) { $payload['aps']['badge'] = $message->getBadge(); } - $payload['aps']['sound'] = $message->getSound(); + $sound = $message->getSound(); + if (!empty($sound)) { + $payload['aps']['sound'] = $sound; + } foreach($message->getCustomData() as $k => $v) { $payload[$k] = $v; diff --git a/library/vendor/Zend/Mobile/Push/Exception.php b/library/vendor/Zend/Mobile/Push/Exception.php index adba861ec..ed48a7bea 100644 --- a/library/vendor/Zend/Mobile/Push/Exception.php +++ b/library/vendor/Zend/Mobile/Push/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Exception/DeviceQuotaExceeded.php b/library/vendor/Zend/Mobile/Push/Exception/DeviceQuotaExceeded.php index ca0941f20..2419909d6 100644 --- a/library/vendor/Zend/Mobile/Push/Exception/DeviceQuotaExceeded.php +++ b/library/vendor/Zend/Mobile/Push/Exception/DeviceQuotaExceeded.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Exception/InvalidAuthToken.php b/library/vendor/Zend/Mobile/Push/Exception/InvalidAuthToken.php index b5c360e25..e78aea559 100644 --- a/library/vendor/Zend/Mobile/Push/Exception/InvalidAuthToken.php +++ b/library/vendor/Zend/Mobile/Push/Exception/InvalidAuthToken.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Exception/InvalidPayload.php b/library/vendor/Zend/Mobile/Push/Exception/InvalidPayload.php index afbaab041..0b7272ca9 100644 --- a/library/vendor/Zend/Mobile/Push/Exception/InvalidPayload.php +++ b/library/vendor/Zend/Mobile/Push/Exception/InvalidPayload.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Exception/InvalidRegistration.php b/library/vendor/Zend/Mobile/Push/Exception/InvalidRegistration.php index 0c28552ed..4ac17c362 100644 --- a/library/vendor/Zend/Mobile/Push/Exception/InvalidRegistration.php +++ b/library/vendor/Zend/Mobile/Push/Exception/InvalidRegistration.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Exception/InvalidToken.php b/library/vendor/Zend/Mobile/Push/Exception/InvalidToken.php index fa004acf8..c8b4c7dec 100644 --- a/library/vendor/Zend/Mobile/Push/Exception/InvalidToken.php +++ b/library/vendor/Zend/Mobile/Push/Exception/InvalidToken.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Exception/InvalidTopic.php b/library/vendor/Zend/Mobile/Push/Exception/InvalidTopic.php index 2a580aa67..7cd91b4cf 100644 --- a/library/vendor/Zend/Mobile/Push/Exception/InvalidTopic.php +++ b/library/vendor/Zend/Mobile/Push/Exception/InvalidTopic.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Exception/QuotaExceeded.php b/library/vendor/Zend/Mobile/Push/Exception/QuotaExceeded.php index c1b6d9aa1..01bf3f691 100644 --- a/library/vendor/Zend/Mobile/Push/Exception/QuotaExceeded.php +++ b/library/vendor/Zend/Mobile/Push/Exception/QuotaExceeded.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Exception/ServerUnavailable.php b/library/vendor/Zend/Mobile/Push/Exception/ServerUnavailable.php index 133697f24..f9701dbb4 100644 --- a/library/vendor/Zend/Mobile/Push/Exception/ServerUnavailable.php +++ b/library/vendor/Zend/Mobile/Push/Exception/ServerUnavailable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Gcm.php b/library/vendor/Zend/Mobile/Push/Gcm.php index 5e2e47e02..5884f9a13 100644 --- a/library/vendor/Zend/Mobile/Push/Gcm.php +++ b/library/vendor/Zend/Mobile/Push/Gcm.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -49,7 +49,7 @@ class Zend_Mobile_Push_Gcm extends Zend_Mobile_Push_Abstract /** * Http Client * - * @var Client + * @var Zend_Http_Client */ protected $_httpClient; @@ -116,9 +116,13 @@ class Zend_Mobile_Push_Gcm extends Zend_Mobile_Push_Abstract /** * Send Message * - * @param Zend_Mobile_Push_Message_Gcm $message - * @return Zend_Mobile_Push_Response_Gcm + * @param Zend_Mobile_Push_Message_Abstract $message + * @throws Zend_Http_Client_Exception * @throws Zend_Mobile_Push_Exception + * @throws Zend_Mobile_Push_Exception_InvalidAuthToken + * @throws Zend_Mobile_Push_Exception_InvalidPayload + * @throws Zend_Mobile_Push_Exception_ServerUnavailable + * @return Zend_Mobile_Push_Response_Gcm */ public function send(Zend_Mobile_Push_Message_Abstract $message) { diff --git a/library/vendor/Zend/Mobile/Push/Interface.php b/library/vendor/Zend/Mobile/Push/Interface.php index 19760352b..d8315e85d 100644 --- a/library/vendor/Zend/Mobile/Push/Interface.php +++ b/library/vendor/Zend/Mobile/Push/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -42,7 +42,7 @@ interface Zend_Mobile_Push_Interface /** * Send a Push Message * - * @param Zend_Mobile_Push_Message_Interface $message + * @param Zend_Mobile_Push_Message_Abstract $message * @return boolean */ public function send(Zend_Mobile_Push_Message_Abstract $message); diff --git a/library/vendor/Zend/Mobile/Push/Message/Abstract.php b/library/vendor/Zend/Mobile/Push/Message/Abstract.php index 181ce824b..96a0fa7c8 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Abstract.php +++ b/library/vendor/Zend/Mobile/Push/Message/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push_Message - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -46,7 +46,7 @@ abstract class Zend_Mobile_Push_Message_Abstract implements Zend_Mobile_Push_Mes /** * Id * - * @var scalar + * @var int|string|float|bool Scalar */ protected $_id; @@ -64,6 +64,7 @@ abstract class Zend_Mobile_Push_Message_Abstract implements Zend_Mobile_Push_Mes * Set Token * * @param string $token + * @throws Zend_Mobile_Push_Message_Exception * @return Zend_Mobile_Push_Message_Abstract */ public function setToken($token) @@ -78,7 +79,7 @@ abstract class Zend_Mobile_Push_Message_Abstract implements Zend_Mobile_Push_Mes /** * Get Message ID * - * @return scalar + * @return int|string|float|bool Scalar */ public function getId() { @@ -88,7 +89,7 @@ abstract class Zend_Mobile_Push_Message_Abstract implements Zend_Mobile_Push_Mes /** * Set Message ID * - * @param scalar $id + * @param int|string|float|bool $id Scalar * @return Zend_Mobile_Push_Message_Abstract * @throws Exception */ diff --git a/library/vendor/Zend/Mobile/Push/Message/Apns.php b/library/vendor/Zend/Mobile/Push/Message/Apns.php index 232b1b872..8cc4ac8f5 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Apns.php +++ b/library/vendor/Zend/Mobile/Push/Message/Apns.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -82,11 +82,12 @@ class Zend_Mobile_Push_Message_Apns extends Zend_Mobile_Push_Message_Abstract /** * Set Alert * - * @param string $text - * @param string $actionLocKey - * @param string $locKey - * @param array $locArgs - * @param string $launchImage + * @param string $text + * @param string|null $actionLocKey + * @param string|null $locKey + * @param array|null $locArgs + * @param string|null $launchImage + * @throws Zend_Mobile_Push_Message_Exception * @return Zend_Mobile_Push_Message_Apns */ public function setAlert($text, $actionLocKey=null, $locKey=null, $locArgs=null, $launchImage=null) @@ -242,9 +243,9 @@ class Zend_Mobile_Push_Message_Apns extends Zend_Mobile_Push_Message_Abstract /** * Set Custom Data * - * @param array $data - * @return Zend_Mobile_Push_Message_Apns + * @param array $array * @throws Zend_Mobile_Push_Message_Exception + * @return Zend_Mobile_Push_Message_Apns */ public function setCustomData($array) { diff --git a/library/vendor/Zend/Mobile/Push/Message/Exception.php b/library/vendor/Zend/Mobile/Push/Message/Exception.php index e2e047eb1..e9527967c 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Exception.php +++ b/library/vendor/Zend/Mobile/Push/Message/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Mobile/Push/Message/Gcm.php b/library/vendor/Zend/Mobile/Push/Message/Gcm.php index f06e1fb1a..64b36128f 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Gcm.php +++ b/library/vendor/Zend/Mobile/Push/Message/Gcm.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ * @method array getToken() @@ -200,7 +200,8 @@ class Zend_Mobile_Push_Message_Gcm extends Zend_Mobile_Push_Message_Abstract /** * Set time to live. * - * @param int $secs + * @param int $secs + * @throws Zend_Mobile_Push_Message_Exception * @return Zend_Mobile_Push_Message_Gcm */ public function setTtl($secs) diff --git a/library/vendor/Zend/Mobile/Push/Message/Interface.php b/library/vendor/Zend/Mobile/Push/Message/Interface.php index 1441485c7..27be3256a 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Interface.php +++ b/library/vendor/Zend/Mobile/Push/Message/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -50,14 +50,14 @@ interface Zend_Mobile_Push_Message_Interface /** * Get Id * - * @return scalar + * @return int|string|float|bool Scalar */ public function getId(); /** * Set Id * - * @param scalar $id + * @param int|string|float|bool $id Scalar * @return Zend_Mobile_Push_Message_Abstract */ public function setId($id); diff --git a/library/vendor/Zend/Mobile/Push/Message/Mpns.php b/library/vendor/Zend/Mobile/Push/Message/Mpns.php index 43511a135..d13678f9c 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Mpns.php +++ b/library/vendor/Zend/Mobile/Push/Message/Mpns.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Mobile_Push_Message_Mpns extends Zend_Mobile_Push_Message_Abstract diff --git a/library/vendor/Zend/Mobile/Push/Message/Mpns/Raw.php b/library/vendor/Zend/Mobile/Push/Message/Mpns/Raw.php index eaa3276f7..c18b3ee89 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Mpns/Raw.php +++ b/library/vendor/Zend/Mobile/Push/Message/Mpns/Raw.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mobile_Push_Message_Mpns_Raw extends Zend_Mobile_Push_Message_Mpns diff --git a/library/vendor/Zend/Mobile/Push/Message/Mpns/Tile.php b/library/vendor/Zend/Mobile/Push/Message/Mpns/Tile.php index eca0b7e00..6d7b266e3 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Mpns/Tile.php +++ b/library/vendor/Zend/Mobile/Push/Message/Mpns/Tile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mobile_Push_Message_Mpns_Tile extends Zend_Mobile_Push_Message_Mpns diff --git a/library/vendor/Zend/Mobile/Push/Message/Mpns/Toast.php b/library/vendor/Zend/Mobile/Push/Message/Mpns/Toast.php index 6e86abdbd..ee9f96ec2 100644 --- a/library/vendor/Zend/Mobile/Push/Message/Mpns/Toast.php +++ b/library/vendor/Zend/Mobile/Push/Message/Mpns/Toast.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Mobile_Push_Message_Mpns_Toast extends Zend_Mobile_Push_Message_Mpns diff --git a/library/vendor/Zend/Mobile/Push/Mpns.php b/library/vendor/Zend/Mobile/Push/Mpns.php index ba91adb2c..2fdb92e9d 100644 --- a/library/vendor/Zend/Mobile/Push/Mpns.php +++ b/library/vendor/Zend/Mobile/Push/Mpns.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -41,7 +41,7 @@ class Zend_Mobile_Push_Mpns extends Zend_Mobile_Push_Abstract /** * Http Client * - * @var Client + * @var Zend_Http_Client */ protected $_httpClient; @@ -75,9 +75,15 @@ class Zend_Mobile_Push_Mpns extends Zend_Mobile_Push_Abstract /** * Send Message * - * @param Zend_Mobile_Push_Message_Mpns $message - * @return boolean + * @param Zend_Mobile_Push_Message_Abstract $message + * @throws Zend_Http_Client_Exception * @throws Zend_Mobile_Push_Exception + * @throws Zend_Mobile_Push_Exception_DeviceQuotaExceeded + * @throws Zend_Mobile_Push_Exception_InvalidPayload + * @throws Zend_Mobile_Push_Exception_InvalidToken + * @throws Zend_Mobile_Push_Exception_QuotaExceeded + * @throws Zend_Mobile_Push_Exception_ServerUnavailable + * @return boolean */ public function send(Zend_Mobile_Push_Message_Abstract $message) { diff --git a/library/vendor/Zend/Mobile/Push/Response/Gcm.php b/library/vendor/Zend/Mobile/Push/Response/Gcm.php index d21565730..7a7445a7b 100644 --- a/library/vendor/Zend/Mobile/Push/Response/Gcm.php +++ b/library/vendor/Zend/Mobile/Push/Response/Gcm.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -137,7 +137,8 @@ class Zend_Mobile_Push_Response_Gcm /** * Set Response * - * @param array $response + * @param array $response + * @throws Zend_Mobile_Push_Exception * @return Zend_Mobile_Push_Response_Gcm */ public function setResponse(array $response) diff --git a/library/vendor/Zend/Mobile/Push/Test/ApnsProxy.php b/library/vendor/Zend/Mobile/Push/Test/ApnsProxy.php index 2dc9fec9f..ba889695e 100644 --- a/library/vendor/Zend/Mobile/Push/Test/ApnsProxy.php +++ b/library/vendor/Zend/Mobile/Push/Test/ApnsProxy.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Push - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id $ */ @@ -50,7 +50,6 @@ class Zend_Mobile_Push_Test_ApnsProxy extends Zend_Mobile_Push_Apns * Set the Response * * @param string $str - * @return Zend_Mobile_Push_ApnsProxy */ public function setReadResponse($str) { $this->_readResponse = $str; diff --git a/library/vendor/Zend/Navigation.php b/library/vendor/Zend/Navigation.php index 034bd62a9..434fc74e1 100644 --- a/library/vendor/Zend/Navigation.php +++ b/library/vendor/Zend/Navigation.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Navigation - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Navigation - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Navigation extends Zend_Navigation_Container diff --git a/library/vendor/Zend/Navigation/Container.php b/library/vendor/Zend/Navigation/Container.php index 767320818..0b6c012af 100644 --- a/library/vendor/Zend/Navigation/Container.php +++ b/library/vendor/Zend/Navigation/Container.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Navigation - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * * @category Zend * @package Zend_Navigation - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable @@ -34,7 +34,7 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable /** * Contains sub pages * - * @var array + * @var Zend_Navigation_Page[] */ protected $_pages = array(); @@ -140,7 +140,7 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable /** * Adds several pages at once * - * @param array|Zend_Config|Zend_Navigation_Container $pages pages to add + * @param Zend_Navigation_Page[]|Zend_Config|Zend_Navigation_Container $pages pages to add * @return Zend_Navigation_Container fluent interface, * returns self * @throws Zend_Navigation_Exception if $pages is not @@ -174,7 +174,7 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable /** * Sets pages this container should have, removing existing pages * - * @param array $pages pages to set + * @param Zend_Navigation_Page[] $pages pages to set * @return Zend_Navigation_Container fluent interface, returns self */ public function setPages(array $pages) @@ -186,7 +186,7 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable /** * Returns pages in the container * - * @return array array of Zend_Navigation_Page instances + * @return Zend_Navigation_Page[] array of Zend_Navigation_Page instances */ public function getPages() { @@ -355,7 +355,7 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable * @param mixed $value value to match property against * @param bool $useRegex [optional] if true PHP's preg_match is used. * Default is false. - * @return array array containing only Zend_Navigation_Page + * @return Zend_Navigation_Page[] array containing only Zend_Navigation_Page * instances */ public function findAllBy($property, $value, $useRegex = false) @@ -479,7 +479,7 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable /** * Returns an array representation of all pages in container * - * @return array + * @return Zend_Navigation_Page[] */ public function toArray() { diff --git a/library/vendor/Zend/Navigation/Exception.php b/library/vendor/Zend/Navigation/Exception.php index b17b8e9c2..7715b88d4 100644 --- a/library/vendor/Zend/Navigation/Exception.php +++ b/library/vendor/Zend/Navigation/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Navigation - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Navigation - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Navigation_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Navigation/Page.php b/library/vendor/Zend/Navigation/Page.php index 485efd773..ea8514a82 100644 --- a/library/vendor/Zend/Navigation/Page.php +++ b/library/vendor/Zend/Navigation/Page.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Navigation - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Navigation - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Navigation_Page extends Zend_Navigation_Container diff --git a/library/vendor/Zend/Navigation/Page/Mvc.php b/library/vendor/Zend/Navigation/Page/Mvc.php index 62a91f42f..965a5ce8e 100644 --- a/library/vendor/Zend/Navigation/Page/Mvc.php +++ b/library/vendor/Zend/Navigation/Page/Mvc.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Navigation * @subpackage Page - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -41,7 +41,7 @@ * @category Zend * @package Zend_Navigation * @subpackage Page - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Navigation_Page_Mvc extends Zend_Navigation_Page diff --git a/library/vendor/Zend/Navigation/Page/Uri.php b/library/vendor/Zend/Navigation/Page/Uri.php index e44e4a3b2..4cc1d4683 100644 --- a/library/vendor/Zend/Navigation/Page/Uri.php +++ b/library/vendor/Zend/Navigation/Page/Uri.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Navigation * @subpackage Page - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Navigation * @subpackage Page - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Navigation_Page_Uri extends Zend_Navigation_Page diff --git a/library/vendor/Zend/Oauth.php b/library/vendor/Zend/Oauth.php index 87dcceee4..c8028a7b2 100644 --- a/library/vendor/Zend/Oauth.php +++ b/library/vendor/Zend/Oauth.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth diff --git a/library/vendor/Zend/Oauth/Client.php b/library/vendor/Zend/Oauth/Client.php index 5cc7e46d3..5d47cdbdc 100644 --- a/library/vendor/Zend/Oauth/Client.php +++ b/library/vendor/Zend/Oauth/Client.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Client extends Zend_Http_Client diff --git a/library/vendor/Zend/Oauth/Config.php b/library/vendor/Zend/Oauth/Config.php index 8d64ec35c..2abb69668 100644 --- a/library/vendor/Zend/Oauth/Config.php +++ b/library/vendor/Zend/Oauth/Config.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Config implements Zend_Oauth_Config_ConfigInterface diff --git a/library/vendor/Zend/Oauth/Config/ConfigInterface.php b/library/vendor/Zend/Oauth/Config/ConfigInterface.php index d33a94616..03ed051e4 100644 --- a/library/vendor/Zend/Oauth/Config/ConfigInterface.php +++ b/library/vendor/Zend/Oauth/Config/ConfigInterface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Oauth_Config_ConfigInterface diff --git a/library/vendor/Zend/Oauth/Consumer.php b/library/vendor/Zend/Oauth/Consumer.php index ee11e6382..7ef6d83af 100644 --- a/library/vendor/Zend/Oauth/Consumer.php +++ b/library/vendor/Zend/Oauth/Consumer.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Consumer extends Zend_Oauth diff --git a/library/vendor/Zend/Oauth/Exception.php b/library/vendor/Zend/Oauth/Exception.php index 4b7749e43..376e9dd2e 100644 --- a/library/vendor/Zend/Oauth/Exception.php +++ b/library/vendor/Zend/Oauth/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Exception extends Zend_Exception {} diff --git a/library/vendor/Zend/Oauth/Http.php b/library/vendor/Zend/Oauth/Http.php index 9a532e24e..a29219707 100644 --- a/library/vendor/Zend/Oauth/Http.php +++ b/library/vendor/Zend/Oauth/Http.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Http diff --git a/library/vendor/Zend/Oauth/Http/AccessToken.php b/library/vendor/Zend/Oauth/Http/AccessToken.php index b7180c38f..8bf93a763 100644 --- a/library/vendor/Zend/Oauth/Http/AccessToken.php +++ b/library/vendor/Zend/Oauth/Http/AccessToken.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Http_AccessToken extends Zend_Oauth_Http diff --git a/library/vendor/Zend/Oauth/Http/RequestToken.php b/library/vendor/Zend/Oauth/Http/RequestToken.php index 53a263cce..435012655 100644 --- a/library/vendor/Zend/Oauth/Http/RequestToken.php +++ b/library/vendor/Zend/Oauth/Http/RequestToken.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Http_RequestToken extends Zend_Oauth_Http diff --git a/library/vendor/Zend/Oauth/Http/UserAuthorization.php b/library/vendor/Zend/Oauth/Http/UserAuthorization.php index b1564779d..37cc2298f 100644 --- a/library/vendor/Zend/Oauth/Http/UserAuthorization.php +++ b/library/vendor/Zend/Oauth/Http/UserAuthorization.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Http_UserAuthorization extends Zend_Oauth_Http diff --git a/library/vendor/Zend/Oauth/Http/Utility.php b/library/vendor/Zend/Oauth/Http/Utility.php index 2c9bd0a37..bec396091 100644 --- a/library/vendor/Zend/Oauth/Http/Utility.php +++ b/library/vendor/Zend/Oauth/Http/Utility.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Http_Utility diff --git a/library/vendor/Zend/Oauth/Signature/Hmac.php b/library/vendor/Zend/Oauth/Signature/Hmac.php index 1e8dd772f..91306b706 100644 --- a/library/vendor/Zend/Oauth/Signature/Hmac.php +++ b/library/vendor/Zend/Oauth/Signature/Hmac.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Signature_Hmac extends Zend_Oauth_Signature_SignatureAbstract diff --git a/library/vendor/Zend/Oauth/Signature/Plaintext.php b/library/vendor/Zend/Oauth/Signature/Plaintext.php index 743cbe37c..96fec151d 100644 --- a/library/vendor/Zend/Oauth/Signature/Plaintext.php +++ b/library/vendor/Zend/Oauth/Signature/Plaintext.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Signature_Plaintext extends Zend_Oauth_Signature_SignatureAbstract diff --git a/library/vendor/Zend/Oauth/Signature/Rsa.php b/library/vendor/Zend/Oauth/Signature/Rsa.php index b593db1dc..1d0efea6b 100644 --- a/library/vendor/Zend/Oauth/Signature/Rsa.php +++ b/library/vendor/Zend/Oauth/Signature/Rsa.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Signature_Rsa extends Zend_Oauth_Signature_SignatureAbstract diff --git a/library/vendor/Zend/Oauth/Signature/SignatureAbstract.php b/library/vendor/Zend/Oauth/Signature/SignatureAbstract.php index 4d8d7f77c..00d5e14b6 100644 --- a/library/vendor/Zend/Oauth/Signature/SignatureAbstract.php +++ b/library/vendor/Zend/Oauth/Signature/SignatureAbstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Oauth_Signature_SignatureAbstract diff --git a/library/vendor/Zend/Oauth/Token.php b/library/vendor/Zend/Oauth/Token.php index f39a5a941..ad5c8897e 100644 --- a/library/vendor/Zend/Oauth/Token.php +++ b/library/vendor/Zend/Oauth/Token.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Oauth_Token diff --git a/library/vendor/Zend/Oauth/Token/Access.php b/library/vendor/Zend/Oauth/Token/Access.php index f9034ab4d..699bf4aaf 100644 --- a/library/vendor/Zend/Oauth/Token/Access.php +++ b/library/vendor/Zend/Oauth/Token/Access.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Token_Access extends Zend_Oauth_Token diff --git a/library/vendor/Zend/Oauth/Token/AuthorizedRequest.php b/library/vendor/Zend/Oauth/Token/AuthorizedRequest.php index ac62aaaab..425f5d12c 100644 --- a/library/vendor/Zend/Oauth/Token/AuthorizedRequest.php +++ b/library/vendor/Zend/Oauth/Token/AuthorizedRequest.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Token_AuthorizedRequest extends Zend_Oauth_Token diff --git a/library/vendor/Zend/Oauth/Token/Request.php b/library/vendor/Zend/Oauth/Token/Request.php index 103113b5a..7de21b844 100644 --- a/library/vendor/Zend/Oauth/Token/Request.php +++ b/library/vendor/Zend/Oauth/Token/Request.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Oauth - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Oauth_Token_Request extends Zend_Oauth_Token diff --git a/library/vendor/Zend/OpenId.php b/library/vendor/Zend/OpenId.php index 41a528bae..650610966 100644 --- a/library/vendor/Zend/OpenId.php +++ b/library/vendor/Zend/OpenId.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_OpenId - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * * @category Zend * @package Zend_OpenId - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_OpenId diff --git a/library/vendor/Zend/OpenId/Consumer.php b/library/vendor/Zend/OpenId/Consumer.php index 43e343865..5282548c1 100644 --- a/library/vendor/Zend/OpenId/Consumer.php +++ b/library/vendor/Zend/OpenId/Consumer.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Consumer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Consumer.php 24593 2012-01-05 20:35:02Z matthew $ */ @@ -43,7 +43,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Consumer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_OpenId_Consumer diff --git a/library/vendor/Zend/OpenId/Consumer/Storage.php b/library/vendor/Zend/OpenId/Consumer/Storage.php index be561e90c..89b0cd287 100644 --- a/library/vendor/Zend/OpenId/Consumer/Storage.php +++ b/library/vendor/Zend/OpenId/Consumer/Storage.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Consumer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Consumer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_OpenId_Consumer_Storage diff --git a/library/vendor/Zend/OpenId/Consumer/Storage/File.php b/library/vendor/Zend/OpenId/Consumer/Storage/File.php index 914a82142..a434fff42 100644 --- a/library/vendor/Zend/OpenId/Consumer/Storage/File.php +++ b/library/vendor/Zend/OpenId/Consumer/Storage/File.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Consumer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Consumer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_OpenId_Consumer_Storage_File extends Zend_OpenId_Consumer_Storage diff --git a/library/vendor/Zend/OpenId/Exception.php b/library/vendor/Zend/OpenId/Exception.php index 4a7b867d4..343dc668f 100644 --- a/library/vendor/Zend/OpenId/Exception.php +++ b/library/vendor/Zend/OpenId/Exception.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_OpenId - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * * @category Zend * @package Zend_OpenId - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_OpenId_Exception extends Zend_Exception diff --git a/library/vendor/Zend/OpenId/Extension.php b/library/vendor/Zend/OpenId/Extension.php index 08e393824..8dbdd5d72 100644 --- a/library/vendor/Zend/OpenId/Extension.php +++ b/library/vendor/Zend/OpenId/Extension.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_OpenId - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_OpenId - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_OpenId_Extension diff --git a/library/vendor/Zend/OpenId/Extension/Sreg.php b/library/vendor/Zend/OpenId/Extension/Sreg.php index 525153518..ae7aa1cbb 100644 --- a/library/vendor/Zend/OpenId/Extension/Sreg.php +++ b/library/vendor/Zend/OpenId/Extension/Sreg.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_OpenId - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * * @category Zend * @package Zend_OpenId - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_OpenId_Extension_Sreg extends Zend_OpenId_Extension diff --git a/library/vendor/Zend/OpenId/Provider.php b/library/vendor/Zend/OpenId/Provider.php index 19f5411cd..6580d3f82 100644 --- a/library/vendor/Zend/OpenId/Provider.php +++ b/library/vendor/Zend/OpenId/Provider.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -35,7 +35,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_OpenId_Provider diff --git a/library/vendor/Zend/OpenId/Provider/Storage.php b/library/vendor/Zend/OpenId/Provider/Storage.php index 77e491fc6..f9bbb1703 100644 --- a/library/vendor/Zend/OpenId/Provider/Storage.php +++ b/library/vendor/Zend/OpenId/Provider/Storage.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_OpenId_Provider_Storage diff --git a/library/vendor/Zend/OpenId/Provider/Storage/File.php b/library/vendor/Zend/OpenId/Provider/Storage/File.php index 1ddf62501..dceb2ee31 100644 --- a/library/vendor/Zend/OpenId/Provider/Storage/File.php +++ b/library/vendor/Zend/OpenId/Provider/Storage/File.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_OpenId_Provider_Storage_File extends Zend_OpenId_Provider_Storage diff --git a/library/vendor/Zend/OpenId/Provider/User.php b/library/vendor/Zend/OpenId/Provider/User.php index 6a962600d..458c3d4a2 100644 --- a/library/vendor/Zend/OpenId/Provider/User.php +++ b/library/vendor/Zend/OpenId/Provider/User.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_OpenId_Provider_User diff --git a/library/vendor/Zend/OpenId/Provider/User/Session.php b/library/vendor/Zend/OpenId/Provider/User/Session.php index 026d4b3c0..fd5a598bb 100644 --- a/library/vendor/Zend/OpenId/Provider/User/Session.php +++ b/library/vendor/Zend/OpenId/Provider/User/Session.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_OpenId * @subpackage Zend_OpenId_Provider - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_OpenId_Provider_User_Session extends Zend_OpenId_Provider_User diff --git a/library/vendor/Zend/Paginator.php b/library/vendor/Zend/Paginator.php index 8640f677d..49ffb9d1e 100644 --- a/library/vendor/Zend/Paginator.php +++ b/library/vendor/Zend/Paginator.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator implements Countable, IteratorAggregate diff --git a/library/vendor/Zend/Paginator/Adapter/Array.php b/library/vendor/Zend/Paginator/Adapter/Array.php index 0af9e66b0..b4d0c09f7 100644 --- a/library/vendor/Zend/Paginator/Adapter/Array.php +++ b/library/vendor/Zend/Paginator/Adapter/Array.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_Adapter_Array implements Zend_Paginator_Adapter_Interface diff --git a/library/vendor/Zend/Paginator/Adapter/DbSelect.php b/library/vendor/Zend/Paginator/Adapter/DbSelect.php index 94b201b56..ebd714249 100644 --- a/library/vendor/Zend/Paginator/Adapter/DbSelect.php +++ b/library/vendor/Zend/Paginator/Adapter/DbSelect.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_Adapter_DbSelect implements Zend_Paginator_Adapter_Interface diff --git a/library/vendor/Zend/Paginator/Adapter/DbTableSelect.php b/library/vendor/Zend/Paginator/Adapter/DbTableSelect.php index c87f3f995..dac467f04 100644 --- a/library/vendor/Zend/Paginator/Adapter/DbTableSelect.php +++ b/library/vendor/Zend/Paginator/Adapter/DbTableSelect.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_Adapter_DbTableSelect extends Zend_Paginator_Adapter_DbSelect diff --git a/library/vendor/Zend/Paginator/Adapter/Interface.php b/library/vendor/Zend/Paginator/Adapter/Interface.php index 301b65518..7ec1ee29a 100644 --- a/library/vendor/Zend/Paginator/Adapter/Interface.php +++ b/library/vendor/Zend/Paginator/Adapter/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Paginator_Adapter_Interface extends Countable diff --git a/library/vendor/Zend/Paginator/Adapter/Iterator.php b/library/vendor/Zend/Paginator/Adapter/Iterator.php index f69804e2e..ad10da9d5 100644 --- a/library/vendor/Zend/Paginator/Adapter/Iterator.php +++ b/library/vendor/Zend/Paginator/Adapter/Iterator.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_Adapter_Iterator implements Zend_Paginator_Adapter_Interface diff --git a/library/vendor/Zend/Paginator/Adapter/Null.php b/library/vendor/Zend/Paginator/Adapter/Null.php index f53b9e70e..da91d4dc9 100644 --- a/library/vendor/Zend/Paginator/Adapter/Null.php +++ b/library/vendor/Zend/Paginator/Adapter/Null.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_Adapter_Null implements Zend_Paginator_Adapter_Interface diff --git a/library/vendor/Zend/Paginator/AdapterAggregate.php b/library/vendor/Zend/Paginator/AdapterAggregate.php index f71f05520..fe209d4ca 100644 --- a/library/vendor/Zend/Paginator/AdapterAggregate.php +++ b/library/vendor/Zend/Paginator/AdapterAggregate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Paginator * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Paginator * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Paginator_AdapterAggregate diff --git a/library/vendor/Zend/Paginator/Exception.php b/library/vendor/Zend/Paginator/Exception.php index 455671284..85513fa01 100644 --- a/library/vendor/Zend/Paginator/Exception.php +++ b/library/vendor/Zend/Paginator/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Paginator/ScrollingStyle/All.php b/library/vendor/Zend/Paginator/ScrollingStyle/All.php index 52d3a5165..6ef54276c 100644 --- a/library/vendor/Zend/Paginator/ScrollingStyle/All.php +++ b/library/vendor/Zend/Paginator/ScrollingStyle/All.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_ScrollingStyle_All implements Zend_Paginator_ScrollingStyle_Interface diff --git a/library/vendor/Zend/Paginator/ScrollingStyle/Elastic.php b/library/vendor/Zend/Paginator/ScrollingStyle/Elastic.php index ab708fc14..6e103f6fd 100644 --- a/library/vendor/Zend/Paginator/ScrollingStyle/Elastic.php +++ b/library/vendor/Zend/Paginator/ScrollingStyle/Elastic.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @link http://www.google.com/search?q=Zend+Framework * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_ScrollingStyle_Elastic extends Zend_Paginator_ScrollingStyle_Sliding diff --git a/library/vendor/Zend/Paginator/ScrollingStyle/Interface.php b/library/vendor/Zend/Paginator/ScrollingStyle/Interface.php index 55d263be6..7871d8925 100644 --- a/library/vendor/Zend/Paginator/ScrollingStyle/Interface.php +++ b/library/vendor/Zend/Paginator/ScrollingStyle/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Paginator_ScrollingStyle_Interface diff --git a/library/vendor/Zend/Paginator/ScrollingStyle/Jumping.php b/library/vendor/Zend/Paginator/ScrollingStyle/Jumping.php index 651d5eefa..93c1b795d 100644 --- a/library/vendor/Zend/Paginator/ScrollingStyle/Jumping.php +++ b/library/vendor/Zend/Paginator/ScrollingStyle/Jumping.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_ScrollingStyle_Jumping implements Zend_Paginator_ScrollingStyle_Interface diff --git a/library/vendor/Zend/Paginator/ScrollingStyle/Sliding.php b/library/vendor/Zend/Paginator/ScrollingStyle/Sliding.php index 532efe3bb..8bc6962a8 100644 --- a/library/vendor/Zend/Paginator/ScrollingStyle/Sliding.php +++ b/library/vendor/Zend/Paginator/ScrollingStyle/Sliding.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @link http://search.yahoo.com/search?p=Zend+Framework * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_ScrollingStyle_Sliding implements Zend_Paginator_ScrollingStyle_Interface diff --git a/library/vendor/Zend/Paginator/SerializableLimitIterator.php b/library/vendor/Zend/Paginator/SerializableLimitIterator.php index fc3163986..72c1399c9 100644 --- a/library/vendor/Zend/Paginator/SerializableLimitIterator.php +++ b/library/vendor/Zend/Paginator/SerializableLimitIterator.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Paginator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Paginator_SerializableLimitIterator extends LimitIterator implements Serializable, ArrayAccess diff --git a/library/vendor/Zend/ProgressBar.php b/library/vendor/Zend/ProgressBar.php index 5bcb00d98..60804ee83 100644 --- a/library/vendor/Zend/ProgressBar.php +++ b/library/vendor/Zend/ProgressBar.php @@ -12,7 +12,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_ProgressBar diff --git a/library/vendor/Zend/ProgressBar/Adapter.php b/library/vendor/Zend/ProgressBar/Adapter.php index 5008e1fdb..89e59183b 100644 --- a/library/vendor/Zend/ProgressBar/Adapter.php +++ b/library/vendor/Zend/ProgressBar/Adapter.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_ProgressBar_Adapter diff --git a/library/vendor/Zend/ProgressBar/Adapter/Console.php b/library/vendor/Zend/ProgressBar/Adapter/Console.php index 7b4ae8dae..2c7c2f15d 100644 --- a/library/vendor/Zend/ProgressBar/Adapter/Console.php +++ b/library/vendor/Zend/ProgressBar/Adapter/Console.php @@ -12,7 +12,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_ProgressBar * @uses Zend_ProgressBar_Adapter_Interface - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_ProgressBar_Adapter_Console extends Zend_ProgressBar_Adapter diff --git a/library/vendor/Zend/ProgressBar/Adapter/Exception.php b/library/vendor/Zend/ProgressBar/Adapter/Exception.php index c98664b48..110fced76 100644 --- a/library/vendor/Zend/ProgressBar/Adapter/Exception.php +++ b/library/vendor/Zend/ProgressBar/Adapter/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_ProgressBar * @uses Zend_ProgressBar_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_ProgressBar_Adapter_Exception extends Zend_ProgressBar_Exception diff --git a/library/vendor/Zend/ProgressBar/Adapter/JsPull.php b/library/vendor/Zend/ProgressBar/Adapter/JsPull.php index 4dcfbaba3..cb9b5bdfe 100644 --- a/library/vendor/Zend/ProgressBar/Adapter/JsPull.php +++ b/library/vendor/Zend/ProgressBar/Adapter/JsPull.php @@ -12,7 +12,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_ProgressBar * @uses Zend_ProgressBar_Adapter_Interface - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_ProgressBar_Adapter_JsPull extends Zend_ProgressBar_Adapter diff --git a/library/vendor/Zend/ProgressBar/Adapter/JsPush.php b/library/vendor/Zend/ProgressBar/Adapter/JsPush.php index 461f40d39..f43d85e90 100644 --- a/library/vendor/Zend/ProgressBar/Adapter/JsPush.php +++ b/library/vendor/Zend/ProgressBar/Adapter/JsPush.php @@ -12,7 +12,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_ProgressBar * @uses Zend_ProgressBar_Adapter_Interface - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_ProgressBar_Adapter_JsPush extends Zend_ProgressBar_Adapter diff --git a/library/vendor/Zend/ProgressBar/Exception.php b/library/vendor/Zend/ProgressBar/Exception.php index 043ce9ba4..b0025207b 100644 --- a/library/vendor/Zend/ProgressBar/Exception.php +++ b/library/vendor/Zend/ProgressBar/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_ProgressBar - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_ProgressBar * @uses Zend_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_ProgressBar_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Queue.php b/library/vendor/Zend/Queue.php index 773c816f2..f79fc2beb 100644 --- a/library/vendor/Zend/Queue.php +++ b/library/vendor/Zend/Queue.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Queue - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Queue - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue implements Countable diff --git a/library/vendor/Zend/Queue/Adapter/Activemq.php b/library/vendor/Zend/Queue/Adapter/Activemq.php index ca2ab7caf..70313fed8 100644 --- a/library/vendor/Zend/Queue/Adapter/Activemq.php +++ b/library/vendor/Zend/Queue/Adapter/Activemq.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Adapter_Activemq extends Zend_Queue_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Queue/Adapter/AdapterAbstract.php b/library/vendor/Zend/Queue/Adapter/AdapterAbstract.php index 8374aba2e..c456a83d1 100644 --- a/library/vendor/Zend/Queue/Adapter/AdapterAbstract.php +++ b/library/vendor/Zend/Queue/Adapter/AdapterAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Queue_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Queue/Adapter/AdapterInterface.php b/library/vendor/Zend/Queue/Adapter/AdapterInterface.php index c303f98d5..749c71415 100644 --- a/library/vendor/Zend/Queue/Adapter/AdapterInterface.php +++ b/library/vendor/Zend/Queue/Adapter/AdapterInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Queue_Adapter_AdapterInterface diff --git a/library/vendor/Zend/Queue/Adapter/Array.php b/library/vendor/Zend/Queue/Adapter/Array.php index 12a6079e6..f0856f8a6 100644 --- a/library/vendor/Zend/Queue/Adapter/Array.php +++ b/library/vendor/Zend/Queue/Adapter/Array.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Adapter_Array extends Zend_Queue_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Queue/Adapter/Db.php b/library/vendor/Zend/Queue/Adapter/Db.php index 87ce40fab..ba6c70628 100644 --- a/library/vendor/Zend/Queue/Adapter/Db.php +++ b/library/vendor/Zend/Queue/Adapter/Db.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -46,7 +46,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Adapter_Db extends Zend_Queue_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Queue/Adapter/Db/Message.php b/library/vendor/Zend/Queue/Adapter/Db/Message.php index ad170fdd7..89f14f478 100644 --- a/library/vendor/Zend/Queue/Adapter/Db/Message.php +++ b/library/vendor/Zend/Queue/Adapter/Db/Message.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Adapter_Db_Message extends Zend_Db_Table_Abstract diff --git a/library/vendor/Zend/Queue/Adapter/Db/Queue.php b/library/vendor/Zend/Queue/Adapter/Db/Queue.php index 30242ca49..c009db2a3 100644 --- a/library/vendor/Zend/Queue/Adapter/Db/Queue.php +++ b/library/vendor/Zend/Queue/Adapter/Db/Queue.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Adapter_Db_Queue extends Zend_Db_Table_Abstract diff --git a/library/vendor/Zend/Queue/Adapter/Memcacheq.php b/library/vendor/Zend/Queue/Adapter/Memcacheq.php index 5f70fd13f..957a2ed4e 100644 --- a/library/vendor/Zend/Queue/Adapter/Memcacheq.php +++ b/library/vendor/Zend/Queue/Adapter/Memcacheq.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Adapter_Memcacheq extends Zend_Queue_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Queue/Adapter/Null.php b/library/vendor/Zend/Queue/Adapter/Null.php index dc40aff5b..f3622bd32 100644 --- a/library/vendor/Zend/Queue/Adapter/Null.php +++ b/library/vendor/Zend/Queue/Adapter/Null.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Adapter_Null extends Zend_Queue_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Queue/Adapter/PlatformJobQueue.php b/library/vendor/Zend/Queue/Adapter/PlatformJobQueue.php index 7d8819955..c2becb188 100644 --- a/library/vendor/Zend/Queue/Adapter/PlatformJobQueue.php +++ b/library/vendor/Zend/Queue/Adapter/PlatformJobQueue.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Queue * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Adapter_PlatformJobQueue extends Zend_Queue_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Queue/Exception.php b/library/vendor/Zend/Queue/Exception.php index d1101604b..46dcc7a89 100644 --- a/library/vendor/Zend/Queue/Exception.php +++ b/library/vendor/Zend/Queue/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Queue - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Queue - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Queue/Message.php b/library/vendor/Zend/Queue/Message.php index 5f1e72d8f..b9573abe4 100644 --- a/library/vendor/Zend/Queue/Message.php +++ b/library/vendor/Zend/Queue/Message.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Message - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Queue * @subpackage Message - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Message diff --git a/library/vendor/Zend/Queue/Message/Iterator.php b/library/vendor/Zend/Queue/Message/Iterator.php index 92c24b5b7..6f0914207 100644 --- a/library/vendor/Zend/Queue/Message/Iterator.php +++ b/library/vendor/Zend/Queue/Message/Iterator.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Message - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Queue * @subpackage Message - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Message_Iterator implements Iterator, Countable diff --git a/library/vendor/Zend/Queue/Message/PlatformJob.php b/library/vendor/Zend/Queue/Message/PlatformJob.php index 94e143327..98dd4af11 100644 --- a/library/vendor/Zend/Queue/Message/PlatformJob.php +++ b/library/vendor/Zend/Queue/Message/PlatformJob.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Message - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Queue * @subpackage Message - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Message_PlatformJob extends Zend_Queue_Message diff --git a/library/vendor/Zend/Queue/Stomp/Client.php b/library/vendor/Zend/Queue/Stomp/Client.php index 6e41506b0..6b5d0e346 100644 --- a/library/vendor/Zend/Queue/Stomp/Client.php +++ b/library/vendor/Zend/Queue/Stomp/Client.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Stomp_Client diff --git a/library/vendor/Zend/Queue/Stomp/Client/Connection.php b/library/vendor/Zend/Queue/Stomp/Client/Connection.php index 9350f0c24..6bd165688 100644 --- a/library/vendor/Zend/Queue/Stomp/Client/Connection.php +++ b/library/vendor/Zend/Queue/Stomp/Client/Connection.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Stomp_Client_Connection diff --git a/library/vendor/Zend/Queue/Stomp/Client/ConnectionInterface.php b/library/vendor/Zend/Queue/Stomp/Client/ConnectionInterface.php index 99897bfde..a8a8b4a97 100644 --- a/library/vendor/Zend/Queue/Stomp/Client/ConnectionInterface.php +++ b/library/vendor/Zend/Queue/Stomp/Client/ConnectionInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Queue_Stomp_Client_ConnectionInterface diff --git a/library/vendor/Zend/Queue/Stomp/Frame.php b/library/vendor/Zend/Queue/Stomp/Frame.php index 47edeb805..44cef7a27 100644 --- a/library/vendor/Zend/Queue/Stomp/Frame.php +++ b/library/vendor/Zend/Queue/Stomp/Frame.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Queue_Stomp_Frame diff --git a/library/vendor/Zend/Queue/Stomp/FrameInterface.php b/library/vendor/Zend/Queue/Stomp/FrameInterface.php index 5aa7f0563..a9ba302b5 100644 --- a/library/vendor/Zend/Queue/Stomp/FrameInterface.php +++ b/library/vendor/Zend/Queue/Stomp/FrameInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Queue * @subpackage Stomp - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Queue_Stomp_FrameInterface diff --git a/library/vendor/Zend/Reflection/Class.php b/library/vendor/Zend/Reflection/Class.php index f7d0ff913..5dd1e01f4 100644 --- a/library/vendor/Zend/Reflection/Class.php +++ b/library/vendor/Zend/Reflection/Class.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Class extends ReflectionClass diff --git a/library/vendor/Zend/Reflection/Docblock.php b/library/vendor/Zend/Reflection/Docblock.php index 512048603..85d806813 100644 --- a/library/vendor/Zend/Reflection/Docblock.php +++ b/library/vendor/Zend/Reflection/Docblock.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Docblock implements Reflector diff --git a/library/vendor/Zend/Reflection/Docblock/Tag.php b/library/vendor/Zend/Reflection/Docblock/Tag.php index f9d0081d9..e9cf71286 100644 --- a/library/vendor/Zend/Reflection/Docblock/Tag.php +++ b/library/vendor/Zend/Reflection/Docblock/Tag.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Docblock_Tag implements Reflector diff --git a/library/vendor/Zend/Reflection/Docblock/Tag/Param.php b/library/vendor/Zend/Reflection/Docblock/Tag/Param.php index 00cb5fc33..2f2cb4028 100644 --- a/library/vendor/Zend/Reflection/Docblock/Tag/Param.php +++ b/library/vendor/Zend/Reflection/Docblock/Tag/Param.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Docblock_Tag_Param extends Zend_Reflection_Docblock_Tag diff --git a/library/vendor/Zend/Reflection/Docblock/Tag/Return.php b/library/vendor/Zend/Reflection/Docblock/Tag/Return.php index 74c8df5a4..44b7e7ef5 100644 --- a/library/vendor/Zend/Reflection/Docblock/Tag/Return.php +++ b/library/vendor/Zend/Reflection/Docblock/Tag/Return.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Docblock_Tag_Return extends Zend_Reflection_Docblock_Tag diff --git a/library/vendor/Zend/Reflection/Exception.php b/library/vendor/Zend/Reflection/Exception.php index 05ce568b4..1a81cb2c2 100644 --- a/library/vendor/Zend/Reflection/Exception.php +++ b/library/vendor/Zend/Reflection/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Reflection/Extension.php b/library/vendor/Zend/Reflection/Extension.php index ca3fe6ea8..8d97f0c3e 100644 --- a/library/vendor/Zend/Reflection/Extension.php +++ b/library/vendor/Zend/Reflection/Extension.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Extension extends ReflectionExtension diff --git a/library/vendor/Zend/Reflection/File.php b/library/vendor/Zend/Reflection/File.php index 991496239..5768b810c 100644 --- a/library/vendor/Zend/Reflection/File.php +++ b/library/vendor/Zend/Reflection/File.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_File implements Reflector diff --git a/library/vendor/Zend/Reflection/Function.php b/library/vendor/Zend/Reflection/Function.php index 17daac6de..0ee56a176 100644 --- a/library/vendor/Zend/Reflection/Function.php +++ b/library/vendor/Zend/Reflection/Function.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Function extends ReflectionFunction diff --git a/library/vendor/Zend/Reflection/Method.php b/library/vendor/Zend/Reflection/Method.php index e57c0de5b..613fcd137 100644 --- a/library/vendor/Zend/Reflection/Method.php +++ b/library/vendor/Zend/Reflection/Method.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Method extends ReflectionMethod diff --git a/library/vendor/Zend/Reflection/Parameter.php b/library/vendor/Zend/Reflection/Parameter.php index 45c1627e4..37bb63eb5 100644 --- a/library/vendor/Zend/Reflection/Parameter.php +++ b/library/vendor/Zend/Reflection/Parameter.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Parameter extends ReflectionParameter diff --git a/library/vendor/Zend/Reflection/Property.php b/library/vendor/Zend/Reflection/Property.php index bef76ac26..bdeaf09df 100644 --- a/library/vendor/Zend/Reflection/Property.php +++ b/library/vendor/Zend/Reflection/Property.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ * @todo implement line numbers * @category Zend * @package Zend_Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Reflection_Property extends ReflectionProperty diff --git a/library/vendor/Zend/Registry.php b/library/vendor/Zend/Registry.php index 2c52a0d52..a9a1b8fd0 100644 --- a/library/vendor/Zend/Registry.php +++ b/library/vendor/Zend/Registry.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Registry - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Registry - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Registry extends ArrayObject @@ -132,7 +132,7 @@ class Zend_Registry extends ArrayObject * * @param string $index - get the value associated with $index * @return mixed - * @throws Zend_Exception if no entry is registerd for $index. + * @throws Zend_Exception if no entry is registered for $index. */ public static function get($index) { diff --git a/library/vendor/Zend/Rest/Client.php b/library/vendor/Zend/Rest/Client.php index 876edbbeb..c9ebe1f51 100644 --- a/library/vendor/Zend/Rest/Client.php +++ b/library/vendor/Zend/Rest/Client.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Rest * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Rest * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Rest_Client extends Zend_Service_Abstract diff --git a/library/vendor/Zend/Rest/Client/Exception.php b/library/vendor/Zend/Rest/Client/Exception.php index 93443941d..14ae028ec 100644 --- a/library/vendor/Zend/Rest/Client/Exception.php +++ b/library/vendor/Zend/Rest/Client/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Rest * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * * @package Zend_Rest * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Rest_Client_Exception extends Zend_Rest_Exception diff --git a/library/vendor/Zend/Rest/Client/Result.php b/library/vendor/Zend/Rest/Client/Result.php index bac3d5b90..49660954b 100644 --- a/library/vendor/Zend/Rest/Client/Result.php +++ b/library/vendor/Zend/Rest/Client/Result.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Rest * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @category Zend * @package Zend_Rest * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Rest_Client_Result implements IteratorAggregate { diff --git a/library/vendor/Zend/Rest/Client/Result/Exception.php b/library/vendor/Zend/Rest/Client/Result/Exception.php index 9cf161970..e84076b5c 100644 --- a/library/vendor/Zend/Rest/Client/Result/Exception.php +++ b/library/vendor/Zend/Rest/Client/Result/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Rest * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * * @package Zend_Rest * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Rest_Client_Result_Exception extends Zend_Rest_Client_Exception{} diff --git a/library/vendor/Zend/Rest/Controller.php b/library/vendor/Zend/Rest/Controller.php index 097d553ad..9d6abd4e0 100644 --- a/library/vendor/Zend/Rest/Controller.php +++ b/library/vendor/Zend/Rest/Controller.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Rest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Rest * @see Zend_Rest_Route - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Rest_Controller extends Zend_Controller_Action diff --git a/library/vendor/Zend/Rest/Exception.php b/library/vendor/Zend/Rest/Exception.php index 0cdf90e2d..be2ff908b 100644 --- a/library/vendor/Zend/Rest/Exception.php +++ b/library/vendor/Zend/Rest/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Rest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ /** * @category Zend * @package Zend_Rest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Rest_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Rest/Route.php b/library/vendor/Zend/Rest/Route.php index 363713889..7124f34ad 100644 --- a/library/vendor/Zend/Rest/Route.php +++ b/library/vendor/Zend/Rest/Route.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Rest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -42,7 +42,7 @@ * * @category Zend * @package Zend_Rest - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Rest_Route extends Zend_Controller_Router_Route_Module diff --git a/library/vendor/Zend/Rest/Server.php b/library/vendor/Zend/Rest/Server.php index 961429e8d..402edac98 100644 --- a/library/vendor/Zend/Rest/Server.php +++ b/library/vendor/Zend/Rest/Server.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Rest * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -36,7 +36,7 @@ * @category Zend * @package Zend_Rest * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Rest_Server implements Zend_Server_Interface @@ -179,44 +179,65 @@ class Zend_Rest_Server implements Zend_Server_Interface if (isset($request['method'])) { $this->_method = $request['method']; if (isset($this->_functions[$this->_method])) { - if ($this->_functions[$this->_method] instanceof Zend_Server_Reflection_Function || $this->_functions[$this->_method] instanceof Zend_Server_Reflection_Method && $this->_functions[$this->_method]->isPublic()) { - $request_keys = array_keys($request); - array_walk($request_keys, array(__CLASS__, "lowerCase")); - $request = array_combine($request_keys, $request); + if ($this->_functions[$this->_method] instanceof + Zend_Server_Reflection_Function + || $this->_functions[$this->_method] instanceof + Zend_Server_Reflection_Method + && $this->_functions[$this->_method]->isPublic() + ) { + $requestKeys = array_keys($request); + array_walk($requestKeys, array(__CLASS__, "lowerCase")); + $request = array_combine($requestKeys, $request); - $func_args = $this->_functions[$this->_method]->getParameters(); + $funcArgs = $this->_functions[$this->_method]->getParameters(); - $calling_args = array(); - $missing_args = array(); - foreach ($func_args as $arg) { + // calling_args will be a zero-based array of the parameters + $callingArgs = array(); + $missingArgs = array(); + foreach ($funcArgs as $i => $arg) { if (isset($request[strtolower($arg->getName())])) { - $calling_args[] = $request[strtolower($arg->getName())]; + $callingArgs[$i] = $request[strtolower($arg->getName())]; } elseif ($arg->isOptional()) { - $calling_args[] = $arg->getDefaultValue(); + $callingArgs[$i] = $arg->getDefaultValue(); } else { - $missing_args[] = $arg->getName(); + $missingArgs[] = $arg->getName(); } } + $anonymousArgs = array(); foreach ($request as $key => $value) { if (substr($key, 0, 3) == 'arg') { $key = str_replace('arg', '', $key); - $calling_args[$key] = $value; - if (($index = array_search($key, $missing_args)) !== false) { - unset($missing_args[$index]); + $anonymousArgs[$key] = $value; + if (($index = array_search($key, $missingArgs)) !== false) { + unset($missingArgs[$index]); } } } + // re-key the $anonymousArgs to be zero-based, and add in + // any values already set in calling_args (optional defaults) + ksort($anonymousArgs); + $callingArgs = array_values($anonymousArgs) + $callingArgs; + // Sort arguments by key -- @see ZF-2279 - ksort($calling_args); + ksort($callingArgs); $result = false; - if (count($calling_args) < count($func_args)) { - $result = $this->fault(new Zend_Rest_Server_Exception('Invalid Method Call to ' . $this->_method . '. Missing argument(s): ' . implode(', ', $missing_args) . '.'), 400); + if (count($callingArgs) < count($funcArgs)) { + $result = $this->fault( + new Zend_Rest_Server_Exception( + 'Invalid Method Call to ' . $this->_method + . '. Missing argument(s): ' . implode( + ', ', $missingArgs + ) . '.' + ), 400 + ); } - if (!$result && $this->_functions[$this->_method] instanceof Zend_Server_Reflection_Method) { + if (!$result && $this->_functions[$this->_method] instanceof + Zend_Server_Reflection_Method + ) { // Get class $class = $this->_functions[$this->_method]->getDeclaringClass()->getName(); @@ -224,27 +245,40 @@ class Zend_Rest_Server implements Zend_Server_Interface // for some reason, invokeArgs() does not work the same as // invoke(), and expects the first argument to be an object. // So, using a callback if the method is static. - $result = $this->_callStaticMethod($class, $calling_args); + $result = $this->_callStaticMethod( + $class, + $callingArgs + ); } else { // Object method - $result = $this->_callObjectMethod($class, $calling_args); + $result = $this->_callObjectMethod( + $class, + $callingArgs + ); } } elseif (!$result) { try { - $result = call_user_func_array($this->_functions[$this->_method]->getName(), $calling_args); //$this->_functions[$this->_method]->invokeArgs($calling_args); + $result = call_user_func_array( + $this->_functions[$this->_method]->getName(), + $callingArgs + ); } catch (Exception $e) { $result = $this->fault($e); } } } else { $result = $this->fault( - new Zend_Rest_Server_Exception("Unknown Method '$this->_method'."), + new Zend_Rest_Server_Exception( + "Unknown Method '$this->_method'." + ), 404 ); } } else { $result = $this->fault( - new Zend_Rest_Server_Exception("Unknown Method '$this->_method'."), + new Zend_Rest_Server_Exception( + "Unknown Method '$this->_method'." + ), 404 ); } @@ -348,9 +382,11 @@ class Zend_Rest_Server implements Zend_Server_Interface * @param DOMElement $parent * @return void */ - protected function _structValue($struct, DOMDocument $dom, DOMElement $parent) + protected function _structValue( + $struct, DOMDocument $dom, DOMElement $parent + ) { - $struct = (array) $struct; + $struct = (array)$struct; foreach ($struct as $key => $value) { if ($value === false) { @@ -359,7 +395,7 @@ class Zend_Rest_Server implements Zend_Server_Interface $value = 1; } - if (ctype_digit((string) $key)) { + if (ctype_digit((string)$key)) { $key = 'key_' . $key; } @@ -473,13 +509,23 @@ class Zend_Rest_Server implements Zend_Server_Interface if ($exception instanceof Exception) { $element = $dom->createElement('message'); - $element->appendChild($dom->createTextNode($exception->getMessage())); + $element->appendChild( + $dom->createTextNode($exception->getMessage()) + ); $xmlResponse->appendChild($element); $code = $exception->getCode(); } elseif (($exception !== null) || 'rest' == $function) { - $xmlResponse->appendChild($dom->createElement('message', 'An unknown error occured. Please try again.')); + $xmlResponse->appendChild( + $dom->createElement( + 'message', 'An unknown error occured. Please try again.' + ) + ); } else { - $xmlResponse->appendChild($dom->createElement('message', 'Call to ' . $method . ' failed.')); + $xmlResponse->appendChild( + $dom->createElement( + 'message', 'Call to ' . $method . ' failed.' + ) + ); } $xmlMethod->appendChild($xmlResponse); @@ -521,7 +567,9 @@ class Zend_Rest_Server implements Zend_Server_Interface if (is_callable($func) && !in_array($func, self::$magicMethods)) { $this->_functions[$func] = $this->_reflection->reflectFunction($func); } else { - throw new Zend_Rest_Server_Exception("Invalid Method Added to Service."); + throw new Zend_Rest_Server_Exception( + "Invalid Method Added to Service." + ); } } } @@ -566,7 +614,13 @@ class Zend_Rest_Server implements Zend_Server_Interface protected function _callStaticMethod($class, array $args) { try { - $result = call_user_func_array(array($class, $this->_functions[$this->_method]->getName()), $args); + $result = call_user_func_array( + array( + $class, + $this->_functions[$this->_method]->getName() + ), + $args + ); } catch (Exception $e) { $result = $this->fault($e); } @@ -590,14 +644,21 @@ class Zend_Rest_Server implements Zend_Server_Interface $object = $this->_functions[$this->_method]->getDeclaringClass()->newInstance(); } } catch (Exception $e) { - throw new Zend_Rest_Server_Exception('Error instantiating class ' . $class . - ' to invoke method ' . $this->_functions[$this->_method]->getName() . - ' (' . $e->getMessage() . ') ', - 500, $e); + throw new Zend_Rest_Server_Exception( + 'Error instantiating class ' . $class . + ' to invoke method ' + . $this->_functions[$this->_method]->getName() . + ' (' . $e->getMessage() . ') ', + 500, + $e + ); } try { - $result = $this->_functions[$this->_method]->invokeArgs($object, $args); + $result = $this->_functions[$this->_method]->invokeArgs( + $object, + $args + ); } catch (Exception $e) { $result = $this->fault($e); } diff --git a/library/vendor/Zend/Rest/Server/Exception.php b/library/vendor/Zend/Rest/Server/Exception.php index b591e7091..6a1274c3f 100644 --- a/library/vendor/Zend/Rest/Server/Exception.php +++ b/library/vendor/Zend/Rest/Server/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Rest * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * * @package Zend_Rest * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Rest_Server_Exception extends Zend_Rest_Exception diff --git a/library/vendor/Zend/SOURCE b/library/vendor/Zend/SOURCE index 3783790ca..8008dd8c2 100644 --- a/library/vendor/Zend/SOURCE +++ b/library/vendor/Zend/SOURCE @@ -1,7 +1,16 @@ -curl https://codeload.github.com/zendframework/zf1/tar.gz/release-1.12.9 -o zf1-release-1.12.9.tar.gz -tar xzf zf1-release-1.12.9.tar.gz --strip-components 3 zf1-release-1.12.9/library/Zend -rm -r Auth/Adapter/Ldap.php Cache/Backend/{Apc.php,Libmemcached.php,Memcached.php} Captcha/ \ -Db/{Adapter,Statement}/{Db2*,Mysqli*,Oracle*} Db/Adapter/Pdo/{Ibm*,Mssql.php,Oci.php} \ -Db/Statement/Pdo/{Ibm.php,Oci.php} Dojo* Feed* Ldap* Pdf* Search/ \ -Serializer/Adapter/Igbinary.php Service/ Soap/ -find . -type f -name \*.php -execdir sed -i '' '/require_once/d' "{}" \; +curl https://codeload.github.com/zendframework/zf1/tar.gz/release-1.12.15 -o zf1-release-1.12.15.tar.gz +tar xzf zf1-release-1.12.15.tar.gz --strip-components 3 zf1-release-1.12.15/library/Zend +rm -r Amf/ +rm -r Cloud/ +rm -r CodeGenerator/ +rm -r Dojo/ +rm Dojo.php +rm -r Gdata/ +rm Gdata.php +rm Locale/Data/*.xml +rm -r Pdf/ +rm Pdf.php +rm -r Service/ +find . -type f -name \*.php ! -path ./Loader/Autoloader.php -execdir sed -i'' '/require_once/d' "{}" \; +rm zf1-release-1.12.15.tar.gz +chmod -R -x+X * diff --git a/library/vendor/Zend/Cloud/OperationNotAvailableException.php b/library/vendor/Zend/Search/Exception.php similarity index 72% rename from library/vendor/Zend/Cloud/OperationNotAvailableException.php rename to library/vendor/Zend/Search/Exception.php index 953c29507..6ad4bc617 100644 --- a/library/vendor/Zend/Cloud/OperationNotAvailableException.php +++ b/library/vendor/Zend/Search/Exception.php @@ -13,21 +13,24 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ */ + /** - * Zend_Exception + * Framework base exception */ + /** * @category Zend - * @package Zend_Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Cloud_OperationNotAvailableException extends Zend_Exception +class Zend_Search_Exception extends Zend_Exception {} diff --git a/library/vendor/Zend/Search/Lucene.php b/library/vendor/Zend/Search/Lucene.php new file mode 100644 index 000000000..2adf11722 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene.php @@ -0,0 +1,1537 @@ +getFileObject('segments.gen', false); + + $format = $genFile->readInt(); + if ($format != (int)0xFFFFFFFE) { + throw new Zend_Search_Lucene_Exception('Wrong segments.gen file format'); + } + + $gen1 = $genFile->readLong(); + $gen2 = $genFile->readLong(); + + if ($gen1 == $gen2) { + return $gen1; + } + + usleep(self::GENERATION_RETRIEVE_PAUSE * 1000); + } + + // All passes are failed + throw new Zend_Search_Lucene_Exception('Index is under processing now'); + } catch (Zend_Search_Lucene_Exception $e) { + if (strpos($e->getMessage(), 'is not readable') !== false) { + try { + // Try to open old style segments file + $segmentsFile = $directory->getFileObject('segments', false); + + // It's pre-2.1 index + return 0; + } catch (Zend_Search_Lucene_Exception $e) { + if (strpos($e->getMessage(), 'is not readable') !== false) { + return -1; + } else { + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + } + } else { + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + } + + return -1; + } + + /** + * Get generation number associated with this index instance + * + * The same generation number in pair with document number or query string + * guarantees to give the same result while index retrieving. + * So it may be used for search result caching. + * + * @return integer + */ + public function getGeneration() + { + return $this->_generation; + } + + + /** + * Get segments file name + * + * @param integer $generation + * @return string + */ + public static function getSegmentFileName($generation) + { + if ($generation == 0) { + return 'segments'; + } + + return 'segments_' . base_convert($generation, 10, 36); + } + + /** + * Get index format version + * + * @return integer + */ + public function getFormatVersion() + { + return $this->_formatVersion; + } + + /** + * Set index format version. + * Index is converted to this format at the nearest upfdate time + * + * @param int $formatVersion + * @throws Zend_Search_Lucene_Exception + */ + public function setFormatVersion($formatVersion) + { + if ($formatVersion != self::FORMAT_PRE_2_1 && + $formatVersion != self::FORMAT_2_1 && + $formatVersion != self::FORMAT_2_3) { + throw new Zend_Search_Lucene_Exception('Unsupported index format'); + } + + $this->_formatVersion = $formatVersion; + } + + /** + * Read segments file for pre-2.1 Lucene index format + * + * @throws Zend_Search_Lucene_Exception + */ + private function _readPre21SegmentsFile() + { + $segmentsFile = $this->_directory->getFileObject('segments'); + + $format = $segmentsFile->readInt(); + + if ($format != (int)0xFFFFFFFF) { + throw new Zend_Search_Lucene_Exception('Wrong segments file format'); + } + + // read version + $segmentsFile->readLong(); + + // read segment name counter + $segmentsFile->readInt(); + + $segments = $segmentsFile->readInt(); + + $this->_docCount = 0; + + // read segmentInfos + for ($count = 0; $count < $segments; $count++) { + $segName = $segmentsFile->readString(); + $segSize = $segmentsFile->readInt(); + $this->_docCount += $segSize; + + $this->_segmentInfos[$segName] = + new Zend_Search_Lucene_Index_SegmentInfo($this->_directory, + $segName, + $segSize); + } + + // Use 2.1 as a target version. Index will be reorganized at update time. + $this->_formatVersion = self::FORMAT_2_1; + } + + /** + * Read segments file + * + * @throws Zend_Search_Lucene_Exception + */ + private function _readSegmentsFile() + { + $segmentsFile = $this->_directory->getFileObject(self::getSegmentFileName($this->_generation)); + + $format = $segmentsFile->readInt(); + + if ($format == (int)0xFFFFFFFC) { + $this->_formatVersion = self::FORMAT_2_3; + } else if ($format == (int)0xFFFFFFFD) { + $this->_formatVersion = self::FORMAT_2_1; + } else { + throw new Zend_Search_Lucene_Exception('Unsupported segments file format'); + } + + // read version + $segmentsFile->readLong(); + + // read segment name counter + $segmentsFile->readInt(); + + $segments = $segmentsFile->readInt(); + + $this->_docCount = 0; + + // read segmentInfos + for ($count = 0; $count < $segments; $count++) { + $segName = $segmentsFile->readString(); + $segSize = $segmentsFile->readInt(); + + // 2.1+ specific properties + $delGen = $segmentsFile->readLong(); + + if ($this->_formatVersion == self::FORMAT_2_3) { + $docStoreOffset = $segmentsFile->readInt(); + + if ($docStoreOffset != (int)0xFFFFFFFF) { + $docStoreSegment = $segmentsFile->readString(); + $docStoreIsCompoundFile = $segmentsFile->readByte(); + + $docStoreOptions = array('offset' => $docStoreOffset, + 'segment' => $docStoreSegment, + 'isCompound' => ($docStoreIsCompoundFile == 1)); + } else { + $docStoreOptions = null; + } + } else { + $docStoreOptions = null; + } + + $hasSingleNormFile = $segmentsFile->readByte(); + $numField = $segmentsFile->readInt(); + + $normGens = array(); + if ($numField != (int)0xFFFFFFFF) { + for ($count1 = 0; $count1 < $numField; $count1++) { + $normGens[] = $segmentsFile->readLong(); + } + + throw new Zend_Search_Lucene_Exception('Separate norm files are not supported. Optimize index to use it with Zend_Search_Lucene.'); + } + + $isCompoundByte = $segmentsFile->readByte(); + + if ($isCompoundByte == 0xFF) { + // The segment is not a compound file + $isCompound = false; + } else if ($isCompoundByte == 0x00) { + // The status is unknown + $isCompound = null; + } else if ($isCompoundByte == 0x01) { + // The segment is a compound file + $isCompound = true; + } + + $this->_docCount += $segSize; + + $this->_segmentInfos[$segName] = + new Zend_Search_Lucene_Index_SegmentInfo($this->_directory, + $segName, + $segSize, + $delGen, + $docStoreOptions, + $hasSingleNormFile, + $isCompound); + } + } + + /** + * Opens the index. + * + * IndexReader constructor needs Directory as a parameter. It should be + * a string with a path to the index folder or a Directory object. + * + * @param Zend_Search_Lucene_Storage_Directory_Filesystem|string $directory + * @throws Zend_Search_Lucene_Exception + */ + public function __construct($directory = null, $create = false) + { + if ($directory === null) { + throw new Zend_Search_Exception('No index directory specified'); + } + + if (is_string($directory)) { + $this->_directory = new Zend_Search_Lucene_Storage_Directory_Filesystem($directory); + $this->_closeDirOnExit = true; + } else { + $this->_directory = $directory; + $this->_closeDirOnExit = false; + } + + $this->_segmentInfos = array(); + + // Mark index as "under processing" to prevent other processes from premature index cleaning + Zend_Search_Lucene_LockManager::obtainReadLock($this->_directory); + + $this->_generation = self::getActualGeneration($this->_directory); + + if ($create) { + try { + Zend_Search_Lucene_LockManager::obtainWriteLock($this->_directory); + } catch (Zend_Search_Lucene_Exception $e) { + Zend_Search_Lucene_LockManager::releaseReadLock($this->_directory); + + if (strpos($e->getMessage(), 'Can\'t obtain exclusive index lock') === false) { + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } else { + throw new Zend_Search_Lucene_Exception('Can\'t create index. It\'s under processing now', 0, $e); + } + } + + if ($this->_generation == -1) { + // Directory doesn't contain existing index, start from 1 + $this->_generation = 1; + $nameCounter = 0; + } else { + // Directory contains existing index + $segmentsFile = $this->_directory->getFileObject(self::getSegmentFileName($this->_generation)); + $segmentsFile->seek(12); // 12 = 4 (int, file format marker) + 8 (long, index version) + + $nameCounter = $segmentsFile->readInt(); + $this->_generation++; + } + + Zend_Search_Lucene_Index_Writer::createIndex($this->_directory, $this->_generation, $nameCounter); + + Zend_Search_Lucene_LockManager::releaseWriteLock($this->_directory); + } + + if ($this->_generation == -1) { + throw new Zend_Search_Lucene_Exception('Index doesn\'t exists in the specified directory.'); + } else if ($this->_generation == 0) { + $this->_readPre21SegmentsFile(); + } else { + $this->_readSegmentsFile(); + } + } + + /** + * Close current index and free resources + */ + private function _close() + { + if ($this->_closed) { + // index is already closed and resources are cleaned up + return; + } + + $this->commit(); + + // Release "under processing" flag + Zend_Search_Lucene_LockManager::releaseReadLock($this->_directory); + + if ($this->_closeDirOnExit) { + $this->_directory->close(); + } + + $this->_directory = null; + $this->_writer = null; + $this->_segmentInfos = null; + + $this->_closed = true; + } + + /** + * Add reference to the index object + * + * @internal + */ + public function addReference() + { + $this->_refCount++; + } + + /** + * Remove reference from the index object + * + * When reference count becomes zero, index is closed and resources are cleaned up + * + * @internal + */ + public function removeReference() + { + $this->_refCount--; + + if ($this->_refCount == 0) { + $this->_close(); + } + } + + /** + * Object destructor + */ + public function __destruct() + { + $this->_close(); + } + + /** + * Returns an instance of Zend_Search_Lucene_Index_Writer for the index + * + * @return Zend_Search_Lucene_Index_Writer + */ + private function _getIndexWriter() + { + if ($this->_writer === null) { + $this->_writer = new Zend_Search_Lucene_Index_Writer($this->_directory, + $this->_segmentInfos, + $this->_formatVersion); + } + + return $this->_writer; + } + + + /** + * Returns the Zend_Search_Lucene_Storage_Directory instance for this index. + * + * @return Zend_Search_Lucene_Storage_Directory + */ + public function getDirectory() + { + return $this->_directory; + } + + + /** + * Returns the total number of documents in this index (including deleted documents). + * + * @return integer + */ + public function count() + { + return $this->_docCount; + } + + /** + * Returns one greater than the largest possible document number. + * This may be used to, e.g., determine how big to allocate a structure which will have + * an element for every document number in an index. + * + * @return integer + */ + public function maxDoc() + { + return $this->count(); + } + + /** + * Returns the total number of non-deleted documents in this index. + * + * @return integer + */ + public function numDocs() + { + $numDocs = 0; + + foreach ($this->_segmentInfos as $segmentInfo) { + $numDocs += $segmentInfo->numDocs(); + } + + return $numDocs; + } + + /** + * Checks, that document is deleted + * + * @param integer $id + * @return boolean + * @throws Zend_Search_Lucene_Exception Exception is thrown if $id is out of the range + */ + public function isDeleted($id) + { + $this->commit(); + + if ($id >= $this->_docCount) { + throw new Zend_Search_Lucene_Exception('Document id is out of the range.'); + } + + $segmentStartId = 0; + foreach ($this->_segmentInfos as $segmentInfo) { + if ($segmentStartId + $segmentInfo->count() > $id) { + break; + } + + $segmentStartId += $segmentInfo->count(); + } + + return $segmentInfo->isDeleted($id - $segmentStartId); + } + + /** + * Set default search field. + * + * Null means, that search is performed through all fields by default + * + * Default value is null + * + * @param string $fieldName + */ + public static function setDefaultSearchField($fieldName) + { + self::$_defaultSearchField = $fieldName; + } + + /** + * Get default search field. + * + * Null means, that search is performed through all fields by default + * + * @return string + */ + public static function getDefaultSearchField() + { + return self::$_defaultSearchField; + } + + /** + * Set result set limit. + * + * 0 (default) means no limit + * + * @param integer $limit + */ + public static function setResultSetLimit($limit) + { + self::$_resultSetLimit = $limit; + } + + /** + * Get result set limit. + * + * 0 means no limit + * + * @return integer + */ + public static function getResultSetLimit() + { + return self::$_resultSetLimit; + } + + /** + * Set terms per query limit. + * + * 0 means no limit + * + * @param integer $limit + */ + public static function setTermsPerQueryLimit($limit) + { + self::$_termsPerQueryLimit = $limit; + } + + /** + * Get result set limit. + * + * 0 (default) means no limit + * + * @return integer + */ + public static function getTermsPerQueryLimit() + { + return self::$_termsPerQueryLimit; + } + + /** + * Retrieve index maxBufferedDocs option + * + * maxBufferedDocs is a minimal number of documents required before + * the buffered in-memory documents are written into a new Segment + * + * Default value is 10 + * + * @return integer + */ + public function getMaxBufferedDocs() + { + return $this->_getIndexWriter()->maxBufferedDocs; + } + + /** + * Set index maxBufferedDocs option + * + * maxBufferedDocs is a minimal number of documents required before + * the buffered in-memory documents are written into a new Segment + * + * Default value is 10 + * + * @param integer $maxBufferedDocs + */ + public function setMaxBufferedDocs($maxBufferedDocs) + { + $this->_getIndexWriter()->maxBufferedDocs = $maxBufferedDocs; + } + + /** + * Retrieve index maxMergeDocs option + * + * maxMergeDocs is a largest number of documents ever merged by addDocument(). + * Small values (e.g., less than 10,000) are best for interactive indexing, + * as this limits the length of pauses while indexing to a few seconds. + * Larger values are best for batched indexing and speedier searches. + * + * Default value is PHP_INT_MAX + * + * @return integer + */ + public function getMaxMergeDocs() + { + return $this->_getIndexWriter()->maxMergeDocs; + } + + /** + * Set index maxMergeDocs option + * + * maxMergeDocs is a largest number of documents ever merged by addDocument(). + * Small values (e.g., less than 10,000) are best for interactive indexing, + * as this limits the length of pauses while indexing to a few seconds. + * Larger values are best for batched indexing and speedier searches. + * + * Default value is PHP_INT_MAX + * + * @param integer $maxMergeDocs + */ + public function setMaxMergeDocs($maxMergeDocs) + { + $this->_getIndexWriter()->maxMergeDocs = $maxMergeDocs; + } + + /** + * Retrieve index mergeFactor option + * + * mergeFactor determines how often segment indices are merged by addDocument(). + * With smaller values, less RAM is used while indexing, + * and searches on unoptimized indices are faster, + * but indexing speed is slower. + * With larger values, more RAM is used during indexing, + * and while searches on unoptimized indices are slower, + * indexing is faster. + * Thus larger values (> 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @return integer + */ + public function getMergeFactor() + { + return $this->_getIndexWriter()->mergeFactor; + } + + /** + * Set index mergeFactor option + * + * mergeFactor determines how often segment indices are merged by addDocument(). + * With smaller values, less RAM is used while indexing, + * and searches on unoptimized indices are faster, + * but indexing speed is slower. + * With larger values, more RAM is used during indexing, + * and while searches on unoptimized indices are slower, + * indexing is faster. + * Thus larger values (> 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @param integer $maxMergeDocs + */ + public function setMergeFactor($mergeFactor) + { + $this->_getIndexWriter()->mergeFactor = $mergeFactor; + } + + /** + * Performs a query against the index and returns an array + * of Zend_Search_Lucene_Search_QueryHit objects. + * Input is a string or Zend_Search_Lucene_Search_Query. + * + * @param Zend_Search_Lucene_Search_QueryParser|string $query + * @return array Zend_Search_Lucene_Search_QueryHit + * @throws Zend_Search_Lucene_Exception + */ + public function find($query) + { + if (is_string($query)) { + + $query = Zend_Search_Lucene_Search_QueryParser::parse($query); + } + + if (!$query instanceof Zend_Search_Lucene_Search_Query) { + throw new Zend_Search_Lucene_Exception('Query must be a string or Zend_Search_Lucene_Search_Query object'); + } + + $this->commit(); + + $hits = array(); + $scores = array(); + $ids = array(); + + $query = $query->rewrite($this)->optimize($this); + + $query->execute($this); + + $topScore = 0; + + /** Zend_Search_Lucene_Search_QueryHit */ + + foreach ($query->matchedDocs() as $id => $num) { + $docScore = $query->score($id, $this); + if( $docScore != 0 ) { + $hit = new Zend_Search_Lucene_Search_QueryHit($this); + $hit->id = $id; + $hit->score = $docScore; + + $hits[] = $hit; + $ids[] = $id; + $scores[] = $docScore; + + if ($docScore > $topScore) { + $topScore = $docScore; + } + } + + if (self::$_resultSetLimit != 0 && count($hits) >= self::$_resultSetLimit) { + break; + } + } + + if (count($hits) == 0) { + // skip sorting, which may cause a error on empty index + return array(); + } + + if ($topScore > 1) { + foreach ($hits as $hit) { + $hit->score /= $topScore; + } + } + + if (func_num_args() == 1) { + // sort by scores + array_multisort($scores, SORT_DESC, SORT_NUMERIC, + $ids, SORT_ASC, SORT_NUMERIC, + $hits); + } else { + // sort by given field names + + $argList = func_get_args(); + $fieldNames = $this->getFieldNames(); + $sortArgs = array(); + + // PHP 5.3 now expects all arguments to array_multisort be passed by + // reference (if it's invoked through call_user_func_array()); + // since constants can't be passed by reference, create some placeholder variables. + $sortReg = SORT_REGULAR; + $sortAsc = SORT_ASC; + $sortNum = SORT_NUMERIC; + + $sortFieldValues = array(); + + for ($count = 1; $count < count($argList); $count++) { + $fieldName = $argList[$count]; + + if (!is_string($fieldName)) { + throw new Zend_Search_Lucene_Exception('Field name must be a string.'); + } + + if (strtolower($fieldName) == 'score') { + $sortArgs[] = &$scores; + } else { + if (!in_array($fieldName, $fieldNames)) { + throw new Zend_Search_Lucene_Exception('Wrong field name.'); + } + + if (!isset($sortFieldValues[$fieldName])) { + $valuesArray = array(); + foreach ($hits as $hit) { + try { + $value = $hit->getDocument()->getFieldValue($fieldName); + } catch (Zend_Search_Lucene_Exception $e) { + if (strpos($e->getMessage(), 'not found') === false) { + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } else { + $value = null; + } + } + + $valuesArray[] = $value; + } + + // Collect loaded values in $sortFieldValues + // Required for PHP 5.3 which translates references into values when source + // variable is destroyed + $sortFieldValues[$fieldName] = $valuesArray; + } + + $sortArgs[] = &$sortFieldValues[$fieldName]; + } + + if ($count + 1 < count($argList) && is_integer($argList[$count+1])) { + $count++; + $sortArgs[] = &$argList[$count]; + + if ($count + 1 < count($argList) && is_integer($argList[$count+1])) { + $count++; + $sortArgs[] = &$argList[$count]; + } else { + if ($argList[$count] == SORT_ASC || $argList[$count] == SORT_DESC) { + $sortArgs[] = &$sortReg; + } else { + $sortArgs[] = &$sortAsc; + } + } + } else { + $sortArgs[] = &$sortAsc; + $sortArgs[] = &$sortReg; + } + } + + // Sort by id's if values are equal + $sortArgs[] = &$ids; + $sortArgs[] = &$sortAsc; + $sortArgs[] = &$sortNum; + + // Array to be sorted + $sortArgs[] = &$hits; + + // Do sort + call_user_func_array('array_multisort', $sortArgs); + } + + return $hits; + } + + + /** + * Returns a list of all unique field names that exist in this index. + * + * @param boolean $indexed + * @return array + */ + public function getFieldNames($indexed = false) + { + $result = array(); + foreach( $this->_segmentInfos as $segmentInfo ) { + $result = array_merge($result, $segmentInfo->getFields($indexed)); + } + return $result; + } + + + /** + * Returns a Zend_Search_Lucene_Document object for the document + * number $id in this index. + * + * @param integer|Zend_Search_Lucene_Search_QueryHit $id + * @return Zend_Search_Lucene_Document + * @throws Zend_Search_Lucene_Exception Exception is thrown if $id is out of the range + */ + public function getDocument($id) + { + if ($id instanceof Zend_Search_Lucene_Search_QueryHit) { + /* @var $id Zend_Search_Lucene_Search_QueryHit */ + $id = $id->id; + } + + if ($id >= $this->_docCount) { + throw new Zend_Search_Lucene_Exception('Document id is out of the range.'); + } + + $segmentStartId = 0; + foreach ($this->_segmentInfos as $segmentInfo) { + if ($segmentStartId + $segmentInfo->count() > $id) { + break; + } + + $segmentStartId += $segmentInfo->count(); + } + + $fdxFile = $segmentInfo->openCompoundFile('.fdx'); + $fdxFile->seek(($id-$segmentStartId)*8, SEEK_CUR); + $fieldValuesPosition = $fdxFile->readLong(); + + $fdtFile = $segmentInfo->openCompoundFile('.fdt'); + $fdtFile->seek($fieldValuesPosition, SEEK_CUR); + $fieldCount = $fdtFile->readVInt(); + + $doc = new Zend_Search_Lucene_Document(); + for ($count = 0; $count < $fieldCount; $count++) { + $fieldNum = $fdtFile->readVInt(); + $bits = $fdtFile->readByte(); + + $fieldInfo = $segmentInfo->getField($fieldNum); + + if (!($bits & 2)) { // Text data + $field = new Zend_Search_Lucene_Field($fieldInfo->name, + $fdtFile->readString(), + 'UTF-8', + true, + $fieldInfo->isIndexed, + $bits & 1 ); + } else { // Binary data + $field = new Zend_Search_Lucene_Field($fieldInfo->name, + $fdtFile->readBinary(), + '', + true, + $fieldInfo->isIndexed, + $bits & 1, + true ); + } + + $doc->addField($field); + } + + return $doc; + } + + + /** + * Returns true if index contain documents with specified term. + * + * Is used for query optimization. + * + * @param Zend_Search_Lucene_Index_Term $term + * @return boolean + */ + public function hasTerm(Zend_Search_Lucene_Index_Term $term) + { + foreach ($this->_segmentInfos as $segInfo) { + if ($segInfo->getTermInfo($term) !== null) { + return true; + } + } + + return false; + } + + /** + * Returns IDs of all documents containing term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + */ + public function termDocs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + $subResults = array(); + $segmentStartDocId = 0; + + foreach ($this->_segmentInfos as $segmentInfo) { + $subResults[] = $segmentInfo->termDocs($term, $segmentStartDocId, $docsFilter); + + $segmentStartDocId += $segmentInfo->count(); + } + + if (count($subResults) == 0) { + return array(); + } else if (count($subResults) == 1) { + // Index is optimized (only one segment) + // Do not perform array reindexing + return reset($subResults); + } else { + $result = call_user_func_array('array_merge', $subResults); + } + + return $result; + } + + /** + * Returns documents filter for all documents containing term. + * + * It performs the same operation as termDocs, but return result as + * Zend_Search_Lucene_Index_DocsFilter object + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return Zend_Search_Lucene_Index_DocsFilter + */ + public function termDocsFilter(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + $segmentStartDocId = 0; + $result = new Zend_Search_Lucene_Index_DocsFilter(); + + foreach ($this->_segmentInfos as $segmentInfo) { + $subResults[] = $segmentInfo->termDocs($term, $segmentStartDocId, $docsFilter); + + $segmentStartDocId += $segmentInfo->count(); + } + + if (count($subResults) == 0) { + return array(); + } else if (count($subResults) == 1) { + // Index is optimized (only one segment) + // Do not perform array reindexing + return reset($subResults); + } else { + $result = call_user_func_array('array_merge', $subResults); + } + + return $result; + } + + + /** + * Returns an array of all term freqs. + * Result array structure: array(docId => freq, ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return integer + */ + public function termFreqs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + $result = array(); + $segmentStartDocId = 0; + foreach ($this->_segmentInfos as $segmentInfo) { + $result += $segmentInfo->termFreqs($term, $segmentStartDocId, $docsFilter); + + $segmentStartDocId += $segmentInfo->count(); + } + + return $result; + } + + /** + * Returns an array of all term positions in the documents. + * Result array structure: array(docId => array(pos1, pos2, ...), ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + */ + public function termPositions(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + $result = array(); + $segmentStartDocId = 0; + foreach ($this->_segmentInfos as $segmentInfo) { + $result += $segmentInfo->termPositions($term, $segmentStartDocId, $docsFilter); + + $segmentStartDocId += $segmentInfo->count(); + } + + return $result; + } + + + /** + * Returns the number of documents in this index containing the $term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @return integer + */ + public function docFreq(Zend_Search_Lucene_Index_Term $term) + { + $result = 0; + foreach ($this->_segmentInfos as $segInfo) { + $termInfo = $segInfo->getTermInfo($term); + if ($termInfo !== null) { + $result += $termInfo->docFreq; + } + } + + return $result; + } + + + /** + * Retrive similarity used by index reader + * + * @return Zend_Search_Lucene_Search_Similarity + */ + public function getSimilarity() + { + /** Zend_Search_Lucene_Search_Similarity */ + + return Zend_Search_Lucene_Search_Similarity::getDefault(); + } + + + /** + * Returns a normalization factor for "field, document" pair. + * + * @param integer $id + * @param string $fieldName + * @return float + */ + public function norm($id, $fieldName) + { + if ($id >= $this->_docCount) { + return null; + } + + $segmentStartId = 0; + foreach ($this->_segmentInfos as $segInfo) { + if ($segmentStartId + $segInfo->count() > $id) { + break; + } + + $segmentStartId += $segInfo->count(); + } + + if ($segInfo->isDeleted($id - $segmentStartId)) { + return 0; + } + + return $segInfo->norm($id - $segmentStartId, $fieldName); + } + + /** + * Returns true if any documents have been deleted from this index. + * + * @return boolean + */ + public function hasDeletions() + { + foreach ($this->_segmentInfos as $segmentInfo) { + if ($segmentInfo->hasDeletions()) { + return true; + } + } + + return false; + } + + + /** + * Deletes a document from the index. + * $id is an internal document id + * + * @param integer|Zend_Search_Lucene_Search_QueryHit $id + * @throws Zend_Search_Lucene_Exception + */ + public function delete($id) + { + if ($id instanceof Zend_Search_Lucene_Search_QueryHit) { + /* @var $id Zend_Search_Lucene_Search_QueryHit */ + $id = $id->id; + } + + if ($id >= $this->_docCount) { + throw new Zend_Search_Lucene_Exception('Document id is out of the range.'); + } + + $segmentStartId = 0; + foreach ($this->_segmentInfos as $segmentInfo) { + if ($segmentStartId + $segmentInfo->count() > $id) { + break; + } + + $segmentStartId += $segmentInfo->count(); + } + $segmentInfo->delete($id - $segmentStartId); + + $this->_hasChanges = true; + } + + + + /** + * Adds a document to this index. + * + * @param Zend_Search_Lucene_Document $document + */ + public function addDocument(Zend_Search_Lucene_Document $document) + { + $this->_getIndexWriter()->addDocument($document); + $this->_docCount++; + + $this->_hasChanges = true; + } + + + /** + * Update document counter + */ + private function _updateDocCount() + { + $this->_docCount = 0; + foreach ($this->_segmentInfos as $segInfo) { + $this->_docCount += $segInfo->count(); + } + } + + /** + * Commit changes resulting from delete() or undeleteAll() operations. + * + * @todo undeleteAll processing. + */ + public function commit() + { + if ($this->_hasChanges) { + $this->_getIndexWriter()->commit(); + + $this->_updateDocCount(); + + $this->_hasChanges = false; + } + } + + + /** + * Optimize index. + * + * Merges all segments into one + */ + public function optimize() + { + // Commit changes if any changes have been made + $this->commit(); + + if (count($this->_segmentInfos) > 1 || $this->hasDeletions()) { + $this->_getIndexWriter()->optimize(); + $this->_updateDocCount(); + } + } + + + /** + * Returns an array of all terms in this index. + * + * @return array + */ + public function terms() + { + $result = array(); + + /** Zend_Search_Lucene_Index_TermsPriorityQueue */ + + $segmentInfoQueue = new Zend_Search_Lucene_Index_TermsPriorityQueue(); + + foreach ($this->_segmentInfos as $segmentInfo) { + $segmentInfo->resetTermsStream(); + + // Skip "empty" segments + if ($segmentInfo->currentTerm() !== null) { + $segmentInfoQueue->put($segmentInfo); + } + } + + while (($segmentInfo = $segmentInfoQueue->pop()) !== null) { + if ($segmentInfoQueue->top() === null || + $segmentInfoQueue->top()->currentTerm()->key() != + $segmentInfo->currentTerm()->key()) { + // We got new term + $result[] = $segmentInfo->currentTerm(); + } + + if ($segmentInfo->nextTerm() !== null) { + // Put segment back into the priority queue + $segmentInfoQueue->put($segmentInfo); + } + } + + return $result; + } + + + /** + * Terms stream priority queue object + * + * @var Zend_Search_Lucene_TermStreamsPriorityQueue + */ + private $_termsStream = null; + + /** + * Reset terms stream. + */ + public function resetTermsStream() + { + if ($this->_termsStream === null) { + /** Zend_Search_Lucene_TermStreamsPriorityQueue */ + + $this->_termsStream = new Zend_Search_Lucene_TermStreamsPriorityQueue($this->_segmentInfos); + } else { + $this->_termsStream->resetTermsStream(); + } + } + + /** + * Skip terms stream up to the specified term preffix. + * + * Prefix contains fully specified field info and portion of searched term + * + * @param Zend_Search_Lucene_Index_Term $prefix + */ + public function skipTo(Zend_Search_Lucene_Index_Term $prefix) + { + $this->_termsStream->skipTo($prefix); + } + + /** + * Scans terms dictionary and returns next term + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function nextTerm() + { + return $this->_termsStream->nextTerm(); + } + + /** + * Returns term in current position + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function currentTerm() + { + return $this->_termsStream->currentTerm(); + } + + /** + * Close terms stream + * + * Should be used for resources clean up if stream is not read up to the end + */ + public function closeTermsStream() + { + $this->_termsStream->closeTermsStream(); + $this->_termsStream = null; + } + + + /************************************************************************* + @todo UNIMPLEMENTED + *************************************************************************/ + /** + * Undeletes all documents currently marked as deleted in this index. + * + * @todo Implementation + */ + public function undeleteAll() + {} +} diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Analyzer.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer.php new file mode 100644 index 000000000..080253395 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer.php @@ -0,0 +1,166 @@ +setInput($data, $encoding); + + $tokenList = array(); + while (($nextToken = $this->nextToken()) !== null) { + $tokenList[] = $nextToken; + } + + return $tokenList; + } + + + /** + * Tokenization stream API + * Set input + * + * @param string $data + */ + public function setInput($data, $encoding = '') + { + $this->_input = $data; + $this->_encoding = $encoding; + $this->reset(); + } + + /** + * Reset token stream + */ + abstract public function reset(); + + /** + * Tokenization stream API + * Get next token + * Returns null at the end of stream + * + * Tokens are returned in UTF-8 (internal Zend_Search_Lucene encoding) + * + * @return Zend_Search_Lucene_Analysis_Token|null + */ + abstract public function nextToken(); + + + + + /** + * Set the default Analyzer implementation used by indexing code. + * + * @param Zend_Search_Lucene_Analysis_Analyzer $similarity + */ + public static function setDefault(Zend_Search_Lucene_Analysis_Analyzer $analyzer) + { + self::$_defaultImpl = $analyzer; + } + + + /** + * Return the default Analyzer implementation used by indexing code. + * + * @return Zend_Search_Lucene_Analysis_Analyzer + */ + public static function getDefault() + { + /** Zend_Search_Lucene_Analysis_Analyzer_Common_Text_CaseInsensitive */ + + if (!self::$_defaultImpl instanceof Zend_Search_Lucene_Analysis_Analyzer) { + self::$_defaultImpl = new Zend_Search_Lucene_Analysis_Analyzer_Common_Text_CaseInsensitive(); + } + + return self::$_defaultImpl; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common.php new file mode 100644 index 000000000..ad4e28214 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common.php @@ -0,0 +1,91 @@ +_filters[] = $filter; + } + + /** + * Apply filters to the token. Can return null when the token was removed. + * + * @param Zend_Search_Lucene_Analysis_Token $token + * @return Zend_Search_Lucene_Analysis_Token + */ + public function normalize(Zend_Search_Lucene_Analysis_Token $token) + { + foreach ($this->_filters as $filter) { + $token = $filter->normalize($token); + + // resulting token can be null if the filter removes it + if ($token === null) { + return null; + } + } + + return $token; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php new file mode 100644 index 000000000..662aa878f --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php @@ -0,0 +1,95 @@ +_position = 0; + + if ($this->_input === null) { + return; + } + + // convert input into ascii + if (PHP_OS != 'AIX') { + $this->_input = iconv($this->_encoding, 'ASCII//TRANSLIT', $this->_input); + } + $this->_encoding = 'ASCII'; + } + + /** + * Tokenization stream API + * Get next token + * Returns null at the end of stream + * + * @return Zend_Search_Lucene_Analysis_Token|null + */ + public function nextToken() + { + if ($this->_input === null) { + return null; + } + + + do { + if (! preg_match('/[a-zA-Z]+/', $this->_input, $match, PREG_OFFSET_CAPTURE, $this->_position)) { + // It covers both cases a) there are no matches (preg_match(...) === 0) + // b) error occured (preg_match(...) === FALSE) + return null; + } + + $str = $match[0][0]; + $pos = $match[0][1]; + $endpos = $pos + strlen($str); + + $this->_position = $endpos; + + $token = $this->normalize(new Zend_Search_Lucene_Analysis_Token($str, $pos, $endpos)); + } while ($token === null); // try again if token is skipped + + return $token; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php new file mode 100644 index 000000000..10e8e06ce --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php @@ -0,0 +1,45 @@ +addFilter(new Zend_Search_Lucene_Analysis_TokenFilter_LowerCase()); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum.php new file mode 100644 index 000000000..24177f871 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum.php @@ -0,0 +1,94 @@ +_position = 0; + + if ($this->_input === null) { + return; + } + + // convert input into ascii + if (PHP_OS != 'AIX') { + $this->_input = iconv($this->_encoding, 'ASCII//TRANSLIT', $this->_input); + } + $this->_encoding = 'ASCII'; + } + + /** + * Tokenization stream API + * Get next token + * Returns null at the end of stream + * + * @return Zend_Search_Lucene_Analysis_Token|null + */ + public function nextToken() + { + if ($this->_input === null) { + return null; + } + + do { + if (! preg_match('/[a-zA-Z0-9]+/', $this->_input, $match, PREG_OFFSET_CAPTURE, $this->_position)) { + // It covers both cases a) there are no matches (preg_match(...) === 0) + // b) error occured (preg_match(...) === FALSE) + return null; + } + + $str = $match[0][0]; + $pos = $match[0][1]; + $endpos = $pos + strlen($str); + + $this->_position = $endpos; + + $token = $this->normalize(new Zend_Search_Lucene_Analysis_Token($str, $pos, $endpos)); + } while ($token === null); // try again if token is skipped + + return $token; + } +} + diff --git a/library/vendor/Zend/Amf/Parse/OutputStream.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php similarity index 53% rename from library/vendor/Zend/Amf/Parse/OutputStream.php rename to library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php index 16e25253e..7ecdc087b 100644 --- a/library/vendor/Zend/Amf/Parse/OutputStream.php +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php @@ -13,36 +13,33 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Amf - * @subpackage Parse - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search_Lucene + * @subpackage Analysis + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ -/** Zend_Amf_Util_BinaryStream */ + +/** Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum */ + +/** Zend_Search_Lucene_Analysis_TokenFilter_LowerCase */ + /** - * Iterate at a binary level through the AMF response - * - * OutputStream extends BinaryStream as eventually BinaryStream could be placed - * outside of Zend_Amf in order to allow other packages to use the class. - * - * @uses Zend_Amf_Util_BinaryStream - * @package Zend_Amf - * @subpackage Parse - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @category Zend + * @package Zend_Search_Lucene + * @subpackage Analysis + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Amf_Parse_OutputStream extends Zend_Amf_Util_BinaryStream + + +class Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive extends Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum { - /** - * Constructor - * - * @return void - */ public function __construct() { - parent::__construct(''); + $this->addFilter(new Zend_Search_Lucene_Analysis_TokenFilter_LowerCase()); } } + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php new file mode 100644 index 000000000..3810729a5 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php @@ -0,0 +1,124 @@ +_position = 0; + $this->_bytePosition = 0; + + // convert input into UTF-8 + if (strcasecmp($this->_encoding, 'utf8' ) != 0 && + strcasecmp($this->_encoding, 'utf-8') != 0 ) { + $this->_input = iconv($this->_encoding, 'UTF-8', $this->_input); + $this->_encoding = 'UTF-8'; + } + } + + /** + * Tokenization stream API + * Get next token + * Returns null at the end of stream + * + * @return Zend_Search_Lucene_Analysis_Token|null + */ + public function nextToken() + { + if ($this->_input === null) { + return null; + } + + do { + if (! preg_match('/[\p{L}]+/u', $this->_input, $match, PREG_OFFSET_CAPTURE, $this->_bytePosition)) { + // It covers both cases a) there are no matches (preg_match(...) === 0) + // b) error occured (preg_match(...) === FALSE) + return null; + } + + // matched string + $matchedWord = $match[0][0]; + + // binary position of the matched word in the input stream + $binStartPos = $match[0][1]; + + // character position of the matched word in the input stream + $startPos = $this->_position + + iconv_strlen(substr($this->_input, + $this->_bytePosition, + $binStartPos - $this->_bytePosition), + 'UTF-8'); + // character postion of the end of matched word in the input stream + $endPos = $startPos + iconv_strlen($matchedWord, 'UTF-8'); + + $this->_bytePosition = $binStartPos + strlen($matchedWord); + $this->_position = $endPos; + + $token = $this->normalize(new Zend_Search_Lucene_Analysis_Token($matchedWord, $startPos, $endPos)); + } while ($token === null); // try again if token is skipped + + return $token; + } +} + diff --git a/library/vendor/Zend/Cloud/Exception.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8/CaseInsensitive.php similarity index 52% rename from library/vendor/Zend/Cloud/Exception.php rename to library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8/CaseInsensitive.php index 3eae6979c..fbe5a8a2c 100644 --- a/library/vendor/Zend/Cloud/Exception.php +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8/CaseInsensitive.php @@ -13,40 +13,35 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search_Lucene + * @subpackage Analysis + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ */ -/** - * Zend_Exception - */ +/** Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8 */ + +/** Zend_Search_Lucene_Analysis_TokenFilter_LowerCaseUtf8 */ /** * @category Zend - * @package Zend_Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search_Lucene + * @subpackage Analysis + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Cloud_Exception extends Zend_Exception + + +class Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive extends Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8 { - /** - * Exception for the underlying adapter - * - * @var Exception - */ - protected $_clientException; - - public function __construct($message, $code = 0, $clientException = null) + public function __construct() { - $this->_clientException = $clientException; - parent::__construct($message, $code, $clientException); - } + parent::__construct(); - public function getClientException() { - return $this->_getPrevious(); + $this->addFilter(new Zend_Search_Lucene_Analysis_TokenFilter_LowerCaseUtf8()); } } diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php new file mode 100644 index 000000000..47d377f3b --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php @@ -0,0 +1,124 @@ +_position = 0; + $this->_bytePosition = 0; + + // convert input into UTF-8 + if (strcasecmp($this->_encoding, 'utf8' ) != 0 && + strcasecmp($this->_encoding, 'utf-8') != 0 ) { + $this->_input = iconv($this->_encoding, 'UTF-8', $this->_input); + $this->_encoding = 'UTF-8'; + } + } + + /** + * Tokenization stream API + * Get next token + * Returns null at the end of stream + * + * @return Zend_Search_Lucene_Analysis_Token|null + */ + public function nextToken() + { + if ($this->_input === null) { + return null; + } + + do { + if (! preg_match('/[\p{L}\p{N}]+/u', $this->_input, $match, PREG_OFFSET_CAPTURE, $this->_bytePosition)) { + // It covers both cases a) there are no matches (preg_match(...) === 0) + // b) error occured (preg_match(...) === FALSE) + return null; + } + + // matched string + $matchedWord = $match[0][0]; + + // binary position of the matched word in the input stream + $binStartPos = $match[0][1]; + + // character position of the matched word in the input stream + $startPos = $this->_position + + iconv_strlen(substr($this->_input, + $this->_bytePosition, + $binStartPos - $this->_bytePosition), + 'UTF-8'); + // character postion of the end of matched word in the input stream + $endPos = $startPos + iconv_strlen($matchedWord, 'UTF-8'); + + $this->_bytePosition = $binStartPos + strlen($matchedWord); + $this->_position = $endPos; + + $token = $this->normalize(new Zend_Search_Lucene_Analysis_Token($matchedWord, $startPos, $endPos)); + } while ($token === null); // try again if token is skipped + + return $token; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num/CaseInsensitive.php b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num/CaseInsensitive.php new file mode 100644 index 000000000..46aff0272 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num/CaseInsensitive.php @@ -0,0 +1,47 @@ +addFilter(new Zend_Search_Lucene_Analysis_TokenFilter_LowerCaseUtf8()); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/Token.php b/library/vendor/Zend/Search/Lucene/Analysis/Token.php new file mode 100644 index 000000000..dc900d16c --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/Token.php @@ -0,0 +1,166 @@ +_termText = $text; + $this->_startOffset = $start; + $this->_endOffset = $end; + + $this->_positionIncrement = 1; + } + + + /** + * positionIncrement setter + * + * @param integer $positionIncrement + */ + public function setPositionIncrement($positionIncrement) + { + $this->_positionIncrement = $positionIncrement; + } + + /** + * Returns the position increment of this Token. + * + * @return integer + */ + public function getPositionIncrement() + { + return $this->_positionIncrement; + } + + /** + * Returns the Token's term text. + * + * @return string + */ + public function getTermText() + { + return $this->_termText; + } + + /** + * Sets the Token's term text. + * + * @param string $text + * @return this + */ + public function setTermText($text) + { + $this->_termText = $text; + return $this; + } + + /** + * Returns this Token's starting offset, the position of the first character + * corresponding to this token in the source text. + * + * Note: + * The difference between getEndOffset() and getStartOffset() may not be equal + * to strlen(Zend_Search_Lucene_Analysis_Token::getTermText()), as the term text may have been altered + * by a stemmer or some other filter. + * + * @return integer + */ + public function getStartOffset() + { + return $this->_startOffset; + } + + /** + * Returns this Token's ending offset, one greater than the position of the + * last character corresponding to this token in the source text. + * + * @return integer + */ + public function getEndOffset() + { + return $this->_endOffset; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter.php b/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter.php new file mode 100644 index 000000000..c1705971e --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter.php @@ -0,0 +1,46 @@ +setTermText(strtolower($srcToken->getTermText())); + return $srcToken; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/LowerCaseUtf8.php b/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/LowerCaseUtf8.php new file mode 100644 index 000000000..94b877de3 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/LowerCaseUtf8.php @@ -0,0 +1,62 @@ +setTermText(mb_strtolower($srcToken->getTermText(), 'UTF-8')); + return $srcToken; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/ShortWords.php b/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/ShortWords.php new file mode 100644 index 000000000..6931ec1ca --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/ShortWords.php @@ -0,0 +1,68 @@ +length = $length; + } + + /** + * Normalize Token or remove it (if null is returned) + * + * @param Zend_Search_Lucene_Analysis_Token $srcToken + * @return Zend_Search_Lucene_Analysis_Token + */ + public function normalize(Zend_Search_Lucene_Analysis_Token $srcToken) { + if (strlen($srcToken->getTermText()) < $this->length) { + return null; + } else { + return $srcToken; + } + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php b/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php new file mode 100644 index 000000000..a9cca5333 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Analysis/TokenFilter/StopWords.php @@ -0,0 +1,97 @@ + 1, 'an' => '1'); + * + * We do recommend to provide all words in lowercase and concatenate this class after the lowercase filter. + * + * @category Zend + * @package Zend_Search_Lucene + * @subpackage Analysis + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +class Zend_Search_Lucene_Analysis_TokenFilter_StopWords extends Zend_Search_Lucene_Analysis_TokenFilter +{ + /** + * Stop Words + * @var array + */ + private $_stopSet; + + /** + * Constructs new instance of this filter. + * + * @param array $stopwords array (set) of words that will be filtered out + */ + public function __construct($stopwords = array()) { + $this->_stopSet = array_flip($stopwords); + } + + /** + * Normalize Token or remove it (if null is returned) + * + * @param Zend_Search_Lucene_Analysis_Token $srcToken + * @return Zend_Search_Lucene_Analysis_Token + */ + public function normalize(Zend_Search_Lucene_Analysis_Token $srcToken) { + if (array_key_exists($srcToken->getTermText(), $this->_stopSet)) { + return null; + } else { + return $srcToken; + } + } + + /** + * Fills stopwords set from a text file. Each line contains one stopword, lines with '#' in the first + * column are ignored (as comments). + * + * You can call this method one or more times. New stopwords are always added to current set. + * + * @param string $filepath full path for text file with stopwords + * @throws Zend_Search_Exception When the file doesn`t exists or is not readable. + */ + public function loadFromFile($filepath = null) { + if (! $filepath || ! file_exists($filepath)) { + throw new Zend_Search_Lucene_Exception('You have to provide valid file path'); + } + $fd = fopen($filepath, "r"); + if (! $fd) { + throw new Zend_Search_Lucene_Exception('Cannot open file ' . $filepath); + } + while (!feof ($fd)) { + $buffer = trim(fgets($fd)); + if (strlen($buffer) > 0 && $buffer[0] != '#') { + $this->_stopSet[$buffer] = 1; + } + } + if (!fclose($fd)) { + throw new Zend_Search_Lucene_Exception('Cannot close file ' . $filepath); + } + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Document.php b/library/vendor/Zend/Search/Lucene/Document.php new file mode 100644 index 000000000..8158c7096 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Document.php @@ -0,0 +1,129 @@ +getFieldValue($offset); + } + + + /** + * Add a field object to this document. + * + * @param Zend_Search_Lucene_Field $field + * @return Zend_Search_Lucene_Document + */ + public function addField(Zend_Search_Lucene_Field $field) + { + $this->_fields[$field->name] = $field; + + return $this; + } + + + /** + * Return an array with the names of the fields in this document. + * + * @return array + */ + public function getFieldNames() + { + return array_keys($this->_fields); + } + + + /** + * Returns Zend_Search_Lucene_Field object for a named field in this document. + * + * @param string $fieldName + * @return Zend_Search_Lucene_Field + */ + public function getField($fieldName) + { + if (!array_key_exists($fieldName, $this->_fields)) { + throw new Zend_Search_Lucene_Exception("Field name \"$fieldName\" not found in document."); + } + return $this->_fields[$fieldName]; + } + + + /** + * Returns the string value of a named field in this document. + * + * @see __get() + * @return string + */ + public function getFieldValue($fieldName) + { + return $this->getField($fieldName)->value; + } + + /** + * Returns the string value of a named field in UTF-8 encoding. + * + * @see __get() + * @return string + */ + public function getFieldUtf8Value($fieldName) + { + return $this->getField($fieldName)->getUtf8Value(); + } +} diff --git a/library/vendor/Zend/Search/Lucene/Document/Docx.php b/library/vendor/Zend/Search/Lucene/Document/Docx.php new file mode 100644 index 000000000..697298ba7 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Document/Docx.php @@ -0,0 +1,149 @@ +open($fileName); + + // Read relations and search for officeDocument + $relationsXml = $package->getFromName('_rels/.rels'); + if ($relationsXml === false) { + throw new Zend_Search_Lucene_Exception('Invalid archive or corrupted .docx file.'); + } + $relations = Zend_Xml_Security::scan($relationsXml); + foreach($relations->Relationship as $rel) { + if ($rel ["Type"] == Zend_Search_Lucene_Document_OpenXml::SCHEMA_OFFICEDOCUMENT) { + // Found office document! Read in contents... + $contents = Zend_Xml_Security::scan($package->getFromName( + $this->absoluteZipPath(dirname($rel['Target']) + . '/' + . basename($rel['Target'])) + )); + + $contents->registerXPathNamespace('w', Zend_Search_Lucene_Document_Docx::SCHEMA_WORDPROCESSINGML); + $paragraphs = $contents->xpath('//w:body/w:p'); + + foreach ($paragraphs as $paragraph) { + $runs = $paragraph->xpath('.//w:r/*[name() = "w:t" or name() = "w:br"]'); + + if ($runs === false) { + // Paragraph doesn't contain any text or breaks + continue; + } + + foreach ($runs as $run) { + if ($run->getName() == 'br') { + // Break element + $documentBody[] = ' '; + } else { + $documentBody[] = (string)$run; + } + } + + // Add space after each paragraph. So they are not bound together. + $documentBody[] = ' '; + } + + break; + } + } + + // Read core properties + $coreProperties = $this->extractMetaData($package); + + // Close file + $package->close(); + + // Store filename + $this->addField(Zend_Search_Lucene_Field::Text('filename', $fileName, 'UTF-8')); + + // Store contents + if ($storeContent) { + $this->addField(Zend_Search_Lucene_Field::Text('body', implode('', $documentBody), 'UTF-8')); + } else { + $this->addField(Zend_Search_Lucene_Field::UnStored('body', implode('', $documentBody), 'UTF-8')); + } + + // Store meta data properties + foreach ($coreProperties as $key => $value) { + $this->addField(Zend_Search_Lucene_Field::Text($key, $value, 'UTF-8')); + } + + // Store title (if not present in meta data) + if (! isset($coreProperties['title'])) { + $this->addField(Zend_Search_Lucene_Field::Text('title', $fileName, 'UTF-8')); + } + } + + /** + * Load Docx document from a file + * + * @param string $fileName + * @param boolean $storeContent + * @return Zend_Search_Lucene_Document_Docx + * @throws Zend_Search_Lucene_Document_Exception + */ + public static function loadDocxFile($fileName, $storeContent = false) { + if (!is_readable($fileName)) { + throw new Zend_Search_Lucene_Document_Exception('Provided file \'' . $fileName . '\' is not readable.'); + } + + return new Zend_Search_Lucene_Document_Docx($fileName, $storeContent); + } +} diff --git a/library/vendor/Zend/Cloud/QueueService/Exception.php b/library/vendor/Zend/Search/Lucene/Document/Exception.php similarity index 68% rename from library/vendor/Zend/Cloud/QueueService/Exception.php rename to library/vendor/Zend/Search/Lucene/Document/Exception.php index 9e30d8e49..836774d53 100644 --- a/library/vendor/Zend/Cloud/QueueService/Exception.php +++ b/library/vendor/Zend/Search/Lucene/Document/Exception.php @@ -13,24 +13,24 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Cloud - * @subpackage QueueService - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search_Lucene + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ */ /** - * Zend_Cloud_Exception + * Framework base exception */ /** * @category Zend - * @package Zend_Cloud - * @subpackage QueueService - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search_Lucene + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Cloud_QueueService_Exception extends Zend_Cloud_Exception +class Zend_Search_Lucene_Document_Exception extends Zend_Search_Lucene_Exception {} + diff --git a/library/vendor/Zend/Search/Lucene/Document/Html.php b/library/vendor/Zend/Search/Lucene/Document/Html.php new file mode 100644 index 000000000..1b5fa0e16 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Document/Html.php @@ -0,0 +1,476 @@ +_doc = new DOMDocument(); + $this->_doc->substituteEntities = true; + + if ($isFile) { + $htmlData = file_get_contents($data); + } else { + $htmlData = $data; + } + @$this->_doc->loadHTML($htmlData); + + if ($this->_doc->encoding === null) { + // Document encoding is not recognized + + /** @todo improve HTML vs HTML fragment recognition */ + if (preg_match('/]*>/i', $htmlData, $matches, PREG_OFFSET_CAPTURE)) { + // It's an HTML document + // Add additional HEAD section and recognize document + $htmlTagOffset = $matches[0][1] + strlen($matches[0][0]); + + @$this->_doc->loadHTML(iconv($defaultEncoding, 'UTF-8//IGNORE', substr($htmlData, 0, $htmlTagOffset)) + . '' + . iconv($defaultEncoding, 'UTF-8//IGNORE', substr($htmlData, $htmlTagOffset))); + + // Remove additional HEAD section + $xpath = new DOMXPath($this->_doc); + $head = $xpath->query('/html/head')->item(0); + $head->parentNode->removeChild($head); + } else { + // It's an HTML fragment + @$this->_doc->loadHTML('' + . iconv($defaultEncoding, 'UTF-8//IGNORE', $htmlData) + . ''); + } + + } + /** @todo Add correction of wrong HTML encoding recognition processing + * The case is: + * Content-type HTTP-EQUIV meta tag is presented, but ISO-8859-5 encoding is actually used, + * even $this->_doc->encoding demonstrates another recognized encoding + */ + + $xpath = new DOMXPath($this->_doc); + + $docTitle = ''; + $titleNodes = $xpath->query('/html/head/title'); + foreach ($titleNodes as $titleNode) { + // title should always have only one entry, but we process all nodeset entries + $docTitle .= $titleNode->nodeValue . ' '; + } + $this->addField(Zend_Search_Lucene_Field::Text('title', $docTitle, 'UTF-8')); + + $metaNodes = $xpath->query('/html/head/meta[@name]'); + foreach ($metaNodes as $metaNode) { + $this->addField(Zend_Search_Lucene_Field::Text($metaNode->getAttribute('name'), + $metaNode->getAttribute('content'), + 'UTF-8')); + } + + $docBody = ''; + $bodyNodes = $xpath->query('/html/body'); + foreach ($bodyNodes as $bodyNode) { + // body should always have only one entry, but we process all nodeset entries + $this->_retrieveNodeText($bodyNode, $docBody); + } + if ($storeContent) { + $this->addField(Zend_Search_Lucene_Field::Text('body', $docBody, 'UTF-8')); + } else { + $this->addField(Zend_Search_Lucene_Field::UnStored('body', $docBody, 'UTF-8')); + } + + $linkNodes = $this->_doc->getElementsByTagName('a'); + foreach ($linkNodes as $linkNode) { + if (($href = $linkNode->getAttribute('href')) != '' && + (!self::$_excludeNoFollowLinks || strtolower($linkNode->getAttribute('rel')) != 'nofollow' ) + ) { + $this->_links[] = $href; + } + } + $linkNodes = $this->_doc->getElementsByTagName('area'); + foreach ($linkNodes as $linkNode) { + if (($href = $linkNode->getAttribute('href')) != '' && + (!self::$_excludeNoFollowLinks || strtolower($linkNode->getAttribute('rel')) != 'nofollow' ) + ) { + $this->_links[] = $href; + } + } + $this->_links = array_unique($this->_links); + + $linkNodes = $xpath->query('/html/head/link'); + foreach ($linkNodes as $linkNode) { + if (($href = $linkNode->getAttribute('href')) != '') { + $this->_headerLinks[] = $href; + } + } + $this->_headerLinks = array_unique($this->_headerLinks); + } + + /** + * Set exclude nofollow links flag + * + * @param boolean $newValue + */ + public static function setExcludeNoFollowLinks($newValue) + { + self::$_excludeNoFollowLinks = $newValue; + } + + /** + * Get exclude nofollow links flag + * + * @return boolean + */ + public static function getExcludeNoFollowLinks() + { + return self::$_excludeNoFollowLinks; + } + + /** + * Get node text + * + * We should exclude scripts, which may be not included into comment tags, CDATA sections, + * + * @param DOMNode $node + * @param string &$text + */ + private function _retrieveNodeText(DOMNode $node, &$text) + { + if ($node->nodeType == XML_TEXT_NODE) { + $text .= $node->nodeValue; + if(!in_array($node->parentNode->tagName, $this->_inlineTags)) { + $text .= ' '; + } + } else if ($node->nodeType == XML_ELEMENT_NODE && $node->nodeName != 'script') { + foreach ($node->childNodes as $childNode) { + $this->_retrieveNodeText($childNode, $text); + } + } + } + + /** + * Get document HREF links + * + * @return array + */ + public function getLinks() + { + return $this->_links; + } + + /** + * Get document header links + * + * @return array + */ + public function getHeaderLinks() + { + return $this->_headerLinks; + } + + /** + * Load HTML document from a string + * + * @param string $data + * @param boolean $storeContent + * @param string $defaultEncoding HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag. + * @return Zend_Search_Lucene_Document_Html + */ + public static function loadHTML($data, $storeContent = false, $defaultEncoding = '') + { + return new Zend_Search_Lucene_Document_Html($data, false, $storeContent, $defaultEncoding); + } + + /** + * Load HTML document from a file + * + * @param string $file + * @param boolean $storeContent + * @param string $defaultEncoding HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag. + * @return Zend_Search_Lucene_Document_Html + */ + public static function loadHTMLFile($file, $storeContent = false, $defaultEncoding = '') + { + return new Zend_Search_Lucene_Document_Html($file, true, $storeContent, $defaultEncoding); + } + + + /** + * Highlight text in text node + * + * @param DOMText $node + * @param array $wordsToHighlight + * @param callback $callback Callback method, used to transform (highlighting) text. + * @param array $params Array of additionall callback parameters (first non-optional parameter is a text to transform) + * @throws Zend_Search_Lucene_Exception + */ + protected function _highlightTextNode(DOMText $node, $wordsToHighlight, $callback, $params) + { + /** Zend_Search_Lucene_Analysis_Analyzer */ + + $analyzer = Zend_Search_Lucene_Analysis_Analyzer::getDefault(); + $analyzer->setInput($node->nodeValue, 'UTF-8'); + + $matchedTokens = array(); + + while (($token = $analyzer->nextToken()) !== null) { + if (isset($wordsToHighlight[$token->getTermText()])) { + $matchedTokens[] = $token; + } + } + + if (count($matchedTokens) == 0) { + return; + } + + $matchedTokens = array_reverse($matchedTokens); + + foreach ($matchedTokens as $token) { + // Cut text after matched token + $node->splitText($token->getEndOffset()); + + // Cut matched node + $matchedWordNode = $node->splitText($token->getStartOffset()); + + // Retrieve HTML string representation for highlihted word + $fullCallbackparamsList = $params; + array_unshift($fullCallbackparamsList, $matchedWordNode->nodeValue); + $highlightedWordNodeSetHtml = call_user_func_array($callback, $fullCallbackparamsList); + + // Transform HTML string to a DOM representation and automatically transform retrieved string + // into valid XHTML (It's automatically done by loadHTML() method) + $highlightedWordNodeSetDomDocument = new DOMDocument('1.0', 'UTF-8'); + $success = @$highlightedWordNodeSetDomDocument-> + loadHTML('' + . $highlightedWordNodeSetHtml + . ''); + if (!$success) { + throw new Zend_Search_Lucene_Exception("Error occured while loading highlighted text fragment: '$highlightedWordNodeSetHtml'."); + } + $highlightedWordNodeSetXpath = new DOMXPath($highlightedWordNodeSetDomDocument); + $highlightedWordNodeSet = $highlightedWordNodeSetXpath->query('/html/body')->item(0)->childNodes; + + for ($count = 0; $count < $highlightedWordNodeSet->length; $count++) { + $nodeToImport = $highlightedWordNodeSet->item($count); + $node->parentNode->insertBefore($this->_doc->importNode($nodeToImport, true /* deep copy */), + $matchedWordNode); + } + + $node->parentNode->removeChild($matchedWordNode); + } + } + + + /** + * highlight words in content of the specified node + * + * @param DOMNode $contextNode + * @param array $wordsToHighlight + * @param callback $callback Callback method, used to transform (highlighting) text. + * @param array $params Array of additionall callback parameters (first non-optional parameter is a text to transform) + */ + protected function _highlightNodeRecursive(DOMNode $contextNode, $wordsToHighlight, $callback, $params) + { + $textNodes = array(); + + if (!$contextNode->hasChildNodes()) { + return; + } + + foreach ($contextNode->childNodes as $childNode) { + if ($childNode->nodeType == XML_TEXT_NODE) { + // process node later to leave childNodes structure untouched + $textNodes[] = $childNode; + } else { + // Process node if it's not a script node + if ($childNode->nodeName != 'script') { + $this->_highlightNodeRecursive($childNode, $wordsToHighlight, $callback, $params); + } + } + } + + foreach ($textNodes as $textNode) { + $this->_highlightTextNode($textNode, $wordsToHighlight, $callback, $params); + } + } + + /** + * Standard callback method used to highlight words. + * + * @param string $stringToHighlight + * @return string + * @internal + */ + public function applyColour($stringToHighlight, $colour) + { + return '' . $stringToHighlight . ''; + } + + /** + * Highlight text with specified color + * + * @param string|array $words + * @param string $colour + * @return string + */ + public function highlight($words, $colour = '#66ffff') + { + return $this->highlightExtended($words, array($this, 'applyColour'), array($colour)); + } + + + + /** + * Highlight text using specified View helper or callback function. + * + * @param string|array $words Words to highlight. Words could be organized using the array or string. + * @param callback $callback Callback method, used to transform (highlighting) text. + * @param array $params Array of additionall callback parameters passed through into it + * (first non-optional parameter is an HTML fragment for highlighting) + * @return string + * @throws Zend_Search_Lucene_Exception + */ + public function highlightExtended($words, $callback, $params = array()) + { + /** Zend_Search_Lucene_Analysis_Analyzer */ + + if (!is_array($words)) { + $words = array($words); + } + + $wordsToHighlightList = array(); + $analyzer = Zend_Search_Lucene_Analysis_Analyzer::getDefault(); + foreach ($words as $wordString) { + $wordsToHighlightList[] = $analyzer->tokenize($wordString); + } + $wordsToHighlight = call_user_func_array('array_merge', $wordsToHighlightList); + + if (count($wordsToHighlight) == 0) { + return $this->_doc->saveHTML(); + } + + $wordsToHighlightFlipped = array(); + foreach ($wordsToHighlight as $id => $token) { + $wordsToHighlightFlipped[$token->getTermText()] = $id; + } + + if (!is_callable($callback)) { + throw new Zend_Search_Lucene_Exception('$viewHelper parameter must be a View Helper name, View Helper object or callback.'); + } + + $xpath = new DOMXPath($this->_doc); + + $matchedNodes = $xpath->query("/html/body"); + foreach ($matchedNodes as $matchedNode) { + $this->_highlightNodeRecursive($matchedNode, $wordsToHighlightFlipped, $callback, $params); + } + } + + + /** + * Get HTML + * + * @return string + */ + public function getHTML() + { + return $this->_doc->saveHTML(); + } + + /** + * Get HTML body + * + * @return string + */ + public function getHtmlBody() + { + $xpath = new DOMXPath($this->_doc); + $bodyNodes = $xpath->query('/html/body')->item(0)->childNodes; + + $outputFragments = array(); + for ($count = 0; $count < $bodyNodes->length; $count++) { + $outputFragments[] = $this->_doc->saveXML($bodyNodes->item($count)); + } + + return implode($outputFragments); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Document/OpenXml.php b/library/vendor/Zend/Search/Lucene/Document/OpenXml.php new file mode 100644 index 000000000..7c86ad264 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Document/OpenXml.php @@ -0,0 +1,129 @@ +getFromName("_rels/.rels")); + foreach ($relations->Relationship as $rel) { + if ($rel["Type"] == Zend_Search_Lucene_Document_OpenXml::SCHEMA_COREPROPERTIES) { + // Found core properties! Read in contents... + $contents = Zend_Xml_Security::scan( + $package->getFromName(dirname($rel["Target"]) . "/" . basename($rel["Target"])) + ); + + foreach ($contents->children(Zend_Search_Lucene_Document_OpenXml::SCHEMA_DUBLINCORE) as $child) { + $coreProperties[$child->getName()] = (string)$child; + } + foreach ($contents->children(Zend_Search_Lucene_Document_OpenXml::SCHEMA_COREPROPERTIES) as $child) { + $coreProperties[$child->getName()] = (string)$child; + } + foreach ($contents->children(Zend_Search_Lucene_Document_OpenXml::SCHEMA_DUBLINCORETERMS) as $child) { + $coreProperties[$child->getName()] = (string)$child; + } + } + } + + return $coreProperties; + } + + /** + * Determine absolute zip path + * + * @param string $path + * @return string + */ + protected function absoluteZipPath($path) { + $path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path); + $parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen'); + $absolutes = array(); + foreach ($parts as $part) { + if ('.' == $part) continue; + if ('..' == $part) { + array_pop($absolutes); + } else { + $absolutes[] = $part; + } + } + return implode('/', $absolutes); + } +} diff --git a/library/vendor/Zend/Search/Lucene/Document/Pptx.php b/library/vendor/Zend/Search/Lucene/Document/Pptx.php new file mode 100644 index 000000000..48aede0b7 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Document/Pptx.php @@ -0,0 +1,198 @@ +open($fileName); + + // Read relations and search for officeDocument + $relationsXml = $package->getFromName('_rels/.rels'); + if ($relationsXml === false) { + throw new Zend_Search_Lucene_Exception('Invalid archive or corrupted .pptx file.'); + } + $relations = Zend_Xml_Security::scan($relationsXml); + foreach ($relations->Relationship as $rel) { + if ($rel["Type"] == Zend_Search_Lucene_Document_OpenXml::SCHEMA_OFFICEDOCUMENT) { + // Found office document! Search for slides... + $slideRelations = Zend_Xml_Security::scan($package->getFromName( $this->absoluteZipPath(dirname($rel["Target"]) . "/_rels/" . basename($rel["Target"]) . ".rels")) ); + foreach ($slideRelations->Relationship as $slideRel) { + if ($slideRel["Type"] == Zend_Search_Lucene_Document_Pptx::SCHEMA_SLIDERELATION) { + // Found slide! + $slides[ str_replace( 'rId', '', (string)$slideRel["Id"] ) ] = Zend_Xml_Security::scan( + $package->getFromName( $this->absoluteZipPath(dirname($rel["Target"]) . "/" . dirname($slideRel["Target"]) . "/" . basename($slideRel["Target"])) ) + ); + + // Search for slide notes + $slideNotesRelations = Zend_Xml_Security::scan($package->getFromName( $this->absoluteZipPath(dirname($rel["Target"]) . "/" . dirname($slideRel["Target"]) . "/_rels/" . basename($slideRel["Target"]) . ".rels")) ); + foreach ($slideNotesRelations->Relationship as $slideNoteRel) { + if ($slideNoteRel["Type"] == Zend_Search_Lucene_Document_Pptx::SCHEMA_SLIDENOTESRELATION) { + // Found slide notes! + $slideNotes[ str_replace( 'rId', '', (string)$slideRel["Id"] ) ] = Zend_Xml_Security::scan( + $package->getFromName( $this->absoluteZipPath(dirname($rel["Target"]) . "/" . dirname($slideRel["Target"]) . "/" . dirname($slideNoteRel["Target"]) . "/" . basename($slideNoteRel["Target"])) ) + ); + + break; + } + } + } + } + + break; + } + } + + // Sort slides + ksort($slides); + ksort($slideNotes); + + // Extract contents from slides + foreach ($slides as $slideKey => $slide) { + // Register namespaces + $slide->registerXPathNamespace("p", Zend_Search_Lucene_Document_Pptx::SCHEMA_PRESENTATIONML); + $slide->registerXPathNamespace("a", Zend_Search_Lucene_Document_Pptx::SCHEMA_DRAWINGML); + + // Fetch all text + $textElements = $slide->xpath('//a:t'); + foreach ($textElements as $textElement) { + $documentBody[] = (string)$textElement; + } + + // Extract contents from slide notes + if (isset($slideNotes[$slideKey])) { + // Fetch slide note + $slideNote = $slideNotes[$slideKey]; + + // Register namespaces + $slideNote->registerXPathNamespace("p", Zend_Search_Lucene_Document_Pptx::SCHEMA_PRESENTATIONML); + $slideNote->registerXPathNamespace("a", Zend_Search_Lucene_Document_Pptx::SCHEMA_DRAWINGML); + + // Fetch all text + $textElements = $slideNote->xpath('//a:t'); + foreach ($textElements as $textElement) { + $documentBody[] = (string)$textElement; + } + } + } + + // Read core properties + $coreProperties = $this->extractMetaData($package); + + // Close file + $package->close(); + + // Store filename + $this->addField(Zend_Search_Lucene_Field::Text('filename', $fileName, 'UTF-8')); + + // Store contents + if ($storeContent) { + $this->addField(Zend_Search_Lucene_Field::Text('body', implode(' ', $documentBody), 'UTF-8')); + } else { + $this->addField(Zend_Search_Lucene_Field::UnStored('body', implode(' ', $documentBody), 'UTF-8')); + } + + // Store meta data properties + foreach ($coreProperties as $key => $value) + { + $this->addField(Zend_Search_Lucene_Field::Text($key, $value, 'UTF-8')); + } + + // Store title (if not present in meta data) + if (!isset($coreProperties['title'])) + { + $this->addField(Zend_Search_Lucene_Field::Text('title', $fileName, 'UTF-8')); + } + } + + /** + * Load Pptx document from a file + * + * @param string $fileName + * @param boolean $storeContent + * @return Zend_Search_Lucene_Document_Pptx + */ + public static function loadPptxFile($fileName, $storeContent = false) + { + return new Zend_Search_Lucene_Document_Pptx($fileName, $storeContent); + } +} diff --git a/library/vendor/Zend/Search/Lucene/Document/Xlsx.php b/library/vendor/Zend/Search/Lucene/Document/Xlsx.php new file mode 100644 index 000000000..5b8b318c7 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Document/Xlsx.php @@ -0,0 +1,262 @@ +open($fileName); + + // Read relations and search for officeDocument + $relationsXml = $package->getFromName('_rels/.rels'); + if ($relationsXml === false) { + throw new Zend_Search_Lucene_Exception('Invalid archive or corrupted .xlsx file.'); + } + $relations = Zend_Xml_Security::scan($relationsXml); + foreach ($relations->Relationship as $rel) { + if ($rel["Type"] == Zend_Search_Lucene_Document_OpenXml::SCHEMA_OFFICEDOCUMENT) { + // Found office document! Read relations for workbook... + $workbookRelations = Zend_Xml_Security::scan($package->getFromName( $this->absoluteZipPath(dirname($rel["Target"]) . "/_rels/" . basename($rel["Target"]) . ".rels")) ); + $workbookRelations->registerXPathNamespace("rel", Zend_Search_Lucene_Document_OpenXml::SCHEMA_RELATIONSHIP); + + // Read shared strings + $sharedStringsPath = $workbookRelations->xpath("rel:Relationship[@Type='" . Zend_Search_Lucene_Document_Xlsx::SCHEMA_SHAREDSTRINGS . "']"); + $sharedStringsPath = (string)$sharedStringsPath[0]['Target']; + $xmlStrings = Zend_Xml_Security::scan($package->getFromName( $this->absoluteZipPath(dirname($rel["Target"]) . "/" . $sharedStringsPath)) ); + if (isset($xmlStrings) && isset($xmlStrings->si)) { + foreach ($xmlStrings->si as $val) { + if (isset($val->t)) { + $sharedStrings[] = (string)$val->t; + } elseif (isset($val->r)) { + $sharedStrings[] = $this->_parseRichText($val); + } + } + } + + // Loop relations for workbook and extract worksheets... + foreach ($workbookRelations->Relationship as $workbookRelation) { + if ($workbookRelation["Type"] == Zend_Search_Lucene_Document_Xlsx::SCHEMA_WORKSHEETRELATION) { + $worksheets[ str_replace( 'rId', '', (string)$workbookRelation["Id"]) ] = Zend_Xml_Security::scan( + $package->getFromName( $this->absoluteZipPath(dirname($rel["Target"]) . "/" . dirname($workbookRelation["Target"]) . "/" . basename($workbookRelation["Target"])) ) + ); + } + } + + break; + } + } + + // Sort worksheets + ksort($worksheets); + + // Extract contents from worksheets + foreach ($worksheets as $sheetKey => $worksheet) { + foreach ($worksheet->sheetData->row as $row) { + foreach ($row->c as $c) { + // Determine data type + $dataType = (string)$c["t"]; + switch ($dataType) { + case "s": + // Value is a shared string + if ((string)$c->v != '') { + $value = $sharedStrings[intval($c->v)]; + } else { + $value = ''; + } + + break; + + case "b": + // Value is boolean + $value = (string)$c->v; + if ($value == '0') { + $value = false; + } else if ($value == '1') { + $value = true; + } else { + $value = (bool)$c->v; + } + + break; + + case "inlineStr": + // Value is rich text inline + $value = $this->_parseRichText($c->is); + + break; + + case "e": + // Value is an error message + if ((string)$c->v != '') { + $value = (string)$c->v; + } else { + $value = ''; + } + + break; + + default: + // Value is a string + $value = (string)$c->v; + + // Check for numeric values + if (is_numeric($value) && $dataType != 's') { + if ($value == (int)$value) $value = (int)$value; + elseif ($value == (float)$value) $value = (float)$value; + elseif ($value == (double)$value) $value = (double)$value; + } + } + + $documentBody[] = $value; + } + } + } + + // Read core properties + $coreProperties = $this->extractMetaData($package); + + // Close file + $package->close(); + + // Store filename + $this->addField(Zend_Search_Lucene_Field::Text('filename', $fileName, 'UTF-8')); + + // Store contents + if ($storeContent) { + $this->addField(Zend_Search_Lucene_Field::Text('body', implode(' ', $documentBody), 'UTF-8')); + } else { + $this->addField(Zend_Search_Lucene_Field::UnStored('body', implode(' ', $documentBody), 'UTF-8')); + } + + // Store meta data properties + foreach ($coreProperties as $key => $value) + { + $this->addField(Zend_Search_Lucene_Field::Text($key, $value, 'UTF-8')); + } + + // Store title (if not present in meta data) + if (!isset($coreProperties['title'])) + { + $this->addField(Zend_Search_Lucene_Field::Text('title', $fileName, 'UTF-8')); + } + } + + /** + * Parse rich text XML + * + * @param SimpleXMLElement $is + * @return string + */ + private function _parseRichText($is = null) { + $value = array(); + + if (isset($is->t)) { + $value[] = (string)$is->t; + } else { + foreach ($is->r as $run) { + $value[] = (string)$run->t; + } + } + + return implode('', $value); + } + + /** + * Load Xlsx document from a file + * + * @param string $fileName + * @param boolean $storeContent + * @return Zend_Search_Lucene_Document_Xlsx + */ + public static function loadXlsxFile($fileName, $storeContent = false) + { + return new Zend_Search_Lucene_Document_Xlsx($fileName, $storeContent); + } +} diff --git a/library/vendor/Zend/Search/Lucene/Exception.php b/library/vendor/Zend/Search/Lucene/Exception.php new file mode 100644 index 000000000..dcb82b30c --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Exception.php @@ -0,0 +1,36 @@ + targetState + * + * @var array + */ + private $_rules = array(); + + /** + * List of entry actions + * Each action executes when entering the state + * + * [state] => action + * + * @var array + */ + private $_entryActions = array(); + + /** + * List of exit actions + * Each action executes when exiting the state + * + * [state] => action + * + * @var array + */ + private $_exitActions = array(); + + /** + * List of input actions + * Each action executes when entering the state + * + * [state][input] => action + * + * @var array + */ + private $_inputActions = array(); + + /** + * List of input actions + * Each action executes when entering the state + * + * [state1][state2] => action + * + * @var array + */ + private $_transitionActions = array(); + + /** + * Finite State machine constructor + * + * $states is an array of integers or strings with a list of possible machine states + * constructor treats fist list element as a sturt state (assignes it to $_current state). + * It may be reassigned by setState() call. + * States list may be empty and can be extended later by addState() or addStates() calls. + * + * $inputAphabet is the same as $states, but represents input alphabet + * it also may be extended later by addInputSymbols() or addInputSymbol() calls. + * + * $rules parameter describes FSM transitions and has a structure: + * array( array(sourseState, input, targetState[, inputAction]), + * array(sourseState, input, targetState[, inputAction]), + * array(sourseState, input, targetState[, inputAction]), + * ... + * ) + * Rules also can be added later by addRules() and addRule() calls. + * + * FSM actions are very flexible and may be defined by addEntryAction(), addExitAction(), + * addInputAction() and addTransitionAction() calls. + * + * @param array $states + * @param array $inputAphabet + * @param array $rules + */ + public function __construct($states = array(), $inputAphabet = array(), $rules = array()) + { + $this->addStates($states); + $this->addInputSymbols($inputAphabet); + $this->addRules($rules); + } + + /** + * Add states to the state machine + * + * @param array $states + */ + public function addStates($states) + { + foreach ($states as $state) { + $this->addState($state); + } + } + + /** + * Add state to the state machine + * + * @param integer|string $state + */ + public function addState($state) + { + $this->_states[$state] = $state; + + if ($this->_currentState === null) { + $this->_currentState = $state; + } + } + + /** + * Set FSM state. + * No any action is invoked + * + * @param integer|string $state + * @throws Zend_Search_Exception + */ + public function setState($state) + { + if (!isset($this->_states[$state])) { + throw new Zend_Search_Exception('State \'' . $state . '\' is not on of the possible FSM states.'); + } + + $this->_currentState = $state; + } + + /** + * Get FSM state. + * + * @return integer|string $state|null + */ + public function getState() + { + return $this->_currentState; + } + + /** + * Add symbols to the input alphabet + * + * @param array $inputAphabet + */ + public function addInputSymbols($inputAphabet) + { + foreach ($inputAphabet as $inputSymbol) { + $this->addInputSymbol($inputSymbol); + } + } + + /** + * Add symbol to the input alphabet + * + * @param integer|string $inputSymbol + */ + public function addInputSymbol($inputSymbol) + { + $this->_inputAphabet[$inputSymbol] = $inputSymbol; + } + + + /** + * Add transition rules + * + * array structure: + * array( array(sourseState, input, targetState[, inputAction]), + * array(sourseState, input, targetState[, inputAction]), + * array(sourseState, input, targetState[, inputAction]), + * ... + * ) + * + * @param array $rules + */ + public function addRules($rules) + { + foreach ($rules as $rule) { + $this->addrule($rule[0], $rule[1], $rule[2], isset($rule[3])?$rule[3]:null); + } + } + + /** + * Add symbol to the input alphabet + * + * @param integer|string $sourceState + * @param integer|string $input + * @param integer|string $targetState + * @param Zend_Search_Lucene_FSMAction|null $inputAction + * @throws Zend_Search_Exception + */ + public function addRule($sourceState, $input, $targetState, $inputAction = null) + { + if (!isset($this->_states[$sourceState])) { + throw new Zend_Search_Exception('Undefined source state (' . $sourceState . ').'); + } + if (!isset($this->_states[$targetState])) { + throw new Zend_Search_Exception('Undefined target state (' . $targetState . ').'); + } + if (!isset($this->_inputAphabet[$input])) { + throw new Zend_Search_Exception('Undefined input symbol (' . $input . ').'); + } + + if (!isset($this->_rules[$sourceState])) { + $this->_rules[$sourceState] = array(); + } + if (isset($this->_rules[$sourceState][$input])) { + throw new Zend_Search_Exception('Rule for {state,input} pair (' . $sourceState . ', '. $input . ') is already defined.'); + } + + $this->_rules[$sourceState][$input] = $targetState; + + + if ($inputAction !== null) { + $this->addInputAction($sourceState, $input, $inputAction); + } + } + + + /** + * Add state entry action. + * Several entry actions are allowed. + * Action execution order is defined by addEntryAction() calls + * + * @param integer|string $state + * @param Zend_Search_Lucene_FSMAction $action + */ + public function addEntryAction($state, Zend_Search_Lucene_FSMAction $action) + { + if (!isset($this->_states[$state])) { + throw new Zend_Search_Exception('Undefined state (' . $state. ').'); + } + + if (!isset($this->_entryActions[$state])) { + $this->_entryActions[$state] = array(); + } + + $this->_entryActions[$state][] = $action; + } + + /** + * Add state exit action. + * Several exit actions are allowed. + * Action execution order is defined by addEntryAction() calls + * + * @param integer|string $state + * @param Zend_Search_Lucene_FSMAction $action + */ + public function addExitAction($state, Zend_Search_Lucene_FSMAction $action) + { + if (!isset($this->_states[$state])) { + throw new Zend_Search_Exception('Undefined state (' . $state. ').'); + } + + if (!isset($this->_exitActions[$state])) { + $this->_exitActions[$state] = array(); + } + + $this->_exitActions[$state][] = $action; + } + + /** + * Add input action (defined by {state, input} pair). + * Several input actions are allowed. + * Action execution order is defined by addInputAction() calls + * + * @param integer|string $state + * @param integer|string $input + * @param Zend_Search_Lucene_FSMAction $action + */ + public function addInputAction($state, $inputSymbol, Zend_Search_Lucene_FSMAction $action) + { + if (!isset($this->_states[$state])) { + throw new Zend_Search_Exception('Undefined state (' . $state. ').'); + } + if (!isset($this->_inputAphabet[$inputSymbol])) { + throw new Zend_Search_Exception('Undefined input symbol (' . $inputSymbol. ').'); + } + + if (!isset($this->_inputActions[$state])) { + $this->_inputActions[$state] = array(); + } + if (!isset($this->_inputActions[$state][$inputSymbol])) { + $this->_inputActions[$state][$inputSymbol] = array(); + } + + $this->_inputActions[$state][$inputSymbol][] = $action; + } + + /** + * Add transition action (defined by {state, input} pair). + * Several transition actions are allowed. + * Action execution order is defined by addTransitionAction() calls + * + * @param integer|string $sourceState + * @param integer|string $targetState + * @param Zend_Search_Lucene_FSMAction $action + */ + public function addTransitionAction($sourceState, $targetState, Zend_Search_Lucene_FSMAction $action) + { + if (!isset($this->_states[$sourceState])) { + throw new Zend_Search_Exception('Undefined source state (' . $sourceState. ').'); + } + if (!isset($this->_states[$targetState])) { + throw new Zend_Search_Exception('Undefined source state (' . $targetState. ').'); + } + + if (!isset($this->_transitionActions[$sourceState])) { + $this->_transitionActions[$sourceState] = array(); + } + if (!isset($this->_transitionActions[$sourceState][$targetState])) { + $this->_transitionActions[$sourceState][$targetState] = array(); + } + + $this->_transitionActions[$sourceState][$targetState][] = $action; + } + + + /** + * Process an input + * + * @param mixed $input + * @throws Zend_Search_Exception + */ + public function process($input) + { + if (!isset($this->_rules[$this->_currentState])) { + throw new Zend_Search_Exception('There is no any rule for current state (' . $this->_currentState . ').'); + } + if (!isset($this->_rules[$this->_currentState][$input])) { + throw new Zend_Search_Exception('There is no any rule for {current state, input} pair (' . $this->_currentState . ', ' . $input . ').'); + } + + $sourceState = $this->_currentState; + $targetState = $this->_rules[$this->_currentState][$input]; + + if ($sourceState != $targetState && isset($this->_exitActions[$sourceState])) { + foreach ($this->_exitActions[$sourceState] as $action) { + $action->doAction(); + } + } + if (isset($this->_inputActions[$sourceState]) && + isset($this->_inputActions[$sourceState][$input])) { + foreach ($this->_inputActions[$sourceState][$input] as $action) { + $action->doAction(); + } + } + + + $this->_currentState = $targetState; + + if (isset($this->_transitionActions[$sourceState]) && + isset($this->_transitionActions[$sourceState][$targetState])) { + foreach ($this->_transitionActions[$sourceState][$targetState] as $action) { + $action->doAction(); + } + } + if ($sourceState != $targetState && isset($this->_entryActions[$targetState])) { + foreach ($this->_entryActions[$targetState] as $action) { + $action->doAction(); + } + } + } + + public function reset() + { + if (count($this->_states) == 0) { + throw new Zend_Search_Exception('There is no any state defined for FSM.'); + } + + $this->_currentState = $this->_states[0]; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/FSMAction.php b/library/vendor/Zend/Search/Lucene/FSMAction.php new file mode 100644 index 000000000..aee126320 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/FSMAction.php @@ -0,0 +1,66 @@ +_object = $object; + $this->_method = $method; + } + + public function doAction() + { + $methodName = $this->_method; + $this->_object->$methodName(); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Field.php b/library/vendor/Zend/Search/Lucene/Field.php new file mode 100644 index 000000000..2c187dcea --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Field.php @@ -0,0 +1,226 @@ +name = $name; + $this->value = $value; + + if (!$isBinary) { + $this->encoding = $encoding; + $this->isTokenized = $isTokenized; + } else { + $this->encoding = ''; + $this->isTokenized = false; + } + + $this->isStored = $isStored; + $this->isIndexed = $isIndexed; + $this->isBinary = $isBinary; + + $this->storeTermVector = false; + $this->boost = 1.0; + } + + + /** + * Constructs a String-valued Field that is not tokenized, but is indexed + * and stored. Useful for non-text fields, e.g. date or url. + * + * @param string $name + * @param string $value + * @param string $encoding + * @return Zend_Search_Lucene_Field + */ + public static function keyword($name, $value, $encoding = '') + { + return new self($name, $value, $encoding, true, true, false); + } + + + /** + * Constructs a String-valued Field that is not tokenized nor indexed, + * but is stored in the index, for return with hits. + * + * @param string $name + * @param string $value + * @param string $encoding + * @return Zend_Search_Lucene_Field + */ + public static function unIndexed($name, $value, $encoding = '') + { + return new self($name, $value, $encoding, true, false, false); + } + + + /** + * Constructs a Binary String valued Field that is not tokenized nor indexed, + * but is stored in the index, for return with hits. + * + * @param string $name + * @param string $value + * @param string $encoding + * @return Zend_Search_Lucene_Field + */ + public static function binary($name, $value) + { + return new self($name, $value, '', true, false, false, true); + } + + /** + * Constructs a String-valued Field that is tokenized and indexed, + * and is stored in the index, for return with hits. Useful for short text + * fields, like "title" or "subject". Term vector will not be stored for this field. + * + * @param string $name + * @param string $value + * @param string $encoding + * @return Zend_Search_Lucene_Field + */ + public static function text($name, $value, $encoding = '') + { + return new self($name, $value, $encoding, true, true, true); + } + + + /** + * Constructs a String-valued Field that is tokenized and indexed, + * but that is not stored in the index. + * + * @param string $name + * @param string $value + * @param string $encoding + * @return Zend_Search_Lucene_Field + */ + public static function unStored($name, $value, $encoding = '') + { + return new self($name, $value, $encoding, false, true, true); + } + + /** + * Get field value in UTF-8 encoding + * + * @return string + */ + public function getUtf8Value() + { + if (strcasecmp($this->encoding, 'utf8' ) == 0 || + strcasecmp($this->encoding, 'utf-8') == 0 ) { + return $this->value; + } else { + + return (PHP_OS != 'AIX') ? iconv($this->encoding, 'UTF-8', $this->value) : iconv('ISO8859-1', 'UTF-8', $this->value); + } + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/DictionaryLoader.php b/library/vendor/Zend/Search/Lucene/Index/DictionaryLoader.php new file mode 100644 index 000000000..f76c88c1b --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/DictionaryLoader.php @@ -0,0 +1,264 @@ +.tii index file data and + * returns two arrays - term and tremInfo lists. + * + * See Zend_Search_Lucene_Index_SegmintInfo class for details + * + * @param string $data + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public static function load($data) + { + $termDictionary = array(); + $termInfos = array(); + $pos = 0; + + // $tiVersion = $tiiFile->readInt(); + $tiVersion = ord($data[0]) << 24 | ord($data[1]) << 16 | ord($data[2]) << 8 | ord($data[3]); + $pos += 4; + if ($tiVersion != (int)0xFFFFFFFE /* pre-2.1 format */ && + $tiVersion != (int)0xFFFFFFFD /* 2.1+ format */) { + throw new Zend_Search_Lucene_Exception('Wrong TermInfoIndexFile file format'); + } + + // $indexTermCount = $tiiFile->readLong(); + if (PHP_INT_SIZE > 4) { + $indexTermCount = ord($data[$pos]) << 56 | + ord($data[$pos+1]) << 48 | + ord($data[$pos+2]) << 40 | + ord($data[$pos+3]) << 32 | + ord($data[$pos+4]) << 24 | + ord($data[$pos+5]) << 16 | + ord($data[$pos+6]) << 8 | + ord($data[$pos+7]); + } else { + if ((ord($data[$pos]) != 0) || + (ord($data[$pos+1]) != 0) || + (ord($data[$pos+2]) != 0) || + (ord($data[$pos+3]) != 0) || + ((ord($data[$pos+4]) & 0x80) != 0)) { + throw new Zend_Search_Lucene_Exception('Largest supported segment size (for 32-bit mode) is 2Gb'); + } + + $indexTermCount = ord($data[$pos+4]) << 24 | + ord($data[$pos+5]) << 16 | + ord($data[$pos+6]) << 8 | + ord($data[$pos+7]); + } + $pos += 8; + + // $tiiFile->readInt(); // IndexInterval + $pos += 4; + + // $skipInterval = $tiiFile->readInt(); + $skipInterval = ord($data[$pos]) << 24 | ord($data[$pos+1]) << 16 | ord($data[$pos+2]) << 8 | ord($data[$pos+3]); + $pos += 4; + if ($indexTermCount < 1) { + throw new Zend_Search_Lucene_Exception('Wrong number of terms in a term dictionary index'); + } + + if ($tiVersion == (int)0xFFFFFFFD /* 2.1+ format */) { + /* Skip MaxSkipLevels value */ + $pos += 4; + } + + $prevTerm = ''; + $freqPointer = 0; + $proxPointer = 0; + $indexPointer = 0; + for ($count = 0; $count < $indexTermCount; $count++) { + //$termPrefixLength = $tiiFile->readVInt(); + $nbyte = ord($data[$pos++]); + $termPrefixLength = $nbyte & 0x7F; + for ($shift=7; ($nbyte & 0x80) != 0; $shift += 7) { + $nbyte = ord($data[$pos++]); + $termPrefixLength |= ($nbyte & 0x7F) << $shift; + } + + // $termSuffix = $tiiFile->readString(); + $nbyte = ord($data[$pos++]); + $len = $nbyte & 0x7F; + for ($shift=7; ($nbyte & 0x80) != 0; $shift += 7) { + $nbyte = ord($data[$pos++]); + $len |= ($nbyte & 0x7F) << $shift; + } + if ($len == 0) { + $termSuffix = ''; + } else { + $termSuffix = substr($data, $pos, $len); + $pos += $len; + for ($count1 = 0; $count1 < $len; $count1++ ) { + if (( ord($termSuffix[$count1]) & 0xC0 ) == 0xC0) { + $addBytes = 1; + if (ord($termSuffix[$count1]) & 0x20 ) { + $addBytes++; + + // Never used for Java Lucene created index. + // Java2 doesn't encode strings in four bytes + if (ord($termSuffix[$count1]) & 0x10 ) { + $addBytes++; + } + } + $termSuffix .= substr($data, $pos, $addBytes); + $pos += $addBytes; + $len += $addBytes; + + // Check for null character. Java2 encodes null character + // in two bytes. + if (ord($termSuffix[$count1]) == 0xC0 && + ord($termSuffix[$count1+1]) == 0x80 ) { + $termSuffix[$count1] = 0; + $termSuffix = substr($termSuffix,0,$count1+1) + . substr($termSuffix,$count1+2); + } + $count1 += $addBytes; + } + } + } + + // $termValue = Zend_Search_Lucene_Index_Term::getPrefix($prevTerm, $termPrefixLength) . $termSuffix; + $pb = 0; $pc = 0; + while ($pb < strlen($prevTerm) && $pc < $termPrefixLength) { + $charBytes = 1; + if ((ord($prevTerm[$pb]) & 0xC0) == 0xC0) { + $charBytes++; + if (ord($prevTerm[$pb]) & 0x20 ) { + $charBytes++; + if (ord($prevTerm[$pb]) & 0x10 ) { + $charBytes++; + } + } + } + + if ($pb + $charBytes > strlen($data)) { + // wrong character + break; + } + + $pc++; + $pb += $charBytes; + } + $termValue = substr($prevTerm, 0, $pb) . $termSuffix; + + // $termFieldNum = $tiiFile->readVInt(); + $nbyte = ord($data[$pos++]); + $termFieldNum = $nbyte & 0x7F; + for ($shift=7; ($nbyte & 0x80) != 0; $shift += 7) { + $nbyte = ord($data[$pos++]); + $termFieldNum |= ($nbyte & 0x7F) << $shift; + } + + // $docFreq = $tiiFile->readVInt(); + $nbyte = ord($data[$pos++]); + $docFreq = $nbyte & 0x7F; + for ($shift=7; ($nbyte & 0x80) != 0; $shift += 7) { + $nbyte = ord($data[$pos++]); + $docFreq |= ($nbyte & 0x7F) << $shift; + } + + // $freqPointer += $tiiFile->readVInt(); + $nbyte = ord($data[$pos++]); + $vint = $nbyte & 0x7F; + for ($shift=7; ($nbyte & 0x80) != 0; $shift += 7) { + $nbyte = ord($data[$pos++]); + $vint |= ($nbyte & 0x7F) << $shift; + } + $freqPointer += $vint; + + // $proxPointer += $tiiFile->readVInt(); + $nbyte = ord($data[$pos++]); + $vint = $nbyte & 0x7F; + for ($shift=7; ($nbyte & 0x80) != 0; $shift += 7) { + $nbyte = ord($data[$pos++]); + $vint |= ($nbyte & 0x7F) << $shift; + } + $proxPointer += $vint; + + if( $docFreq >= $skipInterval ) { + // $skipDelta = $tiiFile->readVInt(); + $nbyte = ord($data[$pos++]); + $vint = $nbyte & 0x7F; + for ($shift=7; ($nbyte & 0x80) != 0; $shift += 7) { + $nbyte = ord($data[$pos++]); + $vint |= ($nbyte & 0x7F) << $shift; + } + $skipDelta = $vint; + } else { + $skipDelta = 0; + } + + // $indexPointer += $tiiFile->readVInt(); + $nbyte = ord($data[$pos++]); + $vint = $nbyte & 0x7F; + for ($shift=7; ($nbyte & 0x80) != 0; $shift += 7) { + $nbyte = ord($data[$pos++]); + $vint |= ($nbyte & 0x7F) << $shift; + } + $indexPointer += $vint; + + + // $this->_termDictionary[] = new Zend_Search_Lucene_Index_Term($termValue, $termFieldNum); + $termDictionary[] = array($termFieldNum, $termValue); + + $termInfos[] = + // new Zend_Search_Lucene_Index_TermInfo($docFreq, $freqPointer, $proxPointer, $skipDelta, $indexPointer); + array($docFreq, $freqPointer, $proxPointer, $skipDelta, $indexPointer); + + $prevTerm = $termValue; + } + + // Check special index entry mark + if ($termDictionary[0][0] != (int)0xFFFFFFFF) { + throw new Zend_Search_Lucene_Exception('Wrong TermInfoIndexFile file format'); + } + + if (PHP_INT_SIZE > 4) { + // Treat 64-bit 0xFFFFFFFF as -1 + $termDictionary[0][0] = -1; + } + + return array($termDictionary, $termInfos); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/DocsFilter.php b/library/vendor/Zend/Search/Lucene/Index/DocsFilter.php new file mode 100644 index 000000000..17d9e4e29 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/DocsFilter.php @@ -0,0 +1,59 @@ + => array( => , + * => , + * => , + * ... ), + * => array( => , + * => , + * => , + * ... ), + * => array( => , + * => , + * => , + * ... ), + * ... + * ) + * + * @var array + */ + public $segmentFilters = array(); +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/FieldInfo.php b/library/vendor/Zend/Search/Lucene/Index/FieldInfo.php new file mode 100644 index 000000000..7eeaba242 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/FieldInfo.php @@ -0,0 +1,50 @@ +name = $name; + $this->isIndexed = $isIndexed; + $this->number = $number; + $this->storeTermVector = $storeTermVector; + $this->normsOmitted = $normsOmitted; + $this->payloadsStored = $payloadsStored; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/SegmentInfo.php b/library/vendor/Zend/Search/Lucene/Index/SegmentInfo.php new file mode 100644 index 000000000..655d0ddb7 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/SegmentInfo.php @@ -0,0 +1,2110 @@ + $termValue + * [1] -> $termFieldNum + * + * Corresponding Zend_Search_Lucene_Index_TermInfo object stored in the $_termDictionaryInfos + * + * @var array + */ + private $_termDictionary; + + /** + * Term Dictionary Index TermInfos + * + * Array of arrays (Zend_Search_Lucene_Index_TermInfo objects are represented as arrays because + * of performance considerations) + * [0] -> $docFreq + * [1] -> $freqPointer + * [2] -> $proxPointer + * [3] -> $skipOffset + * [4] -> $indexPointer + * + * @var array + */ + private $_termDictionaryInfos; + + /** + * Segment fields. Array of Zend_Search_Lucene_Index_FieldInfo objects for this segment + * + * @var array + */ + private $_fields; + + /** + * Field positions in a dictionary. + * (Term dictionary contains filelds ordered by names) + * + * @var array + */ + private $_fieldsDicPositions; + + + /** + * Associative array where the key is the file name and the value is data offset + * in a compound segment file (.csf). + * + * @var array + */ + private $_segFiles; + + /** + * Associative array where the key is the file name and the value is file size (.csf). + * + * @var array + */ + private $_segFileSizes; + + /** + * Delete file generation number + * + * -2 means autodetect latest delete generation + * -1 means 'there is no delete file' + * 0 means pre-2.1 format delete file + * X specifies used delete file + * + * @var integer + */ + private $_delGen; + + /** + * Segment has single norms file + * + * If true then one .nrm file is used for all fields + * Otherwise .fN files are used + * + * @var boolean + */ + private $_hasSingleNormFile; + + /** + * Use compound segment file (*.cfs) to collect all other segment files + * (excluding .del files) + * + * @var boolean + */ + private $_isCompound; + + + /** + * File system adapter. + * + * @var Zend_Search_Lucene_Storage_Directory_Filesystem + */ + private $_directory; + + /** + * Normalization factors. + * An array fieldName => normVector + * normVector is a binary string. + * Each byte corresponds to an indexed document in a segment and + * encodes normalization factor (float value, encoded by + * Zend_Search_Lucene_Search_Similarity::encodeNorm()) + * + * @var array + */ + private $_norms = array(); + + /** + * List of deleted documents. + * bitset if bitset extension is loaded or array otherwise. + * + * @var mixed + */ + private $_deleted = null; + + /** + * $this->_deleted update flag + * + * @var boolean + */ + private $_deletedDirty = false; + + /** + * True if segment uses shared doc store + * + * @var boolean + */ + private $_usesSharedDocStore; + + /* + * Shared doc store options. + * It's an assotiative array with the following items: + * - 'offset' => $docStoreOffset The starting document in the shared doc store files where this segment's documents begin + * - 'segment' => $docStoreSegment The name of the segment that has the shared doc store files. + * - 'isCompound' => $docStoreIsCompoundFile True, if compound file format is used for the shared doc store files (.cfx file). + */ + private $_sharedDocStoreOptions; + + + /** + * Zend_Search_Lucene_Index_SegmentInfo constructor + * + * @param Zend_Search_Lucene_Storage_Directory $directory + * @param string $name + * @param integer $docCount + * @param integer $delGen + * @param array|null $docStoreOptions + * @param boolean $hasSingleNormFile + * @param boolean $isCompound + */ + public function __construct(Zend_Search_Lucene_Storage_Directory $directory, $name, $docCount, $delGen = 0, $docStoreOptions = null, $hasSingleNormFile = false, $isCompound = null) + { + $this->_directory = $directory; + $this->_name = $name; + $this->_docCount = $docCount; + + if ($docStoreOptions !== null) { + $this->_usesSharedDocStore = true; + $this->_sharedDocStoreOptions = $docStoreOptions; + + if ($docStoreOptions['isCompound']) { + $cfxFile = $this->_directory->getFileObject($docStoreOptions['segment'] . '.cfx'); + $cfxFilesCount = $cfxFile->readVInt(); + + $cfxFiles = array(); + $cfxFileSizes = array(); + + for ($count = 0; $count < $cfxFilesCount; $count++) { + $dataOffset = $cfxFile->readLong(); + if ($count != 0) { + $cfxFileSizes[$fileName] = $dataOffset - end($cfxFiles); + } + $fileName = $cfxFile->readString(); + $cfxFiles[$fileName] = $dataOffset; + } + if ($count != 0) { + $cfxFileSizes[$fileName] = $this->_directory->fileLength($docStoreOptions['segment'] . '.cfx') - $dataOffset; + } + + $this->_sharedDocStoreOptions['files'] = $cfxFiles; + $this->_sharedDocStoreOptions['fileSizes'] = $cfxFileSizes; + } + } + + $this->_hasSingleNormFile = $hasSingleNormFile; + $this->_delGen = $delGen; + $this->_termDictionary = null; + + + if ($isCompound !== null) { + $this->_isCompound = $isCompound; + } else { + // It's a pre-2.1 segment or isCompound is set to 'unknown' + // Detect if segment uses compound file + try { + // Try to open compound file + $this->_directory->getFileObject($name . '.cfs'); + + // Compound file is found + $this->_isCompound = true; + } catch (Zend_Search_Lucene_Exception $e) { + if (strpos($e->getMessage(), 'is not readable') !== false) { + // Compound file is not found or is not readable + $this->_isCompound = false; + } else { + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + } + } + + $this->_segFiles = array(); + if ($this->_isCompound) { + $cfsFile = $this->_directory->getFileObject($name . '.cfs'); + $segFilesCount = $cfsFile->readVInt(); + + for ($count = 0; $count < $segFilesCount; $count++) { + $dataOffset = $cfsFile->readLong(); + if ($count != 0) { + $this->_segFileSizes[$fileName] = $dataOffset - end($this->_segFiles); + } + $fileName = $cfsFile->readString(); + $this->_segFiles[$fileName] = $dataOffset; + } + if ($count != 0) { + $this->_segFileSizes[$fileName] = $this->_directory->fileLength($name . '.cfs') - $dataOffset; + } + } + + $fnmFile = $this->openCompoundFile('.fnm'); + $fieldsCount = $fnmFile->readVInt(); + $fieldNames = array(); + $fieldNums = array(); + $this->_fields = array(); + + for ($count=0; $count < $fieldsCount; $count++) { + $fieldName = $fnmFile->readString(); + $fieldBits = $fnmFile->readByte(); + $this->_fields[$count] = new Zend_Search_Lucene_Index_FieldInfo($fieldName, + $fieldBits & 0x01 /* field is indexed */, + $count, + $fieldBits & 0x02 /* termvectors are stored */, + $fieldBits & 0x10 /* norms are omitted */, + $fieldBits & 0x20 /* payloads are stored */); + if ($fieldBits & 0x10) { + // norms are omitted for the indexed field + $this->_norms[$count] = str_repeat(chr(Zend_Search_Lucene_Search_Similarity::encodeNorm(1.0)), $docCount); + } + + $fieldNums[$count] = $count; + $fieldNames[$count] = $fieldName; + } + array_multisort($fieldNames, SORT_ASC, SORT_REGULAR, $fieldNums); + $this->_fieldsDicPositions = array_flip($fieldNums); + + if ($this->_delGen == -2) { + // SegmentInfo constructor is invoked from index writer + // Autodetect current delete file generation number + $this->_delGen = $this->_detectLatestDelGen(); + } + + // Load deletions + $this->_deleted = $this->_loadDelFile(); + } + + /** + * Load detetions file + * + * Returns bitset or an array depending on bitset extension availability + * + * @return mixed + * @throws Zend_Search_Lucene_Exception + */ + private function _loadDelFile() + { + if ($this->_delGen == -1) { + // There is no delete file for this segment + return null; + } else if ($this->_delGen == 0) { + // It's a segment with pre-2.1 format delete file + // Try to load deletions file + return $this->_loadPre21DelFile(); + } else { + // It's 2.1+ format deleteions file + return $this->_load21DelFile(); + } + } + + /** + * Load pre-2.1 detetions file + * + * Returns bitset or an array depending on bitset extension availability + * + * @return mixed + * @throws Zend_Search_Lucene_Exception + */ + private function _loadPre21DelFile() + { + try { + // '.del' files always stored in a separate file + // Segment compound is not used + $delFile = $this->_directory->getFileObject($this->_name . '.del'); + + $byteCount = $delFile->readInt(); + $byteCount = ceil($byteCount/8); + $bitCount = $delFile->readInt(); + + if ($bitCount == 0) { + $delBytes = ''; + } else { + $delBytes = $delFile->readBytes($byteCount); + } + + if (extension_loaded('bitset')) { + return $delBytes; + } else { + $deletions = array(); + for ($count = 0; $count < $byteCount; $count++) { + $byte = ord($delBytes[$count]); + for ($bit = 0; $bit < 8; $bit++) { + if ($byte & (1<<$bit)) { + $deletions[$count*8 + $bit] = 1; + } + } + } + + return $deletions; + } + } catch(Zend_Search_Lucene_Exception $e) { + if (strpos($e->getMessage(), 'is not readable') === false) { + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + // There is no deletion file + $this->_delGen = -1; + + return null; + } + } + + /** + * Load 2.1+ format detetions file + * + * Returns bitset or an array depending on bitset extension availability + * + * @return mixed + */ + private function _load21DelFile() + { + $delFile = $this->_directory->getFileObject($this->_name . '_' . base_convert($this->_delGen, 10, 36) . '.del'); + + $format = $delFile->readInt(); + + if ($format == (int)0xFFFFFFFF) { + if (extension_loaded('bitset')) { + $deletions = bitset_empty(); + } else { + $deletions = array(); + } + + $byteCount = $delFile->readInt(); + $bitCount = $delFile->readInt(); + + $delFileSize = $this->_directory->fileLength($this->_name . '_' . base_convert($this->_delGen, 10, 36) . '.del'); + $byteNum = 0; + + do { + $dgap = $delFile->readVInt(); + $nonZeroByte = $delFile->readByte(); + + $byteNum += $dgap; + + + if (extension_loaded('bitset')) { + for ($bit = 0; $bit < 8; $bit++) { + if ($nonZeroByte & (1<<$bit)) { + bitset_incl($deletions, $byteNum*8 + $bit); + } + } + return $deletions; + } else { + for ($bit = 0; $bit < 8; $bit++) { + if ($nonZeroByte & (1<<$bit)) { + $deletions[$byteNum*8 + $bit] = 1; + } + } + return (count($deletions) > 0) ? $deletions : null; + } + + } while ($delFile->tell() < $delFileSize); + } else { + // $format is actually byte count + $byteCount = ceil($format/8); + $bitCount = $delFile->readInt(); + + if ($bitCount == 0) { + $delBytes = ''; + } else { + $delBytes = $delFile->readBytes($byteCount); + } + + if (extension_loaded('bitset')) { + return $delBytes; + } else { + $deletions = array(); + for ($count = 0; $count < $byteCount; $count++) { + $byte = ord($delBytes[$count]); + for ($bit = 0; $bit < 8; $bit++) { + if ($byte & (1<<$bit)) { + $deletions[$count*8 + $bit] = 1; + } + } + } + + return (count($deletions) > 0) ? $deletions : null; + } + } + } + + /** + * Opens index file stoted within compound index file + * + * @param string $extension + * @param boolean $shareHandler + * @throws Zend_Search_Lucene_Exception + * @return Zend_Search_Lucene_Storage_File + */ + public function openCompoundFile($extension, $shareHandler = true) + { + if (($extension == '.fdx' || $extension == '.fdt') && $this->_usesSharedDocStore) { + $fdxFName = $this->_sharedDocStoreOptions['segment'] . '.fdx'; + $fdtFName = $this->_sharedDocStoreOptions['segment'] . '.fdt'; + + if (!$this->_sharedDocStoreOptions['isCompound']) { + $fdxFile = $this->_directory->getFileObject($fdxFName, $shareHandler); + $fdxFile->seek($this->_sharedDocStoreOptions['offset']*8, SEEK_CUR); + + if ($extension == '.fdx') { + // '.fdx' file is requested + return $fdxFile; + } else { + // '.fdt' file is requested + $fdtStartOffset = $fdxFile->readLong(); + + $fdtFile = $this->_directory->getFileObject($fdtFName, $shareHandler); + $fdtFile->seek($fdtStartOffset, SEEK_CUR); + + return $fdtFile; + } + } + + if( !isset($this->_sharedDocStoreOptions['files'][$fdxFName]) ) { + throw new Zend_Search_Lucene_Exception('Shared doc storage segment compound file doesn\'t contain ' + . $fdxFName . ' file.' ); + } + if( !isset($this->_sharedDocStoreOptions['files'][$fdtFName]) ) { + throw new Zend_Search_Lucene_Exception('Shared doc storage segment compound file doesn\'t contain ' + . $fdtFName . ' file.' ); + } + + // Open shared docstore segment file + $cfxFile = $this->_directory->getFileObject($this->_sharedDocStoreOptions['segment'] . '.cfx', $shareHandler); + // Seek to the start of '.fdx' file within compound file + $cfxFile->seek($this->_sharedDocStoreOptions['files'][$fdxFName]); + // Seek to the start of current segment documents section + $cfxFile->seek($this->_sharedDocStoreOptions['offset']*8, SEEK_CUR); + + if ($extension == '.fdx') { + // '.fdx' file is requested + return $cfxFile; + } else { + // '.fdt' file is requested + $fdtStartOffset = $cfxFile->readLong(); + + // Seek to the start of '.fdt' file within compound file + $cfxFile->seek($this->_sharedDocStoreOptions['files'][$fdtFName]); + // Seek to the start of current segment documents section + $cfxFile->seek($fdtStartOffset, SEEK_CUR); + + return $fdtFile; + } + } + + $filename = $this->_name . $extension; + + if (!$this->_isCompound) { + return $this->_directory->getFileObject($filename, $shareHandler); + } + + if( !isset($this->_segFiles[$filename]) ) { + throw new Zend_Search_Lucene_Exception('Segment compound file doesn\'t contain ' + . $filename . ' file.' ); + } + + $file = $this->_directory->getFileObject($this->_name . '.cfs', $shareHandler); + $file->seek($this->_segFiles[$filename]); + return $file; + } + + /** + * Get compound file length + * + * @param string $extension + * @return integer + */ + public function compoundFileLength($extension) + { + if (($extension == '.fdx' || $extension == '.fdt') && $this->_usesSharedDocStore) { + $filename = $this->_sharedDocStoreOptions['segment'] . $extension; + + if (!$this->_sharedDocStoreOptions['isCompound']) { + return $this->_directory->fileLength($filename); + } + + if( !isset($this->_sharedDocStoreOptions['fileSizes'][$filename]) ) { + throw new Zend_Search_Lucene_Exception('Shared doc store compound file doesn\'t contain ' + . $filename . ' file.' ); + } + + return $this->_sharedDocStoreOptions['fileSizes'][$filename]; + } + + + $filename = $this->_name . $extension; + + // Try to get common file first + if ($this->_directory->fileExists($filename)) { + return $this->_directory->fileLength($filename); + } + + if( !isset($this->_segFileSizes[$filename]) ) { + throw new Zend_Search_Lucene_Exception('Index compound file doesn\'t contain ' + . $filename . ' file.' ); + } + + return $this->_segFileSizes[$filename]; + } + + /** + * Returns field index or -1 if field is not found + * + * @param string $fieldName + * @return integer + */ + public function getFieldNum($fieldName) + { + foreach( $this->_fields as $field ) { + if( $field->name == $fieldName ) { + return $field->number; + } + } + + return -1; + } + + /** + * Returns field info for specified field + * + * @param integer $fieldNum + * @return Zend_Search_Lucene_Index_FieldInfo + */ + public function getField($fieldNum) + { + return $this->_fields[$fieldNum]; + } + + /** + * Returns array of fields. + * if $indexed parameter is true, then returns only indexed fields. + * + * @param boolean $indexed + * @return array + */ + public function getFields($indexed = false) + { + $result = array(); + foreach( $this->_fields as $field ) { + if( (!$indexed) || $field->isIndexed ) { + $result[ $field->name ] = $field->name; + } + } + return $result; + } + + /** + * Returns array of FieldInfo objects. + * + * @return array + */ + public function getFieldInfos() + { + return $this->_fields; + } + + /** + * Returns actual deletions file generation number. + * + * @return integer + */ + public function getDelGen() + { + return $this->_delGen; + } + + /** + * Returns the total number of documents in this segment (including deleted documents). + * + * @return integer + */ + public function count() + { + return $this->_docCount; + } + + /** + * Returns number of deleted documents. + * + * @return integer + */ + private function _deletedCount() + { + if ($this->_deleted === null) { + return 0; + } + + if (extension_loaded('bitset')) { + return count(bitset_to_array($this->_deleted)); + } else { + return count($this->_deleted); + } + } + + /** + * Returns the total number of non-deleted documents in this segment. + * + * @return integer + */ + public function numDocs() + { + if ($this->hasDeletions()) { + return $this->_docCount - $this->_deletedCount(); + } else { + return $this->_docCount; + } + } + + /** + * Get field position in a fields dictionary + * + * @param integer $fieldNum + * @return integer + */ + private function _getFieldPosition($fieldNum) { + // Treat values which are not in a translation table as a 'direct value' + return isset($this->_fieldsDicPositions[$fieldNum]) ? + $this->_fieldsDicPositions[$fieldNum] : $fieldNum; + } + + /** + * Return segment name + * + * @return string + */ + public function getName() + { + return $this->_name; + } + + + /** + * TermInfo cache + * + * Size is 1024. + * Numbers are used instead of class constants because of performance considerations + * + * @var array + */ + private $_termInfoCache = array(); + + private function _cleanUpTermInfoCache() + { + // Clean 256 term infos + foreach ($this->_termInfoCache as $key => $termInfo) { + unset($this->_termInfoCache[$key]); + + // leave 768 last used term infos + if (count($this->_termInfoCache) == 768) { + break; + } + } + } + + /** + * Load terms dictionary index + * + * @throws Zend_Search_Lucene_Exception + */ + private function _loadDictionaryIndex() + { + // Check, if index is already serialized + if ($this->_directory->fileExists($this->_name . '.sti')) { + // Load serialized dictionary index data + $stiFile = $this->_directory->getFileObject($this->_name . '.sti'); + $stiFileData = $stiFile->readBytes($this->_directory->fileLength($this->_name . '.sti')); + + // Load dictionary index data + if (($unserializedData = @unserialize($stiFileData)) !== false) { + list($this->_termDictionary, $this->_termDictionaryInfos) = $unserializedData; + return; + } + } + + // Load data from .tii file and generate .sti file + + // Prefetch dictionary index data + $tiiFile = $this->openCompoundFile('.tii'); + $tiiFileData = $tiiFile->readBytes($this->compoundFileLength('.tii')); + + /** Zend_Search_Lucene_Index_DictionaryLoader */ + + // Load dictionary index data + list($this->_termDictionary, $this->_termDictionaryInfos) = + Zend_Search_Lucene_Index_DictionaryLoader::load($tiiFileData); + + $stiFileData = serialize(array($this->_termDictionary, $this->_termDictionaryInfos)); + $stiFile = $this->_directory->createFile($this->_name . '.sti'); + $stiFile->writeBytes($stiFileData); + } + + /** + * Scans terms dictionary and returns term info + * + * @param Zend_Search_Lucene_Index_Term $term + * @return Zend_Search_Lucene_Index_TermInfo + */ + public function getTermInfo(Zend_Search_Lucene_Index_Term $term) + { + $termKey = $term->key(); + if (isset($this->_termInfoCache[$termKey])) { + $termInfo = $this->_termInfoCache[$termKey]; + + // Move termInfo to the end of cache + unset($this->_termInfoCache[$termKey]); + $this->_termInfoCache[$termKey] = $termInfo; + + return $termInfo; + } + + + if ($this->_termDictionary === null) { + $this->_loadDictionaryIndex(); + } + + $searchField = $this->getFieldNum($term->field); + + if ($searchField == -1) { + return null; + } + $searchDicField = $this->_getFieldPosition($searchField); + + // search for appropriate value in dictionary + $lowIndex = 0; + $highIndex = count($this->_termDictionary)-1; + while ($highIndex >= $lowIndex) { + // $mid = ($highIndex - $lowIndex)/2; + $mid = ($highIndex + $lowIndex) >> 1; + $midTerm = $this->_termDictionary[$mid]; + + $fieldNum = $this->_getFieldPosition($midTerm[0] /* field */); + $delta = $searchDicField - $fieldNum; + if ($delta == 0) { + $delta = strcmp($term->text, $midTerm[1] /* text */); + } + + if ($delta < 0) { + $highIndex = $mid-1; + } elseif ($delta > 0) { + $lowIndex = $mid+1; + } else { + // return $this->_termDictionaryInfos[$mid]; // We got it! + $a = $this->_termDictionaryInfos[$mid]; + $termInfo = new Zend_Search_Lucene_Index_TermInfo($a[0], $a[1], $a[2], $a[3], $a[4]); + + // Put loaded termInfo into cache + $this->_termInfoCache[$termKey] = $termInfo; + + return $termInfo; + } + } + + if ($highIndex == -1) { + // Term is out of the dictionary range + return null; + } + + $prevPosition = $highIndex; + $prevTerm = $this->_termDictionary[$prevPosition]; + $prevTermInfo = $this->_termDictionaryInfos[$prevPosition]; + + $tisFile = $this->openCompoundFile('.tis'); + $tiVersion = $tisFile->readInt(); + if ($tiVersion != (int)0xFFFFFFFE /* pre-2.1 format */ && + $tiVersion != (int)0xFFFFFFFD /* 2.1+ format */) { + throw new Zend_Search_Lucene_Exception('Wrong TermInfoFile file format'); + } + + $termCount = $tisFile->readLong(); + $indexInterval = $tisFile->readInt(); + $skipInterval = $tisFile->readInt(); + if ($tiVersion == (int)0xFFFFFFFD /* 2.1+ format */) { + $maxSkipLevels = $tisFile->readInt(); + } + + $tisFile->seek($prevTermInfo[4] /* indexPointer */ - (($tiVersion == (int)0xFFFFFFFD)? 24 : 20) /* header size*/, SEEK_CUR); + + $termValue = $prevTerm[1] /* text */; + $termFieldNum = $prevTerm[0] /* field */; + $freqPointer = $prevTermInfo[1] /* freqPointer */; + $proxPointer = $prevTermInfo[2] /* proxPointer */; + for ($count = $prevPosition*$indexInterval + 1; + $count <= $termCount && + ( $this->_getFieldPosition($termFieldNum) < $searchDicField || + ($this->_getFieldPosition($termFieldNum) == $searchDicField && + strcmp($termValue, $term->text) < 0) ); + $count++) { + $termPrefixLength = $tisFile->readVInt(); + $termSuffix = $tisFile->readString(); + $termFieldNum = $tisFile->readVInt(); + $termValue = Zend_Search_Lucene_Index_Term::getPrefix($termValue, $termPrefixLength) . $termSuffix; + + $docFreq = $tisFile->readVInt(); + $freqPointer += $tisFile->readVInt(); + $proxPointer += $tisFile->readVInt(); + if( $docFreq >= $skipInterval ) { + $skipOffset = $tisFile->readVInt(); + } else { + $skipOffset = 0; + } + } + + if ($termFieldNum == $searchField && $termValue == $term->text) { + $termInfo = new Zend_Search_Lucene_Index_TermInfo($docFreq, $freqPointer, $proxPointer, $skipOffset); + } else { + $termInfo = null; + } + + // Put loaded termInfo into cache + $this->_termInfoCache[$termKey] = $termInfo; + + if (count($this->_termInfoCache) == 1024) { + $this->_cleanUpTermInfoCache(); + } + + return $termInfo; + } + + /** + * Returns IDs of all the documents containing term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @param integer $shift + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + */ + public function termDocs(Zend_Search_Lucene_Index_Term $term, $shift = 0, $docsFilter = null) + { + $termInfo = $this->getTermInfo($term); + + if (!$termInfo instanceof Zend_Search_Lucene_Index_TermInfo) { + if ($docsFilter !== null && $docsFilter instanceof Zend_Search_Lucene_Index_DocsFilter) { + $docsFilter->segmentFilters[$this->_name] = array(); + } + return array(); + } + + $frqFile = $this->openCompoundFile('.frq'); + $frqFile->seek($termInfo->freqPointer,SEEK_CUR); + $docId = 0; + $result = array(); + + if ($docsFilter !== null) { + if (!$docsFilter instanceof Zend_Search_Lucene_Index_DocsFilter) { + throw new Zend_Search_Lucene_Exception('Documents filter must be an instance of Zend_Search_Lucene_Index_DocsFilter or null.'); + } + + if (isset($docsFilter->segmentFilters[$this->_name])) { + // Filter already has some data for the current segment + + // Make short name for the filter (which doesn't need additional dereferencing) + $filter = &$docsFilter->segmentFilters[$this->_name]; + + // Check if filter is not empty + if (count($filter) == 0) { + return array(); + } + + if ($this->_docCount/count($filter) < self::FULL_SCAN_VS_FETCH_BOUNDARY) { + // Perform fetching +// --------------------------------------------------------------- + $updatedFilterData = array(); + + for( $count=0; $count < $termInfo->docFreq; $count++ ) { + $docDelta = $frqFile->readVInt(); + if( $docDelta % 2 == 1 ) { + $docId += ($docDelta-1)/2; + } else { + $docId += $docDelta/2; + // read freq + $frqFile->readVInt(); + } + + if (isset($filter[$docId])) { + $result[] = $shift + $docId; + $updatedFilterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + } + } + $docsFilter->segmentFilters[$this->_name] = $updatedFilterData; +// --------------------------------------------------------------- + } else { + // Perform full scan + $updatedFilterData = array(); + + for( $count=0; $count < $termInfo->docFreq; $count++ ) { + $docDelta = $frqFile->readVInt(); + if( $docDelta % 2 == 1 ) { + $docId += ($docDelta-1)/2; + } else { + $docId += $docDelta/2; + // read freq + $frqFile->readVInt(); + } + + if (isset($filter[$docId])) { + $result[] = $shift + $docId; + $updatedFilterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + } + } + $docsFilter->segmentFilters[$this->_name] = $updatedFilterData; + } + } else { + // Filter is present, but doesn't has data for the current segment yet + $filterData = array(); + for( $count=0; $count < $termInfo->docFreq; $count++ ) { + $docDelta = $frqFile->readVInt(); + if( $docDelta % 2 == 1 ) { + $docId += ($docDelta-1)/2; + } else { + $docId += $docDelta/2; + // read freq + $frqFile->readVInt(); + } + + $result[] = $shift + $docId; + $filterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + } + $docsFilter->segmentFilters[$this->_name] = $filterData; + } + } else { + for( $count=0; $count < $termInfo->docFreq; $count++ ) { + $docDelta = $frqFile->readVInt(); + if( $docDelta % 2 == 1 ) { + $docId += ($docDelta-1)/2; + } else { + $docId += $docDelta/2; + // read freq + $frqFile->readVInt(); + } + + $result[] = $shift + $docId; + } + } + + return $result; + } + + /** + * Returns term freqs array. + * Result array structure: array(docId => freq, ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param integer $shift + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return Zend_Search_Lucene_Index_TermInfo + */ + public function termFreqs(Zend_Search_Lucene_Index_Term $term, $shift = 0, $docsFilter = null) + { + $termInfo = $this->getTermInfo($term); + + if (!$termInfo instanceof Zend_Search_Lucene_Index_TermInfo) { + if ($docsFilter !== null && $docsFilter instanceof Zend_Search_Lucene_Index_DocsFilter) { + $docsFilter->segmentFilters[$this->_name] = array(); + } + return array(); + } + + $frqFile = $this->openCompoundFile('.frq'); + $frqFile->seek($termInfo->freqPointer,SEEK_CUR); + $result = array(); + $docId = 0; + + $result = array(); + + if ($docsFilter !== null) { + if (!$docsFilter instanceof Zend_Search_Lucene_Index_DocsFilter) { + throw new Zend_Search_Lucene_Exception('Documents filter must be an instance of Zend_Search_Lucene_Index_DocsFilter or null.'); + } + + if (isset($docsFilter->segmentFilters[$this->_name])) { + // Filter already has some data for the current segment + + // Make short name for the filter (which doesn't need additional dereferencing) + $filter = &$docsFilter->segmentFilters[$this->_name]; + + // Check if filter is not empty + if (count($filter) == 0) { + return array(); + } + + + if ($this->_docCount/count($filter) < self::FULL_SCAN_VS_FETCH_BOUNDARY) { + // Perform fetching +// --------------------------------------------------------------- + $updatedFilterData = array(); + + for ($count = 0; $count < $termInfo->docFreq; $count++) { + $docDelta = $frqFile->readVInt(); + if ($docDelta % 2 == 1) { + $docId += ($docDelta-1)/2; + if (isset($filter[$docId])) { + $result[$shift + $docId] = 1; + $updatedFilterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + } + } else { + $docId += $docDelta/2; + $freq = $frqFile->readVInt(); + if (isset($filter[$docId])) { + $result[$shift + $docId] = $freq; + $updatedFilterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + } + } + } + $docsFilter->segmentFilters[$this->_name] = $updatedFilterData; +// --------------------------------------------------------------- + } else { + // Perform full scan + $updatedFilterData = array(); + + for ($count = 0; $count < $termInfo->docFreq; $count++) { + $docDelta = $frqFile->readVInt(); + if ($docDelta % 2 == 1) { + $docId += ($docDelta-1)/2; + if (isset($filter[$docId])) { + $result[$shift + $docId] = 1; + $updatedFilterData[$docId] = 1; // 1 is just some constant value, so we don't need additional var dereference here + } + } else { + $docId += $docDelta/2; + $freq = $frqFile->readVInt(); + if (isset($filter[$docId])) { + $result[$shift + $docId] = $freq; + $updatedFilterData[$docId] = 1; // 1 is just some constant value, so we don't need additional var dereference here + } + } + } + $docsFilter->segmentFilters[$this->_name] = $updatedFilterData; + } + } else { + // Filter doesn't has data for current segment + $filterData = array(); + + for ($count = 0; $count < $termInfo->docFreq; $count++) { + $docDelta = $frqFile->readVInt(); + if ($docDelta % 2 == 1) { + $docId += ($docDelta-1)/2; + $result[$shift + $docId] = 1; + $filterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + } else { + $docId += $docDelta/2; + $result[$shift + $docId] = $frqFile->readVInt(); + $filterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + } + } + + $docsFilter->segmentFilters[$this->_name] = $filterData; + } + } else { + for ($count = 0; $count < $termInfo->docFreq; $count++) { + $docDelta = $frqFile->readVInt(); + if ($docDelta % 2 == 1) { + $docId += ($docDelta-1)/2; + $result[$shift + $docId] = 1; + } else { + $docId += $docDelta/2; + $result[$shift + $docId] = $frqFile->readVInt(); + } + } + } + + return $result; + } + + /** + * Returns term positions array. + * Result array structure: array(docId => array(pos1, pos2, ...), ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param integer $shift + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return Zend_Search_Lucene_Index_TermInfo + */ + public function termPositions(Zend_Search_Lucene_Index_Term $term, $shift = 0, $docsFilter = null) + { + $termInfo = $this->getTermInfo($term); + + if (!$termInfo instanceof Zend_Search_Lucene_Index_TermInfo) { + if ($docsFilter !== null && $docsFilter instanceof Zend_Search_Lucene_Index_DocsFilter) { + $docsFilter->segmentFilters[$this->_name] = array(); + } + return array(); + } + + $frqFile = $this->openCompoundFile('.frq'); + $frqFile->seek($termInfo->freqPointer,SEEK_CUR); + + $docId = 0; + $freqs = array(); + + + if ($docsFilter !== null) { + if (!$docsFilter instanceof Zend_Search_Lucene_Index_DocsFilter) { + throw new Zend_Search_Lucene_Exception('Documents filter must be an instance of Zend_Search_Lucene_Index_DocsFilter or null.'); + } + + if (isset($docsFilter->segmentFilters[$this->_name])) { + // Filter already has some data for the current segment + + // Make short name for the filter (which doesn't need additional dereferencing) + $filter = &$docsFilter->segmentFilters[$this->_name]; + + // Check if filter is not empty + if (count($filter) == 0) { + return array(); + } + + if ($this->_docCount/count($filter) < self::FULL_SCAN_VS_FETCH_BOUNDARY) { + // Perform fetching +// --------------------------------------------------------------- + for ($count = 0; $count < $termInfo->docFreq; $count++) { + $docDelta = $frqFile->readVInt(); + if ($docDelta % 2 == 1) { + $docId += ($docDelta-1)/2; + $freqs[$docId] = 1; + } else { + $docId += $docDelta/2; + $freqs[$docId] = $frqFile->readVInt(); + } + } + + $updatedFilterData = array(); + $result = array(); + $prxFile = $this->openCompoundFile('.prx'); + $prxFile->seek($termInfo->proxPointer, SEEK_CUR); + foreach ($freqs as $docId => $freq) { + $termPosition = 0; + $positions = array(); + + // we have to read .prx file to get right position for next doc + // even filter doesn't match current document + for ($count = 0; $count < $freq; $count++ ) { + $termPosition += $prxFile->readVInt(); + $positions[] = $termPosition; + } + + // Include into updated filter and into result only if doc is matched by filter + if (isset($filter[$docId])) { + $updatedFilterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + $result[$shift + $docId] = $positions; + } + } + + $docsFilter->segmentFilters[$this->_name] = $updatedFilterData; +// --------------------------------------------------------------- + } else { + // Perform full scan + for ($count = 0; $count < $termInfo->docFreq; $count++) { + $docDelta = $frqFile->readVInt(); + if ($docDelta % 2 == 1) { + $docId += ($docDelta-1)/2; + $freqs[$docId] = 1; + } else { + $docId += $docDelta/2; + $freqs[$docId] = $frqFile->readVInt(); + } + } + + $updatedFilterData = array(); + $result = array(); + $prxFile = $this->openCompoundFile('.prx'); + $prxFile->seek($termInfo->proxPointer, SEEK_CUR); + foreach ($freqs as $docId => $freq) { + $termPosition = 0; + $positions = array(); + + // we have to read .prx file to get right position for next doc + // even filter doesn't match current document + for ($count = 0; $count < $freq; $count++ ) { + $termPosition += $prxFile->readVInt(); + $positions[] = $termPosition; + } + + // Include into updated filter and into result only if doc is matched by filter + if (isset($filter[$docId])) { + $updatedFilterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + $result[$shift + $docId] = $positions; + } + } + + $docsFilter->segmentFilters[$this->_name] = $updatedFilterData; + } + } else { + // Filter doesn't has data for current segment + for ($count = 0; $count < $termInfo->docFreq; $count++) { + $docDelta = $frqFile->readVInt(); + if ($docDelta % 2 == 1) { + $docId += ($docDelta-1)/2; + $freqs[$docId] = 1; + } else { + $docId += $docDelta/2; + $freqs[$docId] = $frqFile->readVInt(); + } + } + + $filterData = array(); + $result = array(); + $prxFile = $this->openCompoundFile('.prx'); + $prxFile->seek($termInfo->proxPointer, SEEK_CUR); + foreach ($freqs as $docId => $freq) { + $filterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here + + $termPosition = 0; + $positions = array(); + + for ($count = 0; $count < $freq; $count++ ) { + $termPosition += $prxFile->readVInt(); + $positions[] = $termPosition; + } + + $result[$shift + $docId] = $positions; + } + + $docsFilter->segmentFilters[$this->_name] = $filterData; + } + } else { + for ($count = 0; $count < $termInfo->docFreq; $count++) { + $docDelta = $frqFile->readVInt(); + if ($docDelta % 2 == 1) { + $docId += ($docDelta-1)/2; + $freqs[$docId] = 1; + } else { + $docId += $docDelta/2; + $freqs[$docId] = $frqFile->readVInt(); + } + } + + $result = array(); + $prxFile = $this->openCompoundFile('.prx'); + $prxFile->seek($termInfo->proxPointer, SEEK_CUR); + foreach ($freqs as $docId => $freq) { + $termPosition = 0; + $positions = array(); + + for ($count = 0; $count < $freq; $count++ ) { + $termPosition += $prxFile->readVInt(); + $positions[] = $termPosition; + } + + $result[$shift + $docId] = $positions; + } + } + + return $result; + } + + /** + * Load normalizatin factors from an index file + * + * @param integer $fieldNum + * @throws Zend_Search_Lucene_Exception + */ + private function _loadNorm($fieldNum) + { + if ($this->_hasSingleNormFile) { + $normfFile = $this->openCompoundFile('.nrm'); + + $header = $normfFile->readBytes(3); + $headerFormatVersion = $normfFile->readByte(); + + if ($header != 'NRM' || $headerFormatVersion != (int)0xFF) { + throw new Zend_Search_Lucene_Exception('Wrong norms file format.'); + } + + foreach ($this->_fields as $fNum => $fieldInfo) { + if ($fieldInfo->isIndexed) { + $this->_norms[$fNum] = $normfFile->readBytes($this->_docCount); + } + } + } else { + $fFile = $this->openCompoundFile('.f' . $fieldNum); + $this->_norms[$fieldNum] = $fFile->readBytes($this->_docCount); + } + } + + /** + * Returns normalization factor for specified documents + * + * @param integer $id + * @param string $fieldName + * @return float + */ + public function norm($id, $fieldName) + { + $fieldNum = $this->getFieldNum($fieldName); + + if ( !($this->_fields[$fieldNum]->isIndexed) ) { + return null; + } + + if (!isset($this->_norms[$fieldNum])) { + $this->_loadNorm($fieldNum); + } + + return Zend_Search_Lucene_Search_Similarity::decodeNorm( ord($this->_norms[$fieldNum][$id]) ); + } + + /** + * Returns norm vector, encoded in a byte string + * + * @param string $fieldName + * @return string + */ + public function normVector($fieldName) + { + $fieldNum = $this->getFieldNum($fieldName); + + if ($fieldNum == -1 || !($this->_fields[$fieldNum]->isIndexed)) { + $similarity = Zend_Search_Lucene_Search_Similarity::getDefault(); + + return str_repeat(chr($similarity->encodeNorm( $similarity->lengthNorm($fieldName, 0) )), + $this->_docCount); + } + + if (!isset($this->_norms[$fieldNum])) { + $this->_loadNorm($fieldNum); + } + + return $this->_norms[$fieldNum]; + } + + + /** + * Returns true if any documents have been deleted from this index segment. + * + * @return boolean + */ + public function hasDeletions() + { + return $this->_deleted !== null; + } + + + /** + * Returns true if segment has single norms file. + * + * @return boolean + */ + public function hasSingleNormFile() + { + return $this->_hasSingleNormFile ? true : false; + } + + /** + * Returns true if segment is stored using compound segment file. + * + * @return boolean + */ + public function isCompound() + { + return $this->_isCompound; + } + + /** + * Deletes a document from the index segment. + * $id is an internal document id + * + * @param integer + */ + public function delete($id) + { + $this->_deletedDirty = true; + + if (extension_loaded('bitset')) { + if ($this->_deleted === null) { + $this->_deleted = bitset_empty($id); + } + bitset_incl($this->_deleted, $id); + } else { + if ($this->_deleted === null) { + $this->_deleted = array(); + } + + $this->_deleted[$id] = 1; + } + } + + /** + * Checks, that document is deleted + * + * @param integer + * @return boolean + */ + public function isDeleted($id) + { + if ($this->_deleted === null) { + return false; + } + + if (extension_loaded('bitset')) { + return bitset_in($this->_deleted, $id); + } else { + return isset($this->_deleted[$id]); + } + } + + /** + * Detect latest delete generation + * + * Is actualy used from writeChanges() method or from the constructor if it's invoked from + * Index writer. In both cases index write lock is already obtained, so we shouldn't care + * about it + * + * @return integer + */ + private function _detectLatestDelGen() + { + $delFileList = array(); + foreach ($this->_directory->fileList() as $file) { + if ($file == $this->_name . '.del') { + // Matches .del file name + $delFileList[] = 0; + } else if (preg_match('/^' . $this->_name . '_([a-zA-Z0-9]+)\.del$/i', $file, $matches)) { + // Matches _NNN.del file names + $delFileList[] = (int)base_convert($matches[1], 36, 10); + } + } + + if (count($delFileList) == 0) { + // There is no deletions file for current segment in the directory + // Set deletions file generation number to 1 + return -1; + } else { + // There are some deletions files for current segment in the directory + // Set deletions file generation number to the highest nuber + return max($delFileList); + } + } + + /** + * Write changes if it's necessary. + * + * This method must be invoked only from the Writer _updateSegments() method, + * so index Write lock has to be already obtained. + * + * @internal + * @throws Zend_Search_Lucene_Exceptions + */ + public function writeChanges() + { + // Get new generation number + $latestDelGen = $this->_detectLatestDelGen(); + + if (!$this->_deletedDirty) { + // There was no deletions by current process + + if ($latestDelGen == $this->_delGen) { + // Delete file hasn't been updated by any concurrent process + return; + } else if ($latestDelGen > $this->_delGen) { + // Delete file has been updated by some concurrent process + // Reload deletions file + $this->_delGen = $latestDelGen; + $this->_deleted = $this->_loadDelFile(); + + return; + } else { + throw new Zend_Search_Lucene_Exception('Delete file processing workflow is corrupted for the segment \'' . $this->_name . '\'.'); + } + } + + if ($latestDelGen > $this->_delGen) { + // Merge current deletions with latest deletions file + $this->_delGen = $latestDelGen; + + $latestDelete = $this->_loadDelFile(); + + if (extension_loaded('bitset')) { + $this->_deleted = bitset_union($this->_deleted, $latestDelete); + } else { + $this->_deleted += $latestDelete; + } + } + + if (extension_loaded('bitset')) { + $delBytes = $this->_deleted; + $bitCount = count(bitset_to_array($delBytes)); + } else { + $byteCount = floor($this->_docCount/8)+1; + $delBytes = str_repeat(chr(0), $byteCount); + for ($count = 0; $count < $byteCount; $count++) { + $byte = 0; + for ($bit = 0; $bit < 8; $bit++) { + if (isset($this->_deleted[$count*8 + $bit])) { + $byte |= (1<<$bit); + } + } + $delBytes[$count] = chr($byte); + } + $bitCount = count($this->_deleted); + } + + if ($this->_delGen == -1) { + // Set delete file generation number to 1 + $this->_delGen = 1; + } else { + // Increase delete file generation number by 1 + $this->_delGen++; + } + + $delFile = $this->_directory->createFile($this->_name . '_' . base_convert($this->_delGen, 10, 36) . '.del'); + $delFile->writeInt($this->_docCount); + $delFile->writeInt($bitCount); + $delFile->writeBytes($delBytes); + + $this->_deletedDirty = false; + } + + + /** + * Term Dictionary File object for stream like terms reading + * + * @var Zend_Search_Lucene_Storage_File + */ + private $_tisFile = null; + + /** + * Actual offset of the .tis file data + * + * @var integer + */ + private $_tisFileOffset; + + /** + * Frequencies File object for stream like terms reading + * + * @var Zend_Search_Lucene_Storage_File + */ + private $_frqFile = null; + + /** + * Actual offset of the .frq file data + * + * @var integer + */ + private $_frqFileOffset; + + /** + * Positions File object for stream like terms reading + * + * @var Zend_Search_Lucene_Storage_File + */ + private $_prxFile = null; + + /** + * Actual offset of the .prx file in the compound file + * + * @var integer + */ + private $_prxFileOffset; + + + /** + * Actual number of terms in term stream + * + * @var integer + */ + private $_termCount = 0; + + /** + * Overall number of terms in term stream + * + * @var integer + */ + private $_termNum = 0; + + /** + * Segment index interval + * + * @var integer + */ + private $_indexInterval; + + /** + * Segment skip interval + * + * @var integer + */ + private $_skipInterval; + + /** + * Last TermInfo in a terms stream + * + * @var Zend_Search_Lucene_Index_TermInfo + */ + private $_lastTermInfo = null; + + /** + * Last Term in a terms stream + * + * @var Zend_Search_Lucene_Index_Term + */ + private $_lastTerm = null; + + /** + * Map of the document IDs + * Used to get new docID after removing deleted documents. + * It's not very effective from memory usage point of view, + * but much more faster, then other methods + * + * @var array|null + */ + private $_docMap = null; + + /** + * An array of all term positions in the documents. + * Array structure: array( docId => array( pos1, pos2, ...), ...) + * + * Is set to null if term positions loading has to be skipped + * + * @var array|null + */ + private $_lastTermPositions; + + + /** + * Terms scan mode + * + * Values: + * + * self::SM_TERMS_ONLY - terms are scanned, no additional info is retrieved + * self::SM_FULL_INFO - terms are scanned, frequency and position info is retrieved + * self::SM_MERGE_INFO - terms are scanned, frequency and position info is retrieved + * document numbers are compacted (shifted if segment has deleted documents) + * + * @var integer + */ + private $_termsScanMode; + + /** Scan modes */ + const SM_TERMS_ONLY = 0; // terms are scanned, no additional info is retrieved + const SM_FULL_INFO = 1; // terms are scanned, frequency and position info is retrieved + const SM_MERGE_INFO = 2; // terms are scanned, frequency and position info is retrieved + // document numbers are compacted (shifted if segment contains deleted documents) + + /** + * Reset terms stream + * + * $startId - id for the fist document + * $compact - remove deleted documents + * + * Returns start document id for the next segment + * + * @param integer $startId + * @param integer $mode + * @throws Zend_Search_Lucene_Exception + * @return integer + */ + public function resetTermsStream(/** $startId = 0, $mode = self::SM_TERMS_ONLY */) + { + /** + * SegmentInfo->resetTermsStream() method actually takes two optional parameters: + * $startId (default value is 0) + * $mode (default value is self::SM_TERMS_ONLY) + */ + $argList = func_get_args(); + if (count($argList) > 2) { + throw new Zend_Search_Lucene_Exception('Wrong number of arguments'); + } else if (count($argList) == 2) { + $startId = $argList[0]; + $mode = $argList[1]; + } else if (count($argList) == 1) { + $startId = $argList[0]; + $mode = self::SM_TERMS_ONLY; + } else { + $startId = 0; + $mode = self::SM_TERMS_ONLY; + } + + if ($this->_tisFile !== null) { + $this->_tisFile = null; + } + + $this->_tisFile = $this->openCompoundFile('.tis', false); + $this->_tisFileOffset = $this->_tisFile->tell(); + + $tiVersion = $this->_tisFile->readInt(); + if ($tiVersion != (int)0xFFFFFFFE /* pre-2.1 format */ && + $tiVersion != (int)0xFFFFFFFD /* 2.1+ format */) { + throw new Zend_Search_Lucene_Exception('Wrong TermInfoFile file format'); + } + + $this->_termCount = + $this->_termNum = $this->_tisFile->readLong(); // Read terms count + $this->_indexInterval = $this->_tisFile->readInt(); // Read Index interval + $this->_skipInterval = $this->_tisFile->readInt(); // Read skip interval + if ($tiVersion == (int)0xFFFFFFFD /* 2.1+ format */) { + $maxSkipLevels = $this->_tisFile->readInt(); + } + + if ($this->_frqFile !== null) { + $this->_frqFile = null; + } + if ($this->_prxFile !== null) { + $this->_prxFile = null; + } + $this->_docMap = array(); + + $this->_lastTerm = new Zend_Search_Lucene_Index_Term('', -1); + $this->_lastTermInfo = new Zend_Search_Lucene_Index_TermInfo(0, 0, 0, 0); + $this->_lastTermPositions = null; + + $this->_termsScanMode = $mode; + + switch ($mode) { + case self::SM_TERMS_ONLY: + // Do nothing + break; + + case self::SM_FULL_INFO: + // break intentionally omitted + case self::SM_MERGE_INFO: + $this->_frqFile = $this->openCompoundFile('.frq', false); + $this->_frqFileOffset = $this->_frqFile->tell(); + + $this->_prxFile = $this->openCompoundFile('.prx', false); + $this->_prxFileOffset = $this->_prxFile->tell(); + + for ($count = 0; $count < $this->_docCount; $count++) { + if (!$this->isDeleted($count)) { + $this->_docMap[$count] = $startId + (($mode == self::SM_MERGE_INFO) ? count($this->_docMap) : $count); + } + } + break; + + default: + throw new Zend_Search_Lucene_Exception('Wrong terms scaning mode specified.'); + break; + } + + // Calculate next segment start id (since $this->_docMap structure may be cleaned by $this->nextTerm() call) + $nextSegmentStartId = $startId + (($mode == self::SM_MERGE_INFO) ? count($this->_docMap) : $this->_docCount); + $this->nextTerm(); + + return $nextSegmentStartId; + } + + + /** + * Skip terms stream up to the specified term preffix. + * + * Prefix contains fully specified field info and portion of searched term + * + * @param Zend_Search_Lucene_Index_Term $prefix + * @throws Zend_Search_Lucene_Exception + */ + public function skipTo(Zend_Search_Lucene_Index_Term $prefix) + { + if ($this->_termDictionary === null) { + $this->_loadDictionaryIndex(); + } + + $searchField = $this->getFieldNum($prefix->field); + + if ($searchField == -1) { + /** + * Field is not presented in this segment + * Go to the end of dictionary + */ + $this->_tisFile = null; + $this->_frqFile = null; + $this->_prxFile = null; + + $this->_lastTerm = null; + $this->_lastTermInfo = null; + $this->_lastTermPositions = null; + + return; + } + $searchDicField = $this->_getFieldPosition($searchField); + + // search for appropriate value in dictionary + $lowIndex = 0; + $highIndex = count($this->_termDictionary)-1; + while ($highIndex >= $lowIndex) { + // $mid = ($highIndex - $lowIndex)/2; + $mid = ($highIndex + $lowIndex) >> 1; + $midTerm = $this->_termDictionary[$mid]; + + $fieldNum = $this->_getFieldPosition($midTerm[0] /* field */); + $delta = $searchDicField - $fieldNum; + if ($delta == 0) { + $delta = strcmp($prefix->text, $midTerm[1] /* text */); + } + + if ($delta < 0) { + $highIndex = $mid-1; + } elseif ($delta > 0) { + $lowIndex = $mid+1; + } else { + // We have reached term we are looking for + break; + } + } + + if ($highIndex == -1) { + // Term is out of the dictionary range + $this->_tisFile = null; + $this->_frqFile = null; + $this->_prxFile = null; + + $this->_lastTerm = null; + $this->_lastTermInfo = null; + $this->_lastTermPositions = null; + + return; + } + + $prevPosition = $highIndex; + $prevTerm = $this->_termDictionary[$prevPosition]; + $prevTermInfo = $this->_termDictionaryInfos[$prevPosition]; + + if ($this->_tisFile === null) { + // The end of terms stream is reached and terms dictionary file is closed + // Perform mini-reset operation + $this->_tisFile = $this->openCompoundFile('.tis', false); + + if ($this->_termsScanMode == self::SM_FULL_INFO || $this->_termsScanMode == self::SM_MERGE_INFO) { + $this->_frqFile = $this->openCompoundFile('.frq', false); + $this->_prxFile = $this->openCompoundFile('.prx', false); + } + } + $this->_tisFile->seek($this->_tisFileOffset + $prevTermInfo[4], SEEK_SET); + + $this->_lastTerm = new Zend_Search_Lucene_Index_Term($prevTerm[1] /* text */, + ($prevTerm[0] == -1) ? '' : $this->_fields[$prevTerm[0] /* field */]->name); + $this->_lastTermInfo = new Zend_Search_Lucene_Index_TermInfo($prevTermInfo[0] /* docFreq */, + $prevTermInfo[1] /* freqPointer */, + $prevTermInfo[2] /* proxPointer */, + $prevTermInfo[3] /* skipOffset */); + $this->_termCount = $this->_termNum - $prevPosition*$this->_indexInterval; + + if ($highIndex == 0) { + // skip start entry + $this->nextTerm(); + } else if ($prefix->field == $this->_lastTerm->field && $prefix->text == $this->_lastTerm->text) { + // We got exact match in the dictionary index + + if ($this->_termsScanMode == self::SM_FULL_INFO || $this->_termsScanMode == self::SM_MERGE_INFO) { + $this->_lastTermPositions = array(); + + $this->_frqFile->seek($this->_lastTermInfo->freqPointer + $this->_frqFileOffset, SEEK_SET); + $freqs = array(); $docId = 0; + for( $count = 0; $count < $this->_lastTermInfo->docFreq; $count++ ) { + $docDelta = $this->_frqFile->readVInt(); + if( $docDelta % 2 == 1 ) { + $docId += ($docDelta-1)/2; + $freqs[ $docId ] = 1; + } else { + $docId += $docDelta/2; + $freqs[ $docId ] = $this->_frqFile->readVInt(); + } + } + + $this->_prxFile->seek($this->_lastTermInfo->proxPointer + $this->_prxFileOffset, SEEK_SET); + foreach ($freqs as $docId => $freq) { + $termPosition = 0; $positions = array(); + + for ($count = 0; $count < $freq; $count++ ) { + $termPosition += $this->_prxFile->readVInt(); + $positions[] = $termPosition; + } + + if (isset($this->_docMap[$docId])) { + $this->_lastTermPositions[$this->_docMap[$docId]] = $positions; + } + } + } + + return; + } + + // Search term matching specified prefix + while ($this->_lastTerm !== null) { + if ( strcmp($this->_lastTerm->field, $prefix->field) > 0 || + ($prefix->field == $this->_lastTerm->field && strcmp($this->_lastTerm->text, $prefix->text) >= 0) ) { + // Current term matches or greate than the pattern + return; + } + + $this->nextTerm(); + } + } + + + /** + * Scans terms dictionary and returns next term + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function nextTerm() + { + if ($this->_tisFile === null || $this->_termCount == 0) { + $this->_lastTerm = null; + $this->_lastTermInfo = null; + $this->_lastTermPositions = null; + $this->_docMap = null; + + // may be necessary for "empty" segment + $this->_tisFile = null; + $this->_frqFile = null; + $this->_prxFile = null; + + return null; + } + + $termPrefixLength = $this->_tisFile->readVInt(); + $termSuffix = $this->_tisFile->readString(); + $termFieldNum = $this->_tisFile->readVInt(); + $termValue = Zend_Search_Lucene_Index_Term::getPrefix($this->_lastTerm->text, $termPrefixLength) . $termSuffix; + + $this->_lastTerm = new Zend_Search_Lucene_Index_Term($termValue, $this->_fields[$termFieldNum]->name); + + $docFreq = $this->_tisFile->readVInt(); + $freqPointer = $this->_lastTermInfo->freqPointer + $this->_tisFile->readVInt(); + $proxPointer = $this->_lastTermInfo->proxPointer + $this->_tisFile->readVInt(); + if ($docFreq >= $this->_skipInterval) { + $skipOffset = $this->_tisFile->readVInt(); + } else { + $skipOffset = 0; + } + + $this->_lastTermInfo = new Zend_Search_Lucene_Index_TermInfo($docFreq, $freqPointer, $proxPointer, $skipOffset); + + + if ($this->_termsScanMode == self::SM_FULL_INFO || $this->_termsScanMode == self::SM_MERGE_INFO) { + $this->_lastTermPositions = array(); + + $this->_frqFile->seek($this->_lastTermInfo->freqPointer + $this->_frqFileOffset, SEEK_SET); + $freqs = array(); $docId = 0; + for( $count = 0; $count < $this->_lastTermInfo->docFreq; $count++ ) { + $docDelta = $this->_frqFile->readVInt(); + if( $docDelta % 2 == 1 ) { + $docId += ($docDelta-1)/2; + $freqs[ $docId ] = 1; + } else { + $docId += $docDelta/2; + $freqs[ $docId ] = $this->_frqFile->readVInt(); + } + } + + $this->_prxFile->seek($this->_lastTermInfo->proxPointer + $this->_prxFileOffset, SEEK_SET); + foreach ($freqs as $docId => $freq) { + $termPosition = 0; $positions = array(); + + for ($count = 0; $count < $freq; $count++ ) { + $termPosition += $this->_prxFile->readVInt(); + $positions[] = $termPosition; + } + + if (isset($this->_docMap[$docId])) { + $this->_lastTermPositions[$this->_docMap[$docId]] = $positions; + } + } + } + + $this->_termCount--; + if ($this->_termCount == 0) { + $this->_tisFile = null; + $this->_frqFile = null; + $this->_prxFile = null; + } + + return $this->_lastTerm; + } + + /** + * Close terms stream + * + * Should be used for resources clean up if stream is not read up to the end + */ + public function closeTermsStream() + { + $this->_tisFile = null; + $this->_frqFile = null; + $this->_prxFile = null; + + $this->_lastTerm = null; + $this->_lastTermInfo = null; + $this->_lastTermPositions = null; + + $this->_docMap = null; + } + + + /** + * Returns term in current position + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function currentTerm() + { + return $this->_lastTerm; + } + + + /** + * Returns an array of all term positions in the documents. + * Return array structure: array( docId => array( pos1, pos2, ...), ...) + * + * @return array + */ + public function currentTermPositions() + { + return $this->_lastTermPositions; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/SegmentMerger.php b/library/vendor/Zend/Search/Lucene/Index/SegmentMerger.php new file mode 100644 index 000000000..153d972fe --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/SegmentMerger.php @@ -0,0 +1,266 @@ +][] => + * + * @var array + */ + private $_fieldsMap = array(); + + + + /** + * Object constructor. + * + * Creates new segment merger with $directory as target to merge segments into + * and $name as a name of new segment + * + * @param Zend_Search_Lucene_Storage_Directory $directory + * @param string $name + */ + public function __construct($directory, $name) + { + /** Zend_Search_Lucene_Index_SegmentWriter_StreamWriter */ + $this->_writer = new Zend_Search_Lucene_Index_SegmentWriter_StreamWriter($directory, $name); + } + + + /** + * Add segmnet to a collection of segments to be merged + * + * @param Zend_Search_Lucene_Index_SegmentInfo $segment + */ + public function addSource(Zend_Search_Lucene_Index_SegmentInfo $segmentInfo) + { + $this->_segmentInfos[$segmentInfo->getName()] = $segmentInfo; + } + + + /** + * Do merge. + * + * Returns number of documents in newly created segment + * + * @return Zend_Search_Lucene_Index_SegmentInfo + * @throws Zend_Search_Lucene_Exception + */ + public function merge() + { + if ($this->_mergeDone) { + throw new Zend_Search_Lucene_Exception('Merge is already done.'); + } + + if (count($this->_segmentInfos) < 1) { + throw new Zend_Search_Lucene_Exception('Wrong number of segments to be merged (' + . count($this->_segmentInfos) + . ').'); + } + + $this->_mergeFields(); + $this->_mergeNorms(); + $this->_mergeStoredFields(); + $this->_mergeTerms(); + + $this->_mergeDone = true; + + return $this->_writer->close(); + } + + + /** + * Merge fields information + */ + private function _mergeFields() + { + foreach ($this->_segmentInfos as $segName => $segmentInfo) { + foreach ($segmentInfo->getFieldInfos() as $fieldInfo) { + $this->_fieldsMap[$segName][$fieldInfo->number] = $this->_writer->addFieldInfo($fieldInfo); + } + } + } + + /** + * Merge field's normalization factors + */ + private function _mergeNorms() + { + foreach ($this->_writer->getFieldInfos() as $fieldInfo) { + if ($fieldInfo->isIndexed) { + foreach ($this->_segmentInfos as $segName => $segmentInfo) { + if ($segmentInfo->hasDeletions()) { + $srcNorm = $segmentInfo->normVector($fieldInfo->name); + $norm = ''; + $docs = $segmentInfo->count(); + for ($count = 0; $count < $docs; $count++) { + if (!$segmentInfo->isDeleted($count)) { + $norm .= $srcNorm[$count]; + } + } + $this->_writer->addNorm($fieldInfo->name, $norm); + } else { + $this->_writer->addNorm($fieldInfo->name, $segmentInfo->normVector($fieldInfo->name)); + } + } + } + } + } + + /** + * Merge fields information + */ + private function _mergeStoredFields() + { + $this->_docCount = 0; + + foreach ($this->_segmentInfos as $segName => $segmentInfo) { + $fdtFile = $segmentInfo->openCompoundFile('.fdt'); + + for ($count = 0; $count < $segmentInfo->count(); $count++) { + $fieldCount = $fdtFile->readVInt(); + $storedFields = array(); + + for ($count2 = 0; $count2 < $fieldCount; $count2++) { + $fieldNum = $fdtFile->readVInt(); + $bits = $fdtFile->readByte(); + $fieldInfo = $segmentInfo->getField($fieldNum); + + if (!($bits & 2)) { // Text data + $storedFields[] = + new Zend_Search_Lucene_Field($fieldInfo->name, + $fdtFile->readString(), + 'UTF-8', + true, + $fieldInfo->isIndexed, + $bits & 1 ); + } else { // Binary data + $storedFields[] = + new Zend_Search_Lucene_Field($fieldInfo->name, + $fdtFile->readBinary(), + '', + true, + $fieldInfo->isIndexed, + $bits & 1, + true); + } + } + + if (!$segmentInfo->isDeleted($count)) { + $this->_docCount++; + $this->_writer->addStoredFields($storedFields); + } + } + } + } + + + /** + * Merge fields information + */ + private function _mergeTerms() + { + /** Zend_Search_Lucene_Index_TermsPriorityQueue */ + + $segmentInfoQueue = new Zend_Search_Lucene_Index_TermsPriorityQueue(); + + $segmentStartId = 0; + foreach ($this->_segmentInfos as $segName => $segmentInfo) { + $segmentStartId = $segmentInfo->resetTermsStream($segmentStartId, Zend_Search_Lucene_Index_SegmentInfo::SM_MERGE_INFO); + + // Skip "empty" segments + if ($segmentInfo->currentTerm() !== null) { + $segmentInfoQueue->put($segmentInfo); + } + } + + $this->_writer->initializeDictionaryFiles(); + + $termDocs = array(); + while (($segmentInfo = $segmentInfoQueue->pop()) !== null) { + // Merge positions array + $termDocs += $segmentInfo->currentTermPositions(); + + if ($segmentInfoQueue->top() === null || + $segmentInfoQueue->top()->currentTerm()->key() != + $segmentInfo->currentTerm()->key()) { + // We got new term + ksort($termDocs, SORT_NUMERIC); + + // Add term if it's contained in any document + if (count($termDocs) > 0) { + $this->_writer->addTerm($segmentInfo->currentTerm(), $termDocs); + } + $termDocs = array(); + } + + $segmentInfo->nextTerm(); + // check, if segment dictionary is finished + if ($segmentInfo->currentTerm() !== null) { + // Put segment back into the priority queue + $segmentInfoQueue->put($segmentInfo); + } + } + + $this->_writer->closeDictionaryFiles(); + } +} diff --git a/library/vendor/Zend/Search/Lucene/Index/SegmentWriter.php b/library/vendor/Zend/Search/Lucene/Index/SegmentWriter.php new file mode 100644 index 000000000..a014751c8 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/SegmentWriter.php @@ -0,0 +1,631 @@ + normVector + * normVector is a binary string. + * Each byte corresponds to an indexed document in a segment and + * encodes normalization factor (float value, encoded by + * Zend_Search_Lucene_Search_Similarity::encodeNorm()) + * + * @var array + */ + protected $_norms = array(); + + + /** + * '.fdx' file - Stored Fields, the field index. + * + * @var Zend_Search_Lucene_Storage_File + */ + protected $_fdxFile = null; + + /** + * '.fdt' file - Stored Fields, the field data. + * + * @var Zend_Search_Lucene_Storage_File + */ + protected $_fdtFile = null; + + + /** + * Object constructor. + * + * @param Zend_Search_Lucene_Storage_Directory $directory + * @param string $name + */ + public function __construct(Zend_Search_Lucene_Storage_Directory $directory, $name) + { + $this->_directory = $directory; + $this->_name = $name; + } + + + /** + * Add field to the segment + * + * Returns actual field number + * + * @param Zend_Search_Lucene_Field $field + * @return integer + */ + public function addField(Zend_Search_Lucene_Field $field) + { + if (!isset($this->_fields[$field->name])) { + $fieldNumber = count($this->_fields); + $this->_fields[$field->name] = + new Zend_Search_Lucene_Index_FieldInfo($field->name, + $field->isIndexed, + $fieldNumber, + $field->storeTermVector); + + return $fieldNumber; + } else { + $this->_fields[$field->name]->isIndexed |= $field->isIndexed; + $this->_fields[$field->name]->storeTermVector |= $field->storeTermVector; + + return $this->_fields[$field->name]->number; + } + } + + /** + * Add fieldInfo to the segment + * + * Returns actual field number + * + * @param Zend_Search_Lucene_Index_FieldInfo $fieldInfo + * @return integer + */ + public function addFieldInfo(Zend_Search_Lucene_Index_FieldInfo $fieldInfo) + { + if (!isset($this->_fields[$fieldInfo->name])) { + $fieldNumber = count($this->_fields); + $this->_fields[$fieldInfo->name] = + new Zend_Search_Lucene_Index_FieldInfo($fieldInfo->name, + $fieldInfo->isIndexed, + $fieldNumber, + $fieldInfo->storeTermVector); + + return $fieldNumber; + } else { + $this->_fields[$fieldInfo->name]->isIndexed |= $fieldInfo->isIndexed; + $this->_fields[$fieldInfo->name]->storeTermVector |= $fieldInfo->storeTermVector; + + return $this->_fields[$fieldInfo->name]->number; + } + } + + /** + * Returns array of FieldInfo objects. + * + * @return array + */ + public function getFieldInfos() + { + return $this->_fields; + } + + /** + * Add stored fields information + * + * @param array $storedFields array of Zend_Search_Lucene_Field objects + */ + public function addStoredFields($storedFields) + { + if (!isset($this->_fdxFile)) { + $this->_fdxFile = $this->_directory->createFile($this->_name . '.fdx'); + $this->_fdtFile = $this->_directory->createFile($this->_name . '.fdt'); + + $this->_files[] = $this->_name . '.fdx'; + $this->_files[] = $this->_name . '.fdt'; + } + + $this->_fdxFile->writeLong($this->_fdtFile->tell()); + $this->_fdtFile->writeVInt(count($storedFields)); + foreach ($storedFields as $field) { + $this->_fdtFile->writeVInt($this->_fields[$field->name]->number); + $fieldBits = ($field->isTokenized ? 0x01 : 0x00) | + ($field->isBinary ? 0x02 : 0x00) | + 0x00; /* 0x04 - third bit, compressed (ZLIB) */ + $this->_fdtFile->writeByte($fieldBits); + if ($field->isBinary) { + $this->_fdtFile->writeVInt(strlen($field->value)); + $this->_fdtFile->writeBytes($field->value); + } else { + $this->_fdtFile->writeString($field->getUtf8Value()); + } + } + + $this->_docCount++; + } + + /** + * Returns the total number of documents in this segment. + * + * @return integer + */ + public function count() + { + return $this->_docCount; + } + + /** + * Return segment name + * + * @return string + */ + public function getName() + { + return $this->_name; + } + + /** + * Dump Field Info (.fnm) segment file + */ + protected function _dumpFNM() + { + $fnmFile = $this->_directory->createFile($this->_name . '.fnm'); + $fnmFile->writeVInt(count($this->_fields)); + + $nrmFile = $this->_directory->createFile($this->_name . '.nrm'); + // Write header + $nrmFile->writeBytes('NRM'); + // Write format specifier + $nrmFile->writeByte((int)0xFF); + + foreach ($this->_fields as $field) { + $fnmFile->writeString($field->name); + $fnmFile->writeByte(($field->isIndexed ? 0x01 : 0x00) | + ($field->storeTermVector ? 0x02 : 0x00) +// not supported yet 0x04 /* term positions are stored with the term vectors */ | +// not supported yet 0x08 /* term offsets are stored with the term vectors */ | + ); + + if ($field->isIndexed) { + // pre-2.1 index mode (not used now) + // $normFileName = $this->_name . '.f' . $field->number; + // $fFile = $this->_directory->createFile($normFileName); + // $fFile->writeBytes($this->_norms[$field->name]); + // $this->_files[] = $normFileName; + + $nrmFile->writeBytes($this->_norms[$field->name]); + } + } + + $this->_files[] = $this->_name . '.fnm'; + $this->_files[] = $this->_name . '.nrm'; + } + + + + /** + * Term Dictionary file + * + * @var Zend_Search_Lucene_Storage_File + */ + private $_tisFile = null; + + /** + * Term Dictionary index file + * + * @var Zend_Search_Lucene_Storage_File + */ + private $_tiiFile = null; + + /** + * Frequencies file + * + * @var Zend_Search_Lucene_Storage_File + */ + private $_frqFile = null; + + /** + * Positions file + * + * @var Zend_Search_Lucene_Storage_File + */ + private $_prxFile = null; + + /** + * Number of written terms + * + * @var integer + */ + private $_termCount; + + + /** + * Last saved term + * + * @var Zend_Search_Lucene_Index_Term + */ + private $_prevTerm; + + /** + * Last saved term info + * + * @var Zend_Search_Lucene_Index_TermInfo + */ + private $_prevTermInfo; + + /** + * Last saved index term + * + * @var Zend_Search_Lucene_Index_Term + */ + private $_prevIndexTerm; + + /** + * Last saved index term info + * + * @var Zend_Search_Lucene_Index_TermInfo + */ + private $_prevIndexTermInfo; + + /** + * Last term dictionary file position + * + * @var integer + */ + private $_lastIndexPosition; + + /** + * Create dicrionary, frequency and positions files and write necessary headers + */ + public function initializeDictionaryFiles() + { + $this->_tisFile = $this->_directory->createFile($this->_name . '.tis'); + $this->_tisFile->writeInt((int)0xFFFFFFFD); + $this->_tisFile->writeLong(0 /* dummy data for terms count */); + $this->_tisFile->writeInt(self::$indexInterval); + $this->_tisFile->writeInt(self::$skipInterval); + $this->_tisFile->writeInt(self::$maxSkipLevels); + + $this->_tiiFile = $this->_directory->createFile($this->_name . '.tii'); + $this->_tiiFile->writeInt((int)0xFFFFFFFD); + $this->_tiiFile->writeLong(0 /* dummy data for terms count */); + $this->_tiiFile->writeInt(self::$indexInterval); + $this->_tiiFile->writeInt(self::$skipInterval); + $this->_tiiFile->writeInt(self::$maxSkipLevels); + + /** Dump dictionary header */ + $this->_tiiFile->writeVInt(0); // preffix length + $this->_tiiFile->writeString(''); // suffix + $this->_tiiFile->writeInt((int)0xFFFFFFFF); // field number + $this->_tiiFile->writeByte((int)0x0F); + $this->_tiiFile->writeVInt(0); // DocFreq + $this->_tiiFile->writeVInt(0); // FreqDelta + $this->_tiiFile->writeVInt(0); // ProxDelta + $this->_tiiFile->writeVInt(24); // IndexDelta + + $this->_frqFile = $this->_directory->createFile($this->_name . '.frq'); + $this->_prxFile = $this->_directory->createFile($this->_name . '.prx'); + + $this->_files[] = $this->_name . '.tis'; + $this->_files[] = $this->_name . '.tii'; + $this->_files[] = $this->_name . '.frq'; + $this->_files[] = $this->_name . '.prx'; + + $this->_prevTerm = null; + $this->_prevTermInfo = null; + $this->_prevIndexTerm = null; + $this->_prevIndexTermInfo = null; + $this->_lastIndexPosition = 24; + $this->_termCount = 0; + + } + + /** + * Add term + * + * Term positions is an array( docId => array(pos1, pos2, pos3, ...), ... ) + * + * @param Zend_Search_Lucene_Index_Term $termEntry + * @param array $termDocs + */ + public function addTerm($termEntry, $termDocs) + { + $freqPointer = $this->_frqFile->tell(); + $proxPointer = $this->_prxFile->tell(); + + $prevDoc = 0; + foreach ($termDocs as $docId => $termPositions) { + $docDelta = ($docId - $prevDoc)*2; + $prevDoc = $docId; + if (count($termPositions) > 1) { + $this->_frqFile->writeVInt($docDelta); + $this->_frqFile->writeVInt(count($termPositions)); + } else { + $this->_frqFile->writeVInt($docDelta + 1); + } + + $prevPosition = 0; + foreach ($termPositions as $position) { + $this->_prxFile->writeVInt($position - $prevPosition); + $prevPosition = $position; + } + } + + if (count($termDocs) >= self::$skipInterval) { + /** + * @todo Write Skip Data to a freq file. + * It's not used now, but make index more optimal + */ + $skipOffset = $this->_frqFile->tell() - $freqPointer; + } else { + $skipOffset = 0; + } + + $term = new Zend_Search_Lucene_Index_Term($termEntry->text, + $this->_fields[$termEntry->field]->number); + $termInfo = new Zend_Search_Lucene_Index_TermInfo(count($termDocs), + $freqPointer, $proxPointer, $skipOffset); + + $this->_dumpTermDictEntry($this->_tisFile, $this->_prevTerm, $term, $this->_prevTermInfo, $termInfo); + + if (($this->_termCount + 1) % self::$indexInterval == 0) { + $this->_dumpTermDictEntry($this->_tiiFile, $this->_prevIndexTerm, $term, $this->_prevIndexTermInfo, $termInfo); + + $indexPosition = $this->_tisFile->tell(); + $this->_tiiFile->writeVInt($indexPosition - $this->_lastIndexPosition); + $this->_lastIndexPosition = $indexPosition; + + } + $this->_termCount++; + } + + /** + * Close dictionary + */ + public function closeDictionaryFiles() + { + $this->_tisFile->seek(4); + $this->_tisFile->writeLong($this->_termCount); + + $this->_tiiFile->seek(4); + // + 1 is used to count an additional special index entry (empty term at the start of the list) + $this->_tiiFile->writeLong(($this->_termCount - $this->_termCount % self::$indexInterval)/self::$indexInterval + 1); + } + + + /** + * Dump Term Dictionary segment file entry. + * Used to write entry to .tis or .tii files + * + * @param Zend_Search_Lucene_Storage_File $dicFile + * @param Zend_Search_Lucene_Index_Term $prevTerm + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_TermInfo $prevTermInfo + * @param Zend_Search_Lucene_Index_TermInfo $termInfo + */ + protected function _dumpTermDictEntry(Zend_Search_Lucene_Storage_File $dicFile, + &$prevTerm, Zend_Search_Lucene_Index_Term $term, + &$prevTermInfo, Zend_Search_Lucene_Index_TermInfo $termInfo) + { + if (isset($prevTerm) && $prevTerm->field == $term->field) { + $matchedBytes = 0; + $maxBytes = min(strlen($prevTerm->text), strlen($term->text)); + while ($matchedBytes < $maxBytes && + $prevTerm->text[$matchedBytes] == $term->text[$matchedBytes]) { + $matchedBytes++; + } + + // Calculate actual matched UTF-8 pattern + $prefixBytes = 0; + $prefixChars = 0; + while ($prefixBytes < $matchedBytes) { + $charBytes = 1; + if ((ord($term->text[$prefixBytes]) & 0xC0) == 0xC0) { + $charBytes++; + if (ord($term->text[$prefixBytes]) & 0x20 ) { + $charBytes++; + if (ord($term->text[$prefixBytes]) & 0x10 ) { + $charBytes++; + } + } + } + + if ($prefixBytes + $charBytes > $matchedBytes) { + // char crosses matched bytes boundary + // skip char + break; + } + + $prefixChars++; + $prefixBytes += $charBytes; + } + + // Write preffix length + $dicFile->writeVInt($prefixChars); + // Write suffix + $dicFile->writeString(substr($term->text, $prefixBytes)); + } else { + // Write preffix length + $dicFile->writeVInt(0); + // Write suffix + $dicFile->writeString($term->text); + } + // Write field number + $dicFile->writeVInt($term->field); + // DocFreq (the count of documents which contain the term) + $dicFile->writeVInt($termInfo->docFreq); + + $prevTerm = $term; + + if (!isset($prevTermInfo)) { + // Write FreqDelta + $dicFile->writeVInt($termInfo->freqPointer); + // Write ProxDelta + $dicFile->writeVInt($termInfo->proxPointer); + } else { + // Write FreqDelta + $dicFile->writeVInt($termInfo->freqPointer - $prevTermInfo->freqPointer); + // Write ProxDelta + $dicFile->writeVInt($termInfo->proxPointer - $prevTermInfo->proxPointer); + } + // Write SkipOffset - it's not 0 when $termInfo->docFreq > self::$skipInterval + if ($termInfo->skipOffset != 0) { + $dicFile->writeVInt($termInfo->skipOffset); + } + + $prevTermInfo = $termInfo; + } + + + /** + * Generate compound index file + */ + protected function _generateCFS() + { + $cfsFile = $this->_directory->createFile($this->_name . '.cfs'); + $cfsFile->writeVInt(count($this->_files)); + + $dataOffsetPointers = array(); + foreach ($this->_files as $fileName) { + $dataOffsetPointers[$fileName] = $cfsFile->tell(); + $cfsFile->writeLong(0); // write dummy data + $cfsFile->writeString($fileName); + } + + foreach ($this->_files as $fileName) { + // Get actual data offset + $dataOffset = $cfsFile->tell(); + // Seek to the data offset pointer + $cfsFile->seek($dataOffsetPointers[$fileName]); + // Write actual data offset value + $cfsFile->writeLong($dataOffset); + // Seek back to the end of file + $cfsFile->seek($dataOffset); + + $dataFile = $this->_directory->getFileObject($fileName); + + $byteCount = $this->_directory->fileLength($fileName); + while ($byteCount > 0) { + $data = $dataFile->readBytes(min($byteCount, 131072 /*128Kb*/)); + $byteCount -= strlen($data); + $cfsFile->writeBytes($data); + } + + $this->_directory->deleteFile($fileName); + } + } + + + /** + * Close segment, write it to disk and return segment info + * + * @return Zend_Search_Lucene_Index_SegmentInfo + */ + abstract public function close(); +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php b/library/vendor/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php new file mode 100644 index 000000000..54e041a7a --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php @@ -0,0 +1,225 @@ +_termDocs = array(); + $this->_termDictionary = array(); + } + + + /** + * Adds a document to this segment. + * + * @param Zend_Search_Lucene_Document $document + * @throws Zend_Search_Lucene_Exception + */ + public function addDocument(Zend_Search_Lucene_Document $document) + { + /** Zend_Search_Lucene_Search_Similarity */ + + $storedFields = array(); + $docNorms = array(); + $similarity = Zend_Search_Lucene_Search_Similarity::getDefault(); + + foreach ($document->getFieldNames() as $fieldName) { + $field = $document->getField($fieldName); + + if ($field->storeTermVector) { + /** + * @todo term vector storing support + */ + throw new Zend_Search_Lucene_Exception('Store term vector functionality is not supported yet.'); + } + + if ($field->isIndexed) { + if ($field->isTokenized) { + /** Zend_Search_Lucene_Analysis_Analyzer */ + + $analyzer = Zend_Search_Lucene_Analysis_Analyzer::getDefault(); + $analyzer->setInput($field->value, $field->encoding); + + $position = 0; + $tokenCounter = 0; + while (($token = $analyzer->nextToken()) !== null) { + $tokenCounter++; + + $term = new Zend_Search_Lucene_Index_Term($token->getTermText(), $field->name); + $termKey = $term->key(); + + if (!isset($this->_termDictionary[$termKey])) { + // New term + $this->_termDictionary[$termKey] = $term; + $this->_termDocs[$termKey] = array(); + $this->_termDocs[$termKey][$this->_docCount] = array(); + } else if (!isset($this->_termDocs[$termKey][$this->_docCount])) { + // Existing term, but new term entry + $this->_termDocs[$termKey][$this->_docCount] = array(); + } + $position += $token->getPositionIncrement(); + $this->_termDocs[$termKey][$this->_docCount][] = $position; + } + + if ($tokenCounter == 0) { + // Field contains empty value. Treat it as non-indexed and non-tokenized + $field = clone($field); + $field->isIndexed = $field->isTokenized = false; + } else { + $docNorms[$field->name] = chr($similarity->encodeNorm( $similarity->lengthNorm($field->name, + $tokenCounter)* + $document->boost* + $field->boost )); + } + } else if (($fieldUtf8Value = $field->getUtf8Value()) == '') { + // Field contains empty value. Treat it as non-indexed and non-tokenized + $field = clone($field); + $field->isIndexed = $field->isTokenized = false; + } else { + $term = new Zend_Search_Lucene_Index_Term($fieldUtf8Value, $field->name); + $termKey = $term->key(); + + if (!isset($this->_termDictionary[$termKey])) { + // New term + $this->_termDictionary[$termKey] = $term; + $this->_termDocs[$termKey] = array(); + $this->_termDocs[$termKey][$this->_docCount] = array(); + } else if (!isset($this->_termDocs[$termKey][$this->_docCount])) { + // Existing term, but new term entry + $this->_termDocs[$termKey][$this->_docCount] = array(); + } + $this->_termDocs[$termKey][$this->_docCount][] = 0; // position + + $docNorms[$field->name] = chr($similarity->encodeNorm( $similarity->lengthNorm($field->name, 1)* + $document->boost* + $field->boost )); + } + } + + if ($field->isStored) { + $storedFields[] = $field; + } + + $this->addField($field); + } + + foreach ($this->_fields as $fieldName => $field) { + if (!$field->isIndexed) { + continue; + } + + if (!isset($this->_norms[$fieldName])) { + $this->_norms[$fieldName] = str_repeat(chr($similarity->encodeNorm( $similarity->lengthNorm($fieldName, 0) )), + $this->_docCount); + } + + if (isset($docNorms[$fieldName])){ + $this->_norms[$fieldName] .= $docNorms[$fieldName]; + } else { + $this->_norms[$fieldName] .= chr($similarity->encodeNorm( $similarity->lengthNorm($fieldName, 0) )); + } + } + + $this->addStoredFields($storedFields); + } + + + /** + * Dump Term Dictionary (.tis) and Term Dictionary Index (.tii) segment files + */ + protected function _dumpDictionary() + { + ksort($this->_termDictionary, SORT_STRING); + + $this->initializeDictionaryFiles(); + + foreach ($this->_termDictionary as $termId => $term) { + $this->addTerm($term, $this->_termDocs[$termId]); + } + + $this->closeDictionaryFiles(); + } + + + /** + * Close segment, write it to disk and return segment info + * + * @return Zend_Search_Lucene_Index_SegmentInfo + */ + public function close() + { + if ($this->_docCount == 0) { + return null; + } + + $this->_dumpFNM(); + $this->_dumpDictionary(); + + $this->_generateCFS(); + + /** Zend_Search_Lucene_Index_SegmentInfo */ + + return new Zend_Search_Lucene_Index_SegmentInfo($this->_directory, + $this->_name, + $this->_docCount, + -1, + null, + true, + true); + } + +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/SegmentWriter/StreamWriter.php b/library/vendor/Zend/Search/Lucene/Index/SegmentWriter/StreamWriter.php new file mode 100644 index 000000000..fcc882a04 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/SegmentWriter/StreamWriter.php @@ -0,0 +1,92 @@ +_fdxFile = $this->_directory->createFile($this->_name . '.fdx'); + $this->_fdtFile = $this->_directory->createFile($this->_name . '.fdt'); + + $this->_files[] = $this->_name . '.fdx'; + $this->_files[] = $this->_name . '.fdt'; + } + + public function addNorm($fieldName, $normVector) + { + if (isset($this->_norms[$fieldName])) { + $this->_norms[$fieldName] .= $normVector; + } else { + $this->_norms[$fieldName] = $normVector; + } + } + + /** + * Close segment, write it to disk and return segment info + * + * @return Zend_Search_Lucene_Index_SegmentInfo + */ + public function close() + { + if ($this->_docCount == 0) { + return null; + } + + $this->_dumpFNM(); + $this->_generateCFS(); + + /** Zend_Search_Lucene_Index_SegmentInfo */ + + return new Zend_Search_Lucene_Index_SegmentInfo($this->_directory, + $this->_name, + $this->_docCount, + -1, + null, + true, + true); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/Term.php b/library/vendor/Zend/Search/Lucene/Index/Term.php new file mode 100644 index 000000000..b2328384d --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/Term.php @@ -0,0 +1,144 @@ +field = ($field === null)? Zend_Search_Lucene::getDefaultSearchField() : $field; + $this->text = $text; + } + + + /** + * Returns term key + * + * @return string + */ + public function key() + { + return $this->field . chr(0) . $this->text; + } + + /** + * Get term prefix + * + * @param string $str + * @param integer $length + * @return string + */ + public static function getPrefix($str, $length) + { + $prefixBytes = 0; + $prefixChars = 0; + while ($prefixBytes < strlen($str) && $prefixChars < $length) { + $charBytes = 1; + if ((ord($str[$prefixBytes]) & 0xC0) == 0xC0) { + $charBytes++; + if (ord($str[$prefixBytes]) & 0x20 ) { + $charBytes++; + if (ord($str[$prefixBytes]) & 0x10 ) { + $charBytes++; + } + } + } + + if ($prefixBytes + $charBytes > strlen($str)) { + // wrong character + break; + } + + $prefixChars++; + $prefixBytes += $charBytes; + } + + return substr($str, 0, $prefixBytes); + } + + /** + * Get UTF-8 string length + * + * @param string $str + * @return string + */ + public static function getLength($str) + { + $bytes = 0; + $chars = 0; + while ($bytes < strlen($str)) { + $charBytes = 1; + if ((ord($str[$bytes]) & 0xC0) == 0xC0) { + $charBytes++; + if (ord($str[$bytes]) & 0x20 ) { + $charBytes++; + if (ord($str[$bytes]) & 0x10 ) { + $charBytes++; + } + } + } + + if ($bytes + $charBytes > strlen($str)) { + // wrong character + break; + } + + $chars++; + $bytes += $charBytes; + } + + return $chars; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/TermInfo.php b/library/vendor/Zend/Search/Lucene/Index/TermInfo.php new file mode 100644 index 000000000..824980883 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/TermInfo.php @@ -0,0 +1,80 @@ +docFreq = $docFreq; + $this->freqPointer = $freqPointer; + $this->proxPointer = $proxPointer; + $this->skipOffset = $skipOffset; + $this->indexPointer = $indexPointer; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Index/TermsPriorityQueue.php b/library/vendor/Zend/Search/Lucene/Index/TermsPriorityQueue.php new file mode 100644 index 000000000..2703d69f7 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/TermsPriorityQueue.php @@ -0,0 +1,48 @@ +currentTerm()->key(), $termsStream2->currentTerm()->key()) < 0; + } + +} diff --git a/library/vendor/Zend/Search/Lucene/Index/TermsStream/Interface.php b/library/vendor/Zend/Search/Lucene/Index/TermsStream/Interface.php new file mode 100644 index 000000000..67952bbf8 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Index/TermsStream/Interface.php @@ -0,0 +1,66 @@ + 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @var integer + */ + public $mergeFactor = 10; + + /** + * File system adapter. + * + * @var Zend_Search_Lucene_Storage_Directory + */ + private $_directory = null; + + + /** + * Changes counter. + * + * @var integer + */ + private $_versionUpdate = 0; + + /** + * List of the segments, created by index writer + * Array of Zend_Search_Lucene_Index_SegmentInfo objects + * + * @var array + */ + private $_newSegments = array(); + + /** + * List of segments to be deleted on commit + * + * @var array + */ + private $_segmentsToDelete = array(); + + /** + * Current segment to add documents + * + * @var Zend_Search_Lucene_Index_SegmentWriter_DocumentWriter + */ + private $_currentSegment = null; + + /** + * Array of Zend_Search_Lucene_Index_SegmentInfo objects for this index. + * + * It's a reference to the corresponding Zend_Search_Lucene::$_segmentInfos array + * + * @var array Zend_Search_Lucene_Index_SegmentInfo + */ + private $_segmentInfos; + + /** + * Index target format version + * + * @var integer + */ + private $_targetFormatVersion; + + /** + * List of indexfiles extensions + * + * @var array + */ + private static $_indexExtensions = array('.cfs' => '.cfs', + '.cfx' => '.cfx', + '.fnm' => '.fnm', + '.fdx' => '.fdx', + '.fdt' => '.fdt', + '.tis' => '.tis', + '.tii' => '.tii', + '.frq' => '.frq', + '.prx' => '.prx', + '.tvx' => '.tvx', + '.tvd' => '.tvd', + '.tvf' => '.tvf', + '.del' => '.del', + '.sti' => '.sti' ); + + + /** + * Create empty index + * + * @param Zend_Search_Lucene_Storage_Directory $directory + * @param integer $generation + * @param integer $nameCount + */ + public static function createIndex(Zend_Search_Lucene_Storage_Directory $directory, $generation, $nameCount) + { + if ($generation == 0) { + // Create index in pre-2.1 mode + foreach ($directory->fileList() as $file) { + if ($file == 'deletable' || + $file == 'segments' || + isset(self::$_indexExtensions[ substr($file, strlen($file)-4)]) || + preg_match('/\.f\d+$/i', $file) /* matches .f file names */) { + $directory->deleteFile($file); + } + } + + $segmentsFile = $directory->createFile('segments'); + $segmentsFile->writeInt((int)0xFFFFFFFF); + + // write version (initialized by current time) + $segmentsFile->writeLong(round(microtime(true))); + + // write name counter + $segmentsFile->writeInt($nameCount); + // write segment counter + $segmentsFile->writeInt(0); + + $deletableFile = $directory->createFile('deletable'); + // write counter + $deletableFile->writeInt(0); + } else { + $genFile = $directory->createFile('segments.gen'); + + $genFile->writeInt((int)0xFFFFFFFE); + // Write generation two times + $genFile->writeLong($generation); + $genFile->writeLong($generation); + + $segmentsFile = $directory->createFile(Zend_Search_Lucene::getSegmentFileName($generation)); + $segmentsFile->writeInt((int)0xFFFFFFFD); + + // write version (initialized by current time) + $segmentsFile->writeLong(round(microtime(true))); + + // write name counter + $segmentsFile->writeInt($nameCount); + // write segment counter + $segmentsFile->writeInt(0); + } + } + + /** + * Open the index for writing + * + * @param Zend_Search_Lucene_Storage_Directory $directory + * @param array $segmentInfos + * @param integer $targetFormatVersion + * @param Zend_Search_Lucene_Storage_File $cleanUpLock + */ + public function __construct(Zend_Search_Lucene_Storage_Directory $directory, &$segmentInfos, $targetFormatVersion) + { + $this->_directory = $directory; + $this->_segmentInfos = &$segmentInfos; + $this->_targetFormatVersion = $targetFormatVersion; + } + + /** + * Adds a document to this index. + * + * @param Zend_Search_Lucene_Document $document + */ + public function addDocument(Zend_Search_Lucene_Document $document) + { + /** Zend_Search_Lucene_Index_SegmentWriter_DocumentWriter */ + + if ($this->_currentSegment === null) { + $this->_currentSegment = + new Zend_Search_Lucene_Index_SegmentWriter_DocumentWriter($this->_directory, $this->_newSegmentName()); + } + $this->_currentSegment->addDocument($document); + + if ($this->_currentSegment->count() >= $this->maxBufferedDocs) { + $this->commit(); + } + + $this->_maybeMergeSegments(); + + $this->_versionUpdate++; + } + + + /** + * Check if we have anything to merge + * + * @return boolean + */ + private function _hasAnythingToMerge() + { + $segmentSizes = array(); + foreach ($this->_segmentInfos as $segName => $segmentInfo) { + $segmentSizes[$segName] = $segmentInfo->count(); + } + + $mergePool = array(); + $poolSize = 0; + $sizeToMerge = $this->maxBufferedDocs; + asort($segmentSizes, SORT_NUMERIC); + foreach ($segmentSizes as $segName => $size) { + // Check, if segment comes into a new merging block + while ($size >= $sizeToMerge) { + // Merge previous block if it's large enough + if ($poolSize >= $sizeToMerge) { + return true; + } + $mergePool = array(); + $poolSize = 0; + + $sizeToMerge *= $this->mergeFactor; + + if ($sizeToMerge > $this->maxMergeDocs) { + return false; + } + } + + $mergePool[] = $this->_segmentInfos[$segName]; + $poolSize += $size; + } + + if ($poolSize >= $sizeToMerge) { + return true; + } + + return false; + } + + /** + * Merge segments if necessary + */ + private function _maybeMergeSegments() + { + if (Zend_Search_Lucene_LockManager::obtainOptimizationLock($this->_directory) === false) { + return; + } + + if (!$this->_hasAnythingToMerge()) { + Zend_Search_Lucene_LockManager::releaseOptimizationLock($this->_directory); + return; + } + + // Update segments list to be sure all segments are not merged yet by another process + // + // Segment merging functionality is concentrated in this class and surrounded + // by optimization lock obtaining/releasing. + // _updateSegments() refreshes segments list from the latest index generation. + // So only new segments can be added to the index while we are merging some already existing + // segments. + // Newly added segments will be also included into the index by the _updateSegments() call + // either by another process or by the current process with the commit() call at the end of _mergeSegments() method. + // That's guaranteed by the serialisation of _updateSegments() execution using exclusive locks. + $this->_updateSegments(); + + // Perform standard auto-optimization procedure + $segmentSizes = array(); + foreach ($this->_segmentInfos as $segName => $segmentInfo) { + $segmentSizes[$segName] = $segmentInfo->count(); + } + + $mergePool = array(); + $poolSize = 0; + $sizeToMerge = $this->maxBufferedDocs; + asort($segmentSizes, SORT_NUMERIC); + foreach ($segmentSizes as $segName => $size) { + // Check, if segment comes into a new merging block + while ($size >= $sizeToMerge) { + // Merge previous block if it's large enough + if ($poolSize >= $sizeToMerge) { + $this->_mergeSegments($mergePool); + } + $mergePool = array(); + $poolSize = 0; + + $sizeToMerge *= $this->mergeFactor; + + if ($sizeToMerge > $this->maxMergeDocs) { + Zend_Search_Lucene_LockManager::releaseOptimizationLock($this->_directory); + return; + } + } + + $mergePool[] = $this->_segmentInfos[$segName]; + $poolSize += $size; + } + + if ($poolSize >= $sizeToMerge) { + $this->_mergeSegments($mergePool); + } + + Zend_Search_Lucene_LockManager::releaseOptimizationLock($this->_directory); + } + + /** + * Merge specified segments + * + * $segments is an array of SegmentInfo objects + * + * @param array $segments + */ + private function _mergeSegments($segments) + { + $newName = $this->_newSegmentName(); + + /** Zend_Search_Lucene_Index_SegmentMerger */ + $merger = new Zend_Search_Lucene_Index_SegmentMerger($this->_directory, + $newName); + foreach ($segments as $segmentInfo) { + $merger->addSource($segmentInfo); + $this->_segmentsToDelete[$segmentInfo->getName()] = $segmentInfo->getName(); + } + + $newSegment = $merger->merge(); + if ($newSegment !== null) { + $this->_newSegments[$newSegment->getName()] = $newSegment; + } + + $this->commit(); + } + + /** + * Update segments file by adding current segment to a list + * + * @throws Zend_Search_Lucene_Exception + */ + private function _updateSegments() + { + // Get an exclusive index lock + Zend_Search_Lucene_LockManager::obtainWriteLock($this->_directory); + + // Write down changes for the segments + foreach ($this->_segmentInfos as $segInfo) { + $segInfo->writeChanges(); + } + + + $generation = Zend_Search_Lucene::getActualGeneration($this->_directory); + $segmentsFile = $this->_directory->getFileObject(Zend_Search_Lucene::getSegmentFileName($generation), false); + $newSegmentFile = $this->_directory->createFile(Zend_Search_Lucene::getSegmentFileName(++$generation), false); + + try { + $genFile = $this->_directory->getFileObject('segments.gen', false); + } catch (Zend_Search_Lucene_Exception $e) { + if (strpos($e->getMessage(), 'is not readable') !== false) { + $genFile = $this->_directory->createFile('segments.gen'); + } else { + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + } + + $genFile->writeInt((int)0xFFFFFFFE); + // Write generation (first copy) + $genFile->writeLong($generation); + + try { + // Write format marker + if ($this->_targetFormatVersion == Zend_Search_Lucene::FORMAT_2_1) { + $newSegmentFile->writeInt((int)0xFFFFFFFD); + } else if ($this->_targetFormatVersion == Zend_Search_Lucene::FORMAT_2_3) { + $newSegmentFile->writeInt((int)0xFFFFFFFC); + } + + // Read src file format identifier + $format = $segmentsFile->readInt(); + if ($format == (int)0xFFFFFFFF) { + $srcFormat = Zend_Search_Lucene::FORMAT_PRE_2_1; + } else if ($format == (int)0xFFFFFFFD) { + $srcFormat = Zend_Search_Lucene::FORMAT_2_1; + } else if ($format == (int)0xFFFFFFFC) { + $srcFormat = Zend_Search_Lucene::FORMAT_2_3; + } else { + throw new Zend_Search_Lucene_Exception('Unsupported segments file format'); + } + + $version = $segmentsFile->readLong() + $this->_versionUpdate; + $this->_versionUpdate = 0; + $newSegmentFile->writeLong($version); + + // Write segment name counter + $newSegmentFile->writeInt($segmentsFile->readInt()); + + // Get number of segments offset + $numOfSegmentsOffset = $newSegmentFile->tell(); + // Write dummy data (segment counter) + $newSegmentFile->writeInt(0); + + // Read number of segemnts + $segmentsCount = $segmentsFile->readInt(); + + $segments = array(); + for ($count = 0; $count < $segmentsCount; $count++) { + $segName = $segmentsFile->readString(); + $segSize = $segmentsFile->readInt(); + + if ($srcFormat == Zend_Search_Lucene::FORMAT_PRE_2_1) { + // pre-2.1 index format + $delGen = 0; + $hasSingleNormFile = false; + $numField = (int)0xFFFFFFFF; + $isCompoundByte = 0; + $docStoreOptions = null; + } else { + $delGen = $segmentsFile->readLong(); + + if ($srcFormat == Zend_Search_Lucene::FORMAT_2_3) { + $docStoreOffset = $segmentsFile->readInt(); + + if ($docStoreOffset != (int)0xFFFFFFFF) { + $docStoreSegment = $segmentsFile->readString(); + $docStoreIsCompoundFile = $segmentsFile->readByte(); + + $docStoreOptions = array('offset' => $docStoreOffset, + 'segment' => $docStoreSegment, + 'isCompound' => ($docStoreIsCompoundFile == 1)); + } else { + $docStoreOptions = null; + } + } else { + $docStoreOptions = null; + } + + $hasSingleNormFile = $segmentsFile->readByte(); + $numField = $segmentsFile->readInt(); + + $normGens = array(); + if ($numField != (int)0xFFFFFFFF) { + for ($count1 = 0; $count1 < $numField; $count1++) { + $normGens[] = $segmentsFile->readLong(); + } + } + $isCompoundByte = $segmentsFile->readByte(); + } + + if (!in_array($segName, $this->_segmentsToDelete)) { + // Load segment if necessary + if (!isset($this->_segmentInfos[$segName])) { + if ($isCompoundByte == 0xFF) { + // The segment is not a compound file + $isCompound = false; + } else if ($isCompoundByte == 0x00) { + // The status is unknown + $isCompound = null; + } else if ($isCompoundByte == 0x01) { + // The segment is a compound file + $isCompound = true; + } + + /** Zend_Search_Lucene_Index_SegmentInfo */ + $this->_segmentInfos[$segName] = + new Zend_Search_Lucene_Index_SegmentInfo($this->_directory, + $segName, + $segSize, + $delGen, + $docStoreOptions, + $hasSingleNormFile, + $isCompound); + } else { + // Retrieve actual deletions file generation number + $delGen = $this->_segmentInfos[$segName]->getDelGen(); + } + + $newSegmentFile->writeString($segName); + $newSegmentFile->writeInt($segSize); + $newSegmentFile->writeLong($delGen); + if ($this->_targetFormatVersion == Zend_Search_Lucene::FORMAT_2_3) { + if ($docStoreOptions !== null) { + $newSegmentFile->writeInt($docStoreOffset); + $newSegmentFile->writeString($docStoreSegment); + $newSegmentFile->writeByte($docStoreIsCompoundFile); + } else { + // Set DocStoreOffset to -1 + $newSegmentFile->writeInt((int)0xFFFFFFFF); + } + } else if ($docStoreOptions !== null) { + // Release index write lock + Zend_Search_Lucene_LockManager::releaseWriteLock($this->_directory); + + throw new Zend_Search_Lucene_Exception('Index conversion to lower format version is not supported.'); + } + + $newSegmentFile->writeByte($hasSingleNormFile); + $newSegmentFile->writeInt($numField); + if ($numField != (int)0xFFFFFFFF) { + foreach ($normGens as $normGen) { + $newSegmentFile->writeLong($normGen); + } + } + $newSegmentFile->writeByte($isCompoundByte); + + $segments[$segName] = $segSize; + } + } + $segmentsFile->close(); + + $segmentsCount = count($segments) + count($this->_newSegments); + + foreach ($this->_newSegments as $segName => $segmentInfo) { + $newSegmentFile->writeString($segName); + $newSegmentFile->writeInt($segmentInfo->count()); + + // delete file generation: -1 (there is no delete file yet) + $newSegmentFile->writeInt((int)0xFFFFFFFF);$newSegmentFile->writeInt((int)0xFFFFFFFF); + if ($this->_targetFormatVersion == Zend_Search_Lucene::FORMAT_2_3) { + // docStoreOffset: -1 (segment doesn't use shared doc store) + $newSegmentFile->writeInt((int)0xFFFFFFFF); + } + // HasSingleNormFile + $newSegmentFile->writeByte($segmentInfo->hasSingleNormFile()); + // NumField + $newSegmentFile->writeInt((int)0xFFFFFFFF); + // IsCompoundFile + $newSegmentFile->writeByte($segmentInfo->isCompound() ? 1 : -1); + + $segments[$segmentInfo->getName()] = $segmentInfo->count(); + $this->_segmentInfos[$segName] = $segmentInfo; + } + $this->_newSegments = array(); + + $newSegmentFile->seek($numOfSegmentsOffset); + $newSegmentFile->writeInt($segmentsCount); // Update segments count + $newSegmentFile->close(); + } catch (Exception $e) { + /** Restore previous index generation */ + $generation--; + $genFile->seek(4, SEEK_SET); + // Write generation number twice + $genFile->writeLong($generation); $genFile->writeLong($generation); + + // Release index write lock + Zend_Search_Lucene_LockManager::releaseWriteLock($this->_directory); + + // Throw the exception + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + + // Write generation (second copy) + $genFile->writeLong($generation); + + + // Check if another update or read process is not running now + // If yes, skip clean-up procedure + if (Zend_Search_Lucene_LockManager::escalateReadLock($this->_directory)) { + /** + * Clean-up directory + */ + $filesToDelete = array(); + $filesTypes = array(); + $filesNumbers = array(); + + // list of .del files of currently used segments + // each segment can have several generations of .del files + // only last should not be deleted + $delFiles = array(); + + foreach ($this->_directory->fileList() as $file) { + if ($file == 'deletable') { + // 'deletable' file + $filesToDelete[] = $file; + $filesTypes[] = 0; // delete this file first, since it's not used starting from Lucene v2.1 + $filesNumbers[] = 0; + } else if ($file == 'segments') { + // 'segments' file + $filesToDelete[] = $file; + $filesTypes[] = 1; // second file to be deleted "zero" version of segments file (Lucene pre-2.1) + $filesNumbers[] = 0; + } else if (preg_match('/^segments_[a-zA-Z0-9]+$/i', $file)) { + // 'segments_xxx' file + // Check if it's not a just created generation file + if ($file != Zend_Search_Lucene::getSegmentFileName($generation)) { + $filesToDelete[] = $file; + $filesTypes[] = 2; // first group of files for deletions + $filesNumbers[] = (int)base_convert(substr($file, 9), 36, 10); // ordered by segment generation numbers + } + } else if (preg_match('/(^_([a-zA-Z0-9]+))\.f\d+$/i', $file, $matches)) { + // one of per segment files ('.f') + // Check if it's not one of the segments in the current segments set + if (!isset($segments[$matches[1]])) { + $filesToDelete[] = $file; + $filesTypes[] = 3; // second group of files for deletions + $filesNumbers[] = (int)base_convert($matches[2], 36, 10); // order by segment number + } + } else if (preg_match('/(^_([a-zA-Z0-9]+))(_([a-zA-Z0-9]+))\.del$/i', $file, $matches)) { + // one of per segment files ('_.del' where is '_') + // Check if it's not one of the segments in the current segments set + if (!isset($segments[$matches[1]])) { + $filesToDelete[] = $file; + $filesTypes[] = 3; // second group of files for deletions + $filesNumbers[] = (int)base_convert($matches[2], 36, 10); // order by segment number + } else { + $segmentNumber = (int)base_convert($matches[2], 36, 10); + $delGeneration = (int)base_convert($matches[4], 36, 10); + if (!isset($delFiles[$segmentNumber])) { + $delFiles[$segmentNumber] = array(); + } + $delFiles[$segmentNumber][$delGeneration] = $file; + } + } else if (isset(self::$_indexExtensions[substr($file, strlen($file)-4)])) { + // one of per segment files ('.') + $segmentName = substr($file, 0, strlen($file) - 4); + // Check if it's not one of the segments in the current segments set + if (!isset($segments[$segmentName]) && + ($this->_currentSegment === null || $this->_currentSegment->getName() != $segmentName)) { + $filesToDelete[] = $file; + $filesTypes[] = 3; // second group of files for deletions + $filesNumbers[] = (int)base_convert(substr($file, 1 /* skip '_' */, strlen($file)-5), 36, 10); // order by segment number + } + } + } + + $maxGenNumber = 0; + // process .del files of currently used segments + foreach ($delFiles as $segmentNumber => $segmentDelFiles) { + ksort($delFiles[$segmentNumber], SORT_NUMERIC); + array_pop($delFiles[$segmentNumber]); // remove last delete file generation from candidates for deleting + + end($delFiles[$segmentNumber]); + $lastGenNumber = key($delFiles[$segmentNumber]); + if ($lastGenNumber > $maxGenNumber) { + $maxGenNumber = $lastGenNumber; + } + } + foreach ($delFiles as $segmentNumber => $segmentDelFiles) { + foreach ($segmentDelFiles as $delGeneration => $file) { + $filesToDelete[] = $file; + $filesTypes[] = 4; // third group of files for deletions + $filesNumbers[] = $segmentNumber*$maxGenNumber + $delGeneration; // order by , pair + } + } + + // Reorder files for deleting + array_multisort($filesTypes, SORT_ASC, SORT_NUMERIC, + $filesNumbers, SORT_ASC, SORT_NUMERIC, + $filesToDelete, SORT_ASC, SORT_STRING); + + foreach ($filesToDelete as $file) { + try { + /** Skip shared docstore segments deleting */ + /** @todo Process '.cfx' files to check if them are already unused */ + if (substr($file, strlen($file)-4) != '.cfx') { + $this->_directory->deleteFile($file); + } + } catch (Zend_Search_Lucene_Exception $e) { + if (strpos($e->getMessage(), 'Can\'t delete file') === false) { + // That's not "file is under processing or already deleted" exception + // Pass it through + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + } + } + + // Return read lock into the previous state + Zend_Search_Lucene_LockManager::deEscalateReadLock($this->_directory); + } else { + // Only release resources if another index reader is running now + foreach ($this->_segmentsToDelete as $segName) { + foreach (self::$_indexExtensions as $ext) { + $this->_directory->purgeFile($segName . $ext); + } + } + } + + // Clean-up _segmentsToDelete container + $this->_segmentsToDelete = array(); + + + // Release index write lock + Zend_Search_Lucene_LockManager::releaseWriteLock($this->_directory); + + // Remove unused segments from segments list + foreach ($this->_segmentInfos as $segName => $segmentInfo) { + if (!isset($segments[$segName])) { + unset($this->_segmentInfos[$segName]); + } + } + } + + /** + * Commit current changes + */ + public function commit() + { + if ($this->_currentSegment !== null) { + $newSegment = $this->_currentSegment->close(); + if ($newSegment !== null) { + $this->_newSegments[$newSegment->getName()] = $newSegment; + } + $this->_currentSegment = null; + } + + $this->_updateSegments(); + } + + + /** + * Merges the provided indexes into this index. + * + * @param array $readers + * @return void + */ + public function addIndexes($readers) + { + /** + * @todo implementation + */ + } + + /** + * Merges all segments together into new one + * + * Returns true on success and false if another optimization or auto-optimization process + * is running now + * + * @return boolean + */ + public function optimize() + { + if (Zend_Search_Lucene_LockManager::obtainOptimizationLock($this->_directory) === false) { + return false; + } + + // Update segments list to be sure all segments are not merged yet by another process + // + // Segment merging functionality is concentrated in this class and surrounded + // by optimization lock obtaining/releasing. + // _updateSegments() refreshes segments list from the latest index generation. + // So only new segments can be added to the index while we are merging some already existing + // segments. + // Newly added segments will be also included into the index by the _updateSegments() call + // either by another process or by the current process with the commit() call at the end of _mergeSegments() method. + // That's guaranteed by the serialisation of _updateSegments() execution using exclusive locks. + $this->_updateSegments(); + + $this->_mergeSegments($this->_segmentInfos); + + Zend_Search_Lucene_LockManager::releaseOptimizationLock($this->_directory); + + return true; + } + + /** + * Get name for new segment + * + * @return string + */ + private function _newSegmentName() + { + Zend_Search_Lucene_LockManager::obtainWriteLock($this->_directory); + + $generation = Zend_Search_Lucene::getActualGeneration($this->_directory); + $segmentsFile = $this->_directory->getFileObject(Zend_Search_Lucene::getSegmentFileName($generation), false); + + $segmentsFile->seek(12); // 12 = 4 (int, file format marker) + 8 (long, index version) + $segmentNameCounter = $segmentsFile->readInt(); + + $segmentsFile->seek(12); // 12 = 4 (int, file format marker) + 8 (long, index version) + $segmentsFile->writeInt($segmentNameCounter + 1); + + // Flash output to guarantee that wrong value will not be loaded between unlock and + // return (which calls $segmentsFile destructor) + $segmentsFile->flush(); + + Zend_Search_Lucene_LockManager::releaseWriteLock($this->_directory); + + return '_' . base_convert($segmentNameCounter, 10, 36); + } + +} diff --git a/library/vendor/Zend/Search/Lucene/Interface.php b/library/vendor/Zend/Search/Lucene/Interface.php new file mode 100644 index 000000000..baa26a9c0 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Interface.php @@ -0,0 +1,413 @@ + 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @return integer + */ + public function getMergeFactor(); + + /** + * Set index mergeFactor option + * + * mergeFactor determines how often segment indices are merged by addDocument(). + * With smaller values, less RAM is used while indexing, + * and searches on unoptimized indices are faster, + * but indexing speed is slower. + * With larger values, more RAM is used during indexing, + * and while searches on unoptimized indices are slower, + * indexing is faster. + * Thus larger values (> 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @param integer $maxMergeDocs + */ + public function setMergeFactor($mergeFactor); + + /** + * Performs a query against the index and returns an array + * of Zend_Search_Lucene_Search_QueryHit objects. + * Input is a string or Zend_Search_Lucene_Search_Query. + * + * @param mixed $query + * @return array Zend_Search_Lucene_Search_QueryHit + * @throws Zend_Search_Lucene_Exception + */ + public function find($query); + + /** + * Returns a list of all unique field names that exist in this index. + * + * @param boolean $indexed + * @return array + */ + public function getFieldNames($indexed = false); + + /** + * Returns a Zend_Search_Lucene_Document object for the document + * number $id in this index. + * + * @param integer|Zend_Search_Lucene_Search_QueryHit $id + * @return Zend_Search_Lucene_Document + */ + public function getDocument($id); + + /** + * Returns true if index contain documents with specified term. + * + * Is used for query optimization. + * + * @param Zend_Search_Lucene_Index_Term $term + * @return boolean + */ + public function hasTerm(Zend_Search_Lucene_Index_Term $term); + + /** + * Returns IDs of all the documents containing term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + */ + public function termDocs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null); + + /** + * Returns documents filter for all documents containing term. + * + * It performs the same operation as termDocs, but return result as + * Zend_Search_Lucene_Index_DocsFilter object + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return Zend_Search_Lucene_Index_DocsFilter + */ + public function termDocsFilter(Zend_Search_Lucene_Index_Term $term, $docsFilter = null); + + /** + * Returns an array of all term freqs. + * Return array structure: array( docId => freq, ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return integer + */ + public function termFreqs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null); + + /** + * Returns an array of all term positions in the documents. + * Return array structure: array( docId => array( pos1, pos2, ...), ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + */ + public function termPositions(Zend_Search_Lucene_Index_Term $term, $docsFilter = null); + + /** + * Returns the number of documents in this index containing the $term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @return integer + */ + public function docFreq(Zend_Search_Lucene_Index_Term $term); + + /** + * Retrive similarity used by index reader + * + * @return Zend_Search_Lucene_Search_Similarity + */ + public function getSimilarity(); + + /** + * Returns a normalization factor for "field, document" pair. + * + * @param integer $id + * @param string $fieldName + * @return float + */ + public function norm($id, $fieldName); + + /** + * Returns true if any documents have been deleted from this index. + * + * @return boolean + */ + public function hasDeletions(); + + /** + * Deletes a document from the index. + * $id is an internal document id + * + * @param integer|Zend_Search_Lucene_Search_QueryHit $id + * @throws Zend_Search_Lucene_Exception + */ + public function delete($id); + + /** + * Adds a document to this index. + * + * @param Zend_Search_Lucene_Document $document + */ + public function addDocument(Zend_Search_Lucene_Document $document); + + /** + * Commit changes resulting from delete() or undeleteAll() operations. + */ + public function commit(); + + /** + * Optimize index. + * + * Merges all segments into one + */ + public function optimize(); + + /** + * Returns an array of all terms in this index. + * + * @return array + */ + public function terms(); + + /** + * Undeletes all documents currently marked as deleted in this index. + */ + public function undeleteAll(); + + + /** + * Add reference to the index object + * + * @internal + */ + public function addReference(); + + /** + * Remove reference from the index object + * + * When reference count becomes zero, index is closed and resources are cleaned up + * + * @internal + */ + public function removeReference(); +} diff --git a/library/vendor/Zend/Search/Lucene/Interface/MultiSearcher.php b/library/vendor/Zend/Search/Lucene/Interface/MultiSearcher.php new file mode 100644 index 000000000..c58796de2 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Interface/MultiSearcher.php @@ -0,0 +1,24 @@ +createFile(self::WRITE_LOCK_FILE); + if (!$lock->lock(LOCK_EX)) { + throw new Zend_Search_Lucene_Exception('Can\'t obtain exclusive index lock'); + } + return $lock; + } + + /** + * Release exclusive write lock + * + * @param Zend_Search_Lucene_Storage_Directory $lockDirectory + */ + public static function releaseWriteLock(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + $lock = $lockDirectory->getFileObject(self::WRITE_LOCK_FILE); + $lock->unlock(); + } + + /** + * Obtain the exclusive "read escalation/de-escalation" lock + * + * Required to protect the escalate/de-escalate read lock process + * on GFS (and potentially other) mounted filesystems. + * + * Why we need this: + * While GFS supports cluster-wide locking via flock(), it's + * implementation isn't quite what it should be. The locking + * semantics that work consistently on a local filesystem tend to + * fail on GFS mounted filesystems. This appears to be a design defect + * in the implementation of GFS. How this manifests itself is that + * conditional promotion of a shared lock to exclusive will always + * fail, lock release requests are honored but not immediately + * processed (causing erratic failures of subsequent conditional + * requests) and the releasing of the exclusive lock before the + * shared lock is set when a lock is demoted (which can open a window + * of opportunity for another process to gain an exclusive lock when + * it shoudln't be allowed to). + * + * @param Zend_Search_Lucene_Storage_Directory $lockDirectory + * @return Zend_Search_Lucene_Storage_File + * @throws Zend_Search_Lucene_Exception + */ + private static function _startReadLockProcessing(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + $lock = $lockDirectory->createFile(self::READ_LOCK_PROCESSING_LOCK_FILE); + if (!$lock->lock(LOCK_EX)) { + throw new Zend_Search_Lucene_Exception('Can\'t obtain exclusive lock for the read lock processing file'); + } + return $lock; + } + + /** + * Release the exclusive "read escalation/de-escalation" lock + * + * Required to protect the escalate/de-escalate read lock process + * on GFS (and potentially other) mounted filesystems. + * + * @param Zend_Search_Lucene_Storage_Directory $lockDirectory + */ + private static function _stopReadLockProcessing(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + $lock = $lockDirectory->getFileObject(self::READ_LOCK_PROCESSING_LOCK_FILE); + $lock->unlock(); + } + + + /** + * Obtain shared read lock on the index + * + * It doesn't block other read or update processes, but prevent index from the premature cleaning-up + * + * @param Zend_Search_Lucene_Storage_Directory $defaultLockDirectory + * @return Zend_Search_Lucene_Storage_File + * @throws Zend_Search_Lucene_Exception + */ + public static function obtainReadLock(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + $lock = $lockDirectory->createFile(self::READ_LOCK_FILE); + if (!$lock->lock(LOCK_SH)) { + throw new Zend_Search_Lucene_Exception('Can\'t obtain shared reading index lock'); + } + return $lock; + } + + /** + * Release shared read lock + * + * @param Zend_Search_Lucene_Storage_Directory $lockDirectory + */ + public static function releaseReadLock(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + $lock = $lockDirectory->getFileObject(self::READ_LOCK_FILE); + $lock->unlock(); + } + + /** + * Escalate Read lock to exclusive level + * + * @param Zend_Search_Lucene_Storage_Directory $lockDirectory + * @return boolean + */ + public static function escalateReadLock(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + self::_startReadLockProcessing($lockDirectory); + + $lock = $lockDirectory->getFileObject(self::READ_LOCK_FILE); + + // First, release the shared lock for the benefit of GFS since + // it will fail the conditional request to promote the lock to + // "exclusive" while the shared lock is held (even when we are + // the only holder). + $lock->unlock(); + + // GFS is really poor. While the above "unlock" returns, GFS + // doesn't clean up it's tables right away (which will potentially + // cause the conditional locking for the "exclusive" lock to fail. + // We will retry the conditional lock request several times on a + // failure to get past this. The performance hit is negligible + // in the grand scheme of things and only will occur with GFS + // filesystems or if another local process has the shared lock + // on local filesystems. + for ($retries = 0; $retries < 10; $retries++) { + if ($lock->lock(LOCK_EX, true)) { + // Exclusive lock is obtained! + self::_stopReadLockProcessing($lockDirectory); + return true; + } + + // wait 1 microsecond + usleep(1); + } + + // Restore lock state + $lock->lock(LOCK_SH); + + self::_stopReadLockProcessing($lockDirectory); + return false; + } + + /** + * De-escalate Read lock to shared level + * + * @param Zend_Search_Lucene_Storage_Directory $lockDirectory + */ + public static function deEscalateReadLock(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + $lock = $lockDirectory->getFileObject(self::READ_LOCK_FILE); + $lock->lock(LOCK_SH); + } + + /** + * Obtain exclusive optimization lock on the index + * + * Returns lock object on success and false otherwise (doesn't block execution) + * + * @param Zend_Search_Lucene_Storage_Directory $lockDirectory + * @return mixed + */ + public static function obtainOptimizationLock(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + $lock = $lockDirectory->createFile(self::OPTIMIZATION_LOCK_FILE); + if (!$lock->lock(LOCK_EX, true)) { + return false; + } + return $lock; + } + + /** + * Release exclusive optimization lock + * + * @param Zend_Search_Lucene_Storage_Directory $lockDirectory + */ + public static function releaseOptimizationLock(Zend_Search_Lucene_Storage_Directory $lockDirectory) + { + $lock = $lockDirectory->getFileObject(self::OPTIMIZATION_LOCK_FILE); + $lock->unlock(); + } + +} diff --git a/library/vendor/Zend/Search/Lucene/MultiSearcher.php b/library/vendor/Zend/Search/Lucene/MultiSearcher.php new file mode 100644 index 000000000..f8116f827 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/MultiSearcher.php @@ -0,0 +1,965 @@ +_indices = $indices; + + foreach ($this->_indices as $index) { + if (!$index instanceof Zend_Search_Lucene_Interface) { + throw new Zend_Search_Lucene_Exception('sub-index objects have to implement Zend_Search_Lucene_Interface.'); + } + } + } + + /** + * Add index for searching. + * + * @param Zend_Search_Lucene_Interface $index + */ + public function addIndex(Zend_Search_Lucene_Interface $index) + { + $this->_indices[] = $index; + } + + + /** + * Get current generation number + * + * Returns generation number + * 0 means pre-2.1 index format + * -1 means there are no segments files. + * + * @param Zend_Search_Lucene_Storage_Directory $directory + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public static function getActualGeneration(Zend_Search_Lucene_Storage_Directory $directory) + { + throw new Zend_Search_Lucene_Exception("Generation number can't be retrieved for multi-searcher"); + } + + /** + * Get segments file name + * + * @param integer $generation + * @return string + */ + public static function getSegmentFileName($generation) + { + return Zend_Search_Lucene::getSegmentFileName($generation); + } + + /** + * Get index format version + * + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public function getFormatVersion() + { + throw new Zend_Search_Lucene_Exception("Format version can't be retrieved for multi-searcher"); + } + + /** + * Set index format version. + * Index is converted to this format at the nearest upfdate time + * + * @param int $formatVersion + */ + public function setFormatVersion($formatVersion) + { + foreach ($this->_indices as $index) { + $index->setFormatVersion($formatVersion); + } + } + + /** + * Returns the Zend_Search_Lucene_Storage_Directory instance for this index. + * + * @return Zend_Search_Lucene_Storage_Directory + */ + public function getDirectory() + { + throw new Zend_Search_Lucene_Exception("Index directory can't be retrieved for multi-searcher"); + } + + /** + * Returns the total number of documents in this index (including deleted documents). + * + * @return integer + */ + public function count() + { + $count = 0; + + foreach ($this->_indices as $index) { + $count += $index->count(); + } + + return $count; + } + + /** + * Returns one greater than the largest possible document number. + * This may be used to, e.g., determine how big to allocate a structure which will have + * an element for every document number in an index. + * + * @return integer + */ + public function maxDoc() + { + return $this->count(); + } + + /** + * Returns the total number of non-deleted documents in this index. + * + * @return integer + */ + public function numDocs() + { + $docs = 0; + + foreach ($this->_indices as $index) { + $docs += $index->numDocs(); + } + + return $docs; + } + + /** + * Checks, that document is deleted + * + * @param integer $id + * @return boolean + * @throws Zend_Search_Lucene_Exception Exception is thrown if $id is out of the range + */ + public function isDeleted($id) + { + foreach ($this->_indices as $index) { + $indexCount = $index->count(); + + if ($indexCount > $id) { + return $index->isDeleted($id); + } + + $id -= $indexCount; + } + + throw new Zend_Search_Lucene_Exception('Document id is out of the range.'); + } + + /** + * Set default search field. + * + * Null means, that search is performed through all fields by default + * + * Default value is null + * + * @param string $fieldName + */ + public static function setDefaultSearchField($fieldName) + { + foreach ($this->_indices as $index) { + $index->setDefaultSearchField($fieldName); + } + } + + + /** + * Get default search field. + * + * Null means, that search is performed through all fields by default + * + * @return string + * @throws Zend_Search_Lucene_Exception + */ + public static function getDefaultSearchField() + { + if (count($this->_indices) == 0) { + throw new Zend_Search_Lucene_Exception('Indices list is empty'); + } + + $defaultSearchField = reset($this->_indices)->getDefaultSearchField(); + + foreach ($this->_indices as $index) { + if ($index->getDefaultSearchField() !== $defaultSearchField) { + throw new Zend_Search_Lucene_Exception('Indices have different default search field.'); + } + } + + return $defaultSearchField; + } + + /** + * Set result set limit. + * + * 0 (default) means no limit + * + * @param integer $limit + */ + public static function setResultSetLimit($limit) + { + foreach ($this->_indices as $index) { + $index->setResultSetLimit($limit); + } + } + + /** + * Set result set limit. + * + * 0 means no limit + * + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public static function getResultSetLimit() + { + if (count($this->_indices) == 0) { + throw new Zend_Search_Lucene_Exception('Indices list is empty'); + } + + $defaultResultSetLimit = reset($this->_indices)->getResultSetLimit(); + + foreach ($this->_indices as $index) { + if ($index->getResultSetLimit() !== $defaultResultSetLimit) { + throw new Zend_Search_Lucene_Exception('Indices have different default search field.'); + } + } + + return $defaultResultSetLimit; + } + + /** + * Retrieve index maxBufferedDocs option + * + * maxBufferedDocs is a minimal number of documents required before + * the buffered in-memory documents are written into a new Segment + * + * Default value is 10 + * + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public function getMaxBufferedDocs() + { + if (count($this->_indices) == 0) { + throw new Zend_Search_Lucene_Exception('Indices list is empty'); + } + + $maxBufferedDocs = reset($this->_indices)->getMaxBufferedDocs(); + + foreach ($this->_indices as $index) { + if ($index->getMaxBufferedDocs() !== $maxBufferedDocs) { + throw new Zend_Search_Lucene_Exception('Indices have different default search field.'); + } + } + + return $maxBufferedDocs; + } + + /** + * Set index maxBufferedDocs option + * + * maxBufferedDocs is a minimal number of documents required before + * the buffered in-memory documents are written into a new Segment + * + * Default value is 10 + * + * @param integer $maxBufferedDocs + */ + public function setMaxBufferedDocs($maxBufferedDocs) + { + foreach ($this->_indices as $index) { + $index->setMaxBufferedDocs($maxBufferedDocs); + } + } + + /** + * Retrieve index maxMergeDocs option + * + * maxMergeDocs is a largest number of documents ever merged by addDocument(). + * Small values (e.g., less than 10,000) are best for interactive indexing, + * as this limits the length of pauses while indexing to a few seconds. + * Larger values are best for batched indexing and speedier searches. + * + * Default value is PHP_INT_MAX + * + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public function getMaxMergeDocs() + { + if (count($this->_indices) == 0) { + throw new Zend_Search_Lucene_Exception('Indices list is empty'); + } + + $maxMergeDocs = reset($this->_indices)->getMaxMergeDocs(); + + foreach ($this->_indices as $index) { + if ($index->getMaxMergeDocs() !== $maxMergeDocs) { + throw new Zend_Search_Lucene_Exception('Indices have different default search field.'); + } + } + + return $maxMergeDocs; + } + + /** + * Set index maxMergeDocs option + * + * maxMergeDocs is a largest number of documents ever merged by addDocument(). + * Small values (e.g., less than 10,000) are best for interactive indexing, + * as this limits the length of pauses while indexing to a few seconds. + * Larger values are best for batched indexing and speedier searches. + * + * Default value is PHP_INT_MAX + * + * @param integer $maxMergeDocs + */ + public function setMaxMergeDocs($maxMergeDocs) + { + foreach ($this->_indices as $index) { + $index->setMaxMergeDocs($maxMergeDocs); + } + } + + /** + * Retrieve index mergeFactor option + * + * mergeFactor determines how often segment indices are merged by addDocument(). + * With smaller values, less RAM is used while indexing, + * and searches on unoptimized indices are faster, + * but indexing speed is slower. + * With larger values, more RAM is used during indexing, + * and while searches on unoptimized indices are slower, + * indexing is faster. + * Thus larger values (> 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public function getMergeFactor() + { + if (count($this->_indices) == 0) { + throw new Zend_Search_Lucene_Exception('Indices list is empty'); + } + + $mergeFactor = reset($this->_indices)->getMergeFactor(); + + foreach ($this->_indices as $index) { + if ($index->getMergeFactor() !== $mergeFactor) { + throw new Zend_Search_Lucene_Exception('Indices have different default search field.'); + } + } + + return $mergeFactor; + } + + /** + * Set index mergeFactor option + * + * mergeFactor determines how often segment indices are merged by addDocument(). + * With smaller values, less RAM is used while indexing, + * and searches on unoptimized indices are faster, + * but indexing speed is slower. + * With larger values, more RAM is used during indexing, + * and while searches on unoptimized indices are slower, + * indexing is faster. + * Thus larger values (> 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @param integer $maxMergeDocs + */ + public function setMergeFactor($mergeFactor) + { + foreach ($this->_indices as $index) { + $index->setMaxMergeDocs($mergeFactor); + } + } + + /** + * Performs a query against the index and returns an array + * of Zend_Search_Lucene_Search_QueryHit objects. + * Input is a string or Zend_Search_Lucene_Search_Query. + * + * @param mixed $query + * @return array Zend_Search_Lucene_Search_QueryHit + * @throws Zend_Search_Lucene_Exception + */ + public function find($query) + { + if (count($this->_indices) == 0) { + return array(); + } + + $hitsList = array(); + + $indexShift = 0; + foreach ($this->_indices as $index) { + $hits = $index->find($query); + + if ($indexShift != 0) { + foreach ($hits as $hit) { + $hit->id += $indexShift; + } + } + + $indexShift += $index->count(); + $hitsList[] = $hits; + } + + /** @todo Implement advanced sorting */ + + return call_user_func_array('array_merge', $hitsList); + } + + /** + * Returns a list of all unique field names that exist in this index. + * + * @param boolean $indexed + * @return array + */ + public function getFieldNames($indexed = false) + { + $fieldNamesList = array(); + + foreach ($this->_indices as $index) { + $fieldNamesList[] = $index->getFieldNames($indexed); + } + + return array_unique(call_user_func_array('array_merge', $fieldNamesList)); + } + + /** + * Returns a Zend_Search_Lucene_Document object for the document + * number $id in this index. + * + * @param integer|Zend_Search_Lucene_Search_QueryHit $id + * @return Zend_Search_Lucene_Document + * @throws Zend_Search_Lucene_Exception Exception is thrown if $id is out of the range + */ + public function getDocument($id) + { + if ($id instanceof Zend_Search_Lucene_Search_QueryHit) { + /* @var $id Zend_Search_Lucene_Search_QueryHit */ + $id = $id->id; + } + + foreach ($this->_indices as $index) { + $indexCount = $index->count(); + + if ($indexCount > $id) { + return $index->getDocument($id); + } + + $id -= $indexCount; + } + + throw new Zend_Search_Lucene_Exception('Document id is out of the range.'); + } + + /** + * Returns true if index contain documents with specified term. + * + * Is used for query optimization. + * + * @param Zend_Search_Lucene_Index_Term $term + * @return boolean + */ + public function hasTerm(Zend_Search_Lucene_Index_Term $term) + { + foreach ($this->_indices as $index) { + if ($index->hasTerm($term)) { + return true; + } + } + + return false; + } + + /** + * Returns IDs of all the documents containing term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function termDocs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + if ($docsFilter != null) { + throw new Zend_Search_Lucene_Exception('Document filters could not used with multi-searcher'); + } + + $docsList = array(); + + $indexShift = 0; + foreach ($this->_indices as $index) { + $docs = $index->termDocs($term); + + if ($indexShift != 0) { + foreach ($docs as $id => $docId) { + $docs[$id] += $indexShift; + } + } + + $indexShift += $index->count(); + $docsList[] = $docs; + } + + return call_user_func_array('array_merge', $docsList); + } + + /** + * Returns documents filter for all documents containing term. + * + * It performs the same operation as termDocs, but return result as + * Zend_Search_Lucene_Index_DocsFilter object + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return Zend_Search_Lucene_Index_DocsFilter + * @throws Zend_Search_Lucene_Exception + */ + public function termDocsFilter(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + throw new Zend_Search_Lucene_Exception('Document filters could not used with multi-searcher'); + } + + /** + * Returns an array of all term freqs. + * Return array structure: array( docId => freq, ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public function termFreqs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + if ($docsFilter != null) { + throw new Zend_Search_Lucene_Exception('Document filters could not used with multi-searcher'); + } + + $freqsList = array(); + + $indexShift = 0; + foreach ($this->_indices as $index) { + $freqs = $index->termFreqs($term); + + if ($indexShift != 0) { + $freqsShifted = array(); + + foreach ($freqs as $docId => $freq) { + $freqsShifted[$docId + $indexShift] = $freq; + } + $freqs = $freqsShifted; + } + + $indexShift += $index->count(); + $freqsList[] = $freqs; + } + + return call_user_func_array('array_merge', $freqsList); + } + + /** + * Returns an array of all term positions in the documents. + * Return array structure: array( docId => array( pos1, pos2, ...), ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function termPositions(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + if ($docsFilter != null) { + throw new Zend_Search_Lucene_Exception('Document filters could not used with multi-searcher'); + } + + $termPositionsList = array(); + + $indexShift = 0; + foreach ($this->_indices as $index) { + $termPositions = $index->termPositions($term); + + if ($indexShift != 0) { + $termPositionsShifted = array(); + + foreach ($termPositions as $docId => $positions) { + $termPositions[$docId + $indexShift] = $positions; + } + $termPositions = $termPositionsShifted; + } + + $indexShift += $index->count(); + $termPositionsList[] = $termPositions; + } + + return call_user_func_array('array_merge', $termPositions); + } + + /** + * Returns the number of documents in this index containing the $term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @return integer + */ + public function docFreq(Zend_Search_Lucene_Index_Term $term) + { + $docFreq = 0; + + foreach ($this->_indices as $index) { + $docFreq += $index->docFreq($term); + } + + return $docFreq; + } + + /** + * Retrive similarity used by index reader + * + * @return Zend_Search_Lucene_Search_Similarity + * @throws Zend_Search_Lucene_Exception + */ + public function getSimilarity() + { + if (count($this->_indices) == 0) { + throw new Zend_Search_Lucene_Exception('Indices list is empty'); + } + + $similarity = reset($this->_indices)->getSimilarity(); + + foreach ($this->_indices as $index) { + if ($index->getSimilarity() !== $similarity) { + throw new Zend_Search_Lucene_Exception('Indices have different similarity.'); + } + } + + return $similarity; + } + + /** + * Returns a normalization factor for "field, document" pair. + * + * @param integer $id + * @param string $fieldName + * @return float + */ + public function norm($id, $fieldName) + { + foreach ($this->_indices as $index) { + $indexCount = $index->count(); + + if ($indexCount > $id) { + return $index->norm($id, $fieldName); + } + + $id -= $indexCount; + } + + return null; + } + + /** + * Returns true if any documents have been deleted from this index. + * + * @return boolean + */ + public function hasDeletions() + { + foreach ($this->_indices as $index) { + if ($index->hasDeletions()) { + return true; + } + } + + return false; + } + + /** + * Deletes a document from the index. + * $id is an internal document id + * + * @param integer|Zend_Search_Lucene_Search_QueryHit $id + * @throws Zend_Search_Lucene_Exception + */ + public function delete($id) + { + foreach ($this->_indices as $index) { + $indexCount = $index->count(); + + if ($indexCount > $id) { + $index->delete($id); + return; + } + + $id -= $indexCount; + } + + throw new Zend_Search_Lucene_Exception('Document id is out of the range.'); + } + + + /** + * Callback used to choose target index for new documents + * + * Function/method signature: + * Zend_Search_Lucene_Interface callbackFunction(Zend_Search_Lucene_Document $document, array $indices); + * + * null means "default documents distributing algorithm" + * + * @var callback + */ + protected $_documentDistributorCallBack = null; + + /** + * Set callback for choosing target index. + * + * @param callback $callback + * @throws Zend_Search_Lucene_Exception + */ + public function setDocumentDistributorCallback($callback) + { + if ($callback !== null && !is_callable($callback)) { + throw new Zend_Search_Lucene_Exception('$callback parameter must be a valid callback.'); + } + + $this->_documentDistributorCallBack = $callback; + } + + /** + * Get callback for choosing target index. + * + * @return callback + */ + public function getDocumentDistributorCallback() + { + return $this->_documentDistributorCallBack; + } + + /** + * Adds a document to this index. + * + * @param Zend_Search_Lucene_Document $document + * @throws Zend_Search_Lucene_Exception + */ + public function addDocument(Zend_Search_Lucene_Document $document) + { + if ($this->_documentDistributorCallBack !== null) { + $index = call_user_func($this->_documentDistributorCallBack, $document, $this->_indices); + } else { + $index = $this->_indices[array_rand($this->_indices)]; + } + + $index->addDocument($document); + } + + /** + * Commit changes resulting from delete() or undeleteAll() operations. + */ + public function commit() + { + foreach ($this->_indices as $index) { + $index->commit(); + } + } + + /** + * Optimize index. + * + * Merges all segments into one + */ + public function optimize() + { + foreach ($this->_indices as $index) { + $index->optimise(); + } + } + + /** + * Returns an array of all terms in this index. + * + * @return array + */ + public function terms() + { + $termsList = array(); + + foreach ($this->_indices as $index) { + $termsList[] = $index->terms(); + } + + return array_unique(call_user_func_array('array_merge', $termsList)); + } + + + /** + * Terms stream priority queue object + * + * @var Zend_Search_Lucene_TermStreamsPriorityQueue + */ + private $_termsStream = null; + + /** + * Reset terms stream. + */ + public function resetTermsStream() + { + if ($this->_termsStream === null) { + /** Zend_Search_Lucene_TermStreamsPriorityQueue */ + + $this->_termsStream = new Zend_Search_Lucene_TermStreamsPriorityQueue($this->_indices); + } else { + $this->_termsStream->resetTermsStream(); + } + } + + /** + * Skip terms stream up to specified term preffix. + * + * Prefix contains fully specified field info and portion of searched term + * + * @param Zend_Search_Lucene_Index_Term $prefix + */ + public function skipTo(Zend_Search_Lucene_Index_Term $prefix) + { + $this->_termsStream->skipTo($prefix); + } + + /** + * Scans terms dictionary and returns next term + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function nextTerm() + { + return $this->_termsStream->nextTerm(); + } + + /** + * Returns term in current position + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function currentTerm() + { + return $this->_termsStream->currentTerm(); + } + + /** + * Close terms stream + * + * Should be used for resources clean up if stream is not read up to the end + */ + public function closeTermsStream() + { + $this->_termsStream->closeTermsStream(); + $this->_termsStream = null; + } + + + /** + * Undeletes all documents currently marked as deleted in this index. + */ + public function undeleteAll() + { + foreach ($this->_indices as $index) { + $index->undeleteAll(); + } + } + + + /** + * Add reference to the index object + * + * @internal + */ + public function addReference() + { + // Do nothing, since it's never referenced by indices + } + + /** + * Remove reference from the index object + * + * When reference count becomes zero, index is closed and resources are cleaned up + * + * @internal + */ + public function removeReference() + { + // Do nothing, since it's never referenced by indices + } +} + +/** + * This class is provided for backwards-compatibility (See ZF-12067) + * + * @category Zend + * @package Zend_Search_Lucene + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +class Zend_Search_Lucene_Interface_MultiSearcher + extends Zend_Search_Lucene_MultiSearcher +{ +} diff --git a/library/vendor/Zend/Search/Lucene/PriorityQueue.php b/library/vendor/Zend/Search/Lucene/PriorityQueue.php new file mode 100644 index 000000000..f34c1cbda --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/PriorityQueue.php @@ -0,0 +1,171 @@ +_heap); + $parentId = ($nodeId-1) >> 1; // floor( ($nodeId-1)/2 ) + + while ($nodeId != 0 && $this->_less($element, $this->_heap[$parentId])) { + // Move parent node down + $this->_heap[$nodeId] = $this->_heap[$parentId]; + + // Move pointer to the next level of tree + $nodeId = $parentId; + $parentId = ($nodeId-1) >> 1; // floor( ($nodeId-1)/2 ) + } + + // Put new node into the tree + $this->_heap[$nodeId] = $element; + } + + + /** + * Return least element of the queue + * + * Constant time + * + * @return mixed + */ + public function top() + { + if (count($this->_heap) == 0) { + return null; + } + + return $this->_heap[0]; + } + + + /** + * Removes and return least element of the queue + * + * O(log(N)) time + * + * @return mixed + */ + public function pop() + { + if (count($this->_heap) == 0) { + return null; + } + + $top = $this->_heap[0]; + $lastId = count($this->_heap) - 1; + + /** + * Find appropriate position for last node + */ + $nodeId = 0; // Start from a top + $childId = 1; // First child + + // Choose smaller child + if ($lastId > 2 && $this->_less($this->_heap[2], $this->_heap[1])) { + $childId = 2; + } + + while ($childId < $lastId && + $this->_less($this->_heap[$childId], $this->_heap[$lastId]) + ) { + // Move child node up + $this->_heap[$nodeId] = $this->_heap[$childId]; + + $nodeId = $childId; // Go down + $childId = ($nodeId << 1) + 1; // First child + + // Choose smaller child + if (($childId+1) < $lastId && + $this->_less($this->_heap[$childId+1], $this->_heap[$childId]) + ) { + $childId++; + } + } + + // Move last element to the new position + $this->_heap[$nodeId] = $this->_heap[$lastId]; + unset($this->_heap[$lastId]); + + return $top; + } + + + /** + * Clear queue + */ + public function clear() + { + $this->_heap = array(); + } + + + /** + * Compare elements + * + * Returns true, if $el1 is less than $el2; else otherwise + * + * @param mixed $el1 + * @param mixed $el2 + * @return boolean + */ + abstract protected function _less($el1, $el2); +} + diff --git a/library/vendor/Zend/Search/Lucene/Proxy.php b/library/vendor/Zend/Search/Lucene/Proxy.php new file mode 100644 index 000000000..d3c641982 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Proxy.php @@ -0,0 +1,611 @@ +_index = $index; + $this->_index->addReference(); + } + + /** + * Object destructor + */ + public function __destruct() + { + if ($this->_index !== null) { + // This code is invoked if Zend_Search_Lucene_Interface object constructor throws an exception + $this->_index->removeReference(); + } + $this->_index = null; + } + + /** + * Get current generation number + * + * Returns generation number + * 0 means pre-2.1 index format + * -1 means there are no segments files. + * + * @param Zend_Search_Lucene_Storage_Directory $directory + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public static function getActualGeneration(Zend_Search_Lucene_Storage_Directory $directory) + { + Zend_Search_Lucene::getActualGeneration($directory); + } + + /** + * Get segments file name + * + * @param integer $generation + * @return string + */ + public static function getSegmentFileName($generation) + { + Zend_Search_Lucene::getSegmentFileName($generation); + } + + /** + * Get index format version + * + * @return integer + */ + public function getFormatVersion() + { + return $this->_index->getFormatVersion(); + } + + /** + * Set index format version. + * Index is converted to this format at the nearest upfdate time + * + * @param int $formatVersion + * @throws Zend_Search_Lucene_Exception + */ + public function setFormatVersion($formatVersion) + { + $this->_index->setFormatVersion($formatVersion); + } + + /** + * Returns the Zend_Search_Lucene_Storage_Directory instance for this index. + * + * @return Zend_Search_Lucene_Storage_Directory + */ + public function getDirectory() + { + return $this->_index->getDirectory(); + } + + /** + * Returns the total number of documents in this index (including deleted documents). + * + * @return integer + */ + public function count() + { + return $this->_index->count(); + } + + /** + * Returns one greater than the largest possible document number. + * This may be used to, e.g., determine how big to allocate a structure which will have + * an element for every document number in an index. + * + * @return integer + */ + public function maxDoc() + { + return $this->_index->maxDoc(); + } + + /** + * Returns the total number of non-deleted documents in this index. + * + * @return integer + */ + public function numDocs() + { + return $this->_index->numDocs(); + } + + /** + * Checks, that document is deleted + * + * @param integer $id + * @return boolean + * @throws Zend_Search_Lucene_Exception Exception is thrown if $id is out of the range + */ + public function isDeleted($id) + { + return $this->_index->isDeleted($id); + } + + /** + * Set default search field. + * + * Null means, that search is performed through all fields by default + * + * Default value is null + * + * @param string $fieldName + */ + public static function setDefaultSearchField($fieldName) + { + Zend_Search_Lucene::setDefaultSearchField($fieldName); + } + + /** + * Get default search field. + * + * Null means, that search is performed through all fields by default + * + * @return string + */ + public static function getDefaultSearchField() + { + return Zend_Search_Lucene::getDefaultSearchField(); + } + + /** + * Set result set limit. + * + * 0 (default) means no limit + * + * @param integer $limit + */ + public static function setResultSetLimit($limit) + { + Zend_Search_Lucene::setResultSetLimit($limit); + } + + /** + * Set result set limit. + * + * 0 means no limit + * + * @return integer + */ + public static function getResultSetLimit() + { + return Zend_Search_Lucene::getResultSetLimit(); + } + + /** + * Retrieve index maxBufferedDocs option + * + * maxBufferedDocs is a minimal number of documents required before + * the buffered in-memory documents are written into a new Segment + * + * Default value is 10 + * + * @return integer + */ + public function getMaxBufferedDocs() + { + return $this->_index->getMaxBufferedDocs(); + } + + /** + * Set index maxBufferedDocs option + * + * maxBufferedDocs is a minimal number of documents required before + * the buffered in-memory documents are written into a new Segment + * + * Default value is 10 + * + * @param integer $maxBufferedDocs + */ + public function setMaxBufferedDocs($maxBufferedDocs) + { + $this->_index->setMaxBufferedDocs($maxBufferedDocs); + } + + + /** + * Retrieve index maxMergeDocs option + * + * maxMergeDocs is a largest number of documents ever merged by addDocument(). + * Small values (e.g., less than 10,000) are best for interactive indexing, + * as this limits the length of pauses while indexing to a few seconds. + * Larger values are best for batched indexing and speedier searches. + * + * Default value is PHP_INT_MAX + * + * @return integer + */ + public function getMaxMergeDocs() + { + return $this->_index->getMaxMergeDocs(); + } + + /** + * Set index maxMergeDocs option + * + * maxMergeDocs is a largest number of documents ever merged by addDocument(). + * Small values (e.g., less than 10,000) are best for interactive indexing, + * as this limits the length of pauses while indexing to a few seconds. + * Larger values are best for batched indexing and speedier searches. + * + * Default value is PHP_INT_MAX + * + * @param integer $maxMergeDocs + */ + public function setMaxMergeDocs($maxMergeDocs) + { + $this->_index->setMaxMergeDocs($maxMergeDocs); + } + + + /** + * Retrieve index mergeFactor option + * + * mergeFactor determines how often segment indices are merged by addDocument(). + * With smaller values, less RAM is used while indexing, + * and searches on unoptimized indices are faster, + * but indexing speed is slower. + * With larger values, more RAM is used during indexing, + * and while searches on unoptimized indices are slower, + * indexing is faster. + * Thus larger values (> 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @return integer + */ + public function getMergeFactor() + { + return $this->_index->getMergeFactor(); + } + + /** + * Set index mergeFactor option + * + * mergeFactor determines how often segment indices are merged by addDocument(). + * With smaller values, less RAM is used while indexing, + * and searches on unoptimized indices are faster, + * but indexing speed is slower. + * With larger values, more RAM is used during indexing, + * and while searches on unoptimized indices are slower, + * indexing is faster. + * Thus larger values (> 10) are best for batch index creation, + * and smaller values (< 10) for indices that are interactively maintained. + * + * Default value is 10 + * + * @param integer $maxMergeDocs + */ + public function setMergeFactor($mergeFactor) + { + $this->_index->setMergeFactor($mergeFactor); + } + + /** + * Performs a query against the index and returns an array + * of Zend_Search_Lucene_Search_QueryHit objects. + * Input is a string or Zend_Search_Lucene_Search_Query. + * + * @param mixed $query + * @return array Zend_Search_Lucene_Search_QueryHit + * @throws Zend_Search_Lucene_Exception + */ + public function find($query) + { + // actual parameter list + $parameters = func_get_args(); + + // invoke $this->_index->find() method with specified parameters + return call_user_func_array(array(&$this->_index, 'find'), $parameters); + } + + /** + * Returns a list of all unique field names that exist in this index. + * + * @param boolean $indexed + * @return array + */ + public function getFieldNames($indexed = false) + { + return $this->_index->getFieldNames($indexed); + } + + /** + * Returns a Zend_Search_Lucene_Document object for the document + * number $id in this index. + * + * @param integer|Zend_Search_Lucene_Search_QueryHit $id + * @return Zend_Search_Lucene_Document + */ + public function getDocument($id) + { + return $this->_index->getDocument($id); + } + + /** + * Returns true if index contain documents with specified term. + * + * Is used for query optimization. + * + * @param Zend_Search_Lucene_Index_Term $term + * @return boolean + */ + public function hasTerm(Zend_Search_Lucene_Index_Term $term) + { + return $this->_index->hasTerm($term); + } + + /** + * Returns IDs of all the documents containing term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + */ + public function termDocs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + return $this->_index->termDocs($term, $docsFilter); + } + + /** + * Returns documents filter for all documents containing term. + * + * It performs the same operation as termDocs, but return result as + * Zend_Search_Lucene_Index_DocsFilter object + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return Zend_Search_Lucene_Index_DocsFilter + */ + public function termDocsFilter(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + return $this->_index->termDocsFilter($term, $docsFilter); + } + + /** + * Returns an array of all term freqs. + * Return array structure: array( docId => freq, ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return integer + */ + public function termFreqs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + return $this->_index->termFreqs($term, $docsFilter); + } + + /** + * Returns an array of all term positions in the documents. + * Return array structure: array( docId => array( pos1, pos2, ...), ...) + * + * @param Zend_Search_Lucene_Index_Term $term + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @return array + */ + public function termPositions(Zend_Search_Lucene_Index_Term $term, $docsFilter = null) + { + return $this->_index->termPositions($term, $docsFilter); + } + + /** + * Returns the number of documents in this index containing the $term. + * + * @param Zend_Search_Lucene_Index_Term $term + * @return integer + */ + public function docFreq(Zend_Search_Lucene_Index_Term $term) + { + return $this->_index->docFreq($term); + } + + /** + * Retrive similarity used by index reader + * + * @return Zend_Search_Lucene_Search_Similarity + */ + public function getSimilarity() + { + return $this->_index->getSimilarity(); + } + + /** + * Returns a normalization factor for "field, document" pair. + * + * @param integer $id + * @param string $fieldName + * @return float + */ + public function norm($id, $fieldName) + { + return $this->_index->norm($id, $fieldName); + } + + /** + * Returns true if any documents have been deleted from this index. + * + * @return boolean + */ + public function hasDeletions() + { + return $this->_index->hasDeletions(); + } + + /** + * Deletes a document from the index. + * $id is an internal document id + * + * @param integer|Zend_Search_Lucene_Search_QueryHit $id + * @throws Zend_Search_Lucene_Exception + */ + public function delete($id) + { + return $this->_index->delete($id); + } + + /** + * Adds a document to this index. + * + * @param Zend_Search_Lucene_Document $document + */ + public function addDocument(Zend_Search_Lucene_Document $document) + { + $this->_index->addDocument($document); + } + + /** + * Commit changes resulting from delete() or undeleteAll() operations. + */ + public function commit() + { + $this->_index->commit(); + } + + /** + * Optimize index. + * + * Merges all segments into one + */ + public function optimize() + { + $this->_index->optimize(); + } + + /** + * Returns an array of all terms in this index. + * + * @return array + */ + public function terms() + { + return $this->_index->terms(); + } + + + /** + * Reset terms stream. + */ + public function resetTermsStream() + { + $this->_index->resetTermsStream(); + } + + /** + * Skip terms stream up to specified term preffix. + * + * Prefix contains fully specified field info and portion of searched term + * + * @param Zend_Search_Lucene_Index_Term $prefix + */ + public function skipTo(Zend_Search_Lucene_Index_Term $prefix) + { + return $this->_index->skipTo($prefix); + } + + /** + * Scans terms dictionary and returns next term + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function nextTerm() + { + return $this->_index->nextTerm(); + } + + /** + * Returns term in current position + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function currentTerm() + { + return $this->_index->currentTerm(); + } + + /** + * Close terms stream + * + * Should be used for resources clean up if stream is not read up to the end + */ + public function closeTermsStream() + { + $this->_index->closeTermsStream(); + } + + + /** + * Undeletes all documents currently marked as deleted in this index. + */ + public function undeleteAll() + { + return $this->_index->undeleteAll(); + } + + /** + * Add reference to the index object + * + * @internal + */ + public function addReference() + { + return $this->_index->addReference(); + } + + /** + * Remove reference from the index object + * + * When reference count becomes zero, index is closed and resources are cleaned up + * + * @internal + */ + public function removeReference() + { + return $this->_index->removeReference(); + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/BooleanExpressionRecognizer.php b/library/vendor/Zend/Search/Lucene/Search/BooleanExpressionRecognizer.php new file mode 100644 index 000000000..c39336429 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/BooleanExpressionRecognizer.php @@ -0,0 +1,274 @@ +, ) + * + * So, it has a structure: + * array( array( array(, ), // first literal of first conjuction + * array(, ), // second literal of first conjuction + * ... + * array(, ) + * ), // end of first conjuction + * array( array(, ), // first literal of second conjuction + * array(, ), // second literal of second conjuction + * ... + * array(, ) + * ), // end of second conjuction + * ... + * ) // end of structure + * + * @var array + */ + private $_conjunctions = array(); + + /** + * Current conjuction + * + * @var array + */ + private $_currentConjunction = array(); + + + /** + * Object constructor + */ + public function __construct() + { + parent::__construct( array(self::ST_START, + self::ST_LITERAL, + self::ST_NOT_OPERATOR, + self::ST_AND_OPERATOR, + self::ST_OR_OPERATOR), + array(self::IN_LITERAL, + self::IN_NOT_OPERATOR, + self::IN_AND_OPERATOR, + self::IN_OR_OPERATOR)); + + $emptyOperatorAction = new Zend_Search_Lucene_FSMAction($this, 'emptyOperatorAction'); + $emptyNotOperatorAction = new Zend_Search_Lucene_FSMAction($this, 'emptyNotOperatorAction'); + + $this->addRules(array( array(self::ST_START, self::IN_LITERAL, self::ST_LITERAL), + array(self::ST_START, self::IN_NOT_OPERATOR, self::ST_NOT_OPERATOR), + + array(self::ST_LITERAL, self::IN_AND_OPERATOR, self::ST_AND_OPERATOR), + array(self::ST_LITERAL, self::IN_OR_OPERATOR, self::ST_OR_OPERATOR), + array(self::ST_LITERAL, self::IN_LITERAL, self::ST_LITERAL, $emptyOperatorAction), + array(self::ST_LITERAL, self::IN_NOT_OPERATOR, self::ST_NOT_OPERATOR, $emptyNotOperatorAction), + + array(self::ST_NOT_OPERATOR, self::IN_LITERAL, self::ST_LITERAL), + + array(self::ST_AND_OPERATOR, self::IN_LITERAL, self::ST_LITERAL), + array(self::ST_AND_OPERATOR, self::IN_NOT_OPERATOR, self::ST_NOT_OPERATOR), + + array(self::ST_OR_OPERATOR, self::IN_LITERAL, self::ST_LITERAL), + array(self::ST_OR_OPERATOR, self::IN_NOT_OPERATOR, self::ST_NOT_OPERATOR), + )); + + $notOperatorAction = new Zend_Search_Lucene_FSMAction($this, 'notOperatorAction'); + $orOperatorAction = new Zend_Search_Lucene_FSMAction($this, 'orOperatorAction'); + $literalAction = new Zend_Search_Lucene_FSMAction($this, 'literalAction'); + + + $this->addEntryAction(self::ST_NOT_OPERATOR, $notOperatorAction); + $this->addEntryAction(self::ST_OR_OPERATOR, $orOperatorAction); + $this->addEntryAction(self::ST_LITERAL, $literalAction); + } + + + /** + * Process next operator. + * + * Operators are defined by class constants: IN_AND_OPERATOR, IN_OR_OPERATOR and IN_NOT_OPERATOR + * + * @param integer $operator + */ + public function processOperator($operator) + { + $this->process($operator); + } + + /** + * Process expression literal. + * + * @param integer $operator + */ + public function processLiteral($literal) + { + $this->_literal = $literal; + + $this->process(self::IN_LITERAL); + } + + /** + * Finish an expression and return result + * + * Result is a set of boolean query conjunctions + * + * Each conjunction is an array of conjunction elements + * Each conjunction element is presented with two-elements array: + * array(, ) + * + * So, it has a structure: + * array( array( array(, ), // first literal of first conjuction + * array(, ), // second literal of first conjuction + * ... + * array(, ) + * ), // end of first conjuction + * array( array(, ), // first literal of second conjuction + * array(, ), // second literal of second conjuction + * ... + * array(, ) + * ), // end of second conjuction + * ... + * ) // end of structure + * + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function finishExpression() + { + if ($this->getState() != self::ST_LITERAL) { + throw new Zend_Search_Lucene_Exception('Literal expected.'); + } + + $this->_conjunctions[] = $this->_currentConjunction; + + return $this->_conjunctions; + } + + + + /********************************************************************* + * Actions implementation + *********************************************************************/ + + /** + * default (omitted) operator processing + */ + public function emptyOperatorAction() + { + /** Zend_Search_Lucene_Search_QueryParser */ + + if (Zend_Search_Lucene_Search_QueryParser::getDefaultOperator() == Zend_Search_Lucene_Search_QueryParser::B_AND) { + // Do nothing + } else { + $this->orOperatorAction(); + } + + // Process literal + $this->literalAction(); + } + + /** + * default (omitted) + NOT operator processing + */ + public function emptyNotOperatorAction() + { + /** Zend_Search_Lucene_Search_QueryParser */ + + if (Zend_Search_Lucene_Search_QueryParser::getDefaultOperator() == Zend_Search_Lucene_Search_QueryParser::B_AND) { + // Do nothing + } else { + $this->orOperatorAction(); + } + + // Process NOT operator + $this->notOperatorAction(); + } + + + /** + * NOT operator processing + */ + public function notOperatorAction() + { + $this->_negativeLiteral = true; + } + + /** + * OR operator processing + * Close current conjunction + */ + public function orOperatorAction() + { + $this->_conjunctions[] = $this->_currentConjunction; + $this->_currentConjunction = array(); + } + + /** + * Literal processing + */ + public function literalAction() + { + // Add literal to the current conjunction + $this->_currentConjunction[] = array($this->_literal, !$this->_negativeLiteral); + + // Switch off negative signal + $this->_negativeLiteral = false; + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/Highlighter/Default.php b/library/vendor/Zend/Search/Lucene/Search/Highlighter/Default.php new file mode 100644 index 000000000..34a8386cf --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Highlighter/Default.php @@ -0,0 +1,93 @@ +_doc = $document; + } + + /** + * Get document for highlighting. + * + * @return Zend_Search_Lucene_Document_Html $document + */ + public function getDocument() + { + return $this->_doc; + } + + /** + * Highlight specified words + * + * @param string|array $words Words to highlight. They could be organized using the array or string. + */ + public function highlight($words) + { + $color = $this->_highlightColors[$this->_currentColorIndex]; + $this->_currentColorIndex = ($this->_currentColorIndex + 1) % count($this->_highlightColors); + + $this->_doc->highlight($words, $color); + } + +} diff --git a/library/vendor/Zend/Search/Lucene/Search/Highlighter/Interface.php b/library/vendor/Zend/Search/Lucene/Search/Highlighter/Interface.php new file mode 100644 index 000000000..99fe12ee0 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Highlighter/Interface.php @@ -0,0 +1,53 @@ +_boost; + } + + /** + * Sets the boost for this query clause to $boost. + * + * @param float $boost + */ + public function setBoost($boost) + { + $this->_boost = $boost; + } + + /** + * Score specified document + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + abstract public function score($docId, Zend_Search_Lucene_Interface $reader); + + /** + * Get document ids likely matching the query + * + * It's an array with document ids as keys (performance considerations) + * + * @return array + */ + abstract public function matchedDocs(); + + /** + * Execute query in context of index reader + * It also initializes necessary internal structures + * + * Query specific implementation + * + * @param Zend_Search_Lucene_Interface $reader + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + */ + abstract public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null); + + /** + * Constructs an appropriate Weight implementation for this query. + * + * @param Zend_Search_Lucene_Interface $reader + * @return Zend_Search_Lucene_Search_Weight + */ + abstract public function createWeight(Zend_Search_Lucene_Interface $reader); + + /** + * Constructs an initializes a Weight for a _top-level_query_. + * + * @param Zend_Search_Lucene_Interface $reader + */ + protected function _initWeight(Zend_Search_Lucene_Interface $reader) + { + // Check, that it's a top-level query and query weight is not initialized yet. + if ($this->_weight !== null) { + return $this->_weight; + } + + $this->createWeight($reader); + $sum = $this->_weight->sumOfSquaredWeights(); + $queryNorm = $reader->getSimilarity()->queryNorm($sum); + $this->_weight->normalize($queryNorm); + } + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + abstract public function rewrite(Zend_Search_Lucene_Interface $index); + + /** + * Optimize query in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + abstract public function optimize(Zend_Search_Lucene_Interface $index); + + /** + * Reset query, so it can be reused within other queries or + * with other indeces + */ + public function reset() + { + $this->_weight = null; + } + + + /** + * Print a query + * + * @return string + */ + abstract public function __toString(); + + /** + * Return query terms + * + * @return array + */ + abstract public function getQueryTerms(); + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + abstract protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter); + + /** + * Highlight matches in $inputHTML + * + * @param string $inputHTML + * @param string $defaultEncoding HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag. + * @param Zend_Search_Lucene_Search_Highlighter_Interface|null $highlighter + * @return string + */ + public function highlightMatches($inputHTML, $defaultEncoding = '', $highlighter = null) + { + if ($highlighter === null) { + $highlighter = new Zend_Search_Lucene_Search_Highlighter_Default(); + } + + /** Zend_Search_Lucene_Document_Html */ + + $doc = Zend_Search_Lucene_Document_Html::loadHTML($inputHTML, false, $defaultEncoding); + $highlighter->setDocument($doc); + + $this->_highlightMatches($highlighter); + + return $doc->getHTML(); + } + + /** + * Highlight matches in $inputHtmlFragment and return it (without HTML header and body tag) + * + * @param string $inputHtmlFragment + * @param string $encoding Input HTML string encoding + * @param Zend_Search_Lucene_Search_Highlighter_Interface|null $highlighter + * @return string + */ + public function htmlFragmentHighlightMatches($inputHtmlFragment, $encoding = 'UTF-8', $highlighter = null) + { + if ($highlighter === null) { + $highlighter = new Zend_Search_Lucene_Search_Highlighter_Default(); + } + + $inputHTML = '' + . iconv($encoding, 'UTF-8//IGNORE', $inputHtmlFragment) . ''; + + /** Zend_Search_Lucene_Document_Html */ + + $doc = Zend_Search_Lucene_Document_Html::loadHTML($inputHTML); + $highlighter->setDocument($doc); + + $this->_highlightMatches($highlighter); + + return $doc->getHtmlBody(); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Boolean.php b/library/vendor/Zend/Search/Lucene/Search/Query/Boolean.php new file mode 100644 index 000000000..db4ff3199 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Boolean.php @@ -0,0 +1,802 @@ +_subqueries = $subqueries; + + $this->_signs = null; + // Check if all subqueries are required + if (is_array($signs)) { + foreach ($signs as $sign ) { + if ($sign !== true) { + $this->_signs = $signs; + break; + } + } + } + } + } + + + /** + * Add a $subquery (Zend_Search_Lucene_Search_Query) to this query. + * + * The sign is specified as: + * TRUE - subquery is required + * FALSE - subquery is prohibited + * NULL - subquery is neither prohibited, nor required + * + * @param Zend_Search_Lucene_Search_Query $subquery + * @param boolean|null $sign + * @return void + */ + public function addSubquery(Zend_Search_Lucene_Search_Query $subquery, $sign=null) { + if ($sign !== true || $this->_signs !== null) { // Skip, if all subqueries are required + if ($this->_signs === null) { // Check, If all previous subqueries are required + $this->_signs = array(); + foreach ($this->_subqueries as $prevSubquery) { + $this->_signs[] = true; + } + } + $this->_signs[] = $sign; + } + + $this->_subqueries[] = $subquery; + } + + /** + * Re-write queries into primitive queries + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + $query = new Zend_Search_Lucene_Search_Query_Boolean(); + $query->setBoost($this->getBoost()); + + foreach ($this->_subqueries as $subqueryId => $subquery) { + $query->addSubquery($subquery->rewrite($index), + ($this->_signs === null)? true : $this->_signs[$subqueryId]); + } + + return $query; + } + + /** + * Optimize query in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function optimize(Zend_Search_Lucene_Interface $index) + { + $subqueries = array(); + $signs = array(); + + // Optimize all subqueries + foreach ($this->_subqueries as $id => $subquery) { + $subqueries[] = $subquery->optimize($index); + $signs[] = ($this->_signs === null)? true : $this->_signs[$id]; + } + + // Remove insignificant subqueries + foreach ($subqueries as $id => $subquery) { + if ($subquery instanceof Zend_Search_Lucene_Search_Query_Insignificant) { + // Insignificant subquery has to be removed anyway + unset($subqueries[$id]); + unset($signs[$id]); + } + } + if (count($subqueries) == 0) { + // Boolean query doesn't has non-insignificant subqueries + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } + // Check if all non-insignificant subqueries are prohibited + $allProhibited = true; + foreach ($signs as $sign) { + if ($sign !== false) { + $allProhibited = false; + break; + } + } + if ($allProhibited) { + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } + + + // Check for empty subqueries + foreach ($subqueries as $id => $subquery) { + if ($subquery instanceof Zend_Search_Lucene_Search_Query_Empty) { + if ($signs[$id] === true) { + // Matching is required, but is actually empty + return new Zend_Search_Lucene_Search_Query_Empty(); + } else { + // Matching is optional or prohibited, but is empty + // Remove it from subqueries and signs list + unset($subqueries[$id]); + unset($signs[$id]); + } + } + } + + // Check, if reduced subqueries list is empty + if (count($subqueries) == 0) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + + // Check if all non-empty subqueries are prohibited + $allProhibited = true; + foreach ($signs as $sign) { + if ($sign !== false) { + $allProhibited = false; + break; + } + } + if ($allProhibited) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + + + // Check, if reduced subqueries list has only one entry + if (count($subqueries) == 1) { + // It's a query with only one required or optional clause + // (it's already checked, that it's not a prohibited clause) + + if ($this->getBoost() == 1) { + return reset($subqueries); + } + + $optimizedQuery = clone reset($subqueries); + $optimizedQuery->setBoost($optimizedQuery->getBoost()*$this->getBoost()); + + return $optimizedQuery; + } + + + // Prepare first candidate for optimized query + $optimizedQuery = new Zend_Search_Lucene_Search_Query_Boolean($subqueries, $signs); + $optimizedQuery->setBoost($this->getBoost()); + + + $terms = array(); + $tsigns = array(); + $boostFactors = array(); + + // Try to decompose term and multi-term subqueries + foreach ($subqueries as $id => $subquery) { + if ($subquery instanceof Zend_Search_Lucene_Search_Query_Term) { + $terms[] = $subquery->getTerm(); + $tsigns[] = $signs[$id]; + $boostFactors[] = $subquery->getBoost(); + + // remove subquery from a subqueries list + unset($subqueries[$id]); + unset($signs[$id]); + } else if ($subquery instanceof Zend_Search_Lucene_Search_Query_MultiTerm) { + $subTerms = $subquery->getTerms(); + $subSigns = $subquery->getSigns(); + + if ($signs[$id] === true) { + // It's a required multi-term subquery. + // Something like '... +(+term1 -term2 term3 ...) ...' + + // Multi-term required subquery can be decomposed only if it contains + // required terms and doesn't contain prohibited terms: + // ... +(+term1 term2 ...) ... => ... +term1 term2 ... + // + // Check this + $hasRequired = false; + $hasProhibited = false; + if ($subSigns === null) { + // All subterms are required + $hasRequired = true; + } else { + foreach ($subSigns as $sign) { + if ($sign === true) { + $hasRequired = true; + } else if ($sign === false) { + $hasProhibited = true; + break; + } + } + } + // Continue if subquery has prohibited terms or doesn't have required terms + if ($hasProhibited || !$hasRequired) { + continue; + } + + foreach ($subTerms as $termId => $term) { + $terms[] = $term; + $tsigns[] = ($subSigns === null)? true : $subSigns[$termId]; + $boostFactors[] = $subquery->getBoost(); + } + + // remove subquery from a subqueries list + unset($subqueries[$id]); + unset($signs[$id]); + + } else { // $signs[$id] === null || $signs[$id] === false + // It's an optional or prohibited multi-term subquery. + // Something like '... (+term1 -term2 term3 ...) ...' + // or + // something like '... -(+term1 -term2 term3 ...) ...' + + // Multi-term optional and required subqueries can be decomposed + // only if all terms are optional. + // + // Check if all terms are optional. + $onlyOptional = true; + if ($subSigns === null) { + // All subterms are required + $onlyOptional = false; + } else { + foreach ($subSigns as $sign) { + if ($sign !== null) { + $onlyOptional = false; + break; + } + } + } + + // Continue if non-optional terms are presented in this multi-term subquery + if (!$onlyOptional) { + continue; + } + + foreach ($subTerms as $termId => $term) { + $terms[] = $term; + $tsigns[] = ($signs[$id] === null)? null /* optional */ : + false /* prohibited */; + $boostFactors[] = $subquery->getBoost(); + } + + // remove subquery from a subqueries list + unset($subqueries[$id]); + unset($signs[$id]); + } + } + } + + + // Check, if there are no decomposed subqueries + if (count($terms) == 0 ) { + // return prepared candidate + return $optimizedQuery; + } + + + // Check, if all subqueries have been decomposed and all terms has the same boost factor + if (count($subqueries) == 0 && count(array_unique($boostFactors)) == 1) { + $optimizedQuery = new Zend_Search_Lucene_Search_Query_MultiTerm($terms, $tsigns); + $optimizedQuery->setBoost(reset($boostFactors)*$this->getBoost()); + + return $optimizedQuery; + } + + + // This boolean query can't be transformed to Term/MultiTerm query and still contains + // several subqueries + + // Separate prohibited terms + $prohibitedTerms = array(); + foreach ($terms as $id => $term) { + if ($tsigns[$id] === false) { + $prohibitedTerms[] = $term; + + unset($terms[$id]); + unset($tsigns[$id]); + unset($boostFactors[$id]); + } + } + + if (count($terms) == 1) { + $clause = new Zend_Search_Lucene_Search_Query_Term(reset($terms)); + $clause->setBoost(reset($boostFactors)); + + $subqueries[] = $clause; + $signs[] = reset($tsigns); + + // Clear terms list + $terms = array(); + } else if (count($terms) > 1 && count(array_unique($boostFactors)) == 1) { + $clause = new Zend_Search_Lucene_Search_Query_MultiTerm($terms, $tsigns); + $clause->setBoost(reset($boostFactors)); + + $subqueries[] = $clause; + // Clause sign is 'required' if clause contains required terms. 'Optional' otherwise. + $signs[] = (in_array(true, $tsigns))? true : null; + + // Clear terms list + $terms = array(); + } + + if (count($prohibitedTerms) == 1) { + // (boost factors are not significant for prohibited clauses) + $subqueries[] = new Zend_Search_Lucene_Search_Query_Term(reset($prohibitedTerms)); + $signs[] = false; + + // Clear prohibited terms list + $prohibitedTerms = array(); + } else if (count($prohibitedTerms) > 1) { + // prepare signs array + $prohibitedSigns = array(); + foreach ($prohibitedTerms as $id => $term) { + // all prohibited term are grouped as optional into multi-term query + $prohibitedSigns[$id] = null; + } + + // (boost factors are not significant for prohibited clauses) + $subqueries[] = new Zend_Search_Lucene_Search_Query_MultiTerm($prohibitedTerms, $prohibitedSigns); + // Clause sign is 'prohibited' + $signs[] = false; + + // Clear terms list + $prohibitedTerms = array(); + } + + /** @todo Group terms with the same boost factors together */ + + // Check, that all terms are processed + // Replace candidate for optimized query + if (count($terms) == 0 && count($prohibitedTerms) == 0) { + $optimizedQuery = new Zend_Search_Lucene_Search_Query_Boolean($subqueries, $signs); + $optimizedQuery->setBoost($this->getBoost()); + } + + return $optimizedQuery; + } + + /** + * Returns subqueries + * + * @return array + */ + public function getSubqueries() + { + return $this->_subqueries; + } + + + /** + * Return subqueries signs + * + * @return array + */ + public function getSigns() + { + return $this->_signs; + } + + + /** + * Constructs an appropriate Weight implementation for this query. + * + * @param Zend_Search_Lucene_Interface $reader + * @return Zend_Search_Lucene_Search_Weight + */ + public function createWeight(Zend_Search_Lucene_Interface $reader) + { + $this->_weight = new Zend_Search_Lucene_Search_Weight_Boolean($this, $reader); + return $this->_weight; + } + + + /** + * Calculate result vector for Conjunction query + * (like ' AND AND ') + */ + private function _calculateConjunctionResult() + { + $this->_resVector = null; + + if (count($this->_subqueries) == 0) { + $this->_resVector = array(); + } + + $resVectors = array(); + $resVectorsSizes = array(); + $resVectorsIds = array(); // is used to prevent arrays comparison + foreach ($this->_subqueries as $subqueryId => $subquery) { + $resVectors[] = $subquery->matchedDocs(); + $resVectorsSizes[] = count(end($resVectors)); + $resVectorsIds[] = $subqueryId; + } + // sort resvectors in order of subquery cardinality increasing + array_multisort($resVectorsSizes, SORT_ASC, SORT_NUMERIC, + $resVectorsIds, SORT_ASC, SORT_NUMERIC, + $resVectors); + + foreach ($resVectors as $nextResVector) { + if($this->_resVector === null) { + $this->_resVector = $nextResVector; + } else { + //$this->_resVector = array_intersect_key($this->_resVector, $nextResVector); + + /** + * This code is used as workaround for array_intersect_key() slowness problem. + */ + $updatedVector = array(); + foreach ($this->_resVector as $id => $value) { + if (isset($nextResVector[$id])) { + $updatedVector[$id] = $value; + } + } + $this->_resVector = $updatedVector; + } + + if (count($this->_resVector) == 0) { + // Empty result set, we don't need to check other terms + break; + } + } + + // ksort($this->_resVector, SORT_NUMERIC); + // Used algorithm doesn't change elements order + } + + + /** + * Calculate result vector for non Conjunction query + * (like ' AND AND NOT OR ') + */ + private function _calculateNonConjunctionResult() + { + $requiredVectors = array(); + $requiredVectorsSizes = array(); + $requiredVectorsIds = array(); // is used to prevent arrays comparison + + $optional = array(); + + foreach ($this->_subqueries as $subqueryId => $subquery) { + if ($this->_signs[$subqueryId] === true) { + // required + $requiredVectors[] = $subquery->matchedDocs(); + $requiredVectorsSizes[] = count(end($requiredVectors)); + $requiredVectorsIds[] = $subqueryId; + } elseif ($this->_signs[$subqueryId] === false) { + // prohibited + // Do nothing. matchedDocs() may include non-matching id's + // Calculating prohibited vector may take significant time, but do not affect the result + // Skipped. + } else { + // neither required, nor prohibited + // array union + $optional += $subquery->matchedDocs(); + } + } + + // sort resvectors in order of subquery cardinality increasing + array_multisort($requiredVectorsSizes, SORT_ASC, SORT_NUMERIC, + $requiredVectorsIds, SORT_ASC, SORT_NUMERIC, + $requiredVectors); + + $required = null; + foreach ($requiredVectors as $nextResVector) { + if($required === null) { + $required = $nextResVector; + } else { + //$required = array_intersect_key($required, $nextResVector); + + /** + * This code is used as workaround for array_intersect_key() slowness problem. + */ + $updatedVector = array(); + foreach ($required as $id => $value) { + if (isset($nextResVector[$id])) { + $updatedVector[$id] = $value; + } + } + $required = $updatedVector; + } + + if (count($required) == 0) { + // Empty result set, we don't need to check other terms + break; + } + } + + + if ($required !== null) { + $this->_resVector = &$required; + } else { + $this->_resVector = &$optional; + } + + ksort($this->_resVector, SORT_NUMERIC); + } + + + /** + * Score calculator for conjunction queries (all subqueries are required) + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function _conjunctionScore($docId, Zend_Search_Lucene_Interface $reader) + { + if ($this->_coord === null) { + $this->_coord = $reader->getSimilarity()->coord(count($this->_subqueries), + count($this->_subqueries) ); + } + + $score = 0; + + foreach ($this->_subqueries as $subquery) { + $subscore = $subquery->score($docId, $reader); + + if ($subscore == 0) { + return 0; + } + + $score += $subquery->score($docId, $reader) * $this->_coord; + } + + return $score * $this->_coord * $this->getBoost(); + } + + + /** + * Score calculator for non conjunction queries (not all subqueries are required) + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function _nonConjunctionScore($docId, Zend_Search_Lucene_Interface $reader) + { + if ($this->_coord === null) { + $this->_coord = array(); + + $maxCoord = 0; + foreach ($this->_signs as $sign) { + if ($sign !== false /* not prohibited */) { + $maxCoord++; + } + } + + for ($count = 0; $count <= $maxCoord; $count++) { + $this->_coord[$count] = $reader->getSimilarity()->coord($count, $maxCoord); + } + } + + $score = 0; + $matchedSubqueries = 0; + foreach ($this->_subqueries as $subqueryId => $subquery) { + $subscore = $subquery->score($docId, $reader); + + // Prohibited + if ($this->_signs[$subqueryId] === false && $subscore != 0) { + return 0; + } + + // is required, but doen't match + if ($this->_signs[$subqueryId] === true && $subscore == 0) { + return 0; + } + + if ($subscore != 0) { + $matchedSubqueries++; + $score += $subscore; + } + } + + return $score * $this->_coord[$matchedSubqueries] * $this->getBoost(); + } + + /** + * Execute query in context of index reader + * It also initializes necessary internal structures + * + * @param Zend_Search_Lucene_Interface $reader + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + */ + public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null) + { + // Initialize weight if it's not done yet + $this->_initWeight($reader); + + if ($docsFilter === null) { + // Create local documents filter if it's not provided by upper query + $docsFilter = new Zend_Search_Lucene_Index_DocsFilter(); + } + + foreach ($this->_subqueries as $subqueryId => $subquery) { + if ($this->_signs == null || $this->_signs[$subqueryId] === true) { + // Subquery is required + $subquery->execute($reader, $docsFilter); + } else { + $subquery->execute($reader); + } + } + + if ($this->_signs === null) { + $this->_calculateConjunctionResult(); + } else { + $this->_calculateNonConjunctionResult(); + } + } + + + + /** + * Get document ids likely matching the query + * + * It's an array with document ids as keys (performance considerations) + * + * @return array + */ + public function matchedDocs() + { + return $this->_resVector; + } + + /** + * Score specified document + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function score($docId, Zend_Search_Lucene_Interface $reader) + { + if (isset($this->_resVector[$docId])) { + if ($this->_signs === null) { + return $this->_conjunctionScore($docId, $reader); + } else { + return $this->_nonConjunctionScore($docId, $reader); + } + } else { + return 0; + } + } + + /** + * Return query terms + * + * @return array + */ + public function getQueryTerms() + { + $terms = array(); + + foreach ($this->_subqueries as $id => $subquery) { + if ($this->_signs === null || $this->_signs[$id] !== false) { + $terms = array_merge($terms, $subquery->getQueryTerms()); + } + } + + return $terms; + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + foreach ($this->_subqueries as $id => $subquery) { + if ($this->_signs === null || $this->_signs[$id] !== false) { + $subquery->_highlightMatches($highlighter); + } + } + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + + $query = ''; + + foreach ($this->_subqueries as $id => $subquery) { + if ($id != 0) { + $query .= ' '; + } + + if ($this->_signs === null || $this->_signs[$id] === true) { + $query .= '+'; + } else if ($this->_signs[$id] === false) { + $query .= '-'; + } + + $query .= '(' . $subquery->__toString() . ')'; + } + + if ($this->getBoost() != 1) { + $query = '(' . $query . ')^' . round($this->getBoost(), 4); + } + + return $query; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Empty.php b/library/vendor/Zend/Search/Lucene/Search/Query/Empty.php new file mode 100644 index 000000000..0deba2cba --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Empty.php @@ -0,0 +1,136 @@ +'; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Fuzzy.php b/library/vendor/Zend/Search/Lucene/Search/Query/Fuzzy.php new file mode 100644 index 000000000..c754da422 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Fuzzy.php @@ -0,0 +1,472 @@ += 1) { + throw new Zend_Search_Lucene_Exception('minimumSimilarity cannot be greater than or equal to 1'); + } + if ($prefixLength < 0) { + throw new Zend_Search_Lucene_Exception('prefixLength cannot be less than 0'); + } + + $this->_term = $term; + $this->_minimumSimilarity = $minimumSimilarity; + $this->_prefixLength = ($prefixLength !== null)? $prefixLength : self::$_defaultPrefixLength; + } + + /** + * Get default non-fuzzy prefix length + * + * @return integer + */ + public static function getDefaultPrefixLength() + { + return self::$_defaultPrefixLength; + } + + /** + * Set default non-fuzzy prefix length + * + * @param integer $defaultPrefixLength + */ + public static function setDefaultPrefixLength($defaultPrefixLength) + { + self::$_defaultPrefixLength = $defaultPrefixLength; + } + + /** + * Calculate maximum distance for specified word length + * + * @param integer $prefixLength + * @param integer $termLength + * @param integer $length + * @return integer + */ + private function _calculateMaxDistance($prefixLength, $termLength, $length) + { + $this->_maxDistances[$length] = (int) ((1 - $this->_minimumSimilarity)*(min($termLength, $length) + $prefixLength)); + return $this->_maxDistances[$length]; + } + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + * @throws Zend_Search_Lucene_Exception + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + $this->_matches = array(); + $this->_scores = array(); + $this->_termKeys = array(); + + if ($this->_term->field === null) { + // Search through all fields + $fields = $index->getFieldNames(true /* indexed fields list */); + } else { + $fields = array($this->_term->field); + } + + $prefix = Zend_Search_Lucene_Index_Term::getPrefix($this->_term->text, $this->_prefixLength); + $prefixByteLength = strlen($prefix); + $prefixUtf8Length = Zend_Search_Lucene_Index_Term::getLength($prefix); + + $termLength = Zend_Search_Lucene_Index_Term::getLength($this->_term->text); + + $termRest = substr($this->_term->text, $prefixByteLength); + // we calculate length of the rest in bytes since levenshtein() is not UTF-8 compatible + $termRestLength = strlen($termRest); + + $scaleFactor = 1/(1 - $this->_minimumSimilarity); + + $maxTerms = Zend_Search_Lucene::getTermsPerQueryLimit(); + foreach ($fields as $field) { + $index->resetTermsStream(); + + if ($prefix != '') { + $index->skipTo(new Zend_Search_Lucene_Index_Term($prefix, $field)); + + while ($index->currentTerm() !== null && + $index->currentTerm()->field == $field && + substr($index->currentTerm()->text, 0, $prefixByteLength) == $prefix) { + // Calculate similarity + $target = substr($index->currentTerm()->text, $prefixByteLength); + + $maxDistance = isset($this->_maxDistances[strlen($target)])? + $this->_maxDistances[strlen($target)] : + $this->_calculateMaxDistance($prefixUtf8Length, $termRestLength, strlen($target)); + + if ($termRestLength == 0) { + // we don't have anything to compare. That means if we just add + // the letters for current term we get the new word + $similarity = (($prefixUtf8Length == 0)? 0 : 1 - strlen($target)/$prefixUtf8Length); + } else if (strlen($target) == 0) { + $similarity = (($prefixUtf8Length == 0)? 0 : 1 - $termRestLength/$prefixUtf8Length); + } else if ($maxDistance < abs($termRestLength - strlen($target))){ + //just adding the characters of term to target or vice-versa results in too many edits + //for example "pre" length is 3 and "prefixes" length is 8. We can see that + //given this optimal circumstance, the edit distance cannot be less than 5. + //which is 8-3 or more precisesly abs(3-8). + //if our maximum edit distance is 4, then we can discard this word + //without looking at it. + $similarity = 0; + } else { + $similarity = 1 - levenshtein($termRest, $target)/($prefixUtf8Length + min($termRestLength, strlen($target))); + } + + if ($similarity > $this->_minimumSimilarity) { + $this->_matches[] = $index->currentTerm(); + $this->_termKeys[] = $index->currentTerm()->key(); + $this->_scores[] = ($similarity - $this->_minimumSimilarity)*$scaleFactor; + + if ($maxTerms != 0 && count($this->_matches) > $maxTerms) { + throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.'); + } + } + + $index->nextTerm(); + } + } else { + $index->skipTo(new Zend_Search_Lucene_Index_Term('', $field)); + + while ($index->currentTerm() !== null && $index->currentTerm()->field == $field) { + // Calculate similarity + $target = $index->currentTerm()->text; + + $maxDistance = isset($this->_maxDistances[strlen($target)])? + $this->_maxDistances[strlen($target)] : + $this->_calculateMaxDistance(0, $termRestLength, strlen($target)); + + if ($maxDistance < abs($termRestLength - strlen($target))){ + //just adding the characters of term to target or vice-versa results in too many edits + //for example "pre" length is 3 and "prefixes" length is 8. We can see that + //given this optimal circumstance, the edit distance cannot be less than 5. + //which is 8-3 or more precisesly abs(3-8). + //if our maximum edit distance is 4, then we can discard this word + //without looking at it. + $similarity = 0; + } else { + $similarity = 1 - levenshtein($termRest, $target)/min($termRestLength, strlen($target)); + } + + if ($similarity > $this->_minimumSimilarity) { + $this->_matches[] = $index->currentTerm(); + $this->_termKeys[] = $index->currentTerm()->key(); + $this->_scores[] = ($similarity - $this->_minimumSimilarity)*$scaleFactor; + + if ($maxTerms != 0 && count($this->_matches) > $maxTerms) { + throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.'); + } + } + + $index->nextTerm(); + } + } + + $index->closeTermsStream(); + } + + if (count($this->_matches) == 0) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } else if (count($this->_matches) == 1) { + return new Zend_Search_Lucene_Search_Query_Term(reset($this->_matches)); + } else { + $rewrittenQuery = new Zend_Search_Lucene_Search_Query_Boolean(); + + array_multisort($this->_scores, SORT_DESC, SORT_NUMERIC, + $this->_termKeys, SORT_ASC, SORT_STRING, + $this->_matches); + + $termCount = 0; + foreach ($this->_matches as $id => $matchedTerm) { + $subquery = new Zend_Search_Lucene_Search_Query_Term($matchedTerm); + $subquery->setBoost($this->_scores[$id]); + + $rewrittenQuery->addSubquery($subquery); + + $termCount++; + if ($termCount >= self::MAX_CLAUSE_COUNT) { + break; + } + } + + return $rewrittenQuery; + } + } + + /** + * Optimize query in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function optimize(Zend_Search_Lucene_Interface $index) + { + throw new Zend_Search_Lucene_Exception('Fuzzy query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Return query terms + * + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function getQueryTerms() + { + if ($this->_matches === null) { + throw new Zend_Search_Lucene_Exception('Search or rewrite operations have to be performed before.'); + } + + return $this->_matches; + } + + /** + * Constructs an appropriate Weight implementation for this query. + * + * @param Zend_Search_Lucene_Interface $reader + * @return Zend_Search_Lucene_Search_Weight + * @throws Zend_Search_Lucene_Exception + */ + public function createWeight(Zend_Search_Lucene_Interface $reader) + { + throw new Zend_Search_Lucene_Exception('Fuzzy query should not be directly used for search. Use $query->rewrite($index)'); + } + + + /** + * Execute query in context of index reader + * It also initializes necessary internal structures + * + * @param Zend_Search_Lucene_Interface $reader + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @throws Zend_Search_Lucene_Exception + */ + public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null) + { + throw new Zend_Search_Lucene_Exception('Fuzzy query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Get document ids likely matching the query + * + * It's an array with document ids as keys (performance considerations) + * + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function matchedDocs() + { + throw new Zend_Search_Lucene_Exception('Fuzzy query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Score specified document + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + * @throws Zend_Search_Lucene_Exception + */ + public function score($docId, Zend_Search_Lucene_Interface $reader) + { + throw new Zend_Search_Lucene_Exception('Fuzzy query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + $words = array(); + + $prefix = Zend_Search_Lucene_Index_Term::getPrefix($this->_term->text, $this->_prefixLength); + $prefixByteLength = strlen($prefix); + $prefixUtf8Length = Zend_Search_Lucene_Index_Term::getLength($prefix); + + $termLength = Zend_Search_Lucene_Index_Term::getLength($this->_term->text); + + $termRest = substr($this->_term->text, $prefixByteLength); + // we calculate length of the rest in bytes since levenshtein() is not UTF-8 compatible + $termRestLength = strlen($termRest); + + $scaleFactor = 1/(1 - $this->_minimumSimilarity); + + $docBody = $highlighter->getDocument()->getFieldUtf8Value('body'); + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($docBody, 'UTF-8'); + foreach ($tokens as $token) { + $termText = $token->getTermText(); + + if (substr($termText, 0, $prefixByteLength) == $prefix) { + // Calculate similarity + $target = substr($termText, $prefixByteLength); + + $maxDistance = isset($this->_maxDistances[strlen($target)])? + $this->_maxDistances[strlen($target)] : + $this->_calculateMaxDistance($prefixUtf8Length, $termRestLength, strlen($target)); + + if ($termRestLength == 0) { + // we don't have anything to compare. That means if we just add + // the letters for current term we get the new word + $similarity = (($prefixUtf8Length == 0)? 0 : 1 - strlen($target)/$prefixUtf8Length); + } else if (strlen($target) == 0) { + $similarity = (($prefixUtf8Length == 0)? 0 : 1 - $termRestLength/$prefixUtf8Length); + } else if ($maxDistance < abs($termRestLength - strlen($target))){ + //just adding the characters of term to target or vice-versa results in too many edits + //for example "pre" length is 3 and "prefixes" length is 8. We can see that + //given this optimal circumstance, the edit distance cannot be less than 5. + //which is 8-3 or more precisesly abs(3-8). + //if our maximum edit distance is 4, then we can discard this word + //without looking at it. + $similarity = 0; + } else { + $similarity = 1 - levenshtein($termRest, $target)/($prefixUtf8Length + min($termRestLength, strlen($target))); + } + + if ($similarity > $this->_minimumSimilarity) { + $words[] = $termText; + } + } + } + + $highlighter->highlight($words); + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + return (($this->_term->field === null)? '' : $this->_term->field . ':') + . $this->_term->text . '~' + . (($this->_minimumSimilarity != self::DEFAULT_MIN_SIMILARITY)? round($this->_minimumSimilarity, 4) : '') + . (($this->getBoost() != 1)? '^' . round($this->getBoost(), 4) : ''); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Insignificant.php b/library/vendor/Zend/Search/Lucene/Search/Query/Insignificant.php new file mode 100644 index 000000000..c25e3d439 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Insignificant.php @@ -0,0 +1,137 @@ +'; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/MultiTerm.php b/library/vendor/Zend/Search/Lucene/Search/Query/MultiTerm.php new file mode 100644 index 000000000..20d2ba2a0 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/MultiTerm.php @@ -0,0 +1,657 @@ + (docId => freq, ...) + * term2Id => (docId => freq, ...) + * + * @var array + */ + private $_termsFreqs = array(); + + + /** + * A score factor based on the fraction of all query terms + * that a document contains. + * float for conjunction queries + * array of float for non conjunction queries + * + * @var mixed + */ + private $_coord = null; + + + /** + * Terms weights + * array of Zend_Search_Lucene_Search_Weight + * + * @var array + */ + private $_weights = array(); + + + /** + * Class constructor. Create a new multi-term query object. + * + * if $signs array is omitted then all terms are required + * it differs from addTerm() behavior, but should never be used + * + * @param array $terms Array of Zend_Search_Lucene_Index_Term objects + * @param array $signs Array of signs. Sign is boolean|null. + * @throws Zend_Search_Lucene_Exception + */ + public function __construct($terms = null, $signs = null) + { + if (is_array($terms)) { + if (count($terms) > Zend_Search_Lucene::getTermsPerQueryLimit()) { + throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.'); + } + + $this->_terms = $terms; + + $this->_signs = null; + // Check if all terms are required + if (is_array($signs)) { + foreach ($signs as $sign ) { + if ($sign !== true) { + $this->_signs = $signs; + break; + } + } + } + } + } + + + /** + * Add a $term (Zend_Search_Lucene_Index_Term) to this query. + * + * The sign is specified as: + * TRUE - term is required + * FALSE - term is prohibited + * NULL - term is neither prohibited, nor required + * + * @param Zend_Search_Lucene_Index_Term $term + * @param boolean|null $sign + * @return void + */ + public function addTerm(Zend_Search_Lucene_Index_Term $term, $sign = null) { + if ($sign !== true || $this->_signs !== null) { // Skip, if all terms are required + if ($this->_signs === null) { // Check, If all previous terms are required + $this->_signs = array(); + foreach ($this->_terms as $prevTerm) { + $this->_signs[] = true; + } + } + $this->_signs[] = $sign; + } + + $this->_terms[] = $term; + } + + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + if (count($this->_terms) == 0) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + + // Check, that all fields are qualified + $allQualified = true; + foreach ($this->_terms as $term) { + if ($term->field === null) { + $allQualified = false; + break; + } + } + + if ($allQualified) { + return $this; + } else { + /** transform multiterm query to boolean and apply rewrite() method to subqueries. */ + $query = new Zend_Search_Lucene_Search_Query_Boolean(); + $query->setBoost($this->getBoost()); + + foreach ($this->_terms as $termId => $term) { + $subquery = new Zend_Search_Lucene_Search_Query_Term($term); + + $query->addSubquery($subquery->rewrite($index), + ($this->_signs === null)? true : $this->_signs[$termId]); + } + + return $query; + } + } + + /** + * Optimize query in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function optimize(Zend_Search_Lucene_Interface $index) + { + $terms = $this->_terms; + $signs = $this->_signs; + + foreach ($terms as $id => $term) { + if (!$index->hasTerm($term)) { + if ($signs === null || $signs[$id] === true) { + // Term is required + return new Zend_Search_Lucene_Search_Query_Empty(); + } else { + // Term is optional or prohibited + // Remove it from terms and signs list + unset($terms[$id]); + unset($signs[$id]); + } + } + } + + // Check if all presented terms are prohibited + $allProhibited = true; + if ($signs === null) { + $allProhibited = false; + } else { + foreach ($signs as $sign) { + if ($sign !== false) { + $allProhibited = false; + break; + } + } + } + if ($allProhibited) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + + /** + * @todo make an optimization for repeated terms + * (they may have different signs) + */ + + if (count($terms) == 1) { + // It's already checked, that it's not a prohibited term + + // It's one term query with one required or optional element + $optimizedQuery = new Zend_Search_Lucene_Search_Query_Term(reset($terms)); + $optimizedQuery->setBoost($this->getBoost()); + + return $optimizedQuery; + } + + if (count($terms) == 0) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + + $optimizedQuery = new Zend_Search_Lucene_Search_Query_MultiTerm($terms, $signs); + $optimizedQuery->setBoost($this->getBoost()); + return $optimizedQuery; + } + + + /** + * Returns query term + * + * @return array + */ + public function getTerms() + { + return $this->_terms; + } + + + /** + * Return terms signs + * + * @return array + */ + public function getSigns() + { + return $this->_signs; + } + + + /** + * Set weight for specified term + * + * @param integer $num + * @param Zend_Search_Lucene_Search_Weight_Term $weight + */ + public function setWeight($num, $weight) + { + $this->_weights[$num] = $weight; + } + + + /** + * Constructs an appropriate Weight implementation for this query. + * + * @param Zend_Search_Lucene_Interface $reader + * @return Zend_Search_Lucene_Search_Weight + */ + public function createWeight(Zend_Search_Lucene_Interface $reader) + { + $this->_weight = new Zend_Search_Lucene_Search_Weight_MultiTerm($this, $reader); + return $this->_weight; + } + + + /** + * Calculate result vector for Conjunction query + * (like '+something +another') + * + * @param Zend_Search_Lucene_Interface $reader + */ + private function _calculateConjunctionResult(Zend_Search_Lucene_Interface $reader) + { + $this->_resVector = null; + + if (count($this->_terms) == 0) { + $this->_resVector = array(); + } + + // Order terms by selectivity + $docFreqs = array(); + $ids = array(); + foreach ($this->_terms as $id => $term) { + $docFreqs[] = $reader->docFreq($term); + $ids[] = $id; // Used to keep original order for terms with the same selectivity and omit terms comparison + } + array_multisort($docFreqs, SORT_ASC, SORT_NUMERIC, + $ids, SORT_ASC, SORT_NUMERIC, + $this->_terms); + + $docsFilter = new Zend_Search_Lucene_Index_DocsFilter(); + foreach ($this->_terms as $termId => $term) { + $termDocs = $reader->termDocs($term, $docsFilter); + } + // Treat last retrieved docs vector as a result set + // (filter collects data for other terms) + $this->_resVector = array_flip($termDocs); + + foreach ($this->_terms as $termId => $term) { + $this->_termsFreqs[$termId] = $reader->termFreqs($term, $docsFilter); + } + + // ksort($this->_resVector, SORT_NUMERIC); + // Docs are returned ordered. Used algorithms doesn't change elements order. + } + + + /** + * Calculate result vector for non Conjunction query + * (like '+something -another') + * + * @param Zend_Search_Lucene_Interface $reader + */ + private function _calculateNonConjunctionResult(Zend_Search_Lucene_Interface $reader) + { + $requiredVectors = array(); + $requiredVectorsSizes = array(); + $requiredVectorsIds = array(); // is used to prevent arrays comparison + + $optional = array(); + $prohibited = array(); + + foreach ($this->_terms as $termId => $term) { + $termDocs = array_flip($reader->termDocs($term)); + + if ($this->_signs[$termId] === true) { + // required + $requiredVectors[] = $termDocs; + $requiredVectorsSizes[] = count($termDocs); + $requiredVectorsIds[] = $termId; + } elseif ($this->_signs[$termId] === false) { + // prohibited + // array union + $prohibited += $termDocs; + } else { + // neither required, nor prohibited + // array union + $optional += $termDocs; + } + + $this->_termsFreqs[$termId] = $reader->termFreqs($term); + } + + // sort resvectors in order of subquery cardinality increasing + array_multisort($requiredVectorsSizes, SORT_ASC, SORT_NUMERIC, + $requiredVectorsIds, SORT_ASC, SORT_NUMERIC, + $requiredVectors); + + $required = null; + foreach ($requiredVectors as $nextResVector) { + if($required === null) { + $required = $nextResVector; + } else { + //$required = array_intersect_key($required, $nextResVector); + + /** + * This code is used as workaround for array_intersect_key() slowness problem. + */ + $updatedVector = array(); + foreach ($required as $id => $value) { + if (isset($nextResVector[$id])) { + $updatedVector[$id] = $value; + } + } + $required = $updatedVector; + } + + if (count($required) == 0) { + // Empty result set, we don't need to check other terms + break; + } + } + + if ($required !== null) { + $this->_resVector = $required; + } else { + $this->_resVector = $optional; + } + + if (count($prohibited) != 0) { + // $this->_resVector = array_diff_key($this->_resVector, $prohibited); + + /** + * This code is used as workaround for array_diff_key() slowness problem. + */ + if (count($this->_resVector) < count($prohibited)) { + $updatedVector = $this->_resVector; + foreach ($this->_resVector as $id => $value) { + if (isset($prohibited[$id])) { + unset($updatedVector[$id]); + } + } + $this->_resVector = $updatedVector; + } else { + $updatedVector = $this->_resVector; + foreach ($prohibited as $id => $value) { + unset($updatedVector[$id]); + } + $this->_resVector = $updatedVector; + } + } + + ksort($this->_resVector, SORT_NUMERIC); + } + + + /** + * Score calculator for conjunction queries (all terms are required) + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function _conjunctionScore($docId, Zend_Search_Lucene_Interface $reader) + { + if ($this->_coord === null) { + $this->_coord = $reader->getSimilarity()->coord(count($this->_terms), + count($this->_terms) ); + } + + $score = 0.0; + + foreach ($this->_terms as $termId => $term) { + /** + * We don't need to check that term freq is not 0 + * Score calculation is performed only for matched docs + */ + $score += $reader->getSimilarity()->tf($this->_termsFreqs[$termId][$docId]) * + $this->_weights[$termId]->getValue() * + $reader->norm($docId, $term->field); + } + + return $score * $this->_coord * $this->getBoost(); + } + + + /** + * Score calculator for non conjunction queries (not all terms are required) + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function _nonConjunctionScore($docId, $reader) + { + if ($this->_coord === null) { + $this->_coord = array(); + + $maxCoord = 0; + foreach ($this->_signs as $sign) { + if ($sign !== false /* not prohibited */) { + $maxCoord++; + } + } + + for ($count = 0; $count <= $maxCoord; $count++) { + $this->_coord[$count] = $reader->getSimilarity()->coord($count, $maxCoord); + } + } + + $score = 0.0; + $matchedTerms = 0; + foreach ($this->_terms as $termId=>$term) { + // Check if term is + if ($this->_signs[$termId] !== false && // not prohibited + isset($this->_termsFreqs[$termId][$docId]) // matched + ) { + $matchedTerms++; + + /** + * We don't need to check that term freq is not 0 + * Score calculation is performed only for matched docs + */ + $score += + $reader->getSimilarity()->tf($this->_termsFreqs[$termId][$docId]) * + $this->_weights[$termId]->getValue() * + $reader->norm($docId, $term->field); + } + } + + return $score * $this->_coord[$matchedTerms] * $this->getBoost(); + } + + /** + * Execute query in context of index reader + * It also initializes necessary internal structures + * + * @param Zend_Search_Lucene_Interface $reader + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + */ + public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null) + { + if ($this->_signs === null) { + $this->_calculateConjunctionResult($reader); + } else { + $this->_calculateNonConjunctionResult($reader); + } + + // Initialize weight if it's not done yet + $this->_initWeight($reader); + } + + /** + * Get document ids likely matching the query + * + * It's an array with document ids as keys (performance considerations) + * + * @return array + */ + public function matchedDocs() + { + return $this->_resVector; + } + + /** + * Score specified document + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function score($docId, Zend_Search_Lucene_Interface $reader) + { + if (isset($this->_resVector[$docId])) { + if ($this->_signs === null) { + return $this->_conjunctionScore($docId, $reader); + } else { + return $this->_nonConjunctionScore($docId, $reader); + } + } else { + return 0; + } + } + + /** + * Return query terms + * + * @return array + */ + public function getQueryTerms() + { + if ($this->_signs === null) { + return $this->_terms; + } + + $terms = array(); + + foreach ($this->_signs as $id => $sign) { + if ($sign !== false) { + $terms[] = $this->_terms[$id]; + } + } + + return $terms; + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + $words = array(); + + if ($this->_signs === null) { + foreach ($this->_terms as $term) { + $words[] = $term->text; + } + } else { + foreach ($this->_signs as $id => $sign) { + if ($sign !== false) { + $words[] = $this->_terms[$id]->text; + } + } + } + + $highlighter->highlight($words); + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + + $query = ''; + + foreach ($this->_terms as $id => $term) { + if ($id != 0) { + $query .= ' '; + } + + if ($this->_signs === null || $this->_signs[$id] === true) { + $query .= '+'; + } else if ($this->_signs[$id] === false) { + $query .= '-'; + } + + if ($term->field !== null) { + $query .= $term->field . ':'; + } + $query .= $term->text; + } + + if ($this->getBoost() != 1) { + $query = '(' . $query . ')^' . round($this->getBoost(), 4); + } + + return $query; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Phrase.php b/library/vendor/Zend/Search/Lucene/Search/Query/Phrase.php new file mode 100644 index 000000000..489b3b0bb --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Phrase.php @@ -0,0 +1,563 @@ + (docId => array( pos1, pos2, ... ), ...) + * term2Id => (docId => array( pos1, pos2, ... ), ...) + * + * @var array + */ + private $_termsPositions = array(); + + /** + * Class constructor. Create a new prase query. + * + * @param string $field Field to search. + * @param array $terms Terms to search Array of strings. + * @param array $offsets Relative term positions. Array of integers. + * @throws Zend_Search_Lucene_Exception + */ + public function __construct($terms = null, $offsets = null, $field = null) + { + $this->_slop = 0; + + if (is_array($terms)) { + $this->_terms = array(); + foreach ($terms as $termId => $termText) { + $this->_terms[$termId] = ($field !== null)? new Zend_Search_Lucene_Index_Term($termText, $field): + new Zend_Search_Lucene_Index_Term($termText); + } + } else if ($terms === null) { + $this->_terms = array(); + } else { + throw new Zend_Search_Lucene_Exception('terms argument must be array of strings or null'); + } + + if (is_array($offsets)) { + if (count($this->_terms) != count($offsets)) { + throw new Zend_Search_Lucene_Exception('terms and offsets arguments must have the same size.'); + } + $this->_offsets = $offsets; + } else if ($offsets === null) { + $this->_offsets = array(); + foreach ($this->_terms as $termId => $term) { + $position = count($this->_offsets); + $this->_offsets[$termId] = $position; + } + } else { + throw new Zend_Search_Lucene_Exception('offsets argument must be array of strings or null'); + } + } + + /** + * Set slop + * + * @param integer $slop + */ + public function setSlop($slop) + { + $this->_slop = $slop; + } + + + /** + * Get slop + * + * @return integer + */ + public function getSlop() + { + return $this->_slop; + } + + + /** + * Adds a term to the end of the query phrase. + * The relative position of the term is specified explicitly or the one immediately + * after the last term added. + * + * @param Zend_Search_Lucene_Index_Term $term + * @param integer $position + */ + public function addTerm(Zend_Search_Lucene_Index_Term $term, $position = null) { + if ((count($this->_terms) != 0)&&(end($this->_terms)->field != $term->field)) { + throw new Zend_Search_Lucene_Exception('All phrase terms must be in the same field: ' . + $term->field . ':' . $term->text); + } + + $this->_terms[] = $term; + if ($position !== null) { + $this->_offsets[] = $position; + } else if (count($this->_offsets) != 0) { + $this->_offsets[] = end($this->_offsets) + 1; + } else { + $this->_offsets[] = 0; + } + } + + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + if (count($this->_terms) == 0) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } else if ($this->_terms[0]->field !== null) { + return $this; + } else { + $query = new Zend_Search_Lucene_Search_Query_Boolean(); + $query->setBoost($this->getBoost()); + + foreach ($index->getFieldNames(true) as $fieldName) { + $subquery = new Zend_Search_Lucene_Search_Query_Phrase(); + $subquery->setSlop($this->getSlop()); + + foreach ($this->_terms as $termId => $term) { + $qualifiedTerm = new Zend_Search_Lucene_Index_Term($term->text, $fieldName); + + $subquery->addTerm($qualifiedTerm, $this->_offsets[$termId]); + } + + $query->addSubquery($subquery); + } + + return $query; + } + } + + /** + * Optimize query in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function optimize(Zend_Search_Lucene_Interface $index) + { + // Check, that index contains all phrase terms + foreach ($this->_terms as $term) { + if (!$index->hasTerm($term)) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + } + + if (count($this->_terms) == 1) { + // It's one term query + $optimizedQuery = new Zend_Search_Lucene_Search_Query_Term(reset($this->_terms)); + $optimizedQuery->setBoost($this->getBoost()); + + return $optimizedQuery; + } + + if (count($this->_terms) == 0) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + + + return $this; + } + + /** + * Returns query term + * + * @return array + */ + public function getTerms() + { + return $this->_terms; + } + + + /** + * Set weight for specified term + * + * @param integer $num + * @param Zend_Search_Lucene_Search_Weight_Term $weight + */ + public function setWeight($num, $weight) + { + $this->_weights[$num] = $weight; + } + + + /** + * Constructs an appropriate Weight implementation for this query. + * + * @param Zend_Search_Lucene_Interface $reader + * @return Zend_Search_Lucene_Search_Weight + */ + public function createWeight(Zend_Search_Lucene_Interface $reader) + { + $this->_weight = new Zend_Search_Lucene_Search_Weight_Phrase($this, $reader); + return $this->_weight; + } + + + /** + * Score calculator for exact phrase queries (terms sequence is fixed) + * + * @param integer $docId + * @return float + */ + public function _exactPhraseFreq($docId) + { + $freq = 0; + + // Term Id with lowest cardinality + $lowCardTermId = null; + + // Calculate $lowCardTermId + foreach ($this->_terms as $termId => $term) { + if ($lowCardTermId === null || + count($this->_termsPositions[$termId][$docId]) < + count($this->_termsPositions[$lowCardTermId][$docId]) ) { + $lowCardTermId = $termId; + } + } + + // Walk through positions of the term with lowest cardinality + foreach ($this->_termsPositions[$lowCardTermId][$docId] as $lowCardPos) { + // We expect phrase to be found + $freq++; + + // Walk through other terms + foreach ($this->_terms as $termId => $term) { + if ($termId != $lowCardTermId) { + $expectedPosition = $lowCardPos + + ($this->_offsets[$termId] - + $this->_offsets[$lowCardTermId]); + + if (!in_array($expectedPosition, $this->_termsPositions[$termId][$docId])) { + $freq--; // Phrase wasn't found. + break; + } + } + } + } + + return $freq; + } + + /** + * Score calculator for sloppy phrase queries (terms sequence is fixed) + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function _sloppyPhraseFreq($docId, Zend_Search_Lucene_Interface $reader) + { + $freq = 0; + + $phraseQueue = array(); + $phraseQueue[0] = array(); // empty phrase + $lastTerm = null; + + // Walk through the terms to create phrases. + foreach ($this->_terms as $termId => $term) { + $queueSize = count($phraseQueue); + $firstPass = true; + + // Walk through the term positions. + // Each term position produces a set of phrases. + foreach ($this->_termsPositions[$termId][$docId] as $termPosition ) { + if ($firstPass) { + for ($count = 0; $count < $queueSize; $count++) { + $phraseQueue[$count][$termId] = $termPosition; + } + } else { + for ($count = 0; $count < $queueSize; $count++) { + if ($lastTerm !== null && + abs( $termPosition - $phraseQueue[$count][$lastTerm] - + ($this->_offsets[$termId] - $this->_offsets[$lastTerm])) > $this->_slop) { + continue; + } + + $newPhraseId = count($phraseQueue); + $phraseQueue[$newPhraseId] = $phraseQueue[$count]; + $phraseQueue[$newPhraseId][$termId] = $termPosition; + } + + } + + $firstPass = false; + } + $lastTerm = $termId; + } + + + foreach ($phraseQueue as $phrasePos) { + $minDistance = null; + + for ($shift = -$this->_slop; $shift <= $this->_slop; $shift++) { + $distance = 0; + $start = reset($phrasePos) - reset($this->_offsets) + $shift; + + foreach ($this->_terms as $termId => $term) { + $distance += abs($phrasePos[$termId] - $this->_offsets[$termId] - $start); + + if($distance > $this->_slop) { + break; + } + } + + if ($minDistance === null || $distance < $minDistance) { + $minDistance = $distance; + } + } + + if ($minDistance <= $this->_slop) { + $freq += $reader->getSimilarity()->sloppyFreq($minDistance); + } + } + + return $freq; + } + + /** + * Execute query in context of index reader + * It also initializes necessary internal structures + * + * @param Zend_Search_Lucene_Interface $reader + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + */ + public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null) + { + $this->_resVector = null; + + if (count($this->_terms) == 0) { + $this->_resVector = array(); + } + + $resVectors = array(); + $resVectorsSizes = array(); + $resVectorsIds = array(); // is used to prevent arrays comparison + foreach ($this->_terms as $termId => $term) { + $resVectors[] = array_flip($reader->termDocs($term)); + $resVectorsSizes[] = count(end($resVectors)); + $resVectorsIds[] = $termId; + + $this->_termsPositions[$termId] = $reader->termPositions($term); + } + // sort resvectors in order of subquery cardinality increasing + array_multisort($resVectorsSizes, SORT_ASC, SORT_NUMERIC, + $resVectorsIds, SORT_ASC, SORT_NUMERIC, + $resVectors); + + foreach ($resVectors as $nextResVector) { + if($this->_resVector === null) { + $this->_resVector = $nextResVector; + } else { + //$this->_resVector = array_intersect_key($this->_resVector, $nextResVector); + + /** + * This code is used as workaround for array_intersect_key() slowness problem. + */ + $updatedVector = array(); + foreach ($this->_resVector as $id => $value) { + if (isset($nextResVector[$id])) { + $updatedVector[$id] = $value; + } + } + $this->_resVector = $updatedVector; + } + + if (count($this->_resVector) == 0) { + // Empty result set, we don't need to check other terms + break; + } + } + + // ksort($this->_resVector, SORT_NUMERIC); + // Docs are returned ordered. Used algorithm doesn't change elements order. + + // Initialize weight if it's not done yet + $this->_initWeight($reader); + } + + /** + * Get document ids likely matching the query + * + * It's an array with document ids as keys (performance considerations) + * + * @return array + */ + public function matchedDocs() + { + return $this->_resVector; + } + + /** + * Score specified document + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function score($docId, Zend_Search_Lucene_Interface $reader) + { + if (isset($this->_resVector[$docId])) { + if ($this->_slop == 0) { + $freq = $this->_exactPhraseFreq($docId); + } else { + $freq = $this->_sloppyPhraseFreq($docId, $reader); + } + + if ($freq != 0) { + $tf = $reader->getSimilarity()->tf($freq); + $weight = $this->_weight->getValue(); + $norm = $reader->norm($docId, reset($this->_terms)->field); + + return $tf * $weight * $norm * $this->getBoost(); + } + + // Included in result, but culculated freq is zero + return 0; + } else { + return 0; + } + } + + /** + * Return query terms + * + * @return array + */ + public function getQueryTerms() + { + return $this->_terms; + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + $words = array(); + foreach ($this->_terms as $term) { + $words[] = $term->text; + } + + $highlighter->highlight($words); + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + if (isset($this->_terms[0]) && $this->_terms[0]->field !== null) { + $query = $this->_terms[0]->field . ':'; + } else { + $query = ''; + } + + $query .= '"'; + + foreach ($this->_terms as $id => $term) { + if ($id != 0) { + $query .= ' '; + } + $query .= $term->text; + } + + $query .= '"'; + + if ($this->_slop != 0) { + $query .= '~' . $this->_slop; + } + + if ($this->getBoost() != 1) { + $query .= '^' . round($this->getBoost(), 4); + } + + return $query; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing.php b/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing.php new file mode 100644 index 000000000..6b2a1030b --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing.php @@ -0,0 +1,120 @@ +_word = $word; + $this->_encoding = $encoding; + $this->_field = $fieldName; + $this->_minimumSimilarity = $minimumSimilarity; + } + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + if ($this->_field === null) { + $query = new Zend_Search_Lucene_Search_Query_Boolean(); + + $hasInsignificantSubqueries = false; + + if (Zend_Search_Lucene::getDefaultSearchField() === null) { + $searchFields = $index->getFieldNames(true); + } else { + $searchFields = array(Zend_Search_Lucene::getDefaultSearchField()); + } + + foreach ($searchFields as $fieldName) { + $subquery = new Zend_Search_Lucene_Search_Query_Preprocessing_Fuzzy($this->_word, + $this->_encoding, + $fieldName, + $this->_minimumSimilarity); + + $rewrittenSubquery = $subquery->rewrite($index); + + if ( !($rewrittenSubquery instanceof Zend_Search_Lucene_Search_Query_Insignificant || + $rewrittenSubquery instanceof Zend_Search_Lucene_Search_Query_Empty) ) { + $query->addSubquery($rewrittenSubquery); + } + + if ($rewrittenSubquery instanceof Zend_Search_Lucene_Search_Query_Insignificant) { + $hasInsignificantSubqueries = true; + } + } + + $subqueries = $query->getSubqueries(); + + if (count($subqueries) == 0) { + $this->_matches = array(); + if ($hasInsignificantSubqueries) { + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } else { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + } + + if (count($subqueries) == 1) { + $query = reset($subqueries); + } + + $query->setBoost($this->getBoost()); + + $this->_matches = $query->getQueryTerms(); + return $query; + } + + // ------------------------------------- + // Recognize exact term matching (it corresponds to Keyword fields stored in the index) + // encoding is not used since we expect binary matching + $term = new Zend_Search_Lucene_Index_Term($this->_word, $this->_field); + if ($index->hasTerm($term)) { + $query = new Zend_Search_Lucene_Search_Query_Fuzzy($term, $this->_minimumSimilarity); + $query->setBoost($this->getBoost()); + + // Get rewritten query. Important! It also fills terms matching container. + $rewrittenQuery = $query->rewrite($index); + $this->_matches = $query->getQueryTerms(); + + return $rewrittenQuery; + } + + + // ------------------------------------- + // Recognize wildcard queries + + /** @todo check for PCRE unicode support may be performed through Zend_Environment in some future */ + if (@preg_match('/\pL/u', 'a') == 1) { + $subPatterns = preg_split('/[*?]/u', iconv($this->_encoding, 'UTF-8', $this->_word)); + } else { + $subPatterns = preg_split('/[*?]/', $this->_word); + } + if (count($subPatterns) > 1) { + throw new Zend_Search_Lucene_Search_QueryParserException('Fuzzy search doesn\'t support wildcards (except within Keyword fields).'); + } + + + // ------------------------------------- + // Recognize one-term multi-term and "insignificant" queries + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_word, $this->_encoding); + + if (count($tokens) == 0) { + $this->_matches = array(); + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } + + if (count($tokens) == 1) { + $term = new Zend_Search_Lucene_Index_Term($tokens[0]->getTermText(), $this->_field); + $query = new Zend_Search_Lucene_Search_Query_Fuzzy($term, $this->_minimumSimilarity); + $query->setBoost($this->getBoost()); + + // Get rewritten query. Important! It also fills terms matching container. + $rewrittenQuery = $query->rewrite($index); + $this->_matches = $query->getQueryTerms(); + + return $rewrittenQuery; + } + + // Word is tokenized into several tokens + throw new Zend_Search_Lucene_Search_QueryParserException('Fuzzy search is supported only for non-multiple word terms'); + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + /** Skip fields detection. We don't need it, since we expect all fields presented in the HTML body and don't differentiate them */ + + /** Skip exact term matching recognition, keyword fields highlighting is not supported */ + + // ------------------------------------- + // Recognize wildcard queries + + /** @todo check for PCRE unicode support may be performed through Zend_Environment in some future */ + if (@preg_match('/\pL/u', 'a') == 1) { + $subPatterns = preg_split('/[*?]/u', iconv($this->_encoding, 'UTF-8', $this->_word)); + } else { + $subPatterns = preg_split('/[*?]/', $this->_word); + } + if (count($subPatterns) > 1) { + // Do nothing + return; + } + + + // ------------------------------------- + // Recognize one-term multi-term and "insignificant" queries + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_word, $this->_encoding); + if (count($tokens) == 0) { + // Do nothing + return; + } + if (count($tokens) == 1) { + $term = new Zend_Search_Lucene_Index_Term($tokens[0]->getTermText(), $this->_field); + $query = new Zend_Search_Lucene_Search_Query_Fuzzy($term, $this->_minimumSimilarity); + + $query->_highlightMatches($highlighter); + return; + } + + // Word is tokenized into several tokens + // But fuzzy search is supported only for non-multiple word terms + // Do nothing + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + if ($this->_field !== null) { + $query = $this->_field . ':'; + } else { + $query = ''; + } + + $query .= $this->_word; + + if ($this->getBoost() != 1) { + $query .= '^' . round($this->getBoost(), 4); + } + + return $query; + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Phrase.php b/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Phrase.php new file mode 100644 index 000000000..905258eab --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Phrase.php @@ -0,0 +1,257 @@ +_phrase = $phrase; + $this->_phraseEncoding = $phraseEncoding; + $this->_field = $fieldName; + } + + /** + * Set slop + * + * @param integer $slop + */ + public function setSlop($slop) + { + $this->_slop = $slop; + } + + + /** + * Get slop + * + * @return integer + */ + public function getSlop() + { + return $this->_slop; + } + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { +// Allow to use wildcards within phrases +// They are either removed by text analyzer or used as a part of keyword for keyword fields +// +// if (strpos($this->_phrase, '?') !== false || strpos($this->_phrase, '*') !== false) { +// throw new Zend_Search_Lucene_Search_QueryParserException('Wildcards are only allowed in a single terms.'); +// } + + // Split query into subqueries if field name is not specified + if ($this->_field === null) { + $query = new Zend_Search_Lucene_Search_Query_Boolean(); + $query->setBoost($this->getBoost()); + + if (Zend_Search_Lucene::getDefaultSearchField() === null) { + $searchFields = $index->getFieldNames(true); + } else { + $searchFields = array(Zend_Search_Lucene::getDefaultSearchField()); + } + + foreach ($searchFields as $fieldName) { + $subquery = new Zend_Search_Lucene_Search_Query_Preprocessing_Phrase($this->_phrase, + $this->_phraseEncoding, + $fieldName); + $subquery->setSlop($this->getSlop()); + + $query->addSubquery($subquery->rewrite($index)); + } + + $this->_matches = $query->getQueryTerms(); + return $query; + } + + // Recognize exact term matching (it corresponds to Keyword fields stored in the index) + // encoding is not used since we expect binary matching + $term = new Zend_Search_Lucene_Index_Term($this->_phrase, $this->_field); + if ($index->hasTerm($term)) { + $query = new Zend_Search_Lucene_Search_Query_Term($term); + $query->setBoost($this->getBoost()); + + $this->_matches = $query->getQueryTerms(); + return $query; + } + + + // tokenize phrase using current analyzer and process it as a phrase query + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_phrase, $this->_phraseEncoding); + + if (count($tokens) == 0) { + $this->_matches = array(); + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } + + if (count($tokens) == 1) { + $term = new Zend_Search_Lucene_Index_Term($tokens[0]->getTermText(), $this->_field); + $query = new Zend_Search_Lucene_Search_Query_Term($term); + $query->setBoost($this->getBoost()); + + $this->_matches = $query->getQueryTerms(); + return $query; + } + + //It's non-trivial phrase query + $position = -1; + $query = new Zend_Search_Lucene_Search_Query_Phrase(); + foreach ($tokens as $token) { + $position += $token->getPositionIncrement(); + $term = new Zend_Search_Lucene_Index_Term($token->getTermText(), $this->_field); + $query->addTerm($term, $position); + $query->setSlop($this->getSlop()); + } + $this->_matches = $query->getQueryTerms(); + return $query; + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + /** Skip fields detection. We don't need it, since we expect all fields presented in the HTML body and don't differentiate them */ + + /** Skip exact term matching recognition, keyword fields highlighting is not supported */ + + /** Skip wildcard queries recognition. Supported wildcards are removed by text analyzer */ + + + // tokenize phrase using current analyzer and process it as a phrase query + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_phrase, $this->_phraseEncoding); + + if (count($tokens) == 0) { + // Do nothing + return; + } + + if (count($tokens) == 1) { + $highlighter->highlight($tokens[0]->getTermText()); + return; + } + + //It's non-trivial phrase query + $words = array(); + foreach ($tokens as $token) { + $words[] = $token->getTermText(); + } + $highlighter->highlight($words); + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + if ($this->_field !== null) { + $query = $this->_field . ':'; + } else { + $query = ''; + } + + $query .= '"' . $this->_phrase . '"'; + + if ($this->_slop != 0) { + $query .= '~' . $this->_slop; + } + + if ($this->getBoost() != 1) { + $query .= '^' . round($this->getBoost(), 4); + } + + return $query; + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Term.php b/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Term.php new file mode 100644 index 000000000..2a90fde1b --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Preprocessing/Term.php @@ -0,0 +1,319 @@ +_word = $word; + $this->_encoding = $encoding; + $this->_field = $fieldName; + } + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + if ($this->_field === null) { + $query = new Zend_Search_Lucene_Search_Query_MultiTerm(); + $query->setBoost($this->getBoost()); + + $hasInsignificantSubqueries = false; + + if (Zend_Search_Lucene::getDefaultSearchField() === null) { + $searchFields = $index->getFieldNames(true); + } else { + $searchFields = array(Zend_Search_Lucene::getDefaultSearchField()); + } + + foreach ($searchFields as $fieldName) { + $subquery = new Zend_Search_Lucene_Search_Query_Preprocessing_Term($this->_word, + $this->_encoding, + $fieldName); + $rewrittenSubquery = $subquery->rewrite($index); + foreach ($rewrittenSubquery->getQueryTerms() as $term) { + $query->addTerm($term); + } + + if ($rewrittenSubquery instanceof Zend_Search_Lucene_Search_Query_Insignificant) { + $hasInsignificantSubqueries = true; + } + } + + if (count($query->getTerms()) == 0) { + $this->_matches = array(); + if ($hasInsignificantSubqueries) { + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } else { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + } + + $this->_matches = $query->getQueryTerms(); + return $query; + } + + // ------------------------------------- + // Recognize exact term matching (it corresponds to Keyword fields stored in the index) + // encoding is not used since we expect binary matching + $term = new Zend_Search_Lucene_Index_Term($this->_word, $this->_field); + if ($index->hasTerm($term)) { + $query = new Zend_Search_Lucene_Search_Query_Term($term); + $query->setBoost($this->getBoost()); + + $this->_matches = $query->getQueryTerms(); + return $query; + } + + + // ------------------------------------- + // Recognize wildcard queries + + /** @todo check for PCRE unicode support may be performed through Zend_Environment in some future */ + if (@preg_match('/\pL/u', 'a') == 1) { + $word = iconv($this->_encoding, 'UTF-8', $this->_word); + $wildcardsPattern = '/[*?]/u'; + $subPatternsEncoding = 'UTF-8'; + } else { + $word = $this->_word; + $wildcardsPattern = '/[*?]/'; + $subPatternsEncoding = $this->_encoding; + } + + $subPatterns = preg_split($wildcardsPattern, $word, -1, PREG_SPLIT_OFFSET_CAPTURE); + + if (count($subPatterns) > 1) { + // Wildcard query is recognized + + $pattern = ''; + + foreach ($subPatterns as $id => $subPattern) { + // Append corresponding wildcard character to the pattern before each sub-pattern (except first) + if ($id != 0) { + $pattern .= $word[ $subPattern[1] - 1 ]; + } + + // Check if each subputtern is a single word in terms of current analyzer + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($subPattern[0], $subPatternsEncoding); + if (count($tokens) > 1) { + throw new Zend_Search_Lucene_Search_QueryParserException('Wildcard search is supported only for non-multiple word terms'); + } + foreach ($tokens as $token) { + $pattern .= $token->getTermText(); + } + } + + $term = new Zend_Search_Lucene_Index_Term($pattern, $this->_field); + $query = new Zend_Search_Lucene_Search_Query_Wildcard($term); + $query->setBoost($this->getBoost()); + + // Get rewritten query. Important! It also fills terms matching container. + $rewrittenQuery = $query->rewrite($index); + $this->_matches = $query->getQueryTerms(); + + return $rewrittenQuery; + } + + + // ------------------------------------- + // Recognize one-term multi-term and "insignificant" queries + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_word, $this->_encoding); + + if (count($tokens) == 0) { + $this->_matches = array(); + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } + + if (count($tokens) == 1) { + $term = new Zend_Search_Lucene_Index_Term($tokens[0]->getTermText(), $this->_field); + $query = new Zend_Search_Lucene_Search_Query_Term($term); + $query->setBoost($this->getBoost()); + + $this->_matches = $query->getQueryTerms(); + return $query; + } + + //It's not insignificant or one term query + $query = new Zend_Search_Lucene_Search_Query_MultiTerm(); + + /** + * @todo Process $token->getPositionIncrement() to support stemming, synonyms and other + * analizer design features + */ + foreach ($tokens as $token) { + $term = new Zend_Search_Lucene_Index_Term($token->getTermText(), $this->_field); + $query->addTerm($term, true); // all subterms are required + } + + $query->setBoost($this->getBoost()); + + $this->_matches = $query->getQueryTerms(); + return $query; + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + /** Skip fields detection. We don't need it, since we expect all fields presented in the HTML body and don't differentiate them */ + + /** Skip exact term matching recognition, keyword fields highlighting is not supported */ + + // ------------------------------------- + // Recognize wildcard queries + /** @todo check for PCRE unicode support may be performed through Zend_Environment in some future */ + if (@preg_match('/\pL/u', 'a') == 1) { + $word = iconv($this->_encoding, 'UTF-8', $this->_word); + $wildcardsPattern = '/[*?]/u'; + $subPatternsEncoding = 'UTF-8'; + } else { + $word = $this->_word; + $wildcardsPattern = '/[*?]/'; + $subPatternsEncoding = $this->_encoding; + } + $subPatterns = preg_split($wildcardsPattern, $word, -1, PREG_SPLIT_OFFSET_CAPTURE); + if (count($subPatterns) > 1) { + // Wildcard query is recognized + + $pattern = ''; + + foreach ($subPatterns as $id => $subPattern) { + // Append corresponding wildcard character to the pattern before each sub-pattern (except first) + if ($id != 0) { + $pattern .= $word[ $subPattern[1] - 1 ]; + } + + // Check if each subputtern is a single word in terms of current analyzer + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($subPattern[0], $subPatternsEncoding); + if (count($tokens) > 1) { + // Do nothing (nothing is highlighted) + return; + } + foreach ($tokens as $token) { + $pattern .= $token->getTermText(); + } + } + + $term = new Zend_Search_Lucene_Index_Term($pattern, $this->_field); + $query = new Zend_Search_Lucene_Search_Query_Wildcard($term); + + $query->_highlightMatches($highlighter); + return; + } + + + // ------------------------------------- + // Recognize one-term multi-term and "insignificant" queries + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_word, $this->_encoding); + + if (count($tokens) == 0) { + // Do nothing + return; + } + + if (count($tokens) == 1) { + $highlighter->highlight($tokens[0]->getTermText()); + return; + } + + //It's not insignificant or one term query + $words = array(); + foreach ($tokens as $token) { + $words[] = $token->getTermText(); + } + $highlighter->highlight($words); + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + if ($this->_field !== null) { + $query = $this->_field . ':'; + } else { + $query = ''; + } + + $query .= $this->_word; + + if ($this->getBoost() != 1) { + $query .= '^' . round($this->getBoost(), 4); + } + + return $query; + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Range.php b/library/vendor/Zend/Search/Lucene/Search/Query/Range.php new file mode 100644 index 000000000..f04c0dd88 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Range.php @@ -0,0 +1,360 @@ +field != $upperTerm->field) { + throw new Zend_Search_Lucene_Exception('Both terms must be for the same field'); + } + + $this->_field = ($lowerTerm !== null)? $lowerTerm->field : $upperTerm->field; + $this->_lowerTerm = $lowerTerm; + $this->_upperTerm = $upperTerm; + $this->_inclusive = $inclusive; + } + + /** + * Get query field name + * + * @return string|null + */ + public function getField() + { + return $this->_field; + } + + /** + * Get lower term + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function getLowerTerm() + { + return $this->_lowerTerm; + } + + /** + * Get upper term + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function getUpperTerm() + { + return $this->_upperTerm; + } + + /** + * Get upper term + * + * @return boolean + */ + public function isInclusive() + { + return $this->_inclusive; + } + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + $this->_matches = array(); + + if ($this->_field === null) { + // Search through all fields + $fields = $index->getFieldNames(true /* indexed fields list */); + } else { + $fields = array($this->_field); + } + + $maxTerms = Zend_Search_Lucene::getTermsPerQueryLimit(); + foreach ($fields as $field) { + $index->resetTermsStream(); + + if ($this->_lowerTerm !== null) { + $lowerTerm = new Zend_Search_Lucene_Index_Term($this->_lowerTerm->text, $field); + + $index->skipTo($lowerTerm); + + if (!$this->_inclusive && + $index->currentTerm() == $lowerTerm) { + // Skip lower term + $index->nextTerm(); + } + } else { + $index->skipTo(new Zend_Search_Lucene_Index_Term('', $field)); + } + + + if ($this->_upperTerm !== null) { + // Walk up to the upper term + $upperTerm = new Zend_Search_Lucene_Index_Term($this->_upperTerm->text, $field); + + while ($index->currentTerm() !== null && + $index->currentTerm()->field == $field && + strcmp($index->currentTerm()->text, $upperTerm->text) < 0) { + $this->_matches[] = $index->currentTerm(); + + if ($maxTerms != 0 && count($this->_matches) > $maxTerms) { + throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.'); + } + + $index->nextTerm(); + } + + if ($this->_inclusive && $index->currentTerm() == $upperTerm) { + // Include upper term into result + $this->_matches[] = $upperTerm; + } + } else { + // Walk up to the end of field data + while ($index->currentTerm() !== null && $index->currentTerm()->field == $field) { + $this->_matches[] = $index->currentTerm(); + + if ($maxTerms != 0 && count($this->_matches) > $maxTerms) { + throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.'); + } + + $index->nextTerm(); + } + } + + $index->closeTermsStream(); + } + + if (count($this->_matches) == 0) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } else if (count($this->_matches) == 1) { + return new Zend_Search_Lucene_Search_Query_Term(reset($this->_matches)); + } else { + $rewrittenQuery = new Zend_Search_Lucene_Search_Query_MultiTerm(); + + foreach ($this->_matches as $matchedTerm) { + $rewrittenQuery->addTerm($matchedTerm); + } + + return $rewrittenQuery; + } + } + + /** + * Optimize query in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function optimize(Zend_Search_Lucene_Interface $index) + { + throw new Zend_Search_Lucene_Exception('Range query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Return query terms + * + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function getQueryTerms() + { + if ($this->_matches === null) { + throw new Zend_Search_Lucene_Exception('Search or rewrite operations have to be performed before.'); + } + + return $this->_matches; + } + + /** + * Constructs an appropriate Weight implementation for this query. + * + * @param Zend_Search_Lucene_Interface $reader + * @return Zend_Search_Lucene_Search_Weight + * @throws Zend_Search_Lucene_Exception + */ + public function createWeight(Zend_Search_Lucene_Interface $reader) + { + throw new Zend_Search_Lucene_Exception('Range query should not be directly used for search. Use $query->rewrite($index)'); + } + + + /** + * Execute query in context of index reader + * It also initializes necessary internal structures + * + * @param Zend_Search_Lucene_Interface $reader + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @throws Zend_Search_Lucene_Exception + */ + public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null) + { + throw new Zend_Search_Lucene_Exception('Range query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Get document ids likely matching the query + * + * It's an array with document ids as keys (performance considerations) + * + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function matchedDocs() + { + throw new Zend_Search_Lucene_Exception('Range query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Score specified document + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + * @throws Zend_Search_Lucene_Exception + */ + public function score($docId, Zend_Search_Lucene_Interface $reader) + { + throw new Zend_Search_Lucene_Exception('Range query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + $words = array(); + + $docBody = $highlighter->getDocument()->getFieldUtf8Value('body'); + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($docBody, 'UTF-8'); + + $lowerTermText = ($this->_lowerTerm !== null)? $this->_lowerTerm->text : null; + $upperTermText = ($this->_upperTerm !== null)? $this->_upperTerm->text : null; + + if ($this->_inclusive) { + foreach ($tokens as $token) { + $termText = $token->getTermText(); + if (($lowerTermText == null || $lowerTermText <= $termText) && + ($upperTermText == null || $termText <= $upperTermText)) { + $words[] = $termText; + } + } + } else { + foreach ($tokens as $token) { + $termText = $token->getTermText(); + if (($lowerTermText == null || $lowerTermText < $termText) && + ($upperTermText == null || $termText < $upperTermText)) { + $words[] = $termText; + } + } + } + + $highlighter->highlight($words); + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + return (($this->_field === null)? '' : $this->_field . ':') + . (($this->_inclusive)? '[' : '{') + . (($this->_lowerTerm !== null)? $this->_lowerTerm->text : 'null') + . ' TO ' + . (($this->_upperTerm !== null)? $this->_upperTerm->text : 'null') + . (($this->_inclusive)? ']' : '}') + . (($this->getBoost() != 1)? '^' . round($this->getBoost(), 4) : ''); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Term.php b/library/vendor/Zend/Search/Lucene/Search/Query/Term.php new file mode 100644 index 000000000..0b0ebe9a1 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Term.php @@ -0,0 +1,223 @@ + freq, ...) + * + * @var array + */ + private $_termFreqs; + + + /** + * Zend_Search_Lucene_Search_Query_Term constructor + * + * @param Zend_Search_Lucene_Index_Term $term + * @param boolean $sign + */ + public function __construct(Zend_Search_Lucene_Index_Term $term) + { + $this->_term = $term; + } + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + if ($this->_term->field != null) { + return $this; + } else { + $query = new Zend_Search_Lucene_Search_Query_MultiTerm(); + $query->setBoost($this->getBoost()); + + foreach ($index->getFieldNames(true) as $fieldName) { + $term = new Zend_Search_Lucene_Index_Term($this->_term->text, $fieldName); + + $query->addTerm($term); + } + + return $query->rewrite($index); + } + } + + /** + * Optimize query in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function optimize(Zend_Search_Lucene_Interface $index) + { + // Check, that index contains specified term + if (!$index->hasTerm($this->_term)) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } + + return $this; + } + + + /** + * Constructs an appropriate Weight implementation for this query. + * + * @param Zend_Search_Lucene_Interface $reader + * @return Zend_Search_Lucene_Search_Weight + */ + public function createWeight(Zend_Search_Lucene_Interface $reader) + { + $this->_weight = new Zend_Search_Lucene_Search_Weight_Term($this->_term, $this, $reader); + return $this->_weight; + } + + /** + * Execute query in context of index reader + * It also initializes necessary internal structures + * + * @param Zend_Search_Lucene_Interface $reader + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + */ + public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null) + { + $this->_docVector = array_flip($reader->termDocs($this->_term, $docsFilter)); + $this->_termFreqs = $reader->termFreqs($this->_term, $docsFilter); + + // Initialize weight if it's not done yet + $this->_initWeight($reader); + } + + /** + * Get document ids likely matching the query + * + * It's an array with document ids as keys (performance considerations) + * + * @return array + */ + public function matchedDocs() + { + return $this->_docVector; + } + + /** + * Score specified document + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + */ + public function score($docId, Zend_Search_Lucene_Interface $reader) + { + if (isset($this->_docVector[$docId])) { + return $reader->getSimilarity()->tf($this->_termFreqs[$docId]) * + $this->_weight->getValue() * + $reader->norm($docId, $this->_term->field) * + $this->getBoost(); + } else { + return 0; + } + } + + /** + * Return query terms + * + * @return array + */ + public function getQueryTerms() + { + return array($this->_term); + } + + /** + * Return query term + * + * @return Zend_Search_Lucene_Index_Term + */ + public function getTerm() + { + return $this->_term; + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + $highlighter->highlight($this->_term->text); + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + if ($this->_term->field !== null) { + $query = $this->_term->field . ':'; + } else { + $query = ''; + } + + $query .= $this->_term->text; + + if ($this->getBoost() != 1) { + $query = $query . '^' . round($this->getBoost(), 4); + } + + return $query; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Query/Wildcard.php b/library/vendor/Zend/Search/Lucene/Search/Query/Wildcard.php new file mode 100644 index 000000000..2a4ca12a8 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Query/Wildcard.php @@ -0,0 +1,347 @@ +_pattern = $pattern; + } + + /** + * Get minimum prefix length + * + * @return integer + */ + public static function getMinPrefixLength() + { + return self::$_minPrefixLength; + } + + /** + * Set minimum prefix length + * + * @param integer $minPrefixLength + */ + public static function setMinPrefixLength($minPrefixLength) + { + self::$_minPrefixLength = $minPrefixLength; + } + + /** + * Get terms prefix + * + * @param string $word + * @return string + */ + private static function _getPrefix($word) + { + $questionMarkPosition = strpos($word, '?'); + $astrericPosition = strpos($word, '*'); + + if ($questionMarkPosition !== false) { + if ($astrericPosition !== false) { + return substr($word, 0, min($questionMarkPosition, $astrericPosition)); + } + + return substr($word, 0, $questionMarkPosition); + } else if ($astrericPosition !== false) { + return substr($word, 0, $astrericPosition); + } + + return $word; + } + + /** + * Re-write query into primitive queries in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + * @throws Zend_Search_Lucene_Exception + */ + public function rewrite(Zend_Search_Lucene_Interface $index) + { + $this->_matches = array(); + + if ($this->_pattern->field === null) { + // Search through all fields + $fields = $index->getFieldNames(true /* indexed fields list */); + } else { + $fields = array($this->_pattern->field); + } + + $prefix = self::_getPrefix($this->_pattern->text); + $prefixLength = strlen($prefix); + $matchExpression = '/^' . str_replace(array('\\?', '\\*'), array('.', '.*') , preg_quote($this->_pattern->text, '/')) . '$/'; + + if ($prefixLength < self::$_minPrefixLength) { + throw new Zend_Search_Lucene_Exception('At least ' . self::$_minPrefixLength . ' non-wildcard characters are required at the beginning of pattern.'); + } + + /** @todo check for PCRE unicode support may be performed through Zend_Environment in some future */ + if (@preg_match('/\pL/u', 'a') == 1) { + // PCRE unicode support is turned on + // add Unicode modifier to the match expression + $matchExpression .= 'u'; + } + + $maxTerms = Zend_Search_Lucene::getTermsPerQueryLimit(); + foreach ($fields as $field) { + $index->resetTermsStream(); + + if ($prefix != '') { + $index->skipTo(new Zend_Search_Lucene_Index_Term($prefix, $field)); + + while ($index->currentTerm() !== null && + $index->currentTerm()->field == $field && + substr($index->currentTerm()->text, 0, $prefixLength) == $prefix) { + if (preg_match($matchExpression, $index->currentTerm()->text) === 1) { + $this->_matches[] = $index->currentTerm(); + + if ($maxTerms != 0 && count($this->_matches) > $maxTerms) { + throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.'); + } + } + + $index->nextTerm(); + } + } else { + $index->skipTo(new Zend_Search_Lucene_Index_Term('', $field)); + + while ($index->currentTerm() !== null && $index->currentTerm()->field == $field) { + if (preg_match($matchExpression, $index->currentTerm()->text) === 1) { + $this->_matches[] = $index->currentTerm(); + + if ($maxTerms != 0 && count($this->_matches) > $maxTerms) { + throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.'); + } + } + + $index->nextTerm(); + } + } + + $index->closeTermsStream(); + } + + if (count($this->_matches) == 0) { + return new Zend_Search_Lucene_Search_Query_Empty(); + } else if (count($this->_matches) == 1) { + return new Zend_Search_Lucene_Search_Query_Term(reset($this->_matches)); + } else { + $rewrittenQuery = new Zend_Search_Lucene_Search_Query_MultiTerm(); + + foreach ($this->_matches as $matchedTerm) { + $rewrittenQuery->addTerm($matchedTerm); + } + + return $rewrittenQuery; + } + } + + /** + * Optimize query in the context of specified index + * + * @param Zend_Search_Lucene_Interface $index + * @return Zend_Search_Lucene_Search_Query + */ + public function optimize(Zend_Search_Lucene_Interface $index) + { + throw new Zend_Search_Lucene_Exception('Wildcard query should not be directly used for search. Use $query->rewrite($index)'); + } + + + /** + * Returns query pattern + * + * @return Zend_Search_Lucene_Index_Term + */ + public function getPattern() + { + return $this->_pattern; + } + + + /** + * Return query terms + * + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function getQueryTerms() + { + if ($this->_matches === null) { + throw new Zend_Search_Lucene_Exception('Search has to be performed first to get matched terms'); + } + + return $this->_matches; + } + + /** + * Constructs an appropriate Weight implementation for this query. + * + * @param Zend_Search_Lucene_Interface $reader + * @return Zend_Search_Lucene_Search_Weight + * @throws Zend_Search_Lucene_Exception + */ + public function createWeight(Zend_Search_Lucene_Interface $reader) + { + throw new Zend_Search_Lucene_Exception('Wildcard query should not be directly used for search. Use $query->rewrite($index)'); + } + + + /** + * Execute query in context of index reader + * It also initializes necessary internal structures + * + * @param Zend_Search_Lucene_Interface $reader + * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter + * @throws Zend_Search_Lucene_Exception + */ + public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null) + { + throw new Zend_Search_Lucene_Exception('Wildcard query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Get document ids likely matching the query + * + * It's an array with document ids as keys (performance considerations) + * + * @return array + * @throws Zend_Search_Lucene_Exception + */ + public function matchedDocs() + { + throw new Zend_Search_Lucene_Exception('Wildcard query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Score specified document + * + * @param integer $docId + * @param Zend_Search_Lucene_Interface $reader + * @return float + * @throws Zend_Search_Lucene_Exception + */ + public function score($docId, Zend_Search_Lucene_Interface $reader) + { + throw new Zend_Search_Lucene_Exception('Wildcard query should not be directly used for search. Use $query->rewrite($index)'); + } + + /** + * Query specific matches highlighting + * + * @param Zend_Search_Lucene_Search_Highlighter_Interface $highlighter Highlighter object (also contains doc for highlighting) + */ + protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter) + { + $words = array(); + + $matchExpression = '/^' . str_replace(array('\\?', '\\*'), array('.', '.*') , preg_quote($this->_pattern->text, '/')) . '$/'; + if (@preg_match('/\pL/u', 'a') == 1) { + // PCRE unicode support is turned on + // add Unicode modifier to the match expression + $matchExpression .= 'u'; + } + + $docBody = $highlighter->getDocument()->getFieldUtf8Value('body'); + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($docBody, 'UTF-8'); + foreach ($tokens as $token) { + if (preg_match($matchExpression, $token->getTermText()) === 1) { + $words[] = $token->getTermText(); + } + } + + $highlighter->highlight($words); + } + + /** + * Print a query + * + * @return string + */ + public function __toString() + { + // It's used only for query visualisation, so we don't care about characters escaping + if ($this->_pattern->field !== null) { + $query = $this->_pattern->field . ':'; + } else { + $query = ''; + } + + $query .= $this->_pattern->text; + + if ($this->getBoost() != 1) { + $query = $query . '^' . round($this->getBoost(), 4); + } + + return $query; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryEntry.php b/library/vendor/Zend/Search/Lucene/Search/QueryEntry.php new file mode 100644 index 000000000..5214a40d0 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryEntry.php @@ -0,0 +1,67 @@ +_boost *= $boostFactor; + } + + +} diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Phrase.php b/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Phrase.php new file mode 100644 index 000000000..fefe02cf0 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Phrase.php @@ -0,0 +1,114 @@ +_phrase = $phrase; + $this->_field = $field; + } + + /** + * Process modifier ('~') + * + * @param mixed $parameter + */ + public function processFuzzyProximityModifier($parameter = null) + { + $this->_proximityQuery = true; + + if ($parameter !== null) { + $this->_wordsDistance = $parameter; + } + } + + /** + * Transform entry to a subquery + * + * @param string $encoding + * @return Zend_Search_Lucene_Search_Query + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public function getQuery($encoding) + { + /** Zend_Search_Lucene_Search_Query_Preprocessing_Phrase */ + $query = new Zend_Search_Lucene_Search_Query_Preprocessing_Phrase($this->_phrase, + $encoding, + ($this->_field !== null)? + iconv($encoding, 'UTF-8', $this->_field) : + null); + + if ($this->_proximityQuery) { + $query->setSlop($this->_wordsDistance); + } + + $query->setBoost($this->_boost); + + return $query; + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Subquery.php b/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Subquery.php new file mode 100644 index 000000000..6dc31c9b8 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Subquery.php @@ -0,0 +1,75 @@ +_query = $query; + } + + /** + * Process modifier ('~') + * + * @param mixed $parameter + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public function processFuzzyProximityModifier($parameter = null) + { + throw new Zend_Search_Lucene_Search_QueryParserException('\'~\' sign must follow term or phrase'); + } + + + /** + * Transform entry to a subquery + * + * @param string $encoding + * @return Zend_Search_Lucene_Search_Query + */ + public function getQuery($encoding) + { + $this->_query->setBoost($this->_boost); + + return $this->_query; + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Term.php b/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Term.php new file mode 100644 index 000000000..0b722cbbd --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryEntry/Term.php @@ -0,0 +1,126 @@ +_term = $term; + $this->_field = $field; + } + + /** + * Process modifier ('~') + * + * @param mixed $parameter + */ + public function processFuzzyProximityModifier($parameter = null) + { + $this->_fuzzyQuery = true; + + if ($parameter !== null) { + $this->_similarity = $parameter; + } else { + /** Zend_Search_Lucene_Search_Query_Fuzzy */ + $this->_similarity = Zend_Search_Lucene_Search_Query_Fuzzy::DEFAULT_MIN_SIMILARITY; + } + } + + /** + * Transform entry to a subquery + * + * @param string $encoding + * @return Zend_Search_Lucene_Search_Query + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public function getQuery($encoding) + { + if ($this->_fuzzyQuery) { + /** Zend_Search_Lucene_Search_Query_Preprocessing_Fuzzy */ + $query = new Zend_Search_Lucene_Search_Query_Preprocessing_Fuzzy($this->_term, + $encoding, + ($this->_field !== null)? + iconv($encoding, 'UTF-8', $this->_field) : + null, + $this->_similarity + ); + $query->setBoost($this->_boost); + return $query; + } + + + /** Zend_Search_Lucene_Search_Query_Preprocessing_Term */ + $query = new Zend_Search_Lucene_Search_Query_Preprocessing_Term($this->_term, + $encoding, + ($this->_field !== null)? + iconv($encoding, 'UTF-8', $this->_field) : + null + ); + $query->setBoost($this->_boost); + return $query; + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryHit.php b/library/vendor/Zend/Search/Lucene/Search/QueryHit.php new file mode 100644 index 000000000..df9fd92ca --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryHit.php @@ -0,0 +1,109 @@ +_index = new Zend_Search_Lucene_Proxy($index); + } + + + /** + * Convenience function for getting fields from the document + * associated with this hit. + * + * @param string $offset + * @return string + */ + public function __get($offset) + { + return $this->getDocument()->getFieldValue($offset); + } + + + /** + * Return the document object for this hit + * + * @return Zend_Search_Lucene_Document + */ + public function getDocument() + { + if (!$this->_document instanceof Zend_Search_Lucene_Document) { + $this->_document = $this->_index->getDocument($this->id); + } + + return $this->_document; + } + + + /** + * Return the index object for this hit + * + * @return Zend_Search_Lucene_Interface + */ + public function getIndex() + { + return $this->_index; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryLexer.php b/library/vendor/Zend/Search/Lucene/Search/QueryLexer.php new file mode 100644 index 000000000..00181ce2b --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryLexer.php @@ -0,0 +1,502 @@ +addRules(array( array(self::ST_WHITE_SPACE, self::IN_WHITE_SPACE, self::ST_WHITE_SPACE), + array(self::ST_WHITE_SPACE, self::IN_SYNT_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_WHITE_SPACE, self::IN_MUTABLE_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_WHITE_SPACE, self::IN_LEXEME_MODIFIER, self::ST_LEXEME_MODIFIER), + array(self::ST_WHITE_SPACE, self::IN_ESCAPE_CHAR, self::ST_ESCAPED_CHAR), + array(self::ST_WHITE_SPACE, self::IN_QUOTE, self::ST_QUOTED_LEXEME), + array(self::ST_WHITE_SPACE, self::IN_DECIMAL_POINT, self::ST_LEXEME), + array(self::ST_WHITE_SPACE, self::IN_ASCII_DIGIT, self::ST_LEXEME), + array(self::ST_WHITE_SPACE, self::IN_CHAR, self::ST_LEXEME) + )); + $this->addRules(array( array(self::ST_SYNT_LEXEME, self::IN_WHITE_SPACE, self::ST_WHITE_SPACE), + array(self::ST_SYNT_LEXEME, self::IN_SYNT_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_SYNT_LEXEME, self::IN_MUTABLE_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_SYNT_LEXEME, self::IN_LEXEME_MODIFIER, self::ST_LEXEME_MODIFIER), + array(self::ST_SYNT_LEXEME, self::IN_ESCAPE_CHAR, self::ST_ESCAPED_CHAR), + array(self::ST_SYNT_LEXEME, self::IN_QUOTE, self::ST_QUOTED_LEXEME), + array(self::ST_SYNT_LEXEME, self::IN_DECIMAL_POINT, self::ST_LEXEME), + array(self::ST_SYNT_LEXEME, self::IN_ASCII_DIGIT, self::ST_LEXEME), + array(self::ST_SYNT_LEXEME, self::IN_CHAR, self::ST_LEXEME) + )); + $this->addRules(array( array(self::ST_LEXEME, self::IN_WHITE_SPACE, self::ST_WHITE_SPACE), + array(self::ST_LEXEME, self::IN_SYNT_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_LEXEME, self::IN_MUTABLE_CHAR, self::ST_LEXEME), + array(self::ST_LEXEME, self::IN_LEXEME_MODIFIER, self::ST_LEXEME_MODIFIER), + array(self::ST_LEXEME, self::IN_ESCAPE_CHAR, self::ST_ESCAPED_CHAR), + + // IN_QUOTE not allowed + array(self::ST_LEXEME, self::IN_QUOTE, self::ST_ERROR, $quoteWithinLexemeErrorAction), + + array(self::ST_LEXEME, self::IN_DECIMAL_POINT, self::ST_LEXEME), + array(self::ST_LEXEME, self::IN_ASCII_DIGIT, self::ST_LEXEME), + array(self::ST_LEXEME, self::IN_CHAR, self::ST_LEXEME) + )); + $this->addRules(array( array(self::ST_QUOTED_LEXEME, self::IN_WHITE_SPACE, self::ST_QUOTED_LEXEME), + array(self::ST_QUOTED_LEXEME, self::IN_SYNT_CHAR, self::ST_QUOTED_LEXEME), + array(self::ST_QUOTED_LEXEME, self::IN_MUTABLE_CHAR, self::ST_QUOTED_LEXEME), + array(self::ST_QUOTED_LEXEME, self::IN_LEXEME_MODIFIER, self::ST_QUOTED_LEXEME), + array(self::ST_QUOTED_LEXEME, self::IN_ESCAPE_CHAR, self::ST_ESCAPED_QCHAR), + array(self::ST_QUOTED_LEXEME, self::IN_QUOTE, self::ST_WHITE_SPACE), + array(self::ST_QUOTED_LEXEME, self::IN_DECIMAL_POINT, self::ST_QUOTED_LEXEME), + array(self::ST_QUOTED_LEXEME, self::IN_ASCII_DIGIT, self::ST_QUOTED_LEXEME), + array(self::ST_QUOTED_LEXEME, self::IN_CHAR, self::ST_QUOTED_LEXEME) + )); + $this->addRules(array( array(self::ST_ESCAPED_CHAR, self::IN_WHITE_SPACE, self::ST_LEXEME), + array(self::ST_ESCAPED_CHAR, self::IN_SYNT_CHAR, self::ST_LEXEME), + array(self::ST_ESCAPED_CHAR, self::IN_MUTABLE_CHAR, self::ST_LEXEME), + array(self::ST_ESCAPED_CHAR, self::IN_LEXEME_MODIFIER, self::ST_LEXEME), + array(self::ST_ESCAPED_CHAR, self::IN_ESCAPE_CHAR, self::ST_LEXEME), + array(self::ST_ESCAPED_CHAR, self::IN_QUOTE, self::ST_LEXEME), + array(self::ST_ESCAPED_CHAR, self::IN_DECIMAL_POINT, self::ST_LEXEME), + array(self::ST_ESCAPED_CHAR, self::IN_ASCII_DIGIT, self::ST_LEXEME), + array(self::ST_ESCAPED_CHAR, self::IN_CHAR, self::ST_LEXEME) + )); + $this->addRules(array( array(self::ST_ESCAPED_QCHAR, self::IN_WHITE_SPACE, self::ST_QUOTED_LEXEME), + array(self::ST_ESCAPED_QCHAR, self::IN_SYNT_CHAR, self::ST_QUOTED_LEXEME), + array(self::ST_ESCAPED_QCHAR, self::IN_MUTABLE_CHAR, self::ST_QUOTED_LEXEME), + array(self::ST_ESCAPED_QCHAR, self::IN_LEXEME_MODIFIER, self::ST_QUOTED_LEXEME), + array(self::ST_ESCAPED_QCHAR, self::IN_ESCAPE_CHAR, self::ST_QUOTED_LEXEME), + array(self::ST_ESCAPED_QCHAR, self::IN_QUOTE, self::ST_QUOTED_LEXEME), + array(self::ST_ESCAPED_QCHAR, self::IN_DECIMAL_POINT, self::ST_QUOTED_LEXEME), + array(self::ST_ESCAPED_QCHAR, self::IN_ASCII_DIGIT, self::ST_QUOTED_LEXEME), + array(self::ST_ESCAPED_QCHAR, self::IN_CHAR, self::ST_QUOTED_LEXEME) + )); + $this->addRules(array( array(self::ST_LEXEME_MODIFIER, self::IN_WHITE_SPACE, self::ST_WHITE_SPACE), + array(self::ST_LEXEME_MODIFIER, self::IN_SYNT_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_LEXEME_MODIFIER, self::IN_MUTABLE_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_LEXEME_MODIFIER, self::IN_LEXEME_MODIFIER, self::ST_LEXEME_MODIFIER), + + // IN_ESCAPE_CHAR not allowed + array(self::ST_LEXEME_MODIFIER, self::IN_ESCAPE_CHAR, self::ST_ERROR, $lexemeModifierErrorAction), + + // IN_QUOTE not allowed + array(self::ST_LEXEME_MODIFIER, self::IN_QUOTE, self::ST_ERROR, $lexemeModifierErrorAction), + + + array(self::ST_LEXEME_MODIFIER, self::IN_DECIMAL_POINT, self::ST_MANTISSA), + array(self::ST_LEXEME_MODIFIER, self::IN_ASCII_DIGIT, self::ST_NUMBER), + + // IN_CHAR not allowed + array(self::ST_LEXEME_MODIFIER, self::IN_CHAR, self::ST_ERROR, $lexemeModifierErrorAction), + )); + $this->addRules(array( array(self::ST_NUMBER, self::IN_WHITE_SPACE, self::ST_WHITE_SPACE), + array(self::ST_NUMBER, self::IN_SYNT_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_NUMBER, self::IN_MUTABLE_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_NUMBER, self::IN_LEXEME_MODIFIER, self::ST_LEXEME_MODIFIER), + + // IN_ESCAPE_CHAR not allowed + array(self::ST_NUMBER, self::IN_ESCAPE_CHAR, self::ST_ERROR, $wrongNumberErrorAction), + + // IN_QUOTE not allowed + array(self::ST_NUMBER, self::IN_QUOTE, self::ST_ERROR, $wrongNumberErrorAction), + + array(self::ST_NUMBER, self::IN_DECIMAL_POINT, self::ST_MANTISSA), + array(self::ST_NUMBER, self::IN_ASCII_DIGIT, self::ST_NUMBER), + + // IN_CHAR not allowed + array(self::ST_NUMBER, self::IN_CHAR, self::ST_ERROR, $wrongNumberErrorAction), + )); + $this->addRules(array( array(self::ST_MANTISSA, self::IN_WHITE_SPACE, self::ST_WHITE_SPACE), + array(self::ST_MANTISSA, self::IN_SYNT_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_MANTISSA, self::IN_MUTABLE_CHAR, self::ST_SYNT_LEXEME), + array(self::ST_MANTISSA, self::IN_LEXEME_MODIFIER, self::ST_LEXEME_MODIFIER), + + // IN_ESCAPE_CHAR not allowed + array(self::ST_MANTISSA, self::IN_ESCAPE_CHAR, self::ST_ERROR, $wrongNumberErrorAction), + + // IN_QUOTE not allowed + array(self::ST_MANTISSA, self::IN_QUOTE, self::ST_ERROR, $wrongNumberErrorAction), + + // IN_DECIMAL_POINT not allowed + array(self::ST_MANTISSA, self::IN_DECIMAL_POINT, self::ST_ERROR, $wrongNumberErrorAction), + + array(self::ST_MANTISSA, self::IN_ASCII_DIGIT, self::ST_MANTISSA), + + // IN_CHAR not allowed + array(self::ST_MANTISSA, self::IN_CHAR, self::ST_ERROR, $wrongNumberErrorAction), + )); + + + /** Actions */ + $syntaxLexemeAction = new Zend_Search_Lucene_FSMAction($this, 'addQuerySyntaxLexeme'); + $lexemeModifierAction = new Zend_Search_Lucene_FSMAction($this, 'addLexemeModifier'); + $addLexemeAction = new Zend_Search_Lucene_FSMAction($this, 'addLexeme'); + $addQuotedLexemeAction = new Zend_Search_Lucene_FSMAction($this, 'addQuotedLexeme'); + $addNumberLexemeAction = new Zend_Search_Lucene_FSMAction($this, 'addNumberLexeme'); + $addLexemeCharAction = new Zend_Search_Lucene_FSMAction($this, 'addLexemeChar'); + + + /** Syntax lexeme */ + $this->addEntryAction(self::ST_SYNT_LEXEME, $syntaxLexemeAction); + // Two lexemes in succession + $this->addTransitionAction(self::ST_SYNT_LEXEME, self::ST_SYNT_LEXEME, $syntaxLexemeAction); + + + /** Lexeme */ + $this->addEntryAction(self::ST_LEXEME, $addLexemeCharAction); + $this->addTransitionAction(self::ST_LEXEME, self::ST_LEXEME, $addLexemeCharAction); + // ST_ESCAPED_CHAR => ST_LEXEME transition is covered by ST_LEXEME entry action + + $this->addTransitionAction(self::ST_LEXEME, self::ST_WHITE_SPACE, $addLexemeAction); + $this->addTransitionAction(self::ST_LEXEME, self::ST_SYNT_LEXEME, $addLexemeAction); + $this->addTransitionAction(self::ST_LEXEME, self::ST_QUOTED_LEXEME, $addLexemeAction); + $this->addTransitionAction(self::ST_LEXEME, self::ST_LEXEME_MODIFIER, $addLexemeAction); + $this->addTransitionAction(self::ST_LEXEME, self::ST_NUMBER, $addLexemeAction); + $this->addTransitionAction(self::ST_LEXEME, self::ST_MANTISSA, $addLexemeAction); + + + /** Quoted lexeme */ + // We don't need entry action (skeep quote) + $this->addTransitionAction(self::ST_QUOTED_LEXEME, self::ST_QUOTED_LEXEME, $addLexemeCharAction); + $this->addTransitionAction(self::ST_ESCAPED_QCHAR, self::ST_QUOTED_LEXEME, $addLexemeCharAction); + // Closing quote changes state to the ST_WHITE_SPACE other states are not used + $this->addTransitionAction(self::ST_QUOTED_LEXEME, self::ST_WHITE_SPACE, $addQuotedLexemeAction); + + + /** Lexeme modifier */ + $this->addEntryAction(self::ST_LEXEME_MODIFIER, $lexemeModifierAction); + + + /** Number */ + $this->addEntryAction(self::ST_NUMBER, $addLexemeCharAction); + $this->addEntryAction(self::ST_MANTISSA, $addLexemeCharAction); + $this->addTransitionAction(self::ST_NUMBER, self::ST_NUMBER, $addLexemeCharAction); + // ST_NUMBER => ST_MANTISSA transition is covered by ST_MANTISSA entry action + $this->addTransitionAction(self::ST_MANTISSA, self::ST_MANTISSA, $addLexemeCharAction); + + $this->addTransitionAction(self::ST_NUMBER, self::ST_WHITE_SPACE, $addNumberLexemeAction); + $this->addTransitionAction(self::ST_NUMBER, self::ST_SYNT_LEXEME, $addNumberLexemeAction); + $this->addTransitionAction(self::ST_NUMBER, self::ST_LEXEME_MODIFIER, $addNumberLexemeAction); + $this->addTransitionAction(self::ST_MANTISSA, self::ST_WHITE_SPACE, $addNumberLexemeAction); + $this->addTransitionAction(self::ST_MANTISSA, self::ST_SYNT_LEXEME, $addNumberLexemeAction); + $this->addTransitionAction(self::ST_MANTISSA, self::ST_LEXEME_MODIFIER, $addNumberLexemeAction); + } + + + + + /** + * Translate input char to an input symbol of state machine + * + * @param string $char + * @return integer + */ + private function _translateInput($char) + { + if (strpos(self::QUERY_WHITE_SPACE_CHARS, $char) !== false) { return self::IN_WHITE_SPACE; + } else if (strpos(self::QUERY_SYNT_CHARS, $char) !== false) { return self::IN_SYNT_CHAR; + } else if (strpos(self::QUERY_MUTABLE_CHARS, $char) !== false) { return self::IN_MUTABLE_CHAR; + } else if (strpos(self::QUERY_LEXEMEMODIFIER_CHARS, $char) !== false) { return self::IN_LEXEME_MODIFIER; + } else if (strpos(self::QUERY_ASCIIDIGITS_CHARS, $char) !== false) { return self::IN_ASCII_DIGIT; + } else if ($char === '"' ) { return self::IN_QUOTE; + } else if ($char === '.' ) { return self::IN_DECIMAL_POINT; + } else if ($char === '\\') { return self::IN_ESCAPE_CHAR; + } else { return self::IN_CHAR; + } + } + + + /** + * This method is used to tokenize query string into lexemes + * + * @param string $inputString + * @param string $encoding + * @return array + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public function tokenize($inputString, $encoding) + { + $this->reset(); + + $this->_lexemes = array(); + $this->_queryString = array(); + + if (PHP_OS == 'AIX' && $encoding == '') { + $encoding = 'ISO8859-1'; + } + $strLength = iconv_strlen($inputString, $encoding); + + // Workaround for iconv_substr bug + $inputString .= ' '; + + for ($count = 0; $count < $strLength; $count++) { + $this->_queryString[$count] = iconv_substr($inputString, $count, 1, $encoding); + } + + for ($this->_queryStringPosition = 0; + $this->_queryStringPosition < count($this->_queryString); + $this->_queryStringPosition++) { + $this->process($this->_translateInput($this->_queryString[$this->_queryStringPosition])); + } + + $this->process(self::IN_WHITE_SPACE); + + if ($this->getState() != self::ST_WHITE_SPACE) { + throw new Zend_Search_Lucene_Search_QueryParserException('Unexpected end of query'); + } + + $this->_queryString = null; + + return $this->_lexemes; + } + + + + /********************************************************************* + * Actions implementation + * + * Actions affect on recognized lexemes list + *********************************************************************/ + + /** + * Add query syntax lexeme + * + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public function addQuerySyntaxLexeme() + { + $lexeme = $this->_queryString[$this->_queryStringPosition]; + + // Process two char lexemes + if (strpos(self::QUERY_DOUBLECHARLEXEME_CHARS, $lexeme) !== false) { + // increase current position in a query string + $this->_queryStringPosition++; + + // check, + if ($this->_queryStringPosition == count($this->_queryString) || + $this->_queryString[$this->_queryStringPosition] != $lexeme) { + throw new Zend_Search_Lucene_Search_QueryParserException('Two chars lexeme expected. ' . $this->_positionMsg()); + } + + // duplicate character + $lexeme .= $lexeme; + } + + $token = new Zend_Search_Lucene_Search_QueryToken( + Zend_Search_Lucene_Search_QueryToken::TC_SYNTAX_ELEMENT, + $lexeme, + $this->_queryStringPosition); + + // Skip this lexeme if it's a field indicator ':' and treat previous as 'field' instead of 'word' + if ($token->type == Zend_Search_Lucene_Search_QueryToken::TT_FIELD_INDICATOR) { + $token = array_pop($this->_lexemes); + if ($token === null || $token->type != Zend_Search_Lucene_Search_QueryToken::TT_WORD) { + throw new Zend_Search_Lucene_Search_QueryParserException('Field mark \':\' must follow field name. ' . $this->_positionMsg()); + } + + $token->type = Zend_Search_Lucene_Search_QueryToken::TT_FIELD; + } + + $this->_lexemes[] = $token; + } + + /** + * Add lexeme modifier + */ + public function addLexemeModifier() + { + $this->_lexemes[] = new Zend_Search_Lucene_Search_QueryToken( + Zend_Search_Lucene_Search_QueryToken::TC_SYNTAX_ELEMENT, + $this->_queryString[$this->_queryStringPosition], + $this->_queryStringPosition); + } + + + /** + * Add lexeme + */ + public function addLexeme() + { + $this->_lexemes[] = new Zend_Search_Lucene_Search_QueryToken( + Zend_Search_Lucene_Search_QueryToken::TC_WORD, + $this->_currentLexeme, + $this->_queryStringPosition - 1); + + $this->_currentLexeme = ''; + } + + /** + * Add quoted lexeme + */ + public function addQuotedLexeme() + { + $this->_lexemes[] = new Zend_Search_Lucene_Search_QueryToken( + Zend_Search_Lucene_Search_QueryToken::TC_PHRASE, + $this->_currentLexeme, + $this->_queryStringPosition); + + $this->_currentLexeme = ''; + } + + /** + * Add number lexeme + */ + public function addNumberLexeme() + { + $this->_lexemes[] = new Zend_Search_Lucene_Search_QueryToken( + Zend_Search_Lucene_Search_QueryToken::TC_NUMBER, + $this->_currentLexeme, + $this->_queryStringPosition - 1); + $this->_currentLexeme = ''; + } + + /** + * Extend lexeme by one char + */ + public function addLexemeChar() + { + $this->_currentLexeme .= $this->_queryString[$this->_queryStringPosition]; + } + + + /** + * Position message + * + * @return string + */ + private function _positionMsg() + { + return 'Position is ' . $this->_queryStringPosition . '.'; + } + + + /********************************************************************* + * Syntax errors actions + *********************************************************************/ + public function lexModifierErrException() + { + throw new Zend_Search_Lucene_Search_QueryParserException('Lexeme modifier character can be followed only by number, white space or query syntax element. ' . $this->_positionMsg()); + } + public function quoteWithinLexemeErrException() + { + throw new Zend_Search_Lucene_Search_QueryParserException('Quote within lexeme must be escaped by \'\\\' char. ' . $this->_positionMsg()); + } + public function wrongNumberErrException() + { + throw new Zend_Search_Lucene_Search_QueryParserException('Wrong number syntax.' . $this->_positionMsg()); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryParser.php b/library/vendor/Zend/Search/Lucene/Search/QueryParser.php new file mode 100644 index 000000000..a645ae9ce --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryParser.php @@ -0,0 +1,603 @@ +addRules( + array(array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_WORD, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_PHRASE, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_FIELD, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_REQUIRED, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_PROHIBITED, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_FUZZY_PROX_MARK, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_BOOSTING_MARK, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_RANGE_INCL_START, self::ST_CLOSEDINT_RQ_START), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_RANGE_EXCL_START, self::ST_OPENEDINT_RQ_START), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_SUBQUERY_START, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_SUBQUERY_END, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_AND_LEXEME, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_OR_LEXEME, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_NOT_LEXEME, self::ST_COMMON_QUERY_ELEMENT), + array(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_NUMBER, self::ST_COMMON_QUERY_ELEMENT) + )); + $this->addRules( + array(array(self::ST_CLOSEDINT_RQ_START, Zend_Search_Lucene_Search_QueryToken::TT_WORD, self::ST_CLOSEDINT_RQ_FIRST_TERM), + array(self::ST_CLOSEDINT_RQ_FIRST_TERM, Zend_Search_Lucene_Search_QueryToken::TT_TO_LEXEME, self::ST_CLOSEDINT_RQ_TO_TERM), + array(self::ST_CLOSEDINT_RQ_TO_TERM, Zend_Search_Lucene_Search_QueryToken::TT_WORD, self::ST_CLOSEDINT_RQ_LAST_TERM), + array(self::ST_CLOSEDINT_RQ_LAST_TERM, Zend_Search_Lucene_Search_QueryToken::TT_RANGE_INCL_END, self::ST_COMMON_QUERY_ELEMENT) + )); + $this->addRules( + array(array(self::ST_OPENEDINT_RQ_START, Zend_Search_Lucene_Search_QueryToken::TT_WORD, self::ST_OPENEDINT_RQ_FIRST_TERM), + array(self::ST_OPENEDINT_RQ_FIRST_TERM, Zend_Search_Lucene_Search_QueryToken::TT_TO_LEXEME, self::ST_OPENEDINT_RQ_TO_TERM), + array(self::ST_OPENEDINT_RQ_TO_TERM, Zend_Search_Lucene_Search_QueryToken::TT_WORD, self::ST_OPENEDINT_RQ_LAST_TERM), + array(self::ST_OPENEDINT_RQ_LAST_TERM, Zend_Search_Lucene_Search_QueryToken::TT_RANGE_EXCL_END, self::ST_COMMON_QUERY_ELEMENT) + )); + + + + $addTermEntryAction = new Zend_Search_Lucene_FSMAction($this, 'addTermEntry'); + $addPhraseEntryAction = new Zend_Search_Lucene_FSMAction($this, 'addPhraseEntry'); + $setFieldAction = new Zend_Search_Lucene_FSMAction($this, 'setField'); + $setSignAction = new Zend_Search_Lucene_FSMAction($this, 'setSign'); + $setFuzzyProxAction = new Zend_Search_Lucene_FSMAction($this, 'processFuzzyProximityModifier'); + $processModifierParameterAction = new Zend_Search_Lucene_FSMAction($this, 'processModifierParameter'); + $subqueryStartAction = new Zend_Search_Lucene_FSMAction($this, 'subqueryStart'); + $subqueryEndAction = new Zend_Search_Lucene_FSMAction($this, 'subqueryEnd'); + $logicalOperatorAction = new Zend_Search_Lucene_FSMAction($this, 'logicalOperator'); + $openedRQFirstTermAction = new Zend_Search_Lucene_FSMAction($this, 'openedRQFirstTerm'); + $openedRQLastTermAction = new Zend_Search_Lucene_FSMAction($this, 'openedRQLastTerm'); + $closedRQFirstTermAction = new Zend_Search_Lucene_FSMAction($this, 'closedRQFirstTerm'); + $closedRQLastTermAction = new Zend_Search_Lucene_FSMAction($this, 'closedRQLastTerm'); + + + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_WORD, $addTermEntryAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_PHRASE, $addPhraseEntryAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_FIELD, $setFieldAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_REQUIRED, $setSignAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_PROHIBITED, $setSignAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_FUZZY_PROX_MARK, $setFuzzyProxAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_NUMBER, $processModifierParameterAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_SUBQUERY_START, $subqueryStartAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_SUBQUERY_END, $subqueryEndAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_AND_LEXEME, $logicalOperatorAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_OR_LEXEME, $logicalOperatorAction); + $this->addInputAction(self::ST_COMMON_QUERY_ELEMENT, Zend_Search_Lucene_Search_QueryToken::TT_NOT_LEXEME, $logicalOperatorAction); + + $this->addEntryAction(self::ST_OPENEDINT_RQ_FIRST_TERM, $openedRQFirstTermAction); + $this->addEntryAction(self::ST_OPENEDINT_RQ_LAST_TERM, $openedRQLastTermAction); + $this->addEntryAction(self::ST_CLOSEDINT_RQ_FIRST_TERM, $closedRQFirstTermAction); + $this->addEntryAction(self::ST_CLOSEDINT_RQ_LAST_TERM, $closedRQLastTermAction); + + + $this->_lexer = new Zend_Search_Lucene_Search_QueryLexer(); + } + + /** + * Get query parser instance + * + * @return Zend_Search_Lucene_Search_QueryParser + */ + private static function _getInstance() + { + if (self::$_instance === null) { + self::$_instance = new self(); + } + return self::$_instance; + } + + /** + * Set query string default encoding + * + * @param string $encoding + */ + public static function setDefaultEncoding($encoding) + { + self::_getInstance()->_defaultEncoding = $encoding; + } + + /** + * Get query string default encoding + * + * @return string + */ + public static function getDefaultEncoding() + { + return self::_getInstance()->_defaultEncoding; + } + + /** + * Set default boolean operator + * + * @param integer $operator + */ + public static function setDefaultOperator($operator) + { + self::_getInstance()->_defaultOperator = $operator; + } + + /** + * Get default boolean operator + * + * @return integer + */ + public static function getDefaultOperator() + { + return self::_getInstance()->_defaultOperator; + } + + /** + * Turn on 'suppress query parser exceptions' mode. + */ + public static function suppressQueryParsingExceptions() + { + self::_getInstance()->_suppressQueryParsingExceptions = true; + } + /** + * Turn off 'suppress query parser exceptions' mode. + */ + public static function dontSuppressQueryParsingExceptions() + { + self::_getInstance()->_suppressQueryParsingExceptions = false; + } + /** + * Check 'suppress query parser exceptions' mode. + * @return boolean + */ + public static function queryParsingExceptionsSuppressed() + { + return self::_getInstance()->_suppressQueryParsingExceptions; + } + + + /** + * Escape keyword to force it to be parsed as one term + * + * @param string $keyword + * @return string + */ + public static function escape($keyword) + { + return '\\' . implode('\\', str_split($keyword)); + } + + /** + * Parses a query string + * + * @param string $strQuery + * @param string $encoding + * @return Zend_Search_Lucene_Search_Query + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public static function parse($strQuery, $encoding = null) + { + self::_getInstance(); + + // Reset FSM if previous parse operation didn't return it into a correct state + self::$_instance->reset(); + + try { + + self::$_instance->_encoding = ($encoding !== null) ? $encoding : self::$_instance->_defaultEncoding; + self::$_instance->_lastToken = null; + self::$_instance->_context = new Zend_Search_Lucene_Search_QueryParserContext(self::$_instance->_encoding); + self::$_instance->_contextStack = array(); + self::$_instance->_tokens = self::$_instance->_lexer->tokenize($strQuery, self::$_instance->_encoding); + + // Empty query + if (count(self::$_instance->_tokens) == 0) { + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } + + + foreach (self::$_instance->_tokens as $token) { + try { + self::$_instance->_currentToken = $token; + self::$_instance->process($token->type); + + self::$_instance->_lastToken = $token; + } catch (Exception $e) { + if (strpos($e->getMessage(), 'There is no any rule for') !== false) { + throw new Zend_Search_Lucene_Search_QueryParserException( 'Syntax error at char position ' . $token->position . '.', 0, $e); + } + + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + } + + if (count(self::$_instance->_contextStack) != 0) { + throw new Zend_Search_Lucene_Search_QueryParserException('Syntax Error: mismatched parentheses, every opening must have closing.' ); + } + + return self::$_instance->_context->getQuery(); + } catch (Zend_Search_Lucene_Search_QueryParserException $e) { + if (self::$_instance->_suppressQueryParsingExceptions) { + $queryTokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($strQuery, self::$_instance->_encoding); + + $query = new Zend_Search_Lucene_Search_Query_MultiTerm(); + $termsSign = (self::$_instance->_defaultOperator == self::B_AND) ? true /* required term */ : + null /* optional term */; + + foreach ($queryTokens as $token) { + $query->addTerm(new Zend_Search_Lucene_Index_Term($token->getTermText()), $termsSign); + } + + + return $query; + } else { + throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e); + } + } + } + + /********************************************************************* + * Actions implementation + * + * Actions affect on recognized lexemes list + *********************************************************************/ + + /** + * Add term to a query + */ + public function addTermEntry() + { + $entry = new Zend_Search_Lucene_Search_QueryEntry_Term($this->_currentToken->text, $this->_context->getField()); + $this->_context->addEntry($entry); + } + + /** + * Add phrase to a query + */ + public function addPhraseEntry() + { + $entry = new Zend_Search_Lucene_Search_QueryEntry_Phrase($this->_currentToken->text, $this->_context->getField()); + $this->_context->addEntry($entry); + } + + /** + * Set entry field + */ + public function setField() + { + $this->_context->setNextEntryField($this->_currentToken->text); + } + + /** + * Set entry sign + */ + public function setSign() + { + $this->_context->setNextEntrySign($this->_currentToken->type); + } + + + /** + * Process fuzzy search/proximity modifier - '~' + */ + public function processFuzzyProximityModifier() + { + $this->_context->processFuzzyProximityModifier(); + } + + /** + * Process modifier parameter + * + * @throws Zend_Search_Lucene_Exception + */ + public function processModifierParameter() + { + if ($this->_lastToken === null) { + throw new Zend_Search_Lucene_Search_QueryParserException('Lexeme modifier parameter must follow lexeme modifier. Char position 0.' ); + } + + switch ($this->_lastToken->type) { + case Zend_Search_Lucene_Search_QueryToken::TT_FUZZY_PROX_MARK: + $this->_context->processFuzzyProximityModifier($this->_currentToken->text); + break; + + case Zend_Search_Lucene_Search_QueryToken::TT_BOOSTING_MARK: + $this->_context->boost($this->_currentToken->text); + break; + + default: + // It's not a user input exception + throw new Zend_Search_Lucene_Exception('Lexeme modifier parameter must follow lexeme modifier. Char position 0.' ); + } + } + + + /** + * Start subquery + */ + public function subqueryStart() + { + + $this->_contextStack[] = $this->_context; + $this->_context = new Zend_Search_Lucene_Search_QueryParserContext($this->_encoding, $this->_context->getField()); + } + + /** + * End subquery + */ + public function subqueryEnd() + { + if (count($this->_contextStack) == 0) { + throw new Zend_Search_Lucene_Search_QueryParserException('Syntax Error: mismatched parentheses, every opening must have closing. Char position ' . $this->_currentToken->position . '.' ); + } + + $query = $this->_context->getQuery(); + $this->_context = array_pop($this->_contextStack); + + $this->_context->addEntry(new Zend_Search_Lucene_Search_QueryEntry_Subquery($query)); + } + + /** + * Process logical operator + */ + public function logicalOperator() + { + $this->_context->addLogicalOperator($this->_currentToken->type); + } + + /** + * Process first range query term (opened interval) + */ + public function openedRQFirstTerm() + { + $this->_rqFirstTerm = $this->_currentToken->text; + } + + /** + * Process last range query term (opened interval) + * + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public function openedRQLastTerm() + { + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_rqFirstTerm, $this->_encoding); + if (count($tokens) > 1) { + throw new Zend_Search_Lucene_Search_QueryParserException('Range query boundary terms must be non-multiple word terms'); + } else if (count($tokens) == 1) { + $from = new Zend_Search_Lucene_Index_Term(reset($tokens)->getTermText(), $this->_context->getField()); + } else { + $from = null; + } + + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_currentToken->text, $this->_encoding); + if (count($tokens) > 1) { + throw new Zend_Search_Lucene_Search_QueryParserException('Range query boundary terms must be non-multiple word terms'); + } else if (count($tokens) == 1) { + $to = new Zend_Search_Lucene_Index_Term(reset($tokens)->getTermText(), $this->_context->getField()); + } else { + $to = null; + } + + if ($from === null && $to === null) { + throw new Zend_Search_Lucene_Search_QueryParserException('At least one range query boundary term must be non-empty term'); + } + + $rangeQuery = new Zend_Search_Lucene_Search_Query_Range($from, $to, false); + $entry = new Zend_Search_Lucene_Search_QueryEntry_Subquery($rangeQuery); + $this->_context->addEntry($entry); + } + + /** + * Process first range query term (closed interval) + */ + public function closedRQFirstTerm() + { + $this->_rqFirstTerm = $this->_currentToken->text; + } + + /** + * Process last range query term (closed interval) + * + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public function closedRQLastTerm() + { + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_rqFirstTerm, $this->_encoding); + if (count($tokens) > 1) { + throw new Zend_Search_Lucene_Search_QueryParserException('Range query boundary terms must be non-multiple word terms'); + } else if (count($tokens) == 1) { + $from = new Zend_Search_Lucene_Index_Term(reset($tokens)->getTermText(), $this->_context->getField()); + } else { + $from = null; + } + + $tokens = Zend_Search_Lucene_Analysis_Analyzer::getDefault()->tokenize($this->_currentToken->text, $this->_encoding); + if (count($tokens) > 1) { + throw new Zend_Search_Lucene_Search_QueryParserException('Range query boundary terms must be non-multiple word terms'); + } else if (count($tokens) == 1) { + $to = new Zend_Search_Lucene_Index_Term(reset($tokens)->getTermText(), $this->_context->getField()); + } else { + $to = null; + } + + if ($from === null && $to === null) { + throw new Zend_Search_Lucene_Search_QueryParserException('At least one range query boundary term must be non-empty term'); + } + + $rangeQuery = new Zend_Search_Lucene_Search_Query_Range($from, $to, true); + $entry = new Zend_Search_Lucene_Search_QueryEntry_Subquery($rangeQuery); + $this->_context->addEntry($entry); + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryParserContext.php b/library/vendor/Zend/Search/Lucene/Search/QueryParserContext.php new file mode 100644 index 000000000..e9c80df1a --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryParserContext.php @@ -0,0 +1,385 @@ +_encoding = $encoding; + $this->_defaultField = $defaultField; + } + + + /** + * Get context default field + * + * @return string|null + */ + public function getField() + { + return ($this->_nextEntryField !== null) ? $this->_nextEntryField : $this->_defaultField; + } + + /** + * Set field for next entry + * + * @param string $field + */ + public function setNextEntryField($field) + { + $this->_nextEntryField = $field; + } + + + /** + * Set sign for next entry + * + * @param integer $sign + * @throws Zend_Search_Lucene_Exception + */ + public function setNextEntrySign($sign) + { + if ($this->_mode === self::GM_BOOLEAN) { + throw new Zend_Search_Lucene_Search_QueryParserException('It\'s not allowed to mix boolean and signs styles in the same subquery.'); + } + + $this->_mode = self::GM_SIGNS; + + if ($sign == Zend_Search_Lucene_Search_QueryToken::TT_REQUIRED) { + $this->_nextEntrySign = true; + } else if ($sign == Zend_Search_Lucene_Search_QueryToken::TT_PROHIBITED) { + $this->_nextEntrySign = false; + } else { + throw new Zend_Search_Lucene_Exception('Unrecognized sign type.'); + } + } + + + /** + * Add entry to a query + * + * @param Zend_Search_Lucene_Search_QueryEntry $entry + */ + public function addEntry(Zend_Search_Lucene_Search_QueryEntry $entry) + { + if ($this->_mode !== self::GM_BOOLEAN) { + $this->_signs[] = $this->_nextEntrySign; + } + + $this->_entries[] = $entry; + + $this->_nextEntryField = null; + $this->_nextEntrySign = null; + } + + + /** + * Process fuzzy search or proximity search modifier + * + * @throws Zend_Search_Lucene_Search_QueryParserException + */ + public function processFuzzyProximityModifier($parameter = null) + { + // Check, that modifier has came just after word or phrase + if ($this->_nextEntryField !== null || $this->_nextEntrySign !== null) { + throw new Zend_Search_Lucene_Search_QueryParserException('\'~\' modifier must follow word or phrase.'); + } + + $lastEntry = array_pop($this->_entries); + + if (!$lastEntry instanceof Zend_Search_Lucene_Search_QueryEntry) { + // there are no entries or last entry is boolean operator + throw new Zend_Search_Lucene_Search_QueryParserException('\'~\' modifier must follow word or phrase.'); + } + + $lastEntry->processFuzzyProximityModifier($parameter); + + $this->_entries[] = $lastEntry; + } + + /** + * Set boost factor to the entry + * + * @param float $boostFactor + */ + public function boost($boostFactor) + { + // Check, that modifier has came just after word or phrase + if ($this->_nextEntryField !== null || $this->_nextEntrySign !== null) { + throw new Zend_Search_Lucene_Search_QueryParserException('\'^\' modifier must follow word, phrase or subquery.'); + } + + $lastEntry = array_pop($this->_entries); + + if (!$lastEntry instanceof Zend_Search_Lucene_Search_QueryEntry) { + // there are no entries or last entry is boolean operator + throw new Zend_Search_Lucene_Search_QueryParserException('\'^\' modifier must follow word, phrase or subquery.'); + } + + $lastEntry->boost($boostFactor); + + $this->_entries[] = $lastEntry; + } + + /** + * Process logical operator + * + * @param integer $operator + */ + public function addLogicalOperator($operator) + { + if ($this->_mode === self::GM_SIGNS) { + throw new Zend_Search_Lucene_Search_QueryParserException('It\'s not allowed to mix boolean and signs styles in the same subquery.'); + } + + $this->_mode = self::GM_BOOLEAN; + + $this->_entries[] = $operator; + } + + + /** + * Generate 'signs style' query from the context + * '+term1 term2 -term3 +() ...' + * + * @return Zend_Search_Lucene_Search_Query + */ + public function _signStyleExpressionQuery() + { + $query = new Zend_Search_Lucene_Search_Query_Boolean(); + + if (Zend_Search_Lucene_Search_QueryParser::getDefaultOperator() == Zend_Search_Lucene_Search_QueryParser::B_AND) { + $defaultSign = true; // required + } else { + // Zend_Search_Lucene_Search_QueryParser::B_OR + $defaultSign = null; // optional + } + + foreach ($this->_entries as $entryId => $entry) { + $sign = ($this->_signs[$entryId] !== null) ? $this->_signs[$entryId] : $defaultSign; + $query->addSubquery($entry->getQuery($this->_encoding), $sign); + } + + return $query; + } + + + /** + * Generate 'boolean style' query from the context + * 'term1 and term2 or term3 and () and not ()' + * + * @return Zend_Search_Lucene_Search_Query + * @throws Zend_Search_Lucene + */ + private function _booleanExpressionQuery() + { + /** + * We treat each level of an expression as a boolean expression in + * a Disjunctive Normal Form + * + * AND operator has higher precedence than OR + * + * Thus logical query is a disjunction of one or more conjunctions of + * one or more query entries + */ + + $expressionRecognizer = new Zend_Search_Lucene_Search_BooleanExpressionRecognizer(); + + try { + foreach ($this->_entries as $entry) { + if ($entry instanceof Zend_Search_Lucene_Search_QueryEntry) { + $expressionRecognizer->processLiteral($entry); + } else { + switch ($entry) { + case Zend_Search_Lucene_Search_QueryToken::TT_AND_LEXEME: + $expressionRecognizer->processOperator(Zend_Search_Lucene_Search_BooleanExpressionRecognizer::IN_AND_OPERATOR); + break; + + case Zend_Search_Lucene_Search_QueryToken::TT_OR_LEXEME: + $expressionRecognizer->processOperator(Zend_Search_Lucene_Search_BooleanExpressionRecognizer::IN_OR_OPERATOR); + break; + + case Zend_Search_Lucene_Search_QueryToken::TT_NOT_LEXEME: + $expressionRecognizer->processOperator(Zend_Search_Lucene_Search_BooleanExpressionRecognizer::IN_NOT_OPERATOR); + break; + + default: + throw new Zend_Search_Lucene('Boolean expression error. Unknown operator type.'); + } + } + } + + $conjuctions = $expressionRecognizer->finishExpression(); + } catch (Zend_Search_Exception $e) { + // throw new Zend_Search_Lucene_Search_QueryParserException('Boolean expression error. Error message: \'' . + // $e->getMessage() . '\'.' ); + // It's query syntax error message and it should be user friendly. So FSM message is omitted + throw new Zend_Search_Lucene_Search_QueryParserException('Boolean expression error.', 0, $e); + } + + // Remove 'only negative' conjunctions + foreach ($conjuctions as $conjuctionId => $conjuction) { + $nonNegativeEntryFound = false; + + foreach ($conjuction as $conjuctionEntry) { + if ($conjuctionEntry[1]) { + $nonNegativeEntryFound = true; + break; + } + } + + if (!$nonNegativeEntryFound) { + unset($conjuctions[$conjuctionId]); + } + } + + + $subqueries = array(); + foreach ($conjuctions as $conjuction) { + // Check, if it's a one term conjuction + if (count($conjuction) == 1) { + $subqueries[] = $conjuction[0][0]->getQuery($this->_encoding); + } else { + $subquery = new Zend_Search_Lucene_Search_Query_Boolean(); + + foreach ($conjuction as $conjuctionEntry) { + $subquery->addSubquery($conjuctionEntry[0]->getQuery($this->_encoding), $conjuctionEntry[1]); + } + + $subqueries[] = $subquery; + } + } + + if (count($subqueries) == 0) { + return new Zend_Search_Lucene_Search_Query_Insignificant(); + } + + if (count($subqueries) == 1) { + return $subqueries[0]; + } + + + $query = new Zend_Search_Lucene_Search_Query_Boolean(); + + foreach ($subqueries as $subquery) { + // Non-requirered entry/subquery + $query->addSubquery($subquery); + } + + return $query; + } + + /** + * Generate query from current context + * + * @return Zend_Search_Lucene_Search_Query + */ + public function getQuery() + { + if ($this->_mode === self::GM_BOOLEAN) { + return $this->_booleanExpressionQuery(); + } else { + return $this->_signStyleExpressionQuery(); + } + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/QueryParserException.php b/library/vendor/Zend/Search/Lucene/Search/QueryParserException.php new file mode 100644 index 000000000..0bd043604 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/QueryParserException.php @@ -0,0 +1,40 @@ + or field:() pairs + const TT_FIELD_INDICATOR = 3; // ':' + const TT_REQUIRED = 4; // '+' + const TT_PROHIBITED = 5; // '-' + const TT_FUZZY_PROX_MARK = 6; // '~' + const TT_BOOSTING_MARK = 7; // '^' + const TT_RANGE_INCL_START = 8; // '[' + const TT_RANGE_INCL_END = 9; // ']' + const TT_RANGE_EXCL_START = 10; // '{' + const TT_RANGE_EXCL_END = 11; // '}' + const TT_SUBQUERY_START = 12; // '(' + const TT_SUBQUERY_END = 13; // ')' + const TT_AND_LEXEME = 14; // 'AND' or 'and' + const TT_OR_LEXEME = 15; // 'OR' or 'or' + const TT_NOT_LEXEME = 16; // 'NOT' or 'not' + const TT_TO_LEXEME = 17; // 'TO' or 'to' + const TT_NUMBER = 18; // Number, like: 10, 0.8, .64, .... + + + /** + * Returns all possible lexeme types. + * It's used for syntax analyzer state machine initialization + * + * @return array + */ + public static function getTypes() + { + return array( self::TT_WORD, + self::TT_PHRASE, + self::TT_FIELD, + self::TT_FIELD_INDICATOR, + self::TT_REQUIRED, + self::TT_PROHIBITED, + self::TT_FUZZY_PROX_MARK, + self::TT_BOOSTING_MARK, + self::TT_RANGE_INCL_START, + self::TT_RANGE_INCL_END, + self::TT_RANGE_EXCL_START, + self::TT_RANGE_EXCL_END, + self::TT_SUBQUERY_START, + self::TT_SUBQUERY_END, + self::TT_AND_LEXEME, + self::TT_OR_LEXEME, + self::TT_NOT_LEXEME, + self::TT_TO_LEXEME, + self::TT_NUMBER + ); + } + + + /** + * TokenCategories + */ + const TC_WORD = 0; // Word + const TC_PHRASE = 1; // Phrase (one or several quoted words) + const TC_NUMBER = 2; // Nubers, which are used with syntax elements. Ex. roam~0.8 + const TC_SYNTAX_ELEMENT = 3; // + - ( ) [ ] { } ! || && ~ ^ + + + /** + * Token type. + * + * @var integer + */ + public $type; + + /** + * Token text. + * + * @var integer + */ + public $text; + + /** + * Token position within query. + * + * @var integer + */ + public $position; + + + /** + * IndexReader constructor needs token type and token text as a parameters. + * + * @param integer $tokenCategory + * @param string $tokText + * @param integer $position + */ + public function __construct($tokenCategory, $tokenText, $position) + { + $this->text = $tokenText; + $this->position = $position + 1; // Start from 1 + + switch ($tokenCategory) { + case self::TC_WORD: + if ( strtolower($tokenText) == 'and') { + $this->type = self::TT_AND_LEXEME; + } else if (strtolower($tokenText) == 'or') { + $this->type = self::TT_OR_LEXEME; + } else if (strtolower($tokenText) == 'not') { + $this->type = self::TT_NOT_LEXEME; + } else if (strtolower($tokenText) == 'to') { + $this->type = self::TT_TO_LEXEME; + } else { + $this->type = self::TT_WORD; + } + break; + + case self::TC_PHRASE: + $this->type = self::TT_PHRASE; + break; + + case self::TC_NUMBER: + $this->type = self::TT_NUMBER; + break; + + case self::TC_SYNTAX_ELEMENT: + switch ($tokenText) { + case ':': + $this->type = self::TT_FIELD_INDICATOR; + break; + + case '+': + $this->type = self::TT_REQUIRED; + break; + + case '-': + $this->type = self::TT_PROHIBITED; + break; + + case '~': + $this->type = self::TT_FUZZY_PROX_MARK; + break; + + case '^': + $this->type = self::TT_BOOSTING_MARK; + break; + + case '[': + $this->type = self::TT_RANGE_INCL_START; + break; + + case ']': + $this->type = self::TT_RANGE_INCL_END; + break; + + case '{': + $this->type = self::TT_RANGE_EXCL_START; + break; + + case '}': + $this->type = self::TT_RANGE_EXCL_END; + break; + + case '(': + $this->type = self::TT_SUBQUERY_START; + break; + + case ')': + $this->type = self::TT_SUBQUERY_END; + break; + + case '!': + $this->type = self::TT_NOT_LEXEME; + break; + + case '&&': + $this->type = self::TT_AND_LEXEME; + break; + + case '||': + $this->type = self::TT_OR_LEXEME; + break; + + default: + throw new Zend_Search_Lucene_Exception('Unrecognized query syntax lexeme: \'' . $tokenText . '\''); + } + break; + + case self::TC_NUMBER: + $this->type = self::TT_NUMBER; + + default: + throw new Zend_Search_Lucene_Exception('Unrecognized lexeme type: \'' . $tokenCategory . '\''); + } + } +} diff --git a/library/vendor/Zend/Search/Lucene/Search/Similarity.php b/library/vendor/Zend/Search/Lucene/Search/Similarity.php new file mode 100644 index 000000000..bc6cb7d67 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Similarity.php @@ -0,0 +1,550 @@ + 0.0, + 1 => 5.820766E-10, + 2 => 6.9849193E-10, + 3 => 8.1490725E-10, + 4 => 9.313226E-10, + 5 => 1.1641532E-9, + 6 => 1.3969839E-9, + 7 => 1.6298145E-9, + 8 => 1.8626451E-9, + 9 => 2.3283064E-9, + 10 => 2.7939677E-9, + 11 => 3.259629E-9, + 12 => 3.7252903E-9, + 13 => 4.656613E-9, + 14 => 5.5879354E-9, + 15 => 6.519258E-9, + 16 => 7.4505806E-9, + 17 => 9.313226E-9, + 18 => 1.1175871E-8, + 19 => 1.3038516E-8, + 20 => 1.4901161E-8, + 21 => 1.8626451E-8, + 22 => 2.2351742E-8, + 23 => 2.6077032E-8, + 24 => 2.9802322E-8, + 25 => 3.7252903E-8, + 26 => 4.4703484E-8, + 27 => 5.2154064E-8, + 28 => 5.9604645E-8, + 29 => 7.4505806E-8, + 30 => 8.940697E-8, + 31 => 1.0430813E-7, + 32 => 1.1920929E-7, + 33 => 1.4901161E-7, + 34 => 1.7881393E-7, + 35 => 2.0861626E-7, + 36 => 2.3841858E-7, + 37 => 2.9802322E-7, + 38 => 3.5762787E-7, + 39 => 4.172325E-7, + 40 => 4.7683716E-7, + 41 => 5.9604645E-7, + 42 => 7.1525574E-7, + 43 => 8.34465E-7, + 44 => 9.536743E-7, + 45 => 1.1920929E-6, + 46 => 1.4305115E-6, + 47 => 1.66893E-6, + 48 => 1.9073486E-6, + 49 => 2.3841858E-6, + 50 => 2.861023E-6, + 51 => 3.33786E-6, + 52 => 3.8146973E-6, + 53 => 4.7683716E-6, + 54 => 5.722046E-6, + 55 => 6.67572E-6, + 56 => 7.6293945E-6, + 57 => 9.536743E-6, + 58 => 1.1444092E-5, + 59 => 1.335144E-5, + 60 => 1.5258789E-5, + 61 => 1.9073486E-5, + 62 => 2.2888184E-5, + 63 => 2.670288E-5, + 64 => 3.0517578E-5, + 65 => 3.8146973E-5, + 66 => 4.5776367E-5, + 67 => 5.340576E-5, + 68 => 6.1035156E-5, + 69 => 7.6293945E-5, + 70 => 9.1552734E-5, + 71 => 1.0681152E-4, + 72 => 1.2207031E-4, + 73 => 1.5258789E-4, + 74 => 1.8310547E-4, + 75 => 2.1362305E-4, + 76 => 2.4414062E-4, + 77 => 3.0517578E-4, + 78 => 3.6621094E-4, + 79 => 4.272461E-4, + 80 => 4.8828125E-4, + 81 => 6.1035156E-4, + 82 => 7.324219E-4, + 83 => 8.544922E-4, + 84 => 9.765625E-4, + 85 => 0.0012207031, + 86 => 0.0014648438, + 87 => 0.0017089844, + 88 => 0.001953125, + 89 => 0.0024414062, + 90 => 0.0029296875, + 91 => 0.0034179688, + 92 => 0.00390625, + 93 => 0.0048828125, + 94 => 0.005859375, + 95 => 0.0068359375, + 96 => 0.0078125, + 97 => 0.009765625, + 98 => 0.01171875, + 99 => 0.013671875, + 100 => 0.015625, + 101 => 0.01953125, + 102 => 0.0234375, + 103 => 0.02734375, + 104 => 0.03125, + 105 => 0.0390625, + 106 => 0.046875, + 107 => 0.0546875, + 108 => 0.0625, + 109 => 0.078125, + 110 => 0.09375, + 111 => 0.109375, + 112 => 0.125, + 113 => 0.15625, + 114 => 0.1875, + 115 => 0.21875, + 116 => 0.25, + 117 => 0.3125, + 118 => 0.375, + 119 => 0.4375, + 120 => 0.5, + 121 => 0.625, + 122 => 0.75, + 123 => 0.875, + 124 => 1.0, + 125 => 1.25, + 126 => 1.5, + 127 => 1.75, + 128 => 2.0, + 129 => 2.5, + 130 => 3.0, + 131 => 3.5, + 132 => 4.0, + 133 => 5.0, + 134 => 6.0, + 135 => 7.0, + 136 => 8.0, + 137 => 10.0, + 138 => 12.0, + 139 => 14.0, + 140 => 16.0, + 141 => 20.0, + 142 => 24.0, + 143 => 28.0, + 144 => 32.0, + 145 => 40.0, + 146 => 48.0, + 147 => 56.0, + 148 => 64.0, + 149 => 80.0, + 150 => 96.0, + 151 => 112.0, + 152 => 128.0, + 153 => 160.0, + 154 => 192.0, + 155 => 224.0, + 156 => 256.0, + 157 => 320.0, + 158 => 384.0, + 159 => 448.0, + 160 => 512.0, + 161 => 640.0, + 162 => 768.0, + 163 => 896.0, + 164 => 1024.0, + 165 => 1280.0, + 166 => 1536.0, + 167 => 1792.0, + 168 => 2048.0, + 169 => 2560.0, + 170 => 3072.0, + 171 => 3584.0, + 172 => 4096.0, + 173 => 5120.0, + 174 => 6144.0, + 175 => 7168.0, + 176 => 8192.0, + 177 => 10240.0, + 178 => 12288.0, + 179 => 14336.0, + 180 => 16384.0, + 181 => 20480.0, + 182 => 24576.0, + 183 => 28672.0, + 184 => 32768.0, + 185 => 40960.0, + 186 => 49152.0, + 187 => 57344.0, + 188 => 65536.0, + 189 => 81920.0, + 190 => 98304.0, + 191 => 114688.0, + 192 => 131072.0, + 193 => 163840.0, + 194 => 196608.0, + 195 => 229376.0, + 196 => 262144.0, + 197 => 327680.0, + 198 => 393216.0, + 199 => 458752.0, + 200 => 524288.0, + 201 => 655360.0, + 202 => 786432.0, + 203 => 917504.0, + 204 => 1048576.0, + 205 => 1310720.0, + 206 => 1572864.0, + 207 => 1835008.0, + 208 => 2097152.0, + 209 => 2621440.0, + 210 => 3145728.0, + 211 => 3670016.0, + 212 => 4194304.0, + 213 => 5242880.0, + 214 => 6291456.0, + 215 => 7340032.0, + 216 => 8388608.0, + 217 => 1.048576E7, + 218 => 1.2582912E7, + 219 => 1.4680064E7, + 220 => 1.6777216E7, + 221 => 2.097152E7, + 222 => 2.5165824E7, + 223 => 2.9360128E7, + 224 => 3.3554432E7, + 225 => 4.194304E7, + 226 => 5.0331648E7, + 227 => 5.8720256E7, + 228 => 6.7108864E7, + 229 => 8.388608E7, + 230 => 1.00663296E8, + 231 => 1.17440512E8, + 232 => 1.34217728E8, + 233 => 1.6777216E8, + 234 => 2.01326592E8, + 235 => 2.34881024E8, + 236 => 2.68435456E8, + 237 => 3.3554432E8, + 238 => 4.02653184E8, + 239 => 4.69762048E8, + 240 => 5.3687091E8, + 241 => 6.7108864E8, + 242 => 8.0530637E8, + 243 => 9.395241E8, + 244 => 1.07374182E9, + 245 => 1.34217728E9, + 246 => 1.61061274E9, + 247 => 1.87904819E9, + 248 => 2.14748365E9, + 249 => 2.68435456E9, + 250 => 3.22122547E9, + 251 => 3.75809638E9, + 252 => 4.2949673E9, + 253 => 5.3687091E9, + 254 => 6.4424509E9, + 255 => 7.5161928E9 ); + + + /** + * Set the default Similarity implementation used by indexing and search + * code. + * + * @param Zend_Search_Lucene_Search_Similarity $similarity + */ + public static function setDefault(Zend_Search_Lucene_Search_Similarity $similarity) + { + self::$_defaultImpl = $similarity; + } + + + /** + * Return the default Similarity implementation used by indexing and search + * code. + * + * @return Zend_Search_Lucene_Search_Similarity + */ + public static function getDefault() + { + if (!self::$_defaultImpl instanceof Zend_Search_Lucene_Search_Similarity) { + self::$_defaultImpl = new Zend_Search_Lucene_Search_Similarity_Default(); + } + + return self::$_defaultImpl; + } + + + /** + * Computes the normalization value for a field given the total number of + * terms contained in a field. These values, together with field boosts, are + * stored in an index and multipled into scores for hits on each field by the + * search code. + * + * Matches in longer fields are less precise, so implemenations of this + * method usually return smaller values when 'numTokens' is large, + * and larger values when 'numTokens' is small. + * + * That these values are computed under + * IndexWriter::addDocument(Document) and stored then using + * encodeNorm(float). Thus they have limited precision, and documents + * must be re-indexed if this method is altered. + * + * fieldName - name of field + * numTokens - the total number of tokens contained in fields named + * 'fieldName' of 'doc'. + * Returns a normalization factor for hits on this field of this document + * + * @param string $fieldName + * @param integer $numTokens + * @return float + */ + abstract public function lengthNorm($fieldName, $numTokens); + + /** + * Computes the normalization value for a query given the sum of the squared + * weights of each of the query terms. This value is then multipled into the + * weight of each query term. + * + * This does not affect ranking, but rather just attempts to make scores + * from different queries comparable. + * + * sumOfSquaredWeights - the sum of the squares of query term weights + * Returns a normalization factor for query weights + * + * @param float $sumOfSquaredWeights + * @return float + */ + abstract public function queryNorm($sumOfSquaredWeights); + + + /** + * Decodes a normalization factor stored in an index. + * + * @param integer $byte + * @return float + */ + public static function decodeNorm($byte) + { + return self::$_normTable[$byte & 0xFF]; + } + + + /** + * Encodes a normalization factor for storage in an index. + * + * The encoding uses a five-bit exponent and three-bit mantissa, thus + * representing values from around 7x10^9 to 2x10^-9 with about one + * significant decimal digit of accuracy. Zero is also represented. + * Negative numbers are rounded up to zero. Values too large to represent + * are rounded down to the largest representable value. Positive values too + * small to represent are rounded up to the smallest positive representable + * value. + * + * @param float $f + * @return integer + */ + static function encodeNorm($f) + { + return self::_floatToByte($f); + } + + /** + * Float to byte conversion + * + * @param integer $b + * @return float + */ + private static function _floatToByte($f) + { + // round negatives up to zero + if ($f <= 0.0) { + return 0; + } + + // search for appropriate value + $lowIndex = 0; + $highIndex = 255; + while ($highIndex >= $lowIndex) { + // $mid = ($highIndex - $lowIndex)/2; + $mid = ($highIndex + $lowIndex) >> 1; + $delta = $f - self::$_normTable[$mid]; + + if ($delta < 0) { + $highIndex = $mid-1; + } elseif ($delta > 0) { + $lowIndex = $mid+1; + } else { + return $mid; // We got it! + } + } + + // round to closest value + if ($highIndex != 255 && + $f - self::$_normTable[$highIndex] > self::$_normTable[$highIndex+1] - $f ) { + return $highIndex + 1; + } else { + return $highIndex; + } + } + + + /** + * Computes a score factor based on a term or phrase's frequency in a + * document. This value is multiplied by the idf(Term, Searcher) + * factor for each term in the query and these products are then summed to + * form the initial score for a document. + * + * Terms and phrases repeated in a document indicate the topic of the + * document, so implementations of this method usually return larger values + * when 'freq' is large, and smaller values when 'freq' + * is small. + * + * freq - the frequency of a term within a document + * Returns a score factor based on a term's within-document frequency + * + * @param float $freq + * @return float + */ + abstract public function tf($freq); + + /** + * Computes the amount of a sloppy phrase match, based on an edit distance. + * This value is summed for each sloppy phrase match in a document to form + * the frequency that is passed to tf(float). + * + * A phrase match with a small edit distance to a document passage more + * closely matches the document, so implementations of this method usually + * return larger values when the edit distance is small and smaller values + * when it is large. + * + * distance - the edit distance of this sloppy phrase match + * Returns the frequency increment for this match + * + * @param integer $distance + * @return float + */ + abstract public function sloppyFreq($distance); + + + /** + * Computes a score factor for a simple term or a phrase. + * + * The default implementation is: + * return idfFreq(searcher.docFreq(term), searcher.maxDoc()); + * + * input - the term in question or array of terms + * reader - reader the document collection being searched + * Returns a score factor for the term + * + * @param mixed $input + * @param Zend_Search_Lucene_Interface $reader + * @return a score factor for the term + */ + public function idf($input, Zend_Search_Lucene_Interface $reader) + { + if (!is_array($input)) { + return $this->idfFreq($reader->docFreq($input), $reader->count()); + } else { + $idf = 0.0; + foreach ($input as $term) { + $idf += $this->idfFreq($reader->docFreq($term), $reader->count()); + } + return $idf; + } + } + + /** + * Computes a score factor based on a term's document frequency (the number + * of documents which contain the term). This value is multiplied by the + * tf(int) factor for each term in the query and these products are + * then summed to form the initial score for a document. + * + * Terms that occur in fewer documents are better indicators of topic, so + * implemenations of this method usually return larger values for rare terms, + * and smaller values for common terms. + * + * docFreq - the number of documents which contain the term + * numDocs - the total number of documents in the collection + * Returns a score factor based on the term's document frequency + * + * @param integer $docFreq + * @param integer $numDocs + * @return float + */ + abstract public function idfFreq($docFreq, $numDocs); + + /** + * Computes a score factor based on the fraction of all query terms that a + * document contains. This value is multiplied into scores. + * + * The presence of a large portion of the query terms indicates a better + * match with the query, so implemenations of this method usually return + * larger values when the ratio between these parameters is large and smaller + * values when the ratio between them is small. + * + * overlap - the number of query terms matched in the document + * maxOverlap - the total number of terms in the query + * Returns a score factor based on term overlap with the query + * + * @param integer $overlap + * @param integer $maxOverlap + * @return float + */ + abstract public function coord($overlap, $maxOverlap); +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Similarity/Default.php b/library/vendor/Zend/Search/Lucene/Search/Similarity/Default.php new file mode 100644 index 000000000..d717c2219 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Similarity/Default.php @@ -0,0 +1,109 @@ +createWeight(). + * The sumOfSquaredWeights() method is then called on the top-level + * query to compute the query normalization factor Similarity->queryNorm(float). + * This factor is then passed to normalize(float). At this point the weighting + * is complete. + * + * @category Zend + * @package Zend_Search_Lucene + * @subpackage Search + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +abstract class Zend_Search_Lucene_Search_Weight +{ + /** + * Normalization factor. + * This value is stored only for query expanation purpose and not used in any other place + * + * @var float + */ + protected $_queryNorm; + + /** + * Weight value + * + * Weight value may be initialized in sumOfSquaredWeights() or normalize() + * because they both are invoked either in Query::_initWeight (for top-level query) or + * in corresponding methods of parent query's weights + * + * @var float + */ + protected $_value; + + + /** + * The weight for this query. + * + * @return float + */ + public function getValue() + { + return $this->_value; + } + + /** + * The sum of squared weights of contained query clauses. + * + * @return float + */ + abstract public function sumOfSquaredWeights(); + + /** + * Assigns the query normalization factor to this. + * + * @param float $norm + */ + abstract public function normalize($norm); +} + diff --git a/library/vendor/Zend/Search/Lucene/Search/Weight/Boolean.php b/library/vendor/Zend/Search/Lucene/Search/Weight/Boolean.php new file mode 100644 index 000000000..99e4678d1 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Weight/Boolean.php @@ -0,0 +1,136 @@ +_query = $query; + $this->_reader = $reader; + $this->_weights = array(); + + $signs = $query->getSigns(); + + foreach ($query->getSubqueries() as $num => $subquery) { + if ($signs === null || $signs[$num] === null || $signs[$num]) { + $this->_weights[$num] = $subquery->createWeight($reader); + } + } + } + + + /** + * The weight for this query + * Standard Weight::$_value is not used for boolean queries + * + * @return float + */ + public function getValue() + { + return $this->_query->getBoost(); + } + + + /** + * The sum of squared weights of contained query clauses. + * + * @return float + */ + public function sumOfSquaredWeights() + { + $sum = 0; + foreach ($this->_weights as $weight) { + // sum sub weights + $sum += $weight->sumOfSquaredWeights(); + } + + // boost each sub-weight + $sum *= $this->_query->getBoost() * $this->_query->getBoost(); + + // check for empty query (like '-something -another') + if ($sum == 0) { + $sum = 1.0; + } + return $sum; + } + + + /** + * Assigns the query normalization factor to this. + * + * @param float $queryNorm + */ + public function normalize($queryNorm) + { + // incorporate boost + $queryNorm *= $this->_query->getBoost(); + + foreach ($this->_weights as $weight) { + $weight->normalize($queryNorm); + } + } +} + + diff --git a/library/vendor/Zend/CodeGenerator/Php/Member/Container.php b/library/vendor/Zend/Search/Lucene/Search/Weight/Empty.php similarity index 53% rename from library/vendor/Zend/CodeGenerator/Php/Member/Container.php rename to library/vendor/Zend/Search/Lucene/Search/Weight/Empty.php index 7658ae167..616ebd194 100644 --- a/library/vendor/Zend/CodeGenerator/Php/Member/Container.php +++ b/library/vendor/Zend/Search/Lucene/Search/Weight/Empty.php @@ -13,43 +13,44 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_CodeGenerator - * @subpackage PHP - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search_Lucene + * @subpackage Search + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ + +/** Zend_Search_Lucene_Search_Weight */ + + /** * @category Zend - * @package Zend_CodeGenerator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @package Zend_Search_Lucene + * @subpackage Search + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_CodeGenerator_Php_Member_Container extends ArrayObject +class Zend_Search_Lucene_Search_Weight_Empty extends Zend_Search_Lucene_Search_Weight { - - /**#@+ - * @param const string - */ - const TYPE_PROPERTY = 'property'; - const TYPE_METHOD = 'method'; - /**#@-*/ - /** - * @var const|string - */ - protected $_type = self::TYPE_PROPERTY; - - /** - * __construct() + * The sum of squared weights of contained query clauses. * - * @param const|string $type + * @return float */ - public function __construct($type = self::TYPE_PROPERTY) + public function sumOfSquaredWeights() { - $this->_type = $type; - parent::__construct(array(), self::ARRAY_AS_PROPS); + return 1; } + + /** + * Assigns the query normalization factor to this. + * + * @param float $queryNorm + */ + public function normalize($queryNorm) + { + } } + diff --git a/library/vendor/Zend/Search/Lucene/Search/Weight/MultiTerm.php b/library/vendor/Zend/Search/Lucene/Search/Weight/MultiTerm.php new file mode 100644 index 000000000..67ae854b8 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Weight/MultiTerm.php @@ -0,0 +1,137 @@ +_query = $query; + $this->_reader = $reader; + $this->_weights = array(); + + $signs = $query->getSigns(); + + foreach ($query->getTerms() as $id => $term) { + if ($signs === null || $signs[$id] === null || $signs[$id]) { + $this->_weights[$id] = new Zend_Search_Lucene_Search_Weight_Term($term, $query, $reader); + $query->setWeight($id, $this->_weights[$id]); + } + } + } + + + /** + * The weight for this query + * Standard Weight::$_value is not used for boolean queries + * + * @return float + */ + public function getValue() + { + return $this->_query->getBoost(); + } + + + /** + * The sum of squared weights of contained query clauses. + * + * @return float + */ + public function sumOfSquaredWeights() + { + $sum = 0; + foreach ($this->_weights as $weight) { + // sum sub weights + $sum += $weight->sumOfSquaredWeights(); + } + + // boost each sub-weight + $sum *= $this->_query->getBoost() * $this->_query->getBoost(); + + // check for empty query (like '-something -another') + if ($sum == 0) { + $sum = 1.0; + } + return $sum; + } + + + /** + * Assigns the query normalization factor to this. + * + * @param float $queryNorm + */ + public function normalize($queryNorm) + { + // incorporate boost + $queryNorm *= $this->_query->getBoost(); + + foreach ($this->_weights as $weight) { + $weight->normalize($queryNorm); + } + } +} + + diff --git a/library/vendor/Zend/Search/Lucene/Search/Weight/Phrase.php b/library/vendor/Zend/Search/Lucene/Search/Weight/Phrase.php new file mode 100644 index 000000000..16b3fe929 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Weight/Phrase.php @@ -0,0 +1,107 @@ +_query = $query; + $this->_reader = $reader; + } + + /** + * The sum of squared weights of contained query clauses. + * + * @return float + */ + public function sumOfSquaredWeights() + { + // compute idf + $this->_idf = $this->_reader->getSimilarity()->idf($this->_query->getTerms(), $this->_reader); + + // compute query weight + $this->_queryWeight = $this->_idf * $this->_query->getBoost(); + + // square it + return $this->_queryWeight * $this->_queryWeight; + } + + + /** + * Assigns the query normalization factor to this. + * + * @param float $queryNorm + */ + public function normalize($queryNorm) + { + $this->_queryNorm = $queryNorm; + + // normalize query weight + $this->_queryWeight *= $queryNorm; + + // idf for documents + $this->_value = $this->_queryWeight * $this->_idf; + } +} + + diff --git a/library/vendor/Zend/Search/Lucene/Search/Weight/Term.php b/library/vendor/Zend/Search/Lucene/Search/Weight/Term.php new file mode 100644 index 000000000..595b372b6 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Search/Weight/Term.php @@ -0,0 +1,124 @@ +_term = $term; + $this->_query = $query; + $this->_reader = $reader; + } + + + /** + * The sum of squared weights of contained query clauses. + * + * @return float + */ + public function sumOfSquaredWeights() + { + // compute idf + $this->_idf = $this->_reader->getSimilarity()->idf($this->_term, $this->_reader); + + // compute query weight + $this->_queryWeight = $this->_idf * $this->_query->getBoost(); + + // square it + return $this->_queryWeight * $this->_queryWeight; + } + + + /** + * Assigns the query normalization factor to this. + * + * @param float $queryNorm + */ + public function normalize($queryNorm) + { + $this->_queryNorm = $queryNorm; + + // normalize query weight + $this->_queryWeight *= $queryNorm; + + // idf for documents + $this->_value = $this->_queryWeight * $this->_idf; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Storage/Directory.php b/library/vendor/Zend/Search/Lucene/Storage/Directory.php new file mode 100644 index 000000000..1dd550520 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Storage/Directory.php @@ -0,0 +1,136 @@ + Zend_Search_Lucene_Storage_File object + * + * @var array + * @throws Zend_Search_Lucene_Exception + */ + protected $_fileHandlers; + + /** + * Default file permissions + * + * @var integer + */ + protected static $_defaultFilePermissions = 0666; + + + /** + * Get default file permissions + * + * @return integer + */ + public static function getDefaultFilePermissions() + { + return self::$_defaultFilePermissions; + } + + /** + * Set default file permissions + * + * @param integer $mode + */ + public static function setDefaultFilePermissions($mode) + { + self::$_defaultFilePermissions = $mode; + } + + + /** + * Utility function to recursive directory creation + * + * @param string $dir + * @param integer $mode + * @param boolean $recursive + * @return boolean + */ + + public static function mkdirs($dir, $mode = 0777, $recursive = true) + { + if (($dir === null) || $dir === '') { + return false; + } + if (is_dir($dir) || $dir === '/') { + return true; + } + if (self::mkdirs(dirname($dir), $mode, $recursive)) { + return mkdir($dir, $mode); + } + return false; + } + + + /** + * Object constructor + * Checks if $path is a directory or tries to create it. + * + * @param string $path + * @throws Zend_Search_Lucene_Exception + */ + public function __construct($path) + { + if (!is_dir($path)) { + if (file_exists($path)) { + throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory'); + } else { + if (!self::mkdirs($path)) { + throw new Zend_Search_Lucene_Exception("Can't create directory '$path'."); + } + } + } + $this->_dirPath = $path; + $this->_fileHandlers = array(); + } + + + /** + * Closes the store. + * + * @return void + */ + public function close() + { + foreach ($this->_fileHandlers as $fileObject) { + $fileObject->close(); + } + + $this->_fileHandlers = array(); + } + + + /** + * Returns an array of strings, one for each file in the directory. + * + * @return array + */ + public function fileList() + { + $result = array(); + + $dirContent = opendir( $this->_dirPath ); + while (($file = readdir($dirContent)) !== false) { + if (($file == '..')||($file == '.')) continue; + + if( !is_dir($this->_dirPath . '/' . $file) ) { + $result[] = $file; + } + } + closedir($dirContent); + + return $result; + } + + /** + * Creates a new, empty file in the directory with the given $filename. + * + * @param string $filename + * @return Zend_Search_Lucene_Storage_File + * @throws Zend_Search_Lucene_Exception + */ + public function createFile($filename) + { + if (isset($this->_fileHandlers[$filename])) { + $this->_fileHandlers[$filename]->close(); + } + unset($this->_fileHandlers[$filename]); + $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b'); + + // Set file permissions, but don't care about any possible failures, since file may be already + // created by anther user which has to care about right permissions + @chmod($this->_dirPath . '/' . $filename, self::$_defaultFilePermissions); + + return $this->_fileHandlers[$filename]; + } + + + /** + * Removes an existing $filename in the directory. + * + * @param string $filename + * @return void + * @throws Zend_Search_Lucene_Exception + */ + public function deleteFile($filename) + { + if (isset($this->_fileHandlers[$filename])) { + $this->_fileHandlers[$filename]->close(); + } + unset($this->_fileHandlers[$filename]); + + global $php_errormsg; + $trackErrors = ini_get('track_errors'); + ini_set('track_errors', '1'); + if (!@unlink($this->_dirPath . '/' . $filename)) { + ini_set('track_errors', $trackErrors); + throw new Zend_Search_Lucene_Exception('Can\'t delete file: ' . $php_errormsg); + } + ini_set('track_errors', $trackErrors); + } + + /** + * Purge file if it's cached by directory object + * + * Method is used to prevent 'too many open files' error + * + * @param string $filename + * @return void + */ + public function purgeFile($filename) + { + if (isset($this->_fileHandlers[$filename])) { + $this->_fileHandlers[$filename]->close(); + } + unset($this->_fileHandlers[$filename]); + } + + + /** + * Returns true if a file with the given $filename exists. + * + * @param string $filename + * @return boolean + */ + public function fileExists($filename) + { + return isset($this->_fileHandlers[$filename]) || + file_exists($this->_dirPath . '/' . $filename); + } + + + /** + * Returns the length of a $filename in the directory. + * + * @param string $filename + * @return integer + */ + public function fileLength($filename) + { + if (isset( $this->_fileHandlers[$filename] )) { + return $this->_fileHandlers[$filename]->size(); + } + return filesize($this->_dirPath .'/'. $filename); + } + + + /** + * Returns the UNIX timestamp $filename was last modified. + * + * @param string $filename + * @return integer + */ + public function fileModified($filename) + { + return filemtime($this->_dirPath .'/'. $filename); + } + + + /** + * Renames an existing file in the directory. + * + * @param string $from + * @param string $to + * @return void + * @throws Zend_Search_Lucene_Exception + */ + public function renameFile($from, $to) + { + global $php_errormsg; + + if (isset($this->_fileHandlers[$from])) { + $this->_fileHandlers[$from]->close(); + } + unset($this->_fileHandlers[$from]); + + if (isset($this->_fileHandlers[$to])) { + $this->_fileHandlers[$to]->close(); + } + unset($this->_fileHandlers[$to]); + + if (file_exists($this->_dirPath . '/' . $to)) { + if (!unlink($this->_dirPath . '/' . $to)) { + throw new Zend_Search_Lucene_Exception('Delete operation failed'); + } + } + + $trackErrors = ini_get('track_errors'); + ini_set('track_errors', '1'); + + $success = @rename($this->_dirPath . '/' . $from, $this->_dirPath . '/' . $to); + if (!$success) { + ini_set('track_errors', $trackErrors); + throw new Zend_Search_Lucene_Exception($php_errormsg); + } + + ini_set('track_errors', $trackErrors); + + return $success; + } + + + /** + * Sets the modified time of $filename to now. + * + * @param string $filename + * @return void + */ + public function touchFile($filename) + { + return touch($this->_dirPath .'/'. $filename); + } + + + /** + * Returns a Zend_Search_Lucene_Storage_File object for a given $filename in the directory. + * + * If $shareHandler option is true, then file handler can be shared between File Object + * requests. It speed-ups performance, but makes problems with file position. + * Shared handler are good for short atomic requests. + * Non-shared handlers are useful for stream file reading (especial for compound files). + * + * @param string $filename + * @param boolean $shareHandler + * @return Zend_Search_Lucene_Storage_File + */ + public function getFileObject($filename, $shareHandler = true) + { + $fullFilename = $this->_dirPath . '/' . $filename; + + if (!$shareHandler) { + return new Zend_Search_Lucene_Storage_File_Filesystem($fullFilename); + } + + if (isset( $this->_fileHandlers[$filename] )) { + $this->_fileHandlers[$filename]->seek(0); + return $this->_fileHandlers[$filename]; + } + + $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($fullFilename); + return $this->_fileHandlers[$filename]; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Storage/File.php b/library/vendor/Zend/Search/Lucene/Storage/File.php new file mode 100644 index 000000000..745ed7ed7 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Storage/File.php @@ -0,0 +1,470 @@ +_fread(1)); + } + + /** + * Writes a byte to the end of the file. + * + * @param integer $byte + */ + public function writeByte($byte) + { + return $this->_fwrite(chr($byte), 1); + } + + /** + * Read num bytes from the current position in the file + * and advances the file pointer. + * + * @param integer $num + * @return string + */ + public function readBytes($num) + { + return $this->_fread($num); + } + + /** + * Writes num bytes of data (all, if $num===null) to the end + * of the string. + * + * @param string $data + * @param integer $num + */ + public function writeBytes($data, $num=null) + { + $this->_fwrite($data, $num); + } + + + /** + * Reads an integer from the current position in the file + * and advances the file pointer. + * + * @return integer + */ + public function readInt() + { + $str = $this->_fread(4); + + return ord($str[0]) << 24 | + ord($str[1]) << 16 | + ord($str[2]) << 8 | + ord($str[3]); + } + + + /** + * Writes an integer to the end of file. + * + * @param integer $value + */ + public function writeInt($value) + { + settype($value, 'integer'); + $this->_fwrite( chr($value>>24 & 0xFF) . + chr($value>>16 & 0xFF) . + chr($value>>8 & 0xFF) . + chr($value & 0xFF), 4 ); + } + + + /** + * Returns a long integer from the current position in the file + * and advances the file pointer. + * + * @return integer|float + * @throws Zend_Search_Lucene_Exception + */ + public function readLong() + { + /** + * Check, that we work in 64-bit mode. + * fseek() uses long for offset. Thus, largest index segment file size in 32bit mode is 2Gb + */ + if (PHP_INT_SIZE > 4) { + $str = $this->_fread(8); + + return ord($str[0]) << 56 | + ord($str[1]) << 48 | + ord($str[2]) << 40 | + ord($str[3]) << 32 | + ord($str[4]) << 24 | + ord($str[5]) << 16 | + ord($str[6]) << 8 | + ord($str[7]); + } else { + return $this->readLong32Bit(); + } + } + + /** + * Writes long integer to the end of file + * + * @param integer $value + * @throws Zend_Search_Lucene_Exception + */ + public function writeLong($value) + { + /** + * Check, that we work in 64-bit mode. + * fseek() and ftell() use long for offset. Thus, largest index segment file size in 32bit mode is 2Gb + */ + if (PHP_INT_SIZE > 4) { + settype($value, 'integer'); + $this->_fwrite( chr($value>>56 & 0xFF) . + chr($value>>48 & 0xFF) . + chr($value>>40 & 0xFF) . + chr($value>>32 & 0xFF) . + chr($value>>24 & 0xFF) . + chr($value>>16 & 0xFF) . + chr($value>>8 & 0xFF) . + chr($value & 0xFF), 8 ); + } else { + $this->writeLong32Bit($value); + } + } + + + /** + * Returns a long integer from the current position in the file, + * advances the file pointer and return it as float (for 32-bit platforms). + * + * @return integer|float + * @throws Zend_Search_Lucene_Exception + */ + public function readLong32Bit() + { + $wordHigh = $this->readInt(); + $wordLow = $this->readInt(); + + if ($wordHigh & (int)0x80000000) { + // It's a negative value since the highest bit is set + if ($wordHigh == (int)0xFFFFFFFF && ($wordLow & (int)0x80000000)) { + return $wordLow; + } else { + throw new Zend_Search_Lucene_Exception('Long integers lower than -2147483648 (0x80000000) are not supported on 32-bit platforms.'); + } + + } + + if ($wordLow < 0) { + // Value is large than 0x7FFF FFFF. Represent low word as float. + $wordLow &= 0x7FFFFFFF; + $wordLow += (float)0x80000000; + } + + if ($wordHigh == 0) { + // Return value as integer if possible + return $wordLow; + } + + return $wordHigh*(float)0x100000000/* 0x00000001 00000000 */ + $wordLow; + } + + + /** + * Writes long integer to the end of file (32-bit platforms implementation) + * + * @param integer|float $value + * @throws Zend_Search_Lucene_Exception + */ + public function writeLong32Bit($value) + { + if ($value < (int)0x80000000) { + throw new Zend_Search_Lucene_Exception('Long integers lower than -2147483648 (0x80000000) are not supported on 32-bit platforms.'); + } + + if ($value < 0) { + $wordHigh = (int)0xFFFFFFFF; + $wordLow = (int)$value; + } else { + $wordHigh = (int)($value/(float)0x100000000/* 0x00000001 00000000 */); + $wordLow = $value - $wordHigh*(float)0x100000000/* 0x00000001 00000000 */; + + if ($wordLow > 0x7FFFFFFF) { + // Highest bit of low word is set. Translate it to the corresponding negative integer value + $wordLow -= 0x80000000; + $wordLow |= 0x80000000; + } + } + + $this->writeInt($wordHigh); + $this->writeInt($wordLow); + } + + + /** + * Returns a variable-length integer from the current + * position in the file and advances the file pointer. + * + * @return integer + */ + public function readVInt() + { + $nextByte = ord($this->_fread(1)); + $val = $nextByte & 0x7F; + + for ($shift=7; ($nextByte & 0x80) != 0; $shift += 7) { + $nextByte = ord($this->_fread(1)); + $val |= ($nextByte & 0x7F) << $shift; + } + return $val; + } + + /** + * Writes a variable-length integer to the end of file. + * + * @param integer $value + */ + public function writeVInt($value) + { + settype($value, 'integer'); + while ($value > 0x7F) { + $this->_fwrite(chr( ($value & 0x7F)|0x80 )); + $value >>= 7; + } + $this->_fwrite(chr($value)); + } + + + /** + * Reads a string from the current position in the file + * and advances the file pointer. + * + * @return string + */ + public function readString() + { + $strlen = $this->readVInt(); + if ($strlen == 0) { + return ''; + } else { + /** + * This implementation supports only Basic Multilingual Plane + * (BMP) characters (from 0x0000 to 0xFFFF) and doesn't support + * "supplementary characters" (characters whose code points are + * greater than 0xFFFF) + * Java 2 represents these characters as a pair of char (16-bit) + * values, the first from the high-surrogates range (0xD800-0xDBFF), + * the second from the low-surrogates range (0xDC00-0xDFFF). Then + * they are encoded as usual UTF-8 characters in six bytes. + * Standard UTF-8 representation uses four bytes for supplementary + * characters. + */ + + $str_val = $this->_fread($strlen); + + for ($count = 0; $count < $strlen; $count++ ) { + if (( ord($str_val[$count]) & 0xC0 ) == 0xC0) { + $addBytes = 1; + if (ord($str_val[$count]) & 0x20 ) { + $addBytes++; + + // Never used. Java2 doesn't encode strings in four bytes + if (ord($str_val[$count]) & 0x10 ) { + $addBytes++; + } + } + $str_val .= $this->_fread($addBytes); + $strlen += $addBytes; + + // Check for null character. Java2 encodes null character + // in two bytes. + if (ord($str_val[$count]) == 0xC0 && + ord($str_val[$count+1]) == 0x80 ) { + $str_val[$count] = 0; + $str_val = substr($str_val,0,$count+1) + . substr($str_val,$count+2); + } + $count += $addBytes; + } + } + + return $str_val; + } + } + + /** + * Writes a string to the end of file. + * + * @param string $str + * @throws Zend_Search_Lucene_Exception + */ + public function writeString($str) + { + /** + * This implementation supports only Basic Multilingual Plane + * (BMP) characters (from 0x0000 to 0xFFFF) and doesn't support + * "supplementary characters" (characters whose code points are + * greater than 0xFFFF) + * Java 2 represents these characters as a pair of char (16-bit) + * values, the first from the high-surrogates range (0xD800-0xDBFF), + * the second from the low-surrogates range (0xDC00-0xDFFF). Then + * they are encoded as usual UTF-8 characters in six bytes. + * Standard UTF-8 representation uses four bytes for supplementary + * characters. + */ + + // convert input to a string before iterating string characters + settype($str, 'string'); + + $chars = $strlen = strlen($str); + $containNullChars = false; + + for ($count = 0; $count < $strlen; $count++ ) { + /** + * String is already in Java 2 representation. + * We should only calculate actual string length and replace + * \x00 by \xC0\x80 + */ + if ((ord($str[$count]) & 0xC0) == 0xC0) { + $addBytes = 1; + if (ord($str[$count]) & 0x20 ) { + $addBytes++; + + // Never used. Java2 doesn't encode strings in four bytes + // and we dont't support non-BMP characters + if (ord($str[$count]) & 0x10 ) { + $addBytes++; + } + } + $chars -= $addBytes; + + if (ord($str[$count]) == 0 ) { + $containNullChars = true; + } + $count += $addBytes; + } + } + + if ($chars < 0) { + throw new Zend_Search_Lucene_Exception('Invalid UTF-8 string'); + } + + $this->writeVInt($chars); + if ($containNullChars) { + $this->_fwrite(str_replace($str, "\x00", "\xC0\x80")); + } else { + $this->_fwrite($str); + } + } + + + /** + * Reads binary data from the current position in the file + * and advances the file pointer. + * + * @return string + */ + public function readBinary() + { + return $this->_fread($this->readVInt()); + } +} diff --git a/library/vendor/Zend/Search/Lucene/Storage/File/Filesystem.php b/library/vendor/Zend/Search/Lucene/Storage/File/Filesystem.php new file mode 100644 index 000000000..7a1ef55cc --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Storage/File/Filesystem.php @@ -0,0 +1,226 @@ +_fileHandle = @fopen($filename, $mode); + + if ($this->_fileHandle === false) { + ini_set('track_errors', $trackErrors); + throw new Zend_Search_Lucene_Exception($php_errormsg); + } + + ini_set('track_errors', $trackErrors); + } + + /** + * Sets the file position indicator and advances the file pointer. + * The new position, measured in bytes from the beginning of the file, + * is obtained by adding offset to the position specified by whence, + * whose values are defined as follows: + * SEEK_SET - Set position equal to offset bytes. + * SEEK_CUR - Set position to current location plus offset. + * SEEK_END - Set position to end-of-file plus offset. (To move to + * a position before the end-of-file, you need to pass a negative value + * in offset.) + * SEEK_CUR is the only supported offset type for compound files + * + * Upon success, returns 0; otherwise, returns -1 + * + * @param integer $offset + * @param integer $whence + * @return integer + */ + public function seek($offset, $whence=SEEK_SET) + { + return fseek($this->_fileHandle, $offset, $whence); + } + + + /** + * Get file position. + * + * @return integer + */ + public function tell() + { + return ftell($this->_fileHandle); + } + + /** + * Flush output. + * + * Returns true on success or false on failure. + * + * @return boolean + */ + public function flush() + { + return fflush($this->_fileHandle); + } + + /** + * Close File object + */ + public function close() + { + if ($this->_fileHandle !== null ) { + @fclose($this->_fileHandle); + $this->_fileHandle = null; + } + } + + /** + * Get the size of the already opened file + * + * @return integer + */ + public function size() + { + $position = ftell($this->_fileHandle); + fseek($this->_fileHandle, 0, SEEK_END); + $size = ftell($this->_fileHandle); + fseek($this->_fileHandle,$position); + + return $size; + } + + /** + * Read a $length bytes from the file and advance the file pointer. + * + * @param integer $length + * @return string + */ + protected function _fread($length=1) + { + if ($length == 0) { + return ''; + } + + if ($length < 1024) { + return fread($this->_fileHandle, $length); + } + + $data = ''; + while ($length > 0 && !feof($this->_fileHandle)) { + $nextBlock = fread($this->_fileHandle, $length); + if ($nextBlock === false) { + throw new Zend_Search_Lucene_Exception( "Error occured while file reading." ); + } + + $data .= $nextBlock; + $length -= strlen($nextBlock); + } + if ($length != 0) { + throw new Zend_Search_Lucene_Exception( "Error occured while file reading." ); + } + + return $data; + } + + + /** + * Writes $length number of bytes (all, if $length===null) to the end + * of the file. + * + * @param string $data + * @param integer $length + */ + protected function _fwrite($data, $length=null) + { + if ($length === null ) { + fwrite($this->_fileHandle, $data); + } else { + fwrite($this->_fileHandle, $data, $length); + } + } + + /** + * Lock file + * + * Lock type may be a LOCK_SH (shared lock) or a LOCK_EX (exclusive lock) + * + * @param integer $lockType + * @param boolean $nonBlockingLock + * @return boolean + */ + public function lock($lockType, $nonBlockingLock = false) + { + if ($nonBlockingLock) { + return flock($this->_fileHandle, $lockType | LOCK_NB); + } else { + return flock($this->_fileHandle, $lockType); + } + } + + /** + * Unlock file + * + * Returns true on success + * + * @return boolean + */ + public function unlock() + { + if ($this->_fileHandle !== null ) { + return flock($this->_fileHandle, LOCK_UN); + } else { + return true; + } + } +} + diff --git a/library/vendor/Zend/Search/Lucene/Storage/File/Memory.php b/library/vendor/Zend/Search/Lucene/Storage/File/Memory.php new file mode 100644 index 000000000..25bc416a1 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/Storage/File/Memory.php @@ -0,0 +1,597 @@ +_data = $data; + } + + /** + * Reads $length number of bytes at the current position in the + * file and advances the file pointer. + * + * @param integer $length + * @return string + */ + protected function _fread($length = 1) + { + $returnValue = substr($this->_data, $this->_position, $length); + $this->_position += $length; + return $returnValue; + } + + + /** + * Sets the file position indicator and advances the file pointer. + * The new position, measured in bytes from the beginning of the file, + * is obtained by adding offset to the position specified by whence, + * whose values are defined as follows: + * SEEK_SET - Set position equal to offset bytes. + * SEEK_CUR - Set position to current location plus offset. + * SEEK_END - Set position to end-of-file plus offset. (To move to + * a position before the end-of-file, you need to pass a negative value + * in offset.) + * Upon success, returns 0; otherwise, returns -1 + * + * @param integer $offset + * @param integer $whence + * @return integer + */ + public function seek($offset, $whence=SEEK_SET) + { + switch ($whence) { + case SEEK_SET: + $this->_position = $offset; + break; + + case SEEK_CUR: + $this->_position += $offset; + break; + + case SEEK_END: + $this->_position = strlen($this->_data); + $this->_position += $offset; + break; + + default: + break; + } + } + + /** + * Get file position. + * + * @return integer + */ + public function tell() + { + return $this->_position; + } + + /** + * Flush output. + * + * Returns true on success or false on failure. + * + * @return boolean + */ + public function flush() + { + // Do nothing + + return true; + } + + /** + * Writes $length number of bytes (all, if $length===null) to the end + * of the file. + * + * @param string $data + * @param integer $length + */ + protected function _fwrite($data, $length=null) + { + // We do not need to check if file position points to the end of "file". + // Only append operation is supported now + + if ($length !== null) { + $this->_data .= substr($data, 0, $length); + } else { + $this->_data .= $data; + } + + $this->_position = strlen($this->_data); + } + + /** + * Lock file + * + * Lock type may be a LOCK_SH (shared lock) or a LOCK_EX (exclusive lock) + * + * @param integer $lockType + * @return boolean + */ + public function lock($lockType, $nonBlockinLock = false) + { + // Memory files can't be shared + // do nothing + + return true; + } + + /** + * Unlock file + */ + public function unlock() + { + // Memory files can't be shared + // do nothing + } + + /** + * Reads a byte from the current position in the file + * and advances the file pointer. + * + * @return integer + */ + public function readByte() + { + return ord($this->_data[$this->_position++]); + } + + /** + * Writes a byte to the end of the file. + * + * @param integer $byte + */ + public function writeByte($byte) + { + // We do not need to check if file position points to the end of "file". + // Only append operation is supported now + + $this->_data .= chr($byte); + $this->_position = strlen($this->_data); + + return 1; + } + + /** + * Read num bytes from the current position in the file + * and advances the file pointer. + * + * @param integer $num + * @return string + */ + public function readBytes($num) + { + $returnValue = substr($this->_data, $this->_position, $num); + $this->_position += $num; + + return $returnValue; + } + + /** + * Writes num bytes of data (all, if $num===null) to the end + * of the string. + * + * @param string $data + * @param integer $num + */ + public function writeBytes($data, $num=null) + { + // We do not need to check if file position points to the end of "file". + // Only append operation is supported now + + if ($num !== null) { + $this->_data .= substr($data, 0, $num); + } else { + $this->_data .= $data; + } + + $this->_position = strlen($this->_data); + } + + + /** + * Reads an integer from the current position in the file + * and advances the file pointer. + * + * @return integer + */ + public function readInt() + { + $str = substr($this->_data, $this->_position, 4); + $this->_position += 4; + + return ord($str[0]) << 24 | + ord($str[1]) << 16 | + ord($str[2]) << 8 | + ord($str[3]); + } + + + /** + * Writes an integer to the end of file. + * + * @param integer $value + */ + public function writeInt($value) + { + // We do not need to check if file position points to the end of "file". + // Only append operation is supported now + + settype($value, 'integer'); + $this->_data .= chr($value>>24 & 0xFF) . + chr($value>>16 & 0xFF) . + chr($value>>8 & 0xFF) . + chr($value & 0xFF); + + $this->_position = strlen($this->_data); + } + + + /** + * Returns a long integer from the current position in the file + * and advances the file pointer. + * + * @return integer + * @throws Zend_Search_Lucene_Exception + */ + public function readLong() + { + /** + * Check, that we work in 64-bit mode. + * fseek() uses long for offset. Thus, largest index segment file size in 32bit mode is 2Gb + */ + if (PHP_INT_SIZE > 4) { + $str = substr($this->_data, $this->_position, 8); + $this->_position += 8; + + return ord($str[0]) << 56 | + ord($str[1]) << 48 | + ord($str[2]) << 40 | + ord($str[3]) << 32 | + ord($str[4]) << 24 | + ord($str[5]) << 16 | + ord($str[6]) << 8 | + ord($str[7]); + } else { + return $this->readLong32Bit(); + } + } + + /** + * Writes long integer to the end of file + * + * @param integer $value + * @throws Zend_Search_Lucene_Exception + */ + public function writeLong($value) + { + // We do not need to check if file position points to the end of "file". + // Only append operation is supported now + + /** + * Check, that we work in 64-bit mode. + * fseek() and ftell() use long for offset. Thus, largest index segment file size in 32bit mode is 2Gb + */ + if (PHP_INT_SIZE > 4) { + settype($value, 'integer'); + $this->_data .= chr($value>>56 & 0xFF) . + chr($value>>48 & 0xFF) . + chr($value>>40 & 0xFF) . + chr($value>>32 & 0xFF) . + chr($value>>24 & 0xFF) . + chr($value>>16 & 0xFF) . + chr($value>>8 & 0xFF) . + chr($value & 0xFF); + } else { + $this->writeLong32Bit($value); + } + + $this->_position = strlen($this->_data); + } + + + /** + * Returns a long integer from the current position in the file, + * advances the file pointer and return it as float (for 32-bit platforms). + * + * @return integer|float + * @throws Zend_Search_Lucene_Exception + */ + public function readLong32Bit() + { + $wordHigh = $this->readInt(); + $wordLow = $this->readInt(); + + if ($wordHigh & (int)0x80000000) { + // It's a negative value since the highest bit is set + if ($wordHigh == (int)0xFFFFFFFF && ($wordLow & (int)0x80000000)) { + return $wordLow; + } else { + throw new Zend_Search_Lucene_Exception('Long integers lower than -2147483648 (0x80000000) are not supported on 32-bit platforms.'); + } + + } + + if ($wordLow < 0) { + // Value is large than 0x7FFF FFFF. Represent low word as float. + $wordLow &= 0x7FFFFFFF; + $wordLow += (float)0x80000000; + } + + if ($wordHigh == 0) { + // Return value as integer if possible + return $wordLow; + } + + return $wordHigh*(float)0x100000000/* 0x00000001 00000000 */ + $wordLow; + } + + + /** + * Writes long integer to the end of file (32-bit platforms implementation) + * + * @param integer|float $value + * @throws Zend_Search_Lucene_Exception + */ + public function writeLong32Bit($value) + { + if ($value < (int)0x80000000) { + throw new Zend_Search_Lucene_Exception('Long integers lower than -2147483648 (0x80000000) are not supported on 32-bit platforms.'); + } + + if ($value < 0) { + $wordHigh = (int)0xFFFFFFFF; + $wordLow = (int)$value; + } else { + $wordHigh = (int)($value/(float)0x100000000/* 0x00000001 00000000 */); + $wordLow = $value - $wordHigh*(float)0x100000000/* 0x00000001 00000000 */; + + if ($wordLow > 0x7FFFFFFF) { + // Highest bit of low word is set. Translate it to the corresponding negative integer value + $wordLow -= 0x80000000; + $wordLow |= 0x80000000; + } + } + + $this->writeInt($wordHigh); + $this->writeInt($wordLow); + } + + /** + * Returns a variable-length integer from the current + * position in the file and advances the file pointer. + * + * @return integer + */ + public function readVInt() + { + $nextByte = ord($this->_data[$this->_position++]); + $val = $nextByte & 0x7F; + + for ($shift=7; ($nextByte & 0x80) != 0; $shift += 7) { + $nextByte = ord($this->_data[$this->_position++]); + $val |= ($nextByte & 0x7F) << $shift; + } + return $val; + } + + /** + * Writes a variable-length integer to the end of file. + * + * @param integer $value + */ + public function writeVInt($value) + { + // We do not need to check if file position points to the end of "file". + // Only append operation is supported now + + settype($value, 'integer'); + while ($value > 0x7F) { + $this->_data .= chr( ($value & 0x7F)|0x80 ); + $value >>= 7; + } + $this->_data .= chr($value); + + $this->_position = strlen($this->_data); + } + + + /** + * Reads a string from the current position in the file + * and advances the file pointer. + * + * @return string + */ + public function readString() + { + $strlen = $this->readVInt(); + if ($strlen == 0) { + return ''; + } else { + /** + * This implementation supports only Basic Multilingual Plane + * (BMP) characters (from 0x0000 to 0xFFFF) and doesn't support + * "supplementary characters" (characters whose code points are + * greater than 0xFFFF) + * Java 2 represents these characters as a pair of char (16-bit) + * values, the first from the high-surrogates range (0xD800-0xDBFF), + * the second from the low-surrogates range (0xDC00-0xDFFF). Then + * they are encoded as usual UTF-8 characters in six bytes. + * Standard UTF-8 representation uses four bytes for supplementary + * characters. + */ + + $str_val = substr($this->_data, $this->_position, $strlen); + $this->_position += $strlen; + + for ($count = 0; $count < $strlen; $count++ ) { + if (( ord($str_val[$count]) & 0xC0 ) == 0xC0) { + $addBytes = 1; + if (ord($str_val[$count]) & 0x20 ) { + $addBytes++; + + // Never used. Java2 doesn't encode strings in four bytes + if (ord($str_val[$count]) & 0x10 ) { + $addBytes++; + } + } + $str_val .= substr($this->_data, $this->_position, $addBytes); + $this->_position += $addBytes; + $strlen += $addBytes; + + // Check for null character. Java2 encodes null character + // in two bytes. + if (ord($str_val[$count]) == 0xC0 && + ord($str_val[$count+1]) == 0x80 ) { + $str_val[$count] = 0; + $str_val = substr($str_val,0,$count+1) + . substr($str_val,$count+2); + } + $count += $addBytes; + } + } + + return $str_val; + } + } + + /** + * Writes a string to the end of file. + * + * @param string $str + * @throws Zend_Search_Lucene_Exception + */ + public function writeString($str) + { + /** + * This implementation supports only Basic Multilingual Plane + * (BMP) characters (from 0x0000 to 0xFFFF) and doesn't support + * "supplementary characters" (characters whose code points are + * greater than 0xFFFF) + * Java 2 represents these characters as a pair of char (16-bit) + * values, the first from the high-surrogates range (0xD800-0xDBFF), + * the second from the low-surrogates range (0xDC00-0xDFFF). Then + * they are encoded as usual UTF-8 characters in six bytes. + * Standard UTF-8 representation uses four bytes for supplementary + * characters. + */ + + // We do not need to check if file position points to the end of "file". + // Only append operation is supported now + + // convert input to a string before iterating string characters + settype($str, 'string'); + + $chars = $strlen = strlen($str); + $containNullChars = false; + + for ($count = 0; $count < $strlen; $count++ ) { + /** + * String is already in Java 2 representation. + * We should only calculate actual string length and replace + * \x00 by \xC0\x80 + */ + if ((ord($str[$count]) & 0xC0) == 0xC0) { + $addBytes = 1; + if (ord($str[$count]) & 0x20 ) { + $addBytes++; + + // Never used. Java2 doesn't encode strings in four bytes + // and we dont't support non-BMP characters + if (ord($str[$count]) & 0x10 ) { + $addBytes++; + } + } + $chars -= $addBytes; + + if (ord($str[$count]) == 0 ) { + $containNullChars = true; + } + $count += $addBytes; + } + } + + if ($chars < 0) { + throw new Zend_Search_Lucene_Exception('Invalid UTF-8 string'); + } + + $this->writeVInt($chars); + if ($containNullChars) { + $this->_data .= str_replace($str, "\x00", "\xC0\x80"); + + } else { + $this->_data .= $str; + } + + $this->_position = strlen($this->_data); + } + + + /** + * Reads binary data from the current position in the file + * and advances the file pointer. + * + * @return string + */ + public function readBinary() + { + $length = $this->readVInt(); + $returnValue = substr($this->_data, $this->_position, $length); + $this->_position += $length; + return $returnValue; + } +} + diff --git a/library/vendor/Zend/Search/Lucene/TermStreamsPriorityQueue.php b/library/vendor/Zend/Search/Lucene/TermStreamsPriorityQueue.php new file mode 100644 index 000000000..557865786 --- /dev/null +++ b/library/vendor/Zend/Search/Lucene/TermStreamsPriorityQueue.php @@ -0,0 +1,170 @@ +_termStreams = $termStreams; + + $this->resetTermsStream(); + } + + /** + * Reset terms stream. + */ + public function resetTermsStream() + { + /** Zend_Search_Lucene_Index_TermsPriorityQueue */ + + $this->_termsStreamQueue = new Zend_Search_Lucene_Index_TermsPriorityQueue(); + + foreach ($this->_termStreams as $termStream) { + $termStream->resetTermsStream(); + + // Skip "empty" containers + if ($termStream->currentTerm() !== null) { + $this->_termsStreamQueue->put($termStream); + } + } + + $this->nextTerm(); + } + + /** + * Skip terms stream up to the specified term preffix. + * + * Prefix contains fully specified field info and portion of searched term + * + * @param Zend_Search_Lucene_Index_Term $prefix + */ + public function skipTo(Zend_Search_Lucene_Index_Term $prefix) + { + $this->_termsStreamQueue = new Zend_Search_Lucene_Index_TermsPriorityQueue(); + + foreach ($this->_termStreams as $termStream) { + $termStream->skipTo($prefix); + + if ($termStream->currentTerm() !== null) { + $this->_termsStreamQueue->put($termStream); + } + } + + return $this->nextTerm(); + } + + /** + * Scans term streams and returns next term + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function nextTerm() + { + while (($termStream = $this->_termsStreamQueue->pop()) !== null) { + if ($this->_termsStreamQueue->top() === null || + $this->_termsStreamQueue->top()->currentTerm()->key() != + $termStream->currentTerm()->key()) { + // We got new term + $this->_lastTerm = $termStream->currentTerm(); + + if ($termStream->nextTerm() !== null) { + // Put segment back into the priority queue + $this->_termsStreamQueue->put($termStream); + } + + return $this->_lastTerm; + } + + if ($termStream->nextTerm() !== null) { + // Put segment back into the priority queue + $this->_termsStreamQueue->put($termStream); + } + } + + // End of stream + $this->_lastTerm = null; + + return null; + } + + /** + * Returns term in current position + * + * @return Zend_Search_Lucene_Index_Term|null + */ + public function currentTerm() + { + return $this->_lastTerm; + } + + /** + * Close terms stream + * + * Should be used for resources clean up if stream is not read up to the end + */ + public function closeTermsStream() + { + while (($termStream = $this->_termsStreamQueue->pop()) !== null) { + $termStream->closeTermsStream(); + } + + $this->_termsStreamQueue = null; + $this->_lastTerm = null; + } +} diff --git a/library/vendor/Zend/Serializer.php b/library/vendor/Zend/Serializer.php index b622c9a6e..3eb84d524 100644 --- a/library/vendor/Zend/Serializer.php +++ b/library/vendor/Zend/Serializer.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Serializer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Serializer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Serializer diff --git a/library/vendor/Zend/Serializer/Adapter/AdapterAbstract.php b/library/vendor/Zend/Serializer/Adapter/AdapterAbstract.php index 5d4b19ede..a8657baaa 100644 --- a/library/vendor/Zend/Serializer/Adapter/AdapterAbstract.php +++ b/library/vendor/Zend/Serializer/Adapter/AdapterAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Serializer_Adapter_AdapterAbstract implements Zend_Serializer_Adapter_AdapterInterface diff --git a/library/vendor/Zend/Serializer/Adapter/AdapterInterface.php b/library/vendor/Zend/Serializer/Adapter/AdapterInterface.php index 7ee0719e1..970b02519 100644 --- a/library/vendor/Zend/Serializer/Adapter/AdapterInterface.php +++ b/library/vendor/Zend/Serializer/Adapter/AdapterInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Serializer_Adapter_AdapterInterface diff --git a/library/vendor/Zend/Serializer/Adapter/Amf0.php b/library/vendor/Zend/Serializer/Adapter/Amf0.php index ee92cf5bc..438b7c1fd 100644 --- a/library/vendor/Zend/Serializer/Adapter/Amf0.php +++ b/library/vendor/Zend/Serializer/Adapter/Amf0.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Serializer_Adapter_Amf0 extends Zend_Serializer_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Serializer/Adapter/Amf3.php b/library/vendor/Zend/Serializer/Adapter/Amf3.php index d698c6f48..b1f96a2d7 100644 --- a/library/vendor/Zend/Serializer/Adapter/Amf3.php +++ b/library/vendor/Zend/Serializer/Adapter/Amf3.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Serializer_Adapter_Amf3 extends Zend_Serializer_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Serializer/Adapter/Igbinary.php b/library/vendor/Zend/Serializer/Adapter/Igbinary.php new file mode 100644 index 000000000..3ce8045e4 --- /dev/null +++ b/library/vendor/Zend/Serializer/Adapter/Igbinary.php @@ -0,0 +1,94 @@ +_marker = new stdClass(); } @@ -1092,10 +1084,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt $pattern = '/\\\\u([a-fA-F0-9]{4})/u'; // \uXXXX $data = preg_replace_callback($pattern, array($this, '_convertMatchingUnicodeSequence2Utf8'), $data); - if (self::$_isPhp6) { - $data = unicode_decode($data, 'UTF-8'); - } - $this->_stack[] = $data; } @@ -1160,10 +1148,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt list(, $n) = unpack('l', $n); $data = $this->_read($n); - if (self::$_isPhp6) { - $data = unicode_decode($data, 'UTF-8'); - } - $this->_stack[] = $data; } diff --git a/library/vendor/Zend/Serializer/Adapter/Wddx.php b/library/vendor/Zend/Serializer/Adapter/Wddx.php index cf40c8e2e..c0a5c89dd 100644 --- a/library/vendor/Zend/Serializer/Adapter/Wddx.php +++ b/library/vendor/Zend/Serializer/Adapter/Wddx.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Serializer * @subpackage Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Serializer_Adapter_Wddx extends Zend_Serializer_Adapter_AdapterAbstract diff --git a/library/vendor/Zend/Serializer/Exception.php b/library/vendor/Zend/Serializer/Exception.php index d714bbdc1..6bde2cccf 100644 --- a/library/vendor/Zend/Serializer/Exception.php +++ b/library/vendor/Zend/Serializer/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Serializer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ /** * @category Zend * @package Zend_Serializer - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Serializer_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Server/Abstract.php b/library/vendor/Zend/Server/Abstract.php index 1356cb5dc..a6278accb 100644 --- a/library/vendor/Zend/Server/Abstract.php +++ b/library/vendor/Zend/Server/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -45,7 +45,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Cache.php b/library/vendor/Zend/Server/Cache.php index ef2cf3c8d..6a17a4532 100644 --- a/library/vendor/Zend/Server/Cache.php +++ b/library/vendor/Zend/Server/Cache.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Server_Cache diff --git a/library/vendor/Zend/Server/Definition.php b/library/vendor/Zend/Server/Definition.php index 35e9387fe..fb8d24aab 100644 --- a/library/vendor/Zend/Server/Definition.php +++ b/library/vendor/Zend/Server/Definition.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * @todo Implement iterator * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Server_Definition implements Countable, Iterator diff --git a/library/vendor/Zend/Server/Exception.php b/library/vendor/Zend/Server/Exception.php index f3ee4d303..c3b9c9fbe 100644 --- a/library/vendor/Zend/Server/Exception.php +++ b/library/vendor/Zend/Server/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/Server/Interface.php b/library/vendor/Zend/Server/Interface.php index bddd329ac..cc60bc59e 100644 --- a/library/vendor/Zend/Server/Interface.php +++ b/library/vendor/Zend/Server/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Method/Callback.php b/library/vendor/Zend/Server/Method/Callback.php index 5193fd2c1..3f81197f0 100644 --- a/library/vendor/Zend/Server/Method/Callback.php +++ b/library/vendor/Zend/Server/Method/Callback.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Server * @subpackage Method - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Server * @subpackage Method - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Server_Method_Callback diff --git a/library/vendor/Zend/Server/Method/Definition.php b/library/vendor/Zend/Server/Method/Definition.php index b89e13454..5635ae62e 100644 --- a/library/vendor/Zend/Server/Method/Definition.php +++ b/library/vendor/Zend/Server/Method/Definition.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Server * @subpackage Method - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Server * @subpackage Method - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Server_Method_Definition diff --git a/library/vendor/Zend/Server/Method/Parameter.php b/library/vendor/Zend/Server/Method/Parameter.php index 571af0152..63e14a4ef 100644 --- a/library/vendor/Zend/Server/Method/Parameter.php +++ b/library/vendor/Zend/Server/Method/Parameter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Server * @subpackage Method - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Server * @subpackage Method - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Server_Method_Parameter diff --git a/library/vendor/Zend/Server/Method/Prototype.php b/library/vendor/Zend/Server/Method/Prototype.php index 810caf799..33c5a14b9 100644 --- a/library/vendor/Zend/Server/Method/Prototype.php +++ b/library/vendor/Zend/Server/Method/Prototype.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Server * @subpackage Method - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Server * @subpackage Method - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Server_Method_Prototype diff --git a/library/vendor/Zend/Server/Reflection.php b/library/vendor/Zend/Server/Reflection.php index 12f2b65c9..5d95c64f1 100644 --- a/library/vendor/Zend/Server/Reflection.php +++ b/library/vendor/Zend/Server/Reflection.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -32,7 +32,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Reflection/Class.php b/library/vendor/Zend/Server/Reflection/Class.php index 7834c2ebf..9456f0a32 100644 --- a/library/vendor/Zend/Server/Reflection/Class.php +++ b/library/vendor/Zend/Server/Reflection/Class.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Reflection/Exception.php b/library/vendor/Zend/Server/Reflection/Exception.php index 3cce3b74d..e264768bd 100644 --- a/library/vendor/Zend/Server/Reflection/Exception.php +++ b/library/vendor/Zend/Server/Reflection/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Reflection/Function.php b/library/vendor/Zend/Server/Reflection/Function.php index 50892639e..cd76afa83 100644 --- a/library/vendor/Zend/Server/Reflection/Function.php +++ b/library/vendor/Zend/Server/Reflection/Function.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Reflection/Function/Abstract.php b/library/vendor/Zend/Server/Reflection/Function/Abstract.php index ce325f572..f0557f82b 100644 --- a/library/vendor/Zend/Server/Reflection/Function/Abstract.php +++ b/library/vendor/Zend/Server/Reflection/Function/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -43,7 +43,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Reflection/Method.php b/library/vendor/Zend/Server/Reflection/Method.php index 64c380a59..305b78377 100644 --- a/library/vendor/Zend/Server/Reflection/Method.php +++ b/library/vendor/Zend/Server/Reflection/Method.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Reflection/Node.php b/library/vendor/Zend/Server/Reflection/Node.php index 0ae91bf19..d80abf342 100644 --- a/library/vendor/Zend/Server/Reflection/Node.php +++ b/library/vendor/Zend/Server/Reflection/Node.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * @package Zend_Server * @subpackage Reflection * @version $Id$ - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Server_Reflection_Node diff --git a/library/vendor/Zend/Server/Reflection/Parameter.php b/library/vendor/Zend/Server/Reflection/Parameter.php index 51944367d..681824a44 100644 --- a/library/vendor/Zend/Server/Reflection/Parameter.php +++ b/library/vendor/Zend/Server/Reflection/Parameter.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Reflection/Prototype.php b/library/vendor/Zend/Server/Reflection/Prototype.php index f3c7501b9..e78062369 100644 --- a/library/vendor/Zend/Server/Reflection/Prototype.php +++ b/library/vendor/Zend/Server/Reflection/Prototype.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,7 +34,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Server/Reflection/ReturnValue.php b/library/vendor/Zend/Server/Reflection/ReturnValue.php index 14cc89f59..dcc5132c8 100644 --- a/library/vendor/Zend/Server/Reflection/ReturnValue.php +++ b/library/vendor/Zend/Server/Reflection/ReturnValue.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Server * @subpackage Reflection - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Session.php b/library/vendor/Zend/Session.php index 9d117c8bc..a1ed797b4 100644 --- a/library/vendor/Zend/Session.php +++ b/library/vendor/Zend/Session.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ * @since Preview Release 0.2 @@ -40,7 +40,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Session extends Zend_Session_Abstract @@ -797,8 +797,8 @@ class Zend_Session extends Zend_Session_Abstract } $validator = new $validator_name; if ($validator->validate() === false) { - /** @see Zend_Session_Exception */ - throw new Zend_Session_Exception("This session is not valid according to {$validator_name}."); + /** @see Zend_Session_Validator_Exception */ + throw new Zend_Session_Validator_Exception("This session is not valid according to {$validator_name}."); } } } diff --git a/library/vendor/Zend/Session/Abstract.php b/library/vendor/Zend/Session/Abstract.php index 57639eff4..15ffde008 100644 --- a/library/vendor/Zend/Session/Abstract.php +++ b/library/vendor/Zend/Session/Abstract.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ * @since Preview Release 0.2 @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Session_Abstract diff --git a/library/vendor/Zend/Session/Exception.php b/library/vendor/Zend/Session/Exception.php index c87ace3d0..52672ec68 100644 --- a/library/vendor/Zend/Session/Exception.php +++ b/library/vendor/Zend/Session/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ * @since Preview Release 0.2 @@ -31,7 +31,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Session_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Session/Namespace.php b/library/vendor/Zend/Session/Namespace.php index d5ffafba5..52d794549 100644 --- a/library/vendor/Zend/Session/Namespace.php +++ b/library/vendor/Zend/Session/Namespace.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ * @since Preview Release 0.2 @@ -36,7 +36,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Session_Namespace extends Zend_Session_Abstract implements IteratorAggregate diff --git a/library/vendor/Zend/Session/SaveHandler/DbTable.php b/library/vendor/Zend/Session/SaveHandler/DbTable.php index 18f8d6834..a4b1bf782 100644 --- a/library/vendor/Zend/Session/SaveHandler/DbTable.php +++ b/library/vendor/Zend/Session/SaveHandler/DbTable.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -42,7 +42,7 @@ * @category Zend * @package Zend_Session * @subpackage SaveHandler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Session_SaveHandler_DbTable diff --git a/library/vendor/Zend/Session/SaveHandler/Exception.php b/library/vendor/Zend/Session/SaveHandler/Exception.php index b103d1f2d..2b1876fb0 100644 --- a/library/vendor/Zend/Session/SaveHandler/Exception.php +++ b/library/vendor/Zend/Session/SaveHandler/Exception.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Session_SaveHandler_Exception extends Zend_Session_Exception diff --git a/library/vendor/Zend/Session/SaveHandler/Interface.php b/library/vendor/Zend/Session/SaveHandler/Interface.php index 5c04f441d..18ed5fe52 100644 --- a/library/vendor/Zend/Session/SaveHandler/Interface.php +++ b/library/vendor/Zend/Session/SaveHandler/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ * @since Preview Release 0.2 @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Session * @subpackage SaveHandler - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @see http://php.net/session_set_save_handler */ diff --git a/library/vendor/Zend/Session/Validator/Abstract.php b/library/vendor/Zend/Session/Validator/Abstract.php index 2c79f3265..f39d20e54 100644 --- a/library/vendor/Zend/Session/Validator/Abstract.php +++ b/library/vendor/Zend/Session/Validator/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Session - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ * @since Preview Release 0.2 @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Session * @subpackage Validator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Session_Validator_Abstract implements Zend_Session_Validator_Interface diff --git a/library/vendor/Zend/Session/Validator/Exception.php b/library/vendor/Zend/Session/Validator/Exception.php new file mode 100644 index 000000000..03c2a03f1 --- /dev/null +++ b/library/vendor/Zend/Session/Validator/Exception.php @@ -0,0 +1,42 @@ + 'encoded', 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"); + + /** + * soap:operation style + * + * @var array + */ + protected $_bindingStyle = array('style' => 'rpc', 'transport' => 'http://schemas.xmlsoap.org/soap/http'); + + /** + * Name of the class to handle the WSDL creation. + * + * @var string + */ + protected $_wsdlClass = 'Zend_Soap_Wsdl'; + + /** + * Constructor + * + * @param boolean|string|Zend_Soap_Wsdl_Strategy_Interface $strategy + * @param string|Zend_Uri $uri + * @param string $wsdlClass + */ + public function __construct($strategy = true, $uri=null, $wsdlClass=null) + { + $this->_reflection = new Zend_Server_Reflection(); + $this->setComplexTypeStrategy($strategy); + + if($uri !== null) { + $this->setUri($uri); + } + + if($wsdlClass !== null) { + $this->setWsdlClass($wsdlClass); + } + } + + /** + * Set the location at which the WSDL file will be availabe. + * + * @see Zend_Soap_Exception + * @param Zend_Uri|string $uri + * @return Zend_Soap_AutoDiscover + * @throws Zend_Soap_AutoDiscover_Exception + */ + public function setUri($uri) + { + if (!is_string($uri) && !($uri instanceof Zend_Uri)) { + throw new Zend_Soap_AutoDiscover_Exception("No uri given to Zend_Soap_AutoDiscover::setUri as string or Zend_Uri instance."); + } + $this->_uri = $uri; + + // change uri in WSDL file also if existant + if ($this->_wsdl instanceof Zend_Soap_Wsdl) { + $this->_wsdl->setUri($uri); + } + + return $this; + } + + /** + * Return the current Uri that the SOAP WSDL Service will be located at. + * + * @return Zend_Uri + */ + public function getUri() + { + if($this->_uri !== null) { + $uri = $this->_uri; + } else { + $schema = $this->getSchema(); + $host = $this->getHostName(); + $scriptName = $this->getRequestUriWithoutParameters(); + $uri = Zend_Uri::factory($schema . '://' . $host . $scriptName); + $this->setUri($uri); + } + return $uri; + } + + /** + * Set the name of the WSDL handling class. + * + * @see Zend_Soap_Exception + * @see Zend_Soap_Exception + * @param string $wsdlClass + * @return Zend_Soap_AutoDiscover + * @throws Zend_Soap_AutoDiscover_Exception + */ + public function setWsdlClass($wsdlClass) + { + if (!is_string($wsdlClass) && !is_subclass_of($wsdlClass, 'Zend_Soap_Wsdl')) { + throw new Zend_Soap_AutoDiscover_Exception("No Zend_Soap_Wsdl subclass given to Zend_Soap_AutoDiscover::setWsdlClass as string."); + } + $this->_wsdlClass = $wsdlClass; + + return $this; + } + + /** + * Return the name of the WSDL handling class. + * + * @return string + */ + public function getWsdlClass() + { + return $this->_wsdlClass; + } + + /** + * Set options for all the binding operations soap:body elements. + * + * By default the options are set to 'use' => 'encoded' and + * 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/". + * + * @see Zend_Soap_AutoDiscover_Exception + * @param array $operationStyle + * @return Zend_Soap_AutoDiscover + * @throws Zend_Soap_AutoDiscover_Exception + */ + public function setOperationBodyStyle(array $operationStyle=array()) + { + if(!isset($operationStyle['use'])) { + throw new Zend_Soap_AutoDiscover_Exception("Key 'use' is required in Operation soap:body style."); + } + $this->_operationBodyStyle = $operationStyle; + return $this; + } + + /** + * Set Binding soap:binding style. + * + * By default 'style' is 'rpc' and 'transport' is 'http://schemas.xmlsoap.org/soap/http'. + * + * @param array $bindingStyle + * @return Zend_Soap_AutoDiscover + */ + public function setBindingStyle(array $bindingStyle=array()) + { + if(isset($bindingStyle['style'])) { + $this->_bindingStyle['style'] = $bindingStyle['style']; + } + if(isset($bindingStyle['transport'])) { + $this->_bindingStyle['transport'] = $bindingStyle['transport']; + } + return $this; + } + + /** + * Detect and returns the current HTTP/HTTPS Schema + * + * @return string + */ + protected function getSchema() + { + $schema = "http"; + if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { + $schema = 'https'; + } + return $schema; + } + + /** + * Detect and return the current hostname + * + * @return string + */ + protected function getHostName() + { + if(isset($_SERVER['HTTP_HOST'])) { + $host = $_SERVER['HTTP_HOST']; + } else { + $host = $_SERVER['SERVER_NAME']; + } + return $host; + } + + /** + * Detect and return the current script name without parameters + * + * @return string + */ + protected function getRequestUriWithoutParameters() + { + if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) { // IIS with Microsoft Rewrite Module + $requestUri = $_SERVER['HTTP_X_ORIGINAL_URL']; + } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) { // check this first so IIS will catch + $requestUri = $_SERVER['HTTP_X_REWRITE_URL']; + } elseif (isset($_SERVER['REQUEST_URI'])) { + $requestUri = $_SERVER['REQUEST_URI']; + } elseif (isset($_SERVER['ORIG_PATH_INFO'])) { // IIS 5.0, PHP as CGI + $requestUri = $_SERVER['ORIG_PATH_INFO']; + } else { + $requestUri = $_SERVER['SCRIPT_NAME']; + } + if( ($pos = strpos($requestUri, "?")) !== false) { + $requestUri = substr($requestUri, 0, $pos); + } + + return $requestUri; + } + + /** + * Set the strategy that handles functions and classes that are added AFTER this call. + * + * @param boolean|string|Zend_Soap_Wsdl_Strategy_Interface $strategy + * @return Zend_Soap_AutoDiscover + */ + public function setComplexTypeStrategy($strategy) + { + $this->_strategy = $strategy; + if($this->_wsdl instanceof Zend_Soap_Wsdl) { + $this->_wsdl->setComplexTypeStrategy($strategy); + } + + return $this; + } + + /** + * Set the Class the SOAP server will use + * + * @param string $class Class Name + * @param string $namespace Class Namspace - Not Used + * @param array $argv Arguments to instantiate the class - Not Used + * @return Zend_Soap_AutoDiscover + */ + public function setClass($class, $namespace = '', $argv = null) + { + $uri = $this->getUri(); + + $wsdl = new $this->_wsdlClass($class, $uri, $this->_strategy); + + // The wsdl:types element must precede all other elements (WS-I Basic Profile 1.1 R2023) + $wsdl->addSchemaTypeSection(); + + $port = $wsdl->addPortType($class . 'Port'); + $binding = $wsdl->addBinding($class . 'Binding', 'tns:' .$class. 'Port'); + + $wsdl->addSoapBinding($binding, $this->_bindingStyle['style'], $this->_bindingStyle['transport']); + $wsdl->addService($class . 'Service', $class . 'Port', 'tns:' . $class . 'Binding', $uri); + foreach ($this->_reflection->reflectClass($class)->getMethods() as $method) { + $this->_addFunctionToWsdl($method, $wsdl, $port, $binding); + } + $this->_wsdl = $wsdl; + + return $this; + } + + /** + * Add a Single or Multiple Functions to the WSDL + * + * @param string $function Function Name + * @param string $namespace Function namespace - Not Used + * @return Zend_Soap_AutoDiscover + */ + public function addFunction($function, $namespace = '') + { + static $port; + static $operation; + static $binding; + + if (!is_array($function)) { + $function = (array) $function; + } + + $uri = $this->getUri(); + + if (!($this->_wsdl instanceof Zend_Soap_Wsdl)) { + $parts = explode('.', basename($_SERVER['SCRIPT_NAME'])); + $name = $parts[0]; + $wsdl = new Zend_Soap_Wsdl($name, $uri, $this->_strategy); + + // The wsdl:types element must precede all other elements (WS-I Basic Profile 1.1 R2023) + $wsdl->addSchemaTypeSection(); + + $port = $wsdl->addPortType($name . 'Port'); + $binding = $wsdl->addBinding($name . 'Binding', 'tns:' .$name. 'Port'); + + $wsdl->addSoapBinding($binding, $this->_bindingStyle['style'], $this->_bindingStyle['transport']); + $wsdl->addService($name . 'Service', $name . 'Port', 'tns:' . $name . 'Binding', $uri); + } else { + $wsdl = $this->_wsdl; + } + + foreach ($function as $func) { + $method = $this->_reflection->reflectFunction($func); + $this->_addFunctionToWsdl($method, $wsdl, $port, $binding); + } + $this->_wsdl = $wsdl; + + return $this; + } + + /** + * Add a function to the WSDL document. + * + * @param Zend_Server_Reflection_Function_Abstract $function function to add + * @param Zend_Soap_Wsdl $wsdl WSDL document + * @param object $port wsdl:portType + * @param object $binding wsdl:binding + * @return void + */ + protected function _addFunctionToWsdl($function, $wsdl, $port, $binding) + { + $uri = $this->getUri(); + + // We only support one prototype: the one with the maximum number of arguments + $prototype = null; + $maxNumArgumentsOfPrototype = -1; + foreach ($function->getPrototypes() as $tmpPrototype) { + $numParams = count($tmpPrototype->getParameters()); + if ($numParams > $maxNumArgumentsOfPrototype) { + $maxNumArgumentsOfPrototype = $numParams; + $prototype = $tmpPrototype; + } + } + if ($prototype === null) { + throw new Zend_Soap_AutoDiscover_Exception("No prototypes could be found for the '" . $function->getName() . "' function"); + } + + // Add the input message (parameters) + $args = array(); + if ($this->_bindingStyle['style'] == 'document') { + // Document style: wrap all parameters in a sequence element + $sequence = array(); + foreach ($prototype->getParameters() as $param) { + $sequenceElement = array( + 'name' => $param->getName(), + 'type' => $wsdl->getType($param->getType()) + ); + if ($param->isOptional()) { + $sequenceElement['nillable'] = 'true'; + } + $sequence[] = $sequenceElement; + } + $element = array( + 'name' => $function->getName(), + 'sequence' => $sequence + ); + // Add the wrapper element part, which must be named 'parameters' + $args['parameters'] = array('element' => $wsdl->addElement($element)); + } else { + // RPC style: add each parameter as a typed part + foreach ($prototype->getParameters() as $param) { + $args[$param->getName()] = array('type' => $wsdl->getType($param->getType())); + } + } + $wsdl->addMessage($function->getName() . 'In', $args); + + $isOneWayMessage = false; + if($prototype->getReturnType() == "void") { + $isOneWayMessage = true; + } + + if($isOneWayMessage == false) { + // Add the output message (return value) + $args = array(); + if ($this->_bindingStyle['style'] == 'document') { + // Document style: wrap the return value in a sequence element + $sequence = array(); + if ($prototype->getReturnType() != "void") { + $sequence[] = array( + 'name' => $function->getName() . 'Result', + 'type' => $wsdl->getType($prototype->getReturnType()) + ); + } + $element = array( + 'name' => $function->getName() . 'Response', + 'sequence' => $sequence + ); + // Add the wrapper element part, which must be named 'parameters' + $args['parameters'] = array('element' => $wsdl->addElement($element)); + } else if ($prototype->getReturnType() != "void") { + // RPC style: add the return value as a typed part + $args['return'] = array('type' => $wsdl->getType($prototype->getReturnType())); + } + $wsdl->addMessage($function->getName() . 'Out', $args); + } + + // Add the portType operation + if($isOneWayMessage == false) { + $portOperation = $wsdl->addPortOperation($port, $function->getName(), 'tns:' . $function->getName() . 'In', 'tns:' . $function->getName() . 'Out'); + } else { + $portOperation = $wsdl->addPortOperation($port, $function->getName(), 'tns:' . $function->getName() . 'In', false); + } + $desc = $function->getDescription(); + if (strlen($desc) > 0) { + $wsdl->addDocumentation($portOperation, $desc); + } + + // When using the RPC style, make sure the operation style includes a 'namespace' attribute (WS-I Basic Profile 1.1 R2717) + if ($this->_bindingStyle['style'] == 'rpc' && !isset($this->_operationBodyStyle['namespace'])) { + $this->_operationBodyStyle['namespace'] = ''.$uri; + } + + // Add the binding operation + if($isOneWayMessage == false) { + $operation = $wsdl->addBindingOperation($binding, $function->getName(), $this->_operationBodyStyle, $this->_operationBodyStyle); + } else { + $operation = $wsdl->addBindingOperation($binding, $function->getName(), $this->_operationBodyStyle); + } + $wsdl->addSoapOperation($operation, $uri . '#' .$function->getName()); + + // Add the function name to the list + $this->_functions[] = $function->getName(); + } + + /** + * Action to take when an error occurs + * + * @param string $fault + * @param string|int $code + * @throws Zend_Soap_AutoDiscover_Exception + */ + public function fault($fault = null, $code = null) + { + throw new Zend_Soap_AutoDiscover_Exception("Function has no use in AutoDiscover."); + } + + /** + * Handle the Request + * + * @param string $request A non-standard request - Not Used + */ + public function handle($request = false) + { + if (!headers_sent()) { + header('Content-Type: text/xml'); + } + $this->_wsdl->dump(); + } + + /** + * Proxy to WSDL dump function + * + * @param string $filename + * @return boolean + * @throws Zend_Soap_AutoDiscover_Exception + */ + public function dump($filename) + { + if($this->_wsdl !== null) { + return $this->_wsdl->dump($filename); + } else { + /** + * @see Zend_Soap_AutoDiscover_Exception + */ + throw new Zend_Soap_AutoDiscover_Exception("Cannot dump autodiscovered contents, WSDL file has not been generated yet."); + } + } + + /** + * Proxy to WSDL toXml() function + * + * @return string + * @throws Zend_Soap_AutoDiscover_Exception + */ + public function toXml() + { + if($this->_wsdl !== null) { + return $this->_wsdl->toXml(); + } else { + /** + * @see Zend_Soap_AutoDiscover_Exception + */ + throw new Zend_Soap_AutoDiscover_Exception("Cannot return autodiscovered contents, WSDL file has not been generated yet."); + } + } + + /** + * Return an array of functions in the WSDL + * + * @return array + */ + public function getFunctions() + { + return $this->_functions; + } + + /** + * Load Functions + * + * @param unknown_type $definition + * @throws Zend_Soap_AutoDiscover_Exception + */ + public function loadFunctions($definition) + { + throw new Zend_Soap_AutoDiscover_Exception("Function has no use in AutoDiscover."); + } + + /** + * Set Persistance + * + * @param int $mode + * @throws Zend_Soap_AutoDiscover_Exception + */ + public function setPersistence($mode) + { + throw new Zend_Soap_AutoDiscover_Exception("Function has no use in AutoDiscover."); + } + + /** + * Returns an XSD Type for the given PHP type + * + * @param string $type PHP Type to get the XSD type for + * @return string + */ + public function getType($type) + { + if (!($this->_wsdl instanceof Zend_Soap_Wsdl)) { + /** @todo Exception throwing may be more correct */ + + // WSDL is not defined yet, so we can't recognize type in context of current service + return ''; + } else { + return $this->_wsdl->getType($type); + } + } +} diff --git a/library/vendor/Zend/Soap/AutoDiscover/Exception.php b/library/vendor/Zend/Soap/AutoDiscover/Exception.php new file mode 100644 index 000000000..6b6491ed2 --- /dev/null +++ b/library/vendor/Zend/Soap/AutoDiscover/Exception.php @@ -0,0 +1,33 @@ + PHP class pairings for handling return/incoming values + * @var array + */ + protected $_classmap = null; + + /** + * Registered fault exceptions + * @var array + */ + protected $_faultExceptions = array(); + + /** + * SOAP version to use; SOAP_1_2 by default, to allow processing of headers + * @var int + */ + protected $_soapVersion = SOAP_1_2; + + /** Set of other SoapClient options */ + protected $_uri = null; + protected $_location = null; + protected $_style = null; + protected $_use = null; + protected $_login = null; + protected $_password = null; + protected $_proxy_host = null; + protected $_proxy_port = null; + protected $_proxy_login = null; + protected $_proxy_password = null; + protected $_local_cert = null; + protected $_passphrase = null; + protected $_compression = null; + protected $_connection_timeout = null; + protected $_stream_context = null; + protected $_features = null; + protected $_cache_wsdl = null; + protected $_user_agent = null; + protected $_exceptions = null; + + /** + * WSDL used to access server + * It also defines Zend_Soap_Client working mode (WSDL vs non-WSDL) + * + * @var string + */ + protected $_wsdl = null; + + /** + * SoapClient object + * + * @var SoapClient + */ + protected $_soapClient; + + /** + * Last invoked method + * + * @var string + */ + protected $_lastMethod = ''; + + /** + * SOAP request headers. + * + * Array of SoapHeader objects + * + * @var array + */ + protected $_soapInputHeaders = array(); + + /** + * Permanent SOAP request headers (shared between requests). + * + * Array of SoapHeader objects + * + * @var array + */ + protected $_permanentSoapInputHeaders = array(); + + /** + * Output SOAP headers. + * + * Array of SoapHeader objects + * + * @var array + */ + protected $_soapOutputHeaders = array(); + + /** + * Constructor + * + * @param string $wsdl + * @param array $options + */ + public function __construct($wsdl = null, $options = null) + { + if (!extension_loaded('soap')) { + throw new Zend_Soap_Client_Exception('SOAP extension is not loaded.'); + } + + if ($wsdl !== null) { + $this->setWsdl($wsdl); + } + if ($options !== null) { + $this->setOptions($options); + } + } + + /** + * Set wsdl + * + * @param string $wsdl + * @return Zend_Soap_Client + */ + public function setWsdl($wsdl) + { + $this->_wsdl = $wsdl; + $this->_soapClient = null; + + return $this; + } + + /** + * Get wsdl + * + * @return string + */ + public function getWsdl() + { + return $this->_wsdl; + } + + /** + * Set Options + * + * Allows setting options as an associative array of option => value pairs. + * + * @param array|Zend_Config $options + * @return Zend_Soap_Client + * @throws Zend_SoapClient_Exception + */ + public function setOptions($options) + { + if($options instanceof Zend_Config) { + $options = $options->toArray(); + } + + foreach ($options as $key => $value) { + switch ($key) { + case 'classmap': + case 'classMap': + $this->setClassmap($value); + break; + case 'encoding': + $this->setEncoding($value); + break; + case 'soapVersion': + case 'soap_version': + $this->setSoapVersion($value); + break; + case 'wsdl': + $this->setWsdl($value); + break; + case 'uri': + $this->setUri($value); + break; + case 'location': + $this->setLocation($value); + break; + case 'style': + $this->setStyle($value); + break; + case 'use': + $this->setEncodingMethod($value); + break; + case 'login': + $this->setHttpLogin($value); + break; + case 'password': + $this->setHttpPassword($value); + break; + case 'proxy_host': + $this->setProxyHost($value); + break; + case 'proxy_port': + $this->setProxyPort($value); + break; + case 'proxy_login': + $this->setProxyLogin($value); + break; + case 'proxy_password': + $this->setProxyPassword($value); + break; + case 'local_cert': + $this->setHttpsCertificate($value); + break; + case 'passphrase': + $this->setHttpsCertPassphrase($value); + break; + case 'compression': + $this->setCompressionOptions($value); + break; + case 'stream_context': + $this->setStreamContext($value); + break; + case 'features': + $this->setSoapFeatures($value); + break; + case 'cache_wsdl': + $this->setWsdlCache($value); + break; + case 'useragent': + case 'userAgent': + case 'user_agent': + $this->setUserAgent($value); + break; + case 'exceptions': + $this->setExceptions($value); + break; + + // Not used now + // case 'connection_timeout': + // $this->_connection_timeout = $value; + // break; + + default: + throw new Zend_Soap_Client_Exception('Unknown SOAP client option'); + break; + } + } + + return $this; + } + + /** + * Return array of options suitable for using with SoapClient constructor + * + * @return array + */ + public function getOptions() + { + $options = array(); + + $options['classmap'] = $this->getClassmap(); + $options['encoding'] = $this->getEncoding(); + $options['soap_version'] = $this->getSoapVersion(); + $options['wsdl'] = $this->getWsdl(); + $options['uri'] = $this->getUri(); + $options['location'] = $this->getLocation(); + $options['style'] = $this->getStyle(); + $options['use'] = $this->getEncodingMethod(); + $options['login'] = $this->getHttpLogin(); + $options['password'] = $this->getHttpPassword(); + $options['proxy_host'] = $this->getProxyHost(); + $options['proxy_port'] = $this->getProxyPort(); + $options['proxy_login'] = $this->getProxyLogin(); + $options['proxy_password'] = $this->getProxyPassword(); + $options['local_cert'] = $this->getHttpsCertificate(); + $options['passphrase'] = $this->getHttpsCertPassphrase(); + $options['compression'] = $this->getCompressionOptions(); + //$options['connection_timeout'] = $this->_connection_timeout; + $options['stream_context'] = $this->getStreamContext(); + $options['cache_wsdl'] = $this->getWsdlCache(); + $options['features'] = $this->getSoapFeatures(); + $options['user_agent'] = $this->getUserAgent(); + $options['exceptions'] = $this->getExceptions(); + + foreach ($options as $key => $value) { + /* + * ugly hack as I don't know if checking for '=== null' + * breaks some other option + */ + if (in_array($key, array('user_agent', 'cache_wsdl', 'compression', 'exceptions'))) { + if ($value === null) { + unset($options[$key]); + } + } else { + if ($value == null) { + unset($options[$key]); + } + } + } + + return $options; + } + + /** + * Set SOAP version + * + * @param int $version One of the SOAP_1_1 or SOAP_1_2 constants + * @return Zend_Soap_Client + * @throws Zend_Soap_Client_Exception with invalid soap version argument + */ + public function setSoapVersion($version) + { + if (!in_array($version, array(SOAP_1_1, SOAP_1_2))) { + throw new Zend_Soap_Client_Exception('Invalid soap version specified. Use SOAP_1_1 or SOAP_1_2 constants.'); + } + $this->_soapVersion = $version; + + $this->_soapClient = null; + + return $this; + } + + /** + * Get SOAP version + * + * @return int + */ + public function getSoapVersion() + { + return $this->_soapVersion; + } + + /** + * Set classmap + * + * @param array $classmap + * @return Zend_Soap_Client + * @throws Zend_Soap_Client_Exception for any invalid class in the class map + */ + public function setClassmap(array $classmap) + { + foreach ($classmap as $type => $class) { + if (!class_exists($class)) { + throw new Zend_Soap_Client_Exception('Invalid class in class map'); + } + } + + $this->_classmap = $classmap; + + $this->_soapClient = null; + + return $this; + } + + /** + * Retrieve classmap + * + * @return mixed + */ + public function getClassmap() + { + return $this->_classmap; + } + + /** + * Set encoding + * + * @param string $encoding + * @return Zend_Soap_Client + * @throws Zend_Soap_Client_Exception with invalid encoding argument + */ + public function setEncoding($encoding) + { + if (!is_string($encoding)) { + throw new Zend_Soap_Client_Exception('Invalid encoding specified'); + } + + $this->_encoding = $encoding; + + $this->_soapClient = null; + + return $this; + } + + /** + * Get encoding + * + * @return string + */ + public function getEncoding() + { + return $this->_encoding; + } + + /** + * Check for valid URN + * + * @param string $urn + * @return true + * @throws Zend_Soap_Client_Exception on invalid URN + */ + public function validateUrn($urn) + { + $scheme = parse_url($urn, PHP_URL_SCHEME); + if ($scheme === false || $scheme === null) { + throw new Zend_Soap_Client_Exception('Invalid URN'); + } + + return true; + + } + + /** + * Set URI + * + * URI in Web Service the target namespace + * + * @param string $uri + * @return Zend_Soap_Client + * @throws Zend_Soap_Client_Exception with invalid uri argument + */ + public function setUri($uri) + { + $this->validateUrn($uri); + $this->_uri = $uri; + + $this->_soapClient = null; + + return $this; + } + + /** + * Retrieve URI + * + * @return string + */ + public function getUri() + { + return $this->_uri; + } + + /** + * Set Location + * + * URI in Web Service the target namespace + * + * @param string $location + * @return Zend_Soap_Client + * @throws Zend_Soap_Client_Exception with invalid uri argument + */ + public function setLocation($location) + { + $this->validateUrn($location); + $this->_location = $location; + + $this->_soapClient = null; + + return $this; + } + + /** + * Retrieve URI + * + * @return string + */ + public function getLocation() + { + return $this->_location; + } + + /** + * Set request style + * + * @param int $style One of the SOAP_RPC or SOAP_DOCUMENT constants + * @return Zend_Soap_Client + * @throws Zend_Soap_Client_Exception with invalid style argument + */ + public function setStyle($style) + { + if (!in_array($style, array(SOAP_RPC, SOAP_DOCUMENT))) { + throw new Zend_Soap_Client_Exception('Invalid request style specified. Use SOAP_RPC or SOAP_DOCUMENT constants.'); + } + + $this->_style = $style; + + $this->_soapClient = null; + + return $this; + } + + /** + * Get request style + * + * @return int + */ + public function getStyle() + { + return $this->_style; + } + + /** + * Set message encoding method + * + * @param int $use One of the SOAP_ENCODED or SOAP_LITERAL constants + * @return Zend_Soap_Client + * @throws Zend_Soap_Client_Exception with invalid message encoding method argument + */ + public function setEncodingMethod($use) + { + if (!in_array($use, array(SOAP_ENCODED, SOAP_LITERAL))) { + throw new Zend_Soap_Client_Exception('Invalid message encoding method. Use SOAP_ENCODED or SOAP_LITERAL constants.'); + } + + $this->_use = $use; + + $this->_soapClient = null; + + return $this; + } + + /** + * Get message encoding method + * + * @return int + */ + public function getEncodingMethod() + { + return $this->_use; + } + + /** + * Set HTTP login + * + * @param string $login + * @return Zend_Soap_Client + */ + public function setHttpLogin($login) + { + $this->_login = $login; + + $this->_soapClient = null; + + return $this; + } + + /** + * Retrieve HTTP Login + * + * @return string + */ + public function getHttpLogin() + { + return $this->_login; + } + + /** + * Set HTTP password + * + * @param string $password + * @return Zend_Soap_Client + */ + public function setHttpPassword($password) + { + $this->_password = $password; + + $this->_soapClient = null; + + return $this; + } + + /** + * Retrieve HTTP Password + * + * @return string + */ + public function getHttpPassword() + { + return $this->_password; + } + + /** + * Set proxy host + * + * @param string $proxyHost + * @return Zend_Soap_Client + */ + public function setProxyHost($proxyHost) + { + $this->_proxy_host = $proxyHost; + + $this->_soapClient = null; + + return $this; + } + + /** + * Retrieve proxy host + * + * @return string + */ + public function getProxyHost() + { + return $this->_proxy_host; + } + + /** + * Set proxy port + * + * @param int $proxyPort + * @return Zend_Soap_Client + */ + public function setProxyPort($proxyPort) + { + $this->_proxy_port = (int)$proxyPort; + + $this->_soapClient = null; + + return $this; + } + + /** + * Retrieve proxy port + * + * @return int + */ + public function getProxyPort() + { + return $this->_proxy_port; + } + + /** + * Set proxy login + * + * @param string $proxyLogin + * @return Zend_Soap_Client + */ + public function setProxyLogin($proxyLogin) + { + $this->_proxy_login = $proxyLogin; + + $this->_soapClient = null; + + return $this; + } + + /** + * Retrieve proxy login + * + * @return string + */ + public function getProxyLogin() + { + return $this->_proxy_login; + } + + /** + * Set proxy password + * + * @param string $proxyLogin + * @return Zend_Soap_Client + */ + public function setProxyPassword($proxyPassword) + { + $this->_proxy_password = $proxyPassword; + + $this->_soapClient = null; + + return $this; + } + + /** + * Set HTTPS client certificate path + * + * @param string $localCert local certificate path + * @return Zend_Soap_Client + * @throws Zend_Soap_Client_Exception with invalid local certificate path argument + */ + public function setHttpsCertificate($localCert) + { + if (!is_readable($localCert)) { + throw new Zend_Soap_Client_Exception('Invalid HTTPS client certificate path.'); + } + + $this->_local_cert = $localCert; + + $this->_soapClient = null; + + return $this; + } + + /** + * Get HTTPS client certificate path + * + * @return string + */ + public function getHttpsCertificate() + { + return $this->_local_cert; + } + + /** + * Set HTTPS client certificate passphrase + * + * @param string $passphrase + * @return Zend_Soap_Client + */ + public function setHttpsCertPassphrase($passphrase) + { + $this->_passphrase = $passphrase; + + $this->_soapClient = null; + + return $this; + } + + /** + * Get HTTPS client certificate passphrase + * + * @return string + */ + public function getHttpsCertPassphrase() + { + return $this->_passphrase; + } + + /** + * Set compression options + * + * @param int|null $compressionOptions + * @return Zend_Soap_Client + */ + public function setCompressionOptions($compressionOptions) + { + if ($compressionOptions === null) { + $this->_compression = null; + } else { + $this->_compression = (int)$compressionOptions; + } + $this->_soapClient = null; + return $this; + } + + /** + * Get Compression options + * + * @return int + */ + public function getCompressionOptions() + { + return $this->_compression; + } + + /** + * Retrieve proxy password + * + * @return string + */ + public function getProxyPassword() + { + return $this->_proxy_password; + } + + /** + * Set Stream Context + * + * @return Zend_Soap_Client + */ + public function setStreamContext($context) + { + if(!is_resource($context) || get_resource_type($context) !== "stream-context") { + /** + * @see Zend_Soap_Client_Exception + */ + throw new Zend_Soap_Client_Exception( + "Invalid stream context resource given." + ); + } + + $this->_stream_context = $context; + return $this; + } + + /** + * Get Stream Context + * + * @return resource + */ + public function getStreamContext() + { + return $this->_stream_context; + } + + /** + * Set the SOAP Feature options. + * + * @param string|int $feature + * @return Zend_Soap_Client + */ + public function setSoapFeatures($feature) + { + $this->_features = $feature; + + $this->_soapClient = null; + return $this; + } + + /** + * Return current SOAP Features options + * + * @return int + */ + public function getSoapFeatures() + { + return $this->_features; + } + + /** + * Set the SOAP Wsdl Caching Options + * + * @param string|int|boolean|null $caching + * @return Zend_Soap_Client + */ + public function setWsdlCache($caching) + { + if ($caching === null) { + $this->_cache_wsdl = null; + } else { + $this->_cache_wsdl = (int)$caching; + } + return $this; + } + + /** + * Get current SOAP Wsdl Caching option + * + * @return int + */ + public function getWsdlCache() + { + return $this->_cache_wsdl; + } + + /** + * Set the string to use in User-Agent header + * + * @param string|null $userAgent + * @return Zend_Soap_Client + */ + public function setUserAgent($userAgent) + { + if ($userAgent === null) { + $this->_user_agent = null; + } else { + $this->_user_agent = (string)$userAgent; + } + return $this; + } + + /** + * Get current string to use in User-Agent header + * + * @return string|null + */ + public function getUserAgent() + { + return $this->_user_agent; + } + + /** + * Set the exceptions option + * + * The exceptions option is a boolean value defining whether soap errors + * throw exceptions. + * + * @see http://php.net/manual/soapclient.soapclient.php#refsect1-soapclient.soapclient-parameters + * + * @param bool $exceptions + * @return $this + */ + public function setExceptions($exceptions) + { + $this->_exceptions = (bool) $exceptions; + + return $this; + } + + /** + * Get the exceptions option + * + * The exceptions option is a boolean value defining whether soap errors + * throw exceptions. + * + * @see http://php.net/manual/soapclient.soapclient.php#refsect1-soapclient.soapclient-parameters + * + * @return bool|null + */ + public function getExceptions() + { + return $this->_exceptions; + } + + /** + * Retrieve request XML + * + * @return string + */ + public function getLastRequest() + { + if ($this->_soapClient !== null) { + return $this->_soapClient->__getLastRequest(); + } + + return ''; + } + + /** + * Get response XML + * + * @return string + */ + public function getLastResponse() + { + if ($this->_soapClient !== null) { + return $this->_soapClient->__getLastResponse(); + } + + return ''; + } + + /** + * Retrieve request headers + * + * @return string + */ + public function getLastRequestHeaders() + { + if ($this->_soapClient !== null) { + return $this->_soapClient->__getLastRequestHeaders(); + } + + return ''; + } + + /** + * Retrieve response headers (as string) + * + * @return string + */ + public function getLastResponseHeaders() + { + if ($this->_soapClient !== null) { + return $this->_soapClient->__getLastResponseHeaders(); + } + + return ''; + } + + /** + * Retrieve last invoked method + * + * @return string + */ + public function getLastMethod() + { + return $this->_lastMethod; + } + + /** + * Do request proxy method. + * + * May be overridden in subclasses + * + * @internal + * @param Zend_Soap_Client_Common $client + * @param string $request + * @param string $location + * @param string $action + * @param int $version + * @param int $one_way + * @return mixed + */ + public function _doRequest(Zend_Soap_Client_Common $client, $request, $location, $action, $version, $one_way = null) + { + // Perform request as is + if ($one_way == null) { + return call_user_func(array($client,'SoapClient::__doRequest'), $request, $location, $action, $version); + } else { + return call_user_func(array($client,'SoapClient::__doRequest'), $request, $location, $action, $version, $one_way); + } + } + + /** + * Initialize SOAP Client object + * + * @throws Zend_Soap_Client_Exception + */ + protected function _initSoapClientObject() + { + $wsdl = $this->getWsdl(); + $options = array_merge($this->getOptions(), array('trace' => true)); + + if ($wsdl == null) { + if (!isset($options['location'])) { + throw new Zend_Soap_Client_Exception('\'location\' parameter is required in non-WSDL mode.'); + } + if (!isset($options['uri'])) { + throw new Zend_Soap_Client_Exception('\'uri\' parameter is required in non-WSDL mode.'); + } + } else { + if (isset($options['use'])) { + throw new Zend_Soap_Client_Exception('\'use\' parameter only works in non-WSDL mode.'); + } + if (isset($options['style'])) { + throw new Zend_Soap_Client_Exception('\'style\' parameter only works in non-WSDL mode.'); + } + } + unset($options['wsdl']); + + $this->_soapClient = new Zend_Soap_Client_Common(array($this, '_doRequest'), $wsdl, $options); + } + + + /** + * Perform arguments pre-processing + * + * My be overridden in descendant classes + * + * @param array $arguments + */ + protected function _preProcessArguments($arguments) + { + // Do nothing + return $arguments; + } + + /** + * Perform result pre-processing + * + * My be overridden in descendant classes + * + * @param array $arguments + */ + protected function _preProcessResult($result) + { + // Do nothing + return $result; + } + + /** + * Add SOAP input header + * + * @param SoapHeader $header + * @param boolean $permanent + * @return Zend_Soap_Client + */ + public function addSoapInputHeader(SoapHeader $header, $permanent = false) + { + if ($permanent) { + $this->_permanentSoapInputHeaders[] = $header; + } else { + $this->_soapInputHeaders[] = $header; + } + + return $this; + } + + /** + * Reset SOAP input headers + * + * @return Zend_Soap_Client + */ + public function resetSoapInputHeaders() + { + $this->_permanentSoapInputHeaders = array(); + $this->_soapInputHeaders = array(); + + return $this; + } + + /** + * Get last SOAP output headers + * + * @return array + */ + public function getLastSoapOutputHeaderObjects() + { + return $this->_soapOutputHeaders; + } + + /** + * Perform a SOAP call + * + * @param string $name + * @param array $arguments + * @return mixed + */ + public function __call($name, $arguments) + { + $soapClient = $this->getSoapClient(); + + $this->_lastMethod = $name; + + $soapHeaders = array_merge($this->_permanentSoapInputHeaders, $this->_soapInputHeaders); + $result = $soapClient->__soapCall($name, + $this->_preProcessArguments($arguments), + null, /* Options are already set to the SOAP client object */ + (count($soapHeaders) > 0)? $soapHeaders : null, + $this->_soapOutputHeaders); + + // Reset non-permanent input headers + $this->_soapInputHeaders = array(); + + return $this->_preProcessResult($result); + } + + + /** + * Return a list of available functions + * + * @return array + * @throws Zend_Soap_Client_Exception + */ + public function getFunctions() + { + if ($this->getWsdl() == null) { + throw new Zend_Soap_Client_Exception('\'getFunctions\' method is available only in WSDL mode.'); + } + + $soapClient = $this->getSoapClient(); + return $soapClient->__getFunctions(); + } + + + /** + * Get used types. + * + * @return array + */ + + /** + * Return a list of SOAP types + * + * @return array + * @throws Zend_Soap_Client_Exception + */ + public function getTypes() + { + if ($this->getWsdl() == null) { + throw new Zend_Soap_Client_Exception('\'getTypes\' method is available only in WSDL mode.'); + } + + $soapClient = $this->getSoapClient(); + + return $soapClient->__getTypes(); + } + + /** + * @param SoapClient $soapClient + * @return Zend_Soap_Client + */ + public function setSoapClient(SoapClient $soapClient) + { + $this->_soapClient = $soapClient; + return $this; + } + + /** + * @return SoapClient + */ + public function getSoapClient() + { + if ($this->_soapClient == null) { + $this->_initSoapClientObject(); + } + return $this->_soapClient; + } + + /** + * @param string $name + * @param string $value + * @return Zend_Soap_Client + */ + public function setCookie($cookieName, $cookieValue=null) + { + $soapClient = $this->getSoapClient(); + $soapClient->__setCookie($cookieName, $cookieValue); + return $this; + } +} diff --git a/library/vendor/Zend/Soap/Client/Common.php b/library/vendor/Zend/Soap/Client/Common.php new file mode 100644 index 000000000..7880115ce --- /dev/null +++ b/library/vendor/Zend/Soap/Client/Common.php @@ -0,0 +1,76 @@ +_doRequestCallback = $doRequestCallback; + + parent::__construct($wsdl, $options); + } + + /** + * Performs SOAP request over HTTP. + * Overridden to implement different transport layers, perform additional XML processing or other purpose. + * + * @param string $request + * @param string $location + * @param string $action + * @param int $version + * @param int $one_way + * @return mixed + */ + function __doRequest($request, $location, $action, $version, $one_way = null) + { + if ($one_way === null) { + return call_user_func($this->_doRequestCallback, $this, $request, $location, $action, $version); + } else { + return call_user_func($this->_doRequestCallback, $this, $request, $location, $action, $version, $one_way); + } + } + +} + +} // end if (extension_loaded('soap') diff --git a/library/vendor/Zend/Soap/Client/DotNet.php b/library/vendor/Zend/Soap/Client/DotNet.php new file mode 100644 index 000000000..0e6d121c2 --- /dev/null +++ b/library/vendor/Zend/Soap/Client/DotNet.php @@ -0,0 +1,93 @@ +setSoapVersion(SOAP_1_1); + + parent::__construct($wsdl, $options); + } + + + /** + * Perform arguments pre-processing + * + * My be overridden in descendant classes + * + * @param array $arguments + * @throws Zend_Soap_Client_Exception + */ + protected function _preProcessArguments($arguments) + { + if (count($arguments) > 1 || + (count($arguments) == 1 && !is_array(reset($arguments))) + ) { + throw new Zend_Soap_Client_Exception('.Net webservice arguments have to be grouped into array: array(\'a\' => $a, \'b\' => $b, ...).'); + } + + // Do nothing + return $arguments; + } + + /** + * Perform result pre-processing + * + * My be overridden in descendant classes + * + * @param array $arguments + */ + protected function _preProcessResult($result) + { + $resultProperty = $this->getLastMethod() . 'Result'; + + return $result->$resultProperty; + } + +} + +} // end if (extension_loaded('soap') diff --git a/library/vendor/Zend/Soap/Client/Exception.php b/library/vendor/Zend/Soap/Client/Exception.php new file mode 100644 index 000000000..2c210ed24 --- /dev/null +++ b/library/vendor/Zend/Soap/Client/Exception.php @@ -0,0 +1,34 @@ +_server = $server; + + // Use Server specified SOAP version as default + $this->setSoapVersion($server->getSoapVersion()); + + parent::__construct($wsdl, $options); + } + + /** + * Actual "do request" method. + * + * @internal + * @param Zend_Soap_Client_Common $client + * @param string $request + * @param string $location + * @param string $action + * @param int $version + * @param int $one_way + * @return mixed + */ + public function _doRequest(Zend_Soap_Client_Common $client, $request, $location, $action, $version, $one_way = null) + { + // Perform request as is + ob_start(); + $this->_server->handle($request); + $response = ob_get_clean(); + + if ($response === null || $response === '') { + $serverResponse = $this->server->getResponse(); + if ($serverResponse !== null) { + $response = $serverResponse; + } + } + + return $response; + } +} + +} // end if (extension_loaded('soap') diff --git a/library/vendor/Zend/Soap/Server.php b/library/vendor/Zend/Soap/Server.php new file mode 100644 index 000000000..9b36815b2 --- /dev/null +++ b/library/vendor/Zend/Soap/Server.php @@ -0,0 +1,999 @@ + PHP class pairings for handling return/incoming values + * @var array + */ + protected $_classmap; + + /** + * Encoding + * @var string + */ + protected $_encoding; + + /** + * SOAP Server Features + * + * @var int + */ + protected $_features; + + /** + * WSDL Caching Options of SOAP Server + * + * @var mixed + */ + protected $_wsdlCache; + + /** + * WS-I compliant + * + * @var boolean + */ + protected $_wsiCompliant; + + /** + * Registered fault exceptions + * @var array + */ + protected $_faultExceptions = array(); + + /** + * Functions registered with this server; may be either an array or the SOAP_FUNCTIONS_ALL + * constant + * @var array|int + */ + protected $_functions = array(); + + /** + * Persistence mode; should be one of the SOAP persistence constants + * @var int + */ + protected $_persistence; + + /** + * Request XML + * @var string + */ + protected $_request; + + /** + * Response XML + * @var string + */ + protected $_response; + + /** + * Flag: whether or not {@link handle()} should return a response instead + * of automatically emitting it. + * @var boolean + */ + protected $_returnResponse = false; + + /** + * SOAP version to use; SOAP_1_2 by default, to allow processing of headers + * @var int + */ + protected $_soapVersion = SOAP_1_2; + + /** + * URI or path to WSDL + * @var string + */ + protected $_wsdl; + + /** + * URI namespace for SOAP server + * @var string URI + */ + protected $_uri; + + /** + * Constructor + * + * Sets display_errors INI setting to off (prevent client errors due to bad + * XML in response). Registers {@link handlePhpErrors()} as error handler + * for E_USER_ERROR. + * + * If $wsdl is provided, it is passed on to {@link setWsdl()}; if any + * options are specified, they are passed on to {@link setOptions()}. + * + * @param string $wsdl + * @param array $options + * @return void + */ + public function __construct($wsdl = null, array $options = null) + { + if (!extension_loaded('soap')) { + throw new Zend_Soap_Server_Exception('SOAP extension is not loaded.'); + } + + if (null !== $wsdl) { + $this->setWsdl($wsdl); + } + + if (null !== $options) { + $this->setOptions($options); + } + } + + /** + * Set Options + * + * Allows setting options as an associative array of option => value pairs. + * + * @param array|Zend_Config $options + * @return Zend_Soap_Server + */ + public function setOptions($options) + { + if($options instanceof Zend_Config) { + $options = $options->toArray(); + } + + foreach ($options as $key => $value) { + switch ($key) { + case 'actor': + $this->setActor($value); + break; + case 'classmap': + case 'classMap': + $this->setClassmap($value); + break; + case 'encoding': + $this->setEncoding($value); + break; + case 'soapVersion': + case 'soap_version': + $this->setSoapVersion($value); + break; + case 'uri': + $this->setUri($value); + break; + case 'wsdl': + $this->setWsdl($value); + break; + case 'featues': + trigger_error(__METHOD__ . ': the option "featues" is deprecated as of 1.10.x and will be removed with 2.0.0; use "features" instead', E_USER_NOTICE); + case 'features': + $this->setSoapFeatures($value); + break; + case 'cache_wsdl': + $this->setWsdlCache($value); + break; + case 'wsi_compliant': + $this->setWsiCompliant($value); + break; + default: + break; + } + } + + return $this; + } + + /** + * Return array of options suitable for using with SoapServer constructor + * + * @return array + */ + public function getOptions() + { + $options = array(); + if (null !== $this->_actor) { + $options['actor'] = $this->_actor; + } + + if (null !== $this->_classmap) { + $options['classmap'] = $this->_classmap; + } + + if (null !== $this->_encoding) { + $options['encoding'] = $this->_encoding; + } + + if (null !== $this->_soapVersion) { + $options['soap_version'] = $this->_soapVersion; + } + + if (null !== $this->_uri) { + $options['uri'] = $this->_uri; + } + + if (null !== $this->_features) { + $options['features'] = $this->_features; + } + + if (null !== $this->_wsdlCache) { + $options['cache_wsdl'] = $this->_wsdlCache; + } + + if (null !== $this->_wsiCompliant) { + $options['wsi_compliant'] = $this->_wsiCompliant; + } + + return $options; + } + /** + * Set WS-I compliant + * + * @param boolean $value + * @return Zend_Soap_Server + */ + public function setWsiCompliant($value) + { + if (is_bool($value)) { + $this->_wsiCompliant = $value; + } + return $this; + } + /** + * Gt WS-I compliant + * + * @return boolean + */ + public function getWsiCompliant() + { + return $this->_wsiCompliant; + } + /** + * Set encoding + * + * @param string $encoding + * @return Zend_Soap_Server + * @throws Zend_Soap_Server_Exception with invalid encoding argument + */ + public function setEncoding($encoding) + { + if (!is_string($encoding)) { + throw new Zend_Soap_Server_Exception('Invalid encoding specified'); + } + + $this->_encoding = $encoding; + return $this; + } + + /** + * Get encoding + * + * @return string + */ + public function getEncoding() + { + return $this->_encoding; + } + + /** + * Set SOAP version + * + * @param int $version One of the SOAP_1_1 or SOAP_1_2 constants + * @return Zend_Soap_Server + * @throws Zend_Soap_Server_Exception with invalid soap version argument + */ + public function setSoapVersion($version) + { + if (!in_array($version, array(SOAP_1_1, SOAP_1_2))) { + throw new Zend_Soap_Server_Exception('Invalid soap version specified'); + } + + $this->_soapVersion = $version; + return $this; + } + + /** + * Get SOAP version + * + * @return int + */ + public function getSoapVersion() + { + return $this->_soapVersion; + } + + /** + * Check for valid URN + * + * @param string $urn + * @return true + * @throws Zend_Soap_Server_Exception on invalid URN + */ + public function validateUrn($urn) + { + $scheme = parse_url($urn, PHP_URL_SCHEME); + if ($scheme === false || $scheme === null) { + throw new Zend_Soap_Server_Exception('Invalid URN'); + } + + return true; + } + + /** + * Set actor + * + * Actor is the actor URI for the server. + * + * @param string $actor + * @return Zend_Soap_Server + */ + public function setActor($actor) + { + $this->validateUrn($actor); + $this->_actor = $actor; + return $this; + } + + /** + * Retrieve actor + * + * @return string + */ + public function getActor() + { + return $this->_actor; + } + + /** + * Set URI + * + * URI in SoapServer is actually the target namespace, not a URI; $uri must begin with 'urn:'. + * + * @param string $uri + * @return Zend_Soap_Server + * @throws Zend_Soap_Server_Exception with invalid uri argument + */ + public function setUri($uri) + { + $this->validateUrn($uri); + $this->_uri = $uri; + return $this; + } + + /** + * Retrieve URI + * + * @return string + */ + public function getUri() + { + return $this->_uri; + } + + /** + * Set classmap + * + * @param array $classmap + * @return Zend_Soap_Server + * @throws Zend_Soap_Server_Exception for any invalid class in the class map + */ + public function setClassmap($classmap) + { + if (!is_array($classmap)) { + /** + * @see Zend_Soap_Server_Exception + */ + throw new Zend_Soap_Server_Exception('Classmap must be an array'); + } + foreach ($classmap as $type => $class) { + if (!class_exists($class)) { + /** + * @see Zend_Soap_Server_Exception + */ + throw new Zend_Soap_Server_Exception('Invalid class in class map'); + } + } + + $this->_classmap = $classmap; + return $this; + } + + /** + * Retrieve classmap + * + * @return mixed + */ + public function getClassmap() + { + return $this->_classmap; + } + + /** + * Set wsdl + * + * @param string $wsdl URI or path to a WSDL + * @return Zend_Soap_Server + */ + public function setWsdl($wsdl) + { + $this->_wsdl = $wsdl; + return $this; + } + + /** + * Retrieve wsdl + * + * @return string + */ + public function getWsdl() + { + return $this->_wsdl; + } + + /** + * Set the SOAP Feature options. + * + * @param string|int $feature + * @return Zend_Soap_Server + */ + public function setSoapFeatures($feature) + { + $this->_features = $feature; + return $this; + } + + /** + * Return current SOAP Features options + * + * @return int + */ + public function getSoapFeatures() + { + return $this->_features; + } + + /** + * Set the SOAP Wsdl Caching Options + * + * @param string|int|boolean $caching + * @return Zend_Soap_Server + */ + public function setWsdlCache($options) + { + $this->_wsdlCache = $options; + return $this; + } + + /** + * Get current SOAP Wsdl Caching option + */ + public function getWsdlCache() + { + return $this->_wsdlCache; + } + + /** + * Attach a function as a server method + * + * @param array|string $function Function name, array of function names to attach, + * or SOAP_FUNCTIONS_ALL to attach all functions + * @param string $namespace Ignored + * @return Zend_Soap_Server + * @throws Zend_Soap_Server_Exception on invalid functions + */ + public function addFunction($function, $namespace = '') + { + // Bail early if set to SOAP_FUNCTIONS_ALL + if ($this->_functions == SOAP_FUNCTIONS_ALL) { + return $this; + } + + if (is_array($function)) { + foreach ($function as $func) { + if (is_string($func) && function_exists($func)) { + $this->_functions[] = $func; + } else { + throw new Zend_Soap_Server_Exception('One or more invalid functions specified in array'); + } + } + $this->_functions = array_merge($this->_functions, $function); + } elseif (is_string($function) && function_exists($function)) { + $this->_functions[] = $function; + } elseif ($function == SOAP_FUNCTIONS_ALL) { + $this->_functions = SOAP_FUNCTIONS_ALL; + } else { + throw new Zend_Soap_Server_Exception('Invalid function specified'); + } + + if (is_array($this->_functions)) { + $this->_functions = array_unique($this->_functions); + } + + return $this; + } + + /** + * Attach a class to a server + * + * Accepts a class name to use when handling requests. Any additional + * arguments will be passed to that class' constructor when instantiated. + * + * See {@link setObject()} to set preconfigured object instances as request handlers. + * + * @param string $class Class Name which executes SOAP Requests at endpoint. + * @return Zend_Soap_Server + * @throws Zend_Soap_Server_Exception if called more than once, or if class + * does not exist + */ + public function setClass($class, $namespace = '', $argv = null) + { + if (isset($this->_class)) { + throw new Zend_Soap_Server_Exception('A class has already been registered with this soap server instance'); + } + + if (!is_string($class)) { + throw new Zend_Soap_Server_Exception('Invalid class argument (' . gettype($class) . ')'); + } + + if (!class_exists($class)) { + throw new Zend_Soap_Server_Exception('Class "' . $class . '" does not exist'); + } + + $this->_class = $class; + if (1 < func_num_args()) { + $argv = func_get_args(); + array_shift($argv); + $this->_classArgs = $argv; + } + + return $this; + } + + /** + * Attach an object to a server + * + * Accepts an instanciated object to use when handling requests. + * + * @param object $object + * @return Zend_Soap_Server + */ + public function setObject($object) + { + if(!is_object($object)) { + throw new Zend_Soap_Server_Exception('Invalid object argument ('.gettype($object).')'); + } + + if(isset($this->_object)) { + throw new Zend_Soap_Server_Exception('An object has already been registered with this soap server instance'); + } + + if ($this->_wsiCompliant) { + $this->_object = new Zend_Soap_Server_Proxy($object); + } else { + $this->_object = $object; + } + + return $this; + } + + /** + * Return a server definition array + * + * Returns a list of all functions registered with {@link addFunction()}, + * merged with all public methods of the class set with {@link setClass()} + * (if any). + * + * @access public + * @return array + */ + public function getFunctions() + { + $functions = array(); + if (null !== $this->_class) { + $functions = get_class_methods($this->_class); + } elseif (null !== $this->_object) { + $functions = get_class_methods($this->_object); + } + + return array_merge((array) $this->_functions, $functions); + } + + /** + * Unimplemented: Load server definition + * + * @param array $array + * @return void + * @throws Zend_Soap_Server_Exception Unimplemented + */ + public function loadFunctions($definition) + { + throw new Zend_Soap_Server_Exception('Unimplemented'); + } + + /** + * Set server persistence + * + * @param int $mode + * @return Zend_Soap_Server + */ + public function setPersistence($mode) + { + if (!in_array($mode, array(SOAP_PERSISTENCE_SESSION, SOAP_PERSISTENCE_REQUEST))) { + throw new Zend_Soap_Server_Exception('Invalid persistence mode specified'); + } + + $this->_persistence = $mode; + return $this; + } + + /** + * Get server persistence + * + * @return Zend_Soap_Server + */ + public function getPersistence() + { + return $this->_persistence; + } + + /** + * Set request + * + * $request may be any of: + * - DOMDocument; if so, then cast to XML + * - DOMNode; if so, then grab owner document and cast to XML + * - SimpleXMLElement; if so, then cast to XML + * - stdClass; if so, calls __toString() and verifies XML + * - string; if so, verifies XML + * + * @param DOMDocument|DOMNode|SimpleXMLElement|stdClass|string $request + * @return Zend_Soap_Server + */ + protected function _setRequest($request) + { + if ($request instanceof DOMDocument) { + $xml = $request->saveXML(); + } elseif ($request instanceof DOMNode) { + $xml = $request->ownerDocument->saveXML(); + } elseif ($request instanceof SimpleXMLElement) { + $xml = $request->asXML(); + } elseif (is_object($request) || is_string($request)) { + if (is_object($request)) { + $xml = $request->__toString(); + } else { + $xml = $request; + } + + $dom = new DOMDocument(); + try { + if(strlen($xml) == 0 || (!$dom = Zend_Xml_Security::scan($xml, $dom))) { + throw new Zend_Soap_Server_Exception('Invalid XML'); + } + } catch (Zend_Xml_Exception $e) { + throw new Zend_Soap_Server_Exception( + $e->getMessage() + ); + } + } + $this->_request = $xml; + return $this; + } + + /** + * Retrieve request XML + * + * @return string + */ + public function getLastRequest() + { + return $this->_request; + } + + /** + * Set return response flag + * + * If true, {@link handle()} will return the response instead of + * automatically sending it back to the requesting client. + * + * The response is always available via {@link getResponse()}. + * + * @param boolean $flag + * @return Zend_Soap_Server + */ + public function setReturnResponse($flag) + { + $this->_returnResponse = ($flag) ? true : false; + return $this; + } + + /** + * Retrieve return response flag + * + * @return boolean + */ + public function getReturnResponse() + { + return $this->_returnResponse; + } + + /** + * Get response XML + * + * @return string + */ + public function getLastResponse() + { + return $this->_response; + } + + /** + * Get SoapServer object + * + * Uses {@link $_wsdl} and return value of {@link getOptions()} to instantiate + * SoapServer object, and then registers any functions or class with it, as + * well as peristence. + * + * @return SoapServer + */ + protected function _getSoap() + { + $options = $this->getOptions(); + $server = new SoapServer($this->_wsdl, $options); + + if (!empty($this->_functions)) { + $server->addFunction($this->_functions); + } + + if (!empty($this->_class)) { + $args = $this->_classArgs; + array_unshift($args, $this->_class); + if ($this->_wsiCompliant) { + array_unshift($args, 'Zend_Soap_Server_Proxy'); + } + call_user_func_array(array($server, 'setClass'), $args); + } + + if (!empty($this->_object)) { + $server->setObject($this->_object); + } + + if (null !== $this->_persistence) { + $server->setPersistence($this->_persistence); + } + + return $server; + } + + /** + * Handle a request + * + * Instantiates SoapServer object with options set in object, and + * dispatches its handle() method. + * + * $request may be any of: + * - DOMDocument; if so, then cast to XML + * - DOMNode; if so, then grab owner document and cast to XML + * - SimpleXMLElement; if so, then cast to XML + * - stdClass; if so, calls __toString() and verifies XML + * - string; if so, verifies XML + * + * If no request is passed, pulls request using php:://input (for + * cross-platform compatability purposes). + * + * @param DOMDocument|DOMNode|SimpleXMLElement|stdClass|string $request Optional request + * @return void|string + */ + public function handle($request = null) + { + if (null === $request) { + $request = file_get_contents('php://input'); + } + + // Set Zend_Soap_Server error handler + $displayErrorsOriginalState = $this->_initializeSoapErrorContext(); + + $setRequestException = null; + /** + * @see Zend_Soap_Server_Exception + */ + try { + $this->_setRequest($request); + } catch (Zend_Soap_Server_Exception $e) { + $setRequestException = $e; + } + + $soap = $this->_getSoap(); + + $fault = false; + ob_start(); + if ($setRequestException instanceof Exception) { + // Create SOAP fault message if we've caught a request exception + $fault = $this->fault($setRequestException->getMessage(), 'Sender'); + } else { + try { + $soap->handle($this->_request); + } catch (Exception $e) { + $fault = $this->fault($e); + } + } + $this->_response = ob_get_clean(); + + // Restore original error handler + restore_error_handler(); + ini_set('display_errors', $displayErrorsOriginalState); + + // Send a fault, if we have one + if ($fault) { + $soap->fault($fault->faultcode, $fault->faultstring); + } + + if (!$this->_returnResponse) { + echo $this->_response; + return; + } + + return $this->_response; + } + + /** + * Method initalizes the error context that the SOAPServer enviroment will run in. + * + * @return boolean display_errors original value + */ + protected function _initializeSoapErrorContext() + { + $displayErrorsOriginalState = ini_get('display_errors'); + ini_set('display_errors', false); + set_error_handler(array($this, 'handlePhpErrors'), E_USER_ERROR); + return $displayErrorsOriginalState; + } + + /** + * Register a valid fault exception + * + * @param string|array $class Exception class or array of exception classes + * @return Zend_Soap_Server + */ + public function registerFaultException($class) + { + $this->_faultExceptions = array_merge($this->_faultExceptions, (array) $class); + return $this; + } + + /** + * Deregister a fault exception from the fault exception stack + * + * @param string $class + * @return boolean + */ + public function deregisterFaultException($class) + { + if (in_array($class, $this->_faultExceptions, true)) { + $index = array_search($class, $this->_faultExceptions); + unset($this->_faultExceptions[$index]); + return true; + } + + return false; + } + + /** + * Return fault exceptions list + * + * @return array + */ + public function getFaultExceptions() + { + return $this->_faultExceptions; + } + + /** + * Generate a server fault + * + * Note that the arguments are reverse to those of SoapFault. + * + * If an exception is passed as the first argument, its message and code + * will be used to create the fault object if it has been registered via + * {@Link registerFaultException()}. + * + * @link http://www.w3.org/TR/soap12-part1/#faultcodes + * @param string|Exception $fault + * @param string $code SOAP Fault Codes + * @return SoapFault + */ + public function fault($fault = null, $code = "Receiver") + { + if ($fault instanceof Exception) { + $class = get_class($fault); + if (in_array($class, $this->_faultExceptions)) { + $message = $fault->getMessage(); + $eCode = $fault->getCode(); + $code = empty($eCode) ? $code : $eCode; + } else { + $message = 'Unknown error'; + } + } elseif(is_string($fault)) { + $message = $fault; + } else { + $message = 'Unknown error'; + } + + $allowedFaultModes = array( + 'VersionMismatch', 'MustUnderstand', 'DataEncodingUnknown', + 'Sender', 'Receiver', 'Server' + ); + if(!in_array($code, $allowedFaultModes)) { + $code = "Receiver"; + } + + return new SoapFault($code, $message); + } + + /** + * Throw PHP errors as SoapFaults + * + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline + * @param array $errcontext + * @return void + * @throws SoapFault + */ + public function handlePhpErrors($errno, $errstr, $errfile = null, $errline = null, array $errcontext = null) + { + throw $this->fault($errstr, "Receiver"); + } +} diff --git a/library/vendor/Zend/Amf/Server/Exception.php b/library/vendor/Zend/Soap/Server/Exception.php similarity index 72% rename from library/vendor/Zend/Amf/Server/Exception.php rename to library/vendor/Zend/Soap/Server/Exception.php index d44b458a3..29e455494 100644 --- a/library/vendor/Zend/Amf/Server/Exception.php +++ b/library/vendor/Zend/Soap/Server/Exception.php @@ -13,24 +13,24 @@ * to license@zend.com so we can send you a copy immediately. * * @category Zend - * @package Zend_Amf + * @package Zend_Soap * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + + +/** Zend_Exception */ + + +/** + * @category Zend + * @package Zend_Soap + * @subpackage Server + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +class Zend_Soap_Server_Exception extends Zend_Exception +{} -/** Zend_Amf_Exception */ - -/** - * Zend_Amf_Server_Exception - * - * @category Zend - * @package Zend_Amf - * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -class Zend_Amf_Server_Exception extends Zend_Amf_Exception -{ -} diff --git a/library/vendor/Zend/Soap/Server/Proxy.php b/library/vendor/Zend/Soap/Server/Proxy.php new file mode 100644 index 000000000..93b6ab4e6 --- /dev/null +++ b/library/vendor/Zend/Soap/Server/Proxy.php @@ -0,0 +1,75 @@ +getConstructor(); + if ($constructor === null) { + $this->_classInstance = $class->newInstance(); + } else { + $this->_classInstance = $class->newInstanceArgs($classArgs); + } + $this->_className = $className; + } + /** + * Proxy for the WS-I compliant call + * + * @param string $name + * @param string $arguments + * @return array + */ + public function __call($name, $arguments) + { + $result = call_user_func_array(array($this->_classInstance, $name), $this->_preProcessArguments($arguments)); + return array("{$name}Result"=>$result); + } + /** + * Pre process arguments + * + * @param mixed $arguments + * @return array + */ + protected function _preProcessArguments($arguments) + { + if (count($arguments) == 1 && is_object($arguments[0])) { + return get_object_vars($arguments[0]); + } else { + return $arguments; + } + } +} diff --git a/library/vendor/Zend/Soap/Wsdl.php b/library/vendor/Zend/Soap/Wsdl.php new file mode 100644 index 000000000..95f2c2072 --- /dev/null +++ b/library/vendor/Zend/Soap/Wsdl.php @@ -0,0 +1,661 @@ +getUri(); + } + $this->_uri = $uri; + + /** + * @todo change DomDocument object creation from cparsing to construxting using API + * It also should authomatically escape $name and $uri values if necessary + */ + $wsdl = " + "; + $this->_dom = new DOMDocument(); + if (!$this->_dom = Zend_Xml_Security::scan($wsdl, $this->_dom)) { + throw new Zend_Server_Exception('Unable to create DomDocument'); + } + $this->_wsdl = $this->_dom->documentElement; + + $this->setComplexTypeStrategy($strategy); + } + + /** + * Set a new uri for this WSDL + * + * @param string|Zend_Uri_Http $uri + * @return Zend_Server_Wsdl + */ + public function setUri($uri) + { + if ($uri instanceof Zend_Uri_Http) { + $uri = $uri->getUri(); + } + $oldUri = $this->_uri; + $this->_uri = $uri; + + if($this->_dom !== null) { + // @todo: This is the worst hack ever, but its needed due to design and non BC issues of WSDL generation + $xml = $this->_dom->saveXML(); + $xml = str_replace($oldUri, $uri, $xml); + $this->_dom = new DOMDocument(); + $this->_dom = Zend_Xml_Security::scan($xml, $this->_dom); + } + + return $this; + } + + /** + * Set a strategy for complex type detection and handling + * + * @todo Boolean is for backwards compability with extractComplexType object var. Remove it in later versions. + * @param boolean|string|Zend_Soap_Wsdl_Strategy_Interface $strategy + * @return Zend_Soap_Wsdl + */ + public function setComplexTypeStrategy($strategy) + { + if($strategy === true) { + $strategy = new Zend_Soap_Wsdl_Strategy_DefaultComplexType(); + } else if($strategy === false) { + $strategy = new Zend_Soap_Wsdl_Strategy_AnyType(); + } else if(is_string($strategy)) { + if(class_exists($strategy)) { + $strategy = new $strategy(); + } else { + throw new Zend_Soap_Wsdl_Exception( + sprintf("Strategy with name '%s does not exist.", $strategy + )); + } + } + + if(!($strategy instanceof Zend_Soap_Wsdl_Strategy_Interface)) { + throw new Zend_Soap_Wsdl_Exception("Set a strategy that is not of type 'Zend_Soap_Wsdl_Strategy_Interface'"); + } + $this->_strategy = $strategy; + return $this; + } + + /** + * Get the current complex type strategy + * + * @return Zend_Soap_Wsdl_Strategy_Interface + */ + public function getComplexTypeStrategy() + { + return $this->_strategy; + } + + /** + * Add a {@link http://www.w3.org/TR/wsdl#_messages message} element to the WSDL + * + * @param string $name Name for the {@link http://www.w3.org/TR/wsdl#_messages message} + * @param array $parts An array of {@link http://www.w3.org/TR/wsdl#_message parts} + * The array is constructed like: 'name of part' => 'part xml schema data type' + * or 'name of part' => array('type' => 'part xml schema type') + * or 'name of part' => array('element' => 'part xml element name') + * @return object The new message's XML_Tree_Node for use in {@link function addDocumentation} + */ + public function addMessage($name, $parts) + { + $message = $this->_dom->createElement('message'); + + $message->setAttribute('name', $name); + + if (sizeof($parts) > 0) { + foreach ($parts as $name => $type) { + $part = $this->_dom->createElement('part'); + $part->setAttribute('name', $name); + if (is_array($type)) { + foreach ($type as $key => $value) { + $part->setAttribute($key, $value); + } + } else { + $part->setAttribute('type', $type); + } + $message->appendChild($part); + } + } + + $this->_wsdl->appendChild($message); + + return $message; + } + + /** + * Add a {@link http://www.w3.org/TR/wsdl#_porttypes portType} element to the WSDL + * + * @param string $name portType element's name + * @return object The new portType's XML_Tree_Node for use in {@link function addPortOperation} and {@link function addDocumentation} + */ + public function addPortType($name) + { + $portType = $this->_dom->createElement('portType'); + $portType->setAttribute('name', $name); + $this->_wsdl->appendChild($portType); + + return $portType; + } + + /** + * Add an {@link http://www.w3.org/TR/wsdl#_request-response operation} element to a portType element + * + * @param object $portType a portType XML_Tree_Node, from {@link function addPortType} + * @param string $name Operation name + * @param string $input Input Message + * @param string $output Output Message + * @param string $fault Fault Message + * @return object The new operation's XML_Tree_Node for use in {@link function addDocumentation} + */ + public function addPortOperation($portType, $name, $input = false, $output = false, $fault = false) + { + $operation = $this->_dom->createElement('operation'); + $operation->setAttribute('name', $name); + + if (is_string($input) && (strlen(trim($input)) >= 1)) { + $node = $this->_dom->createElement('input'); + $node->setAttribute('message', $input); + $operation->appendChild($node); + } + if (is_string($output) && (strlen(trim($output)) >= 1)) { + $node= $this->_dom->createElement('output'); + $node->setAttribute('message', $output); + $operation->appendChild($node); + } + if (is_string($fault) && (strlen(trim($fault)) >= 1)) { + $node = $this->_dom->createElement('fault'); + $node->setAttribute('message', $fault); + $operation->appendChild($node); + } + + $portType->appendChild($operation); + + return $operation; + } + + /** + * Add a {@link http://www.w3.org/TR/wsdl#_bindings binding} element to WSDL + * + * @param string $name Name of the Binding + * @param string $type name of the portType to bind + * @return object The new binding's XML_Tree_Node for use with {@link function addBindingOperation} and {@link function addDocumentation} + */ + public function addBinding($name, $portType) + { + $binding = $this->_dom->createElement('binding'); + $binding->setAttribute('name', $name); + $binding->setAttribute('type', $portType); + + $this->_wsdl->appendChild($binding); + + return $binding; + } + + /** + * Add an operation to a binding element + * + * @param object $binding A binding XML_Tree_Node returned by {@link function addBinding} + * @param array $input An array of attributes for the input element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} + * @param array $output An array of attributes for the output element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} + * @param array $fault An array of attributes for the fault element, allowed keys are: 'name', 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} + * @return object The new Operation's XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation} + */ + public function addBindingOperation($binding, $name, $input = false, $output = false, $fault = false) + { + $operation = $this->_dom->createElement('operation'); + $operation->setAttribute('name', $name); + + if (is_array($input)) { + $node = $this->_dom->createElement('input'); + $soap_node = $this->_dom->createElement('soap:body'); + foreach ($input as $name => $value) { + $soap_node->setAttribute($name, $value); + } + $node->appendChild($soap_node); + $operation->appendChild($node); + } + + if (is_array($output)) { + $node = $this->_dom->createElement('output'); + $soap_node = $this->_dom->createElement('soap:body'); + foreach ($output as $name => $value) { + $soap_node->setAttribute($name, $value); + } + $node->appendChild($soap_node); + $operation->appendChild($node); + } + + if (is_array($fault)) { + $node = $this->_dom->createElement('fault'); + /** + * Note. Do we really need name attribute to be also set at wsdl:fault node??? + * W3C standard doesn't mention it (http://www.w3.org/TR/wsdl#_soap:fault) + * But some real world WSDLs use it, so it may be required for compatibility reasons. + */ + if (isset($fault['name'])) { + $node->setAttribute('name', $fault['name']); + } + + $soap_node = $this->_dom->createElement('soap:fault'); + foreach ($fault as $name => $value) { + $soap_node->setAttribute($name, $value); + } + $node->appendChild($soap_node); + $operation->appendChild($node); + } + + $binding->appendChild($operation); + + return $operation; + } + + /** + * Add a {@link http://www.w3.org/TR/wsdl#_soap:binding SOAP binding} element to a Binding element + * + * @param object $binding A binding XML_Tree_Node returned by {@link function addBinding} + * @param string $style binding style, possible values are "rpc" (the default) and "document" + * @param string $transport Transport method (defaults to HTTP) + * @return boolean + */ + public function addSoapBinding($binding, $style = 'document', $transport = 'http://schemas.xmlsoap.org/soap/http') + { + $soap_binding = $this->_dom->createElement('soap:binding'); + $soap_binding->setAttribute('style', $style); + $soap_binding->setAttribute('transport', $transport); + + $binding->appendChild($soap_binding); + + return $soap_binding; + } + + /** + * Add a {@link http://www.w3.org/TR/wsdl#_soap:operation SOAP operation} to an operation element + * + * @param object $operation An operation XML_Tree_Node returned by {@link function addBindingOperation} + * @param string $soap_action SOAP Action + * @return boolean + */ + public function addSoapOperation($binding, $soap_action) + { + if ($soap_action instanceof Zend_Uri_Http) { + $soap_action = $soap_action->getUri(); + } + $soap_operation = $this->_dom->createElement('soap:operation'); + $soap_operation->setAttribute('soapAction', $soap_action); + + $binding->insertBefore($soap_operation, $binding->firstChild); + + return $soap_operation; + } + + /** + * Add a {@link http://www.w3.org/TR/wsdl#_services service} element to the WSDL + * + * @param string $name Service Name + * @param string $port_name Name of the port for the service + * @param string $binding Binding for the port + * @param string $location SOAP Address for the service + * @return object The new service's XML_Tree_Node for use with {@link function addDocumentation} + */ + public function addService($name, $port_name, $binding, $location) + { + if ($location instanceof Zend_Uri_Http) { + $location = $location->getUri(); + } + $service = $this->_dom->createElement('service'); + $service->setAttribute('name', $name); + + $port = $this->_dom->createElement('port'); + $port->setAttribute('name', $port_name); + $port->setAttribute('binding', $binding); + + $soap_address = $this->_dom->createElement('soap:address'); + $soap_address->setAttribute('location', $location); + + $port->appendChild($soap_address); + $service->appendChild($port); + + $this->_wsdl->appendChild($service); + + return $service; + } + + /** + * Add a documentation element to any element in the WSDL. + * + * Note that the WSDL {@link http://www.w3.org/TR/wsdl#_documentation specification} uses 'document', + * but the WSDL {@link http://schemas.xmlsoap.org/wsdl/ schema} uses 'documentation' instead. + * The {@link http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDL_documentation_Element WS-I Basic Profile 1.1} recommends using 'documentation'. + * + * @param object $input_node An XML_Tree_Node returned by another method to add the documentation to + * @param string $documentation Human readable documentation for the node + * @return DOMElement The documentation element + */ + public function addDocumentation($input_node, $documentation) + { + if ($input_node === $this) { + $node = $this->_dom->documentElement; + } else { + $node = $input_node; + } + + $doc = $this->_dom->createElement('documentation'); + $doc_cdata = $this->_dom->createTextNode(str_replace(array("\r\n", "\r"), "\n", $documentation)); + $doc->appendChild($doc_cdata); + + if($node->hasChildNodes()) { + $node->insertBefore($doc, $node->firstChild); + } else { + $node->appendChild($doc); + } + + return $doc; + } + + /** + * Add WSDL Types element + * + * @param object $types A DomDocument|DomNode|DomElement|DomDocumentFragment with all the XML Schema types defined in it + */ + public function addTypes($types) + { + if ($types instanceof DomDocument) { + $dom = $this->_dom->importNode($types->documentElement); + $this->_wsdl->appendChild($types->documentElement); + } elseif ($types instanceof DomNode || $types instanceof DomElement || $types instanceof DomDocumentFragment ) { + $dom = $this->_dom->importNode($types); + $this->_wsdl->appendChild($dom); + } + } + + /** + * Add a complex type name that is part of this WSDL and can be used in signatures. + * + * @param string $type + * @return Zend_Soap_Wsdl + */ + public function addType($type) + { + if(!in_array($type, $this->_includedTypes)) { + $this->_includedTypes[] = $type; + } + return $this; + } + + /** + * Return an array of all currently included complex types + * + * @return array + */ + public function getTypes() + { + return $this->_includedTypes; + } + + /** + * Return the Schema node of the WSDL + * + * @return DOMElement + */ + public function getSchema() + { + if($this->_schema == null) { + $this->addSchemaTypeSection(); + } + + return $this->_schema; + } + + /** + * Return the WSDL as XML + * + * @return string WSDL as XML + */ + public function toXML() + { + return $this->_dom->saveXML(); + } + + /** + * Return DOM Document + * + * @return object DomDocum ent + */ + public function toDomDocument() + { + return $this->_dom; + } + + /** + * Echo the WSDL as XML + * + * @return boolean + */ + public function dump($filename = false) + { + if (!$filename) { + echo $this->toXML(); + return true; + } else { + return file_put_contents($filename, $this->toXML()); + } + } + + /** + * Returns an XSD Type for the given PHP type + * + * @param string $type PHP Type to get the XSD type for + * @return string + */ + public function getType($type) + { + switch (strtolower($type)) { + case 'string': + case 'str': + return 'xsd:string'; + case 'long': + return 'xsd:long'; + case 'int': + case 'integer': + return 'xsd:int'; + case 'float': + return 'xsd:float'; + case 'double': + return 'xsd:double'; + case 'boolean': + case 'bool': + return 'xsd:boolean'; + case 'array': + return 'soap-enc:Array'; + case 'object': + return 'xsd:struct'; + case 'mixed': + return 'xsd:anyType'; + case 'void': + return ''; + default: + // delegate retrieval of complex type to current strategy + return $this->addComplexType($type); + } + } + + /** + * This function makes sure a complex types section and schema additions are set. + * + * @return Zend_Soap_Wsdl + */ + public function addSchemaTypeSection() + { + if ($this->_schema === null) { + $this->_schema = $this->_dom->createElement('xsd:schema'); + $this->_schema->setAttribute('targetNamespace', $this->_uri); + $types = $this->_dom->createElement('types'); + $types->appendChild($this->_schema); + $this->_wsdl->appendChild($types); + } + return $this; + } + + /** + * Add a {@link http://www.w3.org/TR/wsdl#_types types} data type definition + * + * @param string $type Name of the class to be specified + * @return string XSD Type for the given PHP type + */ + public function addComplexType($type) + { + if (in_array($type, $this->getTypes())) { + return "tns:$type"; + } + $this->addSchemaTypeSection(); + + $strategy = $this->getComplexTypeStrategy(); + $strategy->setContext($this); + // delegates the detection of a complex type to the current strategy + return $strategy->addComplexType($type); + } + + /** + * Parse an xsd:element represented as an array into a DOMElement. + * + * @param array $element an xsd:element represented as an array + * @return DOMElement parsed element + */ + private function _parseElement($element) + { + if (!is_array($element)) { + throw new Zend_Soap_Wsdl_Exception("The 'element' parameter needs to be an associative array."); + } + + $elementXml = $this->_dom->createElement('xsd:element'); + foreach ($element as $key => $value) { + if (in_array($key, array('sequence', 'all', 'choice'))) { + if (is_array($value)) { + $complexType = $this->_dom->createElement('xsd:complexType'); + if (count($value) > 0) { + $container = $this->_dom->createElement('xsd:' . $key); + foreach ($value as $subelement) { + $subelementXml = $this->_parseElement($subelement); + $container->appendChild($subelementXml); + } + $complexType->appendChild($container); + } + $elementXml->appendChild($complexType); + } + } else { + $elementXml->setAttribute($key, $value); + } + } + return $elementXml; + } + + /** + * Add an xsd:element represented as an array to the schema. + * + * Array keys represent attribute names and values their respective value. + * The 'sequence', 'all' and 'choice' keys must have an array of elements as their value, + * to add them to a nested complexType. + * + * Example: array( 'name' => 'MyElement', + * 'sequence' => array( array('name' => 'myString', 'type' => 'string'), + * array('name' => 'myInteger', 'type' => 'int') ) ); + * Resulting XML: + * + * + * + * + * @param array $element an xsd:element represented as an array + * @return string xsd:element for the given element array + */ + public function addElement($element) + { + $schema = $this->getSchema(); + $elementXml = $this->_parseElement($element); + $schema->appendChild($elementXml); + return 'tns:' . $element['name']; + } +} diff --git a/library/vendor/Zend/Soap/Wsdl/Exception.php b/library/vendor/Zend/Soap/Wsdl/Exception.php new file mode 100644 index 000000000..11397f0b0 --- /dev/null +++ b/library/vendor/Zend/Soap/Wsdl/Exception.php @@ -0,0 +1,36 @@ +_context = $context; + } + + /** + * Return the current Zend_Soap_Wsdl context object + * + * @return Zend_Soap_Wsdl + */ + public function getContext() + { + return $this->_context; + } +} diff --git a/library/vendor/Zend/Soap/Wsdl/Strategy/AnyType.php b/library/vendor/Zend/Soap/Wsdl/Strategy/AnyType.php new file mode 100644 index 000000000..13f352e15 --- /dev/null +++ b/library/vendor/Zend/Soap/Wsdl/Strategy/AnyType.php @@ -0,0 +1,58 @@ +_inProcess)) { + return "tns:" . $type; + } + $this->_inProcess[$type] = $type; + + $nestingLevel = $this->_getNestedCount($type); + + if($nestingLevel > 1) { + throw new Zend_Soap_Wsdl_Exception( + "ArrayOfTypeComplex cannot return nested ArrayOfObject deeper than ". + "one level. Use array object properties to return deep nested data. + "); + } + + $singularType = $this->_getSingularPhpType($type); + + if(!class_exists($singularType)) { + throw new Zend_Soap_Wsdl_Exception(sprintf( + "Cannot add a complex type %s that is not an object or where ". + "class could not be found in 'DefaultComplexType' strategy.", $type + )); + } + + if($nestingLevel == 1) { + // The following blocks define the Array of Object structure + $xsdComplexTypeName = $this->_addArrayOfComplexType($singularType, $type); + } else { + $xsdComplexTypeName = $singularType; + } + + // The array for the objects has been created, now build the object definition: + if(!in_array($singularType, $this->getContext()->getTypes())) { + parent::addComplexType($singularType); + } + + unset($this->_inProcess[$type]); + return "tns:".$xsdComplexTypeName; + } + + protected function _addArrayOfComplexType($singularType, $type) + { + $dom = $this->getContext()->toDomDocument(); + + $xsdComplexTypeName = $this->_getXsdComplexTypeName($singularType); + + if(!in_array($xsdComplexTypeName, $this->getContext()->getTypes())) { + $complexType = $dom->createElement('xsd:complexType'); + $complexType->setAttribute('name', $xsdComplexTypeName); + + $complexContent = $dom->createElement("xsd:complexContent"); + $complexType->appendChild($complexContent); + + $xsdRestriction = $dom->createElement("xsd:restriction"); + $xsdRestriction->setAttribute('base', 'soap-enc:Array'); + $complexContent->appendChild($xsdRestriction); + + $xsdAttribute = $dom->createElement("xsd:attribute"); + $xsdAttribute->setAttribute("ref", "soap-enc:arrayType"); + $xsdAttribute->setAttribute("wsdl:arrayType", sprintf("tns:%s[]", $singularType)); + $xsdRestriction->appendChild($xsdAttribute); + + $this->getContext()->getSchema()->appendChild($complexType); + $this->getContext()->addType($xsdComplexTypeName); + } + + return $xsdComplexTypeName; + } + + protected function _getXsdComplexTypeName($type) + { + return sprintf('ArrayOf%s', $type); + } + + /** + * From a nested definition with type[], get the singular PHP Type + * + * @param string $type + * @return string + */ + protected function _getSingularPhpType($type) + { + return str_replace("[]", "", $type); + } + + /** + * Return the array nesting level based on the type name + * + * @param string $type + * @return integer + */ + protected function _getNestedCount($type) + { + return substr_count($type, "[]"); + } +} diff --git a/library/vendor/Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php b/library/vendor/Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php new file mode 100644 index 000000000..e82ea50d9 --- /dev/null +++ b/library/vendor/Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php @@ -0,0 +1,154 @@ +_getNestedCount($type); + + if($nestedCounter > 0) { + $singularType = $this->_getSingularType($type); + + for($i = 1; $i <= $nestedCounter; $i++) { + $complexTypeName = substr($this->_getTypeNameBasedOnNestingLevel($singularType, $i), 4); + $childTypeName = $this->_getTypeNameBasedOnNestingLevel($singularType, $i-1); + + $this->_addElementFromWsdlAndChildTypes($complexTypeName, $childTypeName); + } + // adding the PHP type which is resolved to a nested XSD type. therefore add only once. + $this->getContext()->addType($complexTypeName); + + return "tns:$complexTypeName"; + } else if (!in_array($type, $this->getContext()->getTypes())) { + // New singular complex type + return parent::addComplexType($type); + } else { + // Existing complex type + return $this->getContext()->getType($type); + } + } + + /** + * Return the ArrayOf or simple type name based on the singular xsdtype and the nesting level + * + * @param string $singularType + * @param int $level + * @return string + */ + protected function _getTypeNameBasedOnNestingLevel($singularType, $level) + { + if($level == 0) { + // This is not an Array anymore, return the xsd simple type + return $singularType; + } else { + $prefix = str_repeat("ArrayOf", $level); + $xsdType = $this->_getStrippedXsdType($singularType); + $arrayType = $prefix.$xsdType; + return "tns:$arrayType"; + } + } + + /** + * Strip the xsd: from a singularType and Format it nice for ArrayOf naming + * + * @param string $singularType + * @return string + */ + protected function _getStrippedXsdType($singularType) + { + return ucfirst(substr(strtolower($singularType), 4)); + } + + /** + * From a nested defintion with type[], get the singular xsd:type + * + * @throws Zend_Soap_Wsdl_Exception When no xsd:simpletype can be detected. + * @param string $type + * @return string + */ + protected function _getSingularType($type) + { + $singulartype = $this->getContext()->getType(str_replace("[]", "", $type)); + return $singulartype; + } + + /** + * Return the array nesting level based on the type name + * + * @param string $type + * @return integer + */ + protected function _getNestedCount($type) + { + return substr_count($type, "[]"); + } + + /** + * Append the complex type definition to the WSDL via the context access + * + * @param string $arrayType + * @param string $childTypeName + * @return void + */ + protected function _addElementFromWsdlAndChildTypes($arrayType, $childTypeName) + { + if (!in_array($arrayType, $this->getContext()->getTypes())) { + $dom = $this->getContext()->toDomDocument(); + + $complexType = $dom->createElement('xsd:complexType'); + $complexType->setAttribute('name', $arrayType); + + $sequence = $dom->createElement('xsd:sequence'); + + $element = $dom->createElement('xsd:element'); + $element->setAttribute('name', 'item'); + $element->setAttribute('type', $childTypeName); + $element->setAttribute('minOccurs', 0); + $element->setAttribute('maxOccurs', 'unbounded'); + $sequence->appendChild($element); + + $complexType->appendChild($sequence); + + $this->getContext()->getSchema()->appendChild($complexType); + $this->getContext()->addType($arrayType); + } + } +} diff --git a/library/vendor/Zend/Soap/Wsdl/Strategy/Composite.php b/library/vendor/Zend/Soap/Wsdl/Strategy/Composite.php new file mode 100644 index 000000000..a80120e83 --- /dev/null +++ b/library/vendor/Zend/Soap/Wsdl/Strategy/Composite.php @@ -0,0 +1,183 @@ + Strategy pairs. + * + * @var array + */ + protected $_typeMap = array(); + + /** + * Default Strategy of this composite + * + * @var string|Zend_Soap_Wsdl_Strategy_Interface + */ + protected $_defaultStrategy; + + /** + * Context WSDL file that this composite serves + * + * @var Zend_Soap_Wsdl|null + */ + protected $_context; + + /** + * Construct Composite WSDL Strategy. + * + * @throws Zend_Soap_Wsdl_Exception + * @param array $typeMap + * @param string|Zend_Soap_Wsdl_Strategy_Interface $defaultStrategy + */ + public function __construct(array $typeMap=array(), $defaultStrategy="Zend_Soap_Wsdl_Strategy_DefaultComplexType") + { + foreach($typeMap AS $type => $strategy) { + $this->connectTypeToStrategy($type, $strategy); + } + $this->_defaultStrategy = $defaultStrategy; + } + + /** + * Connect a complex type to a given strategy. + * + * @throws Zend_Soap_Wsdl_Exception + * @param string $type + * @param string|Zend_Soap_Wsdl_Strategy_Interface $strategy + * @return Zend_Soap_Wsdl_Strategy_Composite + */ + public function connectTypeToStrategy($type, $strategy) + { + if(!is_string($type)) { + /** + * @see Zend_Soap_Wsdl_Exception + */ + throw new Zend_Soap_Wsdl_Exception("Invalid type given to Composite Type Map."); + } + $this->_typeMap[$type] = $strategy; + return $this; + } + + /** + * Return default strategy of this composite + * + * @throws Zend_Soap_Wsdl_Exception + * @param string $type + * @return Zend_Soap_Wsdl_Strategy_Interface + */ + public function getDefaultStrategy() + { + $strategy = $this->_defaultStrategy; + if(is_string($strategy) && class_exists($strategy)) { + $strategy = new $strategy; + } + if( !($strategy instanceof Zend_Soap_Wsdl_Strategy_Interface) ) { + /** + * @see Zend_Soap_Wsdl_Exception + */ + throw new Zend_Soap_Wsdl_Exception( + "Default Strategy for Complex Types is not a valid strategy object." + ); + } + $this->_defaultStrategy = $strategy; + return $strategy; + } + + /** + * Return specific strategy or the default strategy of this type. + * + * @throws Zend_Soap_Wsdl_Exception + * @param string $type + * @return Zend_Soap_Wsdl_Strategy_Interface + */ + public function getStrategyOfType($type) + { + if(isset($this->_typeMap[$type])) { + $strategy = $this->_typeMap[$type]; + + if(is_string($strategy) && class_exists($strategy)) { + $strategy = new $strategy(); + } + + if( !($strategy instanceof Zend_Soap_Wsdl_Strategy_Interface) ) { + /** + * @see Zend_Soap_Wsdl_Exception + */ + throw new Zend_Soap_Wsdl_Exception( + "Strategy for Complex Type '".$type."' is not a valid strategy object." + ); + } + $this->_typeMap[$type] = $strategy; + } else { + $strategy = $this->getDefaultStrategy(); + } + return $strategy; + } + + /** + * Method accepts the current WSDL context file. + * + * @param Zend_Soap_Wsdl $context + */ + public function setContext(Zend_Soap_Wsdl $context) + { + $this->_context = $context; + return $this; + } + + /** + * Create a complex type based on a strategy + * + * @throws Zend_Soap_Wsdl_Exception + * @param string $type + * @return string XSD type + */ + public function addComplexType($type) + { + if(!($this->_context instanceof Zend_Soap_Wsdl) ) { + /** + * @see Zend_Soap_Wsdl_Exception + */ + throw new Zend_Soap_Wsdl_Exception( + "Cannot add complex type '".$type."', no context is set for this composite strategy." + ); + } + + $strategy = $this->getStrategyOfType($type); + $strategy->setContext($this->_context); + return $strategy->addComplexType($type); + } +} diff --git a/library/vendor/Zend/Soap/Wsdl/Strategy/DefaultComplexType.php b/library/vendor/Zend/Soap/Wsdl/Strategy/DefaultComplexType.php new file mode 100644 index 000000000..3baf8048e --- /dev/null +++ b/library/vendor/Zend/Soap/Wsdl/Strategy/DefaultComplexType.php @@ -0,0 +1,89 @@ +getContext()->toDomDocument(); + $class = new ReflectionClass($type); + + $defaultProperties = $class->getDefaultProperties(); + + $complexType = $dom->createElement('xsd:complexType'); + $complexType->setAttribute('name', $type); + + $all = $dom->createElement('xsd:all'); + + foreach ($class->getProperties() as $property) { + if ($property->isPublic() && preg_match_all('/@var\s+([^\s]+)/m', $property->getDocComment(), $matches)) { + + /** + * @todo check if 'xsd:element' must be used here (it may not be compatible with using 'complexType' + * node for describing other classes used as attribute types for current class + */ + $element = $dom->createElement('xsd:element'); + $element->setAttribute('name', $propertyName = $property->getName()); + $element->setAttribute('type', $this->getContext()->getType(trim($matches[1][0]))); + + // If the default value is null, then this property is nillable. + if ($defaultProperties[$propertyName] === null) { + $element->setAttribute('nillable', 'true'); + } + + $all->appendChild($element); + } + } + + $complexType->appendChild($all); + $this->getContext()->getSchema()->appendChild($complexType); + $this->getContext()->addType($type); + + return "tns:$type"; + } +} diff --git a/library/vendor/Zend/Soap/Wsdl/Strategy/Interface.php b/library/vendor/Zend/Soap/Wsdl/Strategy/Interface.php new file mode 100644 index 000000000..9a576055c --- /dev/null +++ b/library/vendor/Zend/Soap/Wsdl/Strategy/Interface.php @@ -0,0 +1,48 @@ + $context + */ + public function setContext(Zend_Soap_Wsdl $context); + + /** + * Create a complex type based on a strategy + * + * @param string $type + * @return string XSD type + */ + public function addComplexType($type); +} diff --git a/library/vendor/Zend/Stdlib/CallbackHandler.php b/library/vendor/Zend/Stdlib/CallbackHandler.php index 45a1272bc..01ef04c0c 100644 --- a/library/vendor/Zend/Stdlib/CallbackHandler.php +++ b/library/vendor/Zend/Stdlib/CallbackHandler.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Stdlib_CallbackHandler @@ -100,7 +100,10 @@ class Zend_Stdlib_CallbackHandler } // If pecl/weakref is not installed, simply store the callback and return - if (!class_exists('WeakRef')) { + set_error_handler(array($this, 'errorHandler'), E_WARNING); + $callable = class_exists('WeakRef'); + restore_error_handler(); + if (!$callable || $this->error) { $this->callback = $callback; return; } diff --git a/library/vendor/Zend/Stdlib/Exception.php b/library/vendor/Zend/Stdlib/Exception.php index 2191cfa29..05cb27533 100644 --- a/library/vendor/Zend/Stdlib/Exception.php +++ b/library/vendor/Zend/Stdlib/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,7 +23,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Stdlib_Exception diff --git a/library/vendor/Zend/Stdlib/Exception/InvalidCallbackException.php b/library/vendor/Zend/Stdlib/Exception/InvalidCallbackException.php index 11e8ddc57..03ee26865 100644 --- a/library/vendor/Zend/Stdlib/Exception/InvalidCallbackException.php +++ b/library/vendor/Zend/Stdlib/Exception/InvalidCallbackException.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Stdlib_Exception_InvalidCallbackException diff --git a/library/vendor/Zend/Stdlib/PriorityQueue.php b/library/vendor/Zend/Stdlib/PriorityQueue.php index 47bf68f00..2110123ba 100644 --- a/library/vendor/Zend/Stdlib/PriorityQueue.php +++ b/library/vendor/Zend/Stdlib/PriorityQueue.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -33,7 +33,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Stdlib_PriorityQueue implements Countable, IteratorAggregate, Serializable diff --git a/library/vendor/Zend/Stdlib/SplPriorityQueue.php b/library/vendor/Zend/Stdlib/SplPriorityQueue.php index 9f11b7005..bf19cc7aa 100644 --- a/library/vendor/Zend/Stdlib/SplPriorityQueue.php +++ b/library/vendor/Zend/Stdlib/SplPriorityQueue.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -381,7 +381,7 @@ if (!is_array($this->preparedQueue)) { * * @category Zend * @package Zend_Stdlib - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Stdlib_SplPriorityQueue extends SplPriorityQueue implements Serializable diff --git a/library/vendor/Zend/Tag/Cloud.php b/library/vendor/Zend/Tag/Cloud.php index bf0b4e0de..890328673 100644 --- a/library/vendor/Zend/Tag/Cloud.php +++ b/library/vendor/Zend/Tag/Cloud.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Tag - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tag_Cloud diff --git a/library/vendor/Zend/Tag/Cloud/Decorator/Cloud.php b/library/vendor/Zend/Tag/Cloud/Decorator/Cloud.php index 19f402f75..e649d54f2 100644 --- a/library/vendor/Zend/Tag/Cloud/Decorator/Cloud.php +++ b/library/vendor/Zend/Tag/Cloud/Decorator/Cloud.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_Tag - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Tag_Cloud_Decorator_Cloud diff --git a/library/vendor/Zend/Tag/Cloud/Decorator/Exception.php b/library/vendor/Zend/Tag/Cloud/Decorator/Exception.php index 9406e75f4..73a4e3ead 100644 --- a/library/vendor/Zend/Tag/Cloud/Decorator/Exception.php +++ b/library/vendor/Zend/Tag/Cloud/Decorator/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Tag * @uses Zend_Tag_Cloud_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tag_Cloud_Decorator_Exception extends Zend_Tag_Cloud_Exception diff --git a/library/vendor/Zend/Tag/Cloud/Decorator/HtmlCloud.php b/library/vendor/Zend/Tag/Cloud/Decorator/HtmlCloud.php index 3173b31ad..75e246f34 100644 --- a/library/vendor/Zend/Tag/Cloud/Decorator/HtmlCloud.php +++ b/library/vendor/Zend/Tag/Cloud/Decorator/HtmlCloud.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Tag * @uses Zend_Tag_Cloud_Decorator_Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tag_Cloud_Decorator_HtmlCloud extends Zend_Tag_Cloud_Decorator_Cloud diff --git a/library/vendor/Zend/Tag/Cloud/Decorator/HtmlTag.php b/library/vendor/Zend/Tag/Cloud/Decorator/HtmlTag.php index aba758b23..c257cce14 100644 --- a/library/vendor/Zend/Tag/Cloud/Decorator/HtmlTag.php +++ b/library/vendor/Zend/Tag/Cloud/Decorator/HtmlTag.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Tag * @uses Zend_Tag_Cloud_Decorator_Tag - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tag_Cloud_Decorator_HtmlTag extends Zend_Tag_Cloud_Decorator_Tag diff --git a/library/vendor/Zend/Tag/Cloud/Decorator/Tag.php b/library/vendor/Zend/Tag/Cloud/Decorator/Tag.php index bc0b4006b..b23695691 100644 --- a/library/vendor/Zend/Tag/Cloud/Decorator/Tag.php +++ b/library/vendor/Zend/Tag/Cloud/Decorator/Tag.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage Cloud - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_Tag - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Tag_Cloud_Decorator_Tag diff --git a/library/vendor/Zend/Tag/Cloud/Exception.php b/library/vendor/Zend/Tag/Cloud/Exception.php index b6bc8d4ae..023f6cc9c 100644 --- a/library/vendor/Zend/Tag/Cloud/Exception.php +++ b/library/vendor/Zend/Tag/Cloud/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tag - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Tag * @uses Zend_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tag_Cloud_Exception extends Zend_Tag_Exception diff --git a/library/vendor/Zend/Tag/Exception.php b/library/vendor/Zend/Tag/Exception.php index a42606bbb..ad5647b13 100644 --- a/library/vendor/Zend/Tag/Exception.php +++ b/library/vendor/Zend/Tag/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tag - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Tag * @uses Zend_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tag_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Tag/Item.php b/library/vendor/Zend/Tag/Item.php index 699601ec9..3398df995 100644 --- a/library/vendor/Zend/Tag/Item.php +++ b/library/vendor/Zend/Tag/Item.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage Item - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Tag * @uses Zend_Tag_Taggable - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tag_Item implements Zend_Tag_Taggable diff --git a/library/vendor/Zend/Tag/ItemList.php b/library/vendor/Zend/Tag/ItemList.php index 83607b8e0..225e1f45a 100644 --- a/library/vendor/Zend/Tag/ItemList.php +++ b/library/vendor/Zend/Tag/ItemList.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage ItemList - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ /** * @category Zend * @package Zend_Tag - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tag_ItemList implements Countable, SeekableIterator, ArrayAccess diff --git a/library/vendor/Zend/Tag/Taggable.php b/library/vendor/Zend/Tag/Taggable.php index 8a3d7c285..767b8e5b0 100644 --- a/library/vendor/Zend/Tag/Taggable.php +++ b/library/vendor/Zend/Tag/Taggable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tag * @subpackage Item - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tag - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tag_Taggable diff --git a/library/vendor/Zend/Test/DbAdapter.php b/library/vendor/Zend/Test/DbAdapter.php index b32076f76..86ab71f3a 100644 --- a/library/vendor/Zend/Test/DbAdapter.php +++ b/library/vendor/Zend/Test/DbAdapter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_DbAdapter extends Zend_Db_Adapter_Abstract diff --git a/library/vendor/Zend/Test/DbStatement.php b/library/vendor/Zend/Test/DbStatement.php index 3a3a0242b..2499aed44 100644 --- a/library/vendor/Zend/Test/DbStatement.php +++ b/library/vendor/Zend/Test/DbStatement.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -30,7 +30,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_DbStatement implements Zend_Db_Statement_Interface diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery.php b/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery.php index 9b035afea..2aa52794b 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery.php @@ -15,15 +15,24 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ if (version_compare(PHPUnit_Runner_Version::id(), '4.1', '>=')) { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'DomQuery41.php'); + + class Zend_Test_PHPUnit_Constraint_DomQuery extends Zend_Test_PHPUnit_Constraint_DomQuery41 + {} } elseif (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'DomQuery37.php'); + + class Zend_Test_PHPUnit_Constraint_DomQuery extends Zend_Test_PHPUnit_Constraint_DomQuery37 + {} } else { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'DomQuery34.php'); + + class Zend_Test_PHPUnit_Constraint_DomQuery extends Zend_Test_PHPUnit_Constraint_DomQuery34 + {} } diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery34.php b/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery34.php index a67d4a482..740f51cbb 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery34.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery34.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** @see Zend_Dom_Query */ +require_once 'Zend/Dom/Query.php'; /** * Zend_Dom_Query-based PHPUnit Constraint @@ -29,10 +30,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_DomQuery34 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -148,6 +149,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -163,6 +165,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint switch ($assertType) { case self::ASSERT_CONTENT_CONTAINS: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No content provided against which to match'); } $this->_content = $content = $argv[2]; @@ -171,6 +174,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint : $this->_matchContent($result, $content); case self::ASSERT_CONTENT_REGEX: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No pattern provided against which to match'); } $this->_content = $content = $argv[2]; @@ -181,6 +185,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint case self::ASSERT_CONTENT_COUNT_MIN: case self::ASSERT_CONTENT_COUNT_MAX: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No count provided against which to compare'); } $this->_content = $content = $argv[2]; @@ -207,6 +212,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint */ public function fail($other, $description, $not = false) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_CONTENT_CONTAINS: $failure = 'Failed asserting node denoted by %s CONTAINS content "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery37.php b/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery37.php index fd7798035..b5c230ab7 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery37.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery37.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** @see Zend_Dom_Query */ +require_once 'Zend/Dom/Query.php'; /** * Zend_Dom_Query-based PHPUnit Constraint @@ -29,10 +30,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_DomQuery37 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -156,6 +157,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -169,6 +171,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint switch ($assertType) { case self::ASSERT_CONTENT_CONTAINS: if (!$match) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No content provided against which to match'); } $this->_content = $match; @@ -177,6 +180,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint : $this->_matchContent($result, $match); case self::ASSERT_CONTENT_REGEX: if (!$match) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No pattern provided against which to match'); } $this->_content = $match; @@ -187,6 +191,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint case self::ASSERT_CONTENT_COUNT_MIN: case self::ASSERT_CONTENT_COUNT_MAX: if ($match === false) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No count provided against which to compare'); } $this->_content = $match; @@ -219,6 +224,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint */ public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $cannot_be_used = NULL) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_CONTENT_CONTAINS: $failure = 'Failed asserting node denoted by %s CONTAINS content "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery41.php b/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery41.php index a60c1dbb7..28cc484b3 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery41.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/DomQuery41.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** @see Zend_Dom_Query */ +require_once 'Zend/Dom/Query.php'; /** * Zend_Dom_Query-based PHPUnit Constraint @@ -29,10 +30,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_DomQuery41 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -156,6 +157,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -169,6 +171,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint switch ($assertType) { case self::ASSERT_CONTENT_CONTAINS: if (!$match) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No content provided against which to match'); } $this->_content = $match; @@ -177,6 +180,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint : $this->_matchContent($result, $match); case self::ASSERT_CONTENT_REGEX: if (!$match) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No pattern provided against which to match'); } $this->_content = $match; @@ -187,6 +191,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint case self::ASSERT_CONTENT_COUNT_MIN: case self::ASSERT_CONTENT_COUNT_MAX: if ($match === false) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No count provided against which to compare'); } $this->_content = $match; @@ -221,6 +226,7 @@ class Zend_Test_PHPUnit_Constraint_DomQuery extends PHPUnit_Framework_Constraint */ public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = NULL) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_CONTENT_CONTAINS: $failure = 'Failed asserting node denoted by %s CONTAINS content "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/Exception.php b/library/vendor/Zend/Test/PHPUnit/Constraint/Exception.php index 46e0457b4..2286fef07 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/Exception.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Constraint_Exception extends PHPUnit_Framework_ExpectationFailedException diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect.php b/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect.php index b7451a323..819d8b2b9 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect.php @@ -15,15 +15,24 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ if (version_compare(PHPUnit_Runner_Version::id(), '4.1', '>=')) { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Redirect41.php'); + + class Zend_Test_PHPUnit_Constraint_Redirect extends Zend_Test_PHPUnit_Constraint_Redirect41 + {} } elseif (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Redirect37.php'); + + class Zend_Test_PHPUnit_Constraint_Redirect extends Zend_Test_PHPUnit_Constraint_Redirect37 + {} } else { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Redirect34.php'); + + class Zend_Test_PHPUnit_Constraint_Redirect extends Zend_Test_PHPUnit_Constraint_Redirect34 + {} } diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect34.php b/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect34.php index 51dcec8fd..e8d9f8ed9 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect34.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect34.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,10 +27,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_Redirect34 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -103,6 +103,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint public function evaluate($other, $assertType = null) { if (!$other instanceof Zend_Controller_Response_Abstract) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Redirect constraint assertions require a response object'); } @@ -112,6 +113,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -124,6 +126,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint switch ($assertType) { case self::ASSERT_REDIRECT_TO: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No redirect URL provided against which to match'); } $this->_match = $match = $argv[2]; @@ -132,6 +135,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint : $this->_match($response, $match); case self::ASSERT_REDIRECT_REGEX: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No pattern provided against which to match redirect'); } $this->_match = $match = $argv[2]; @@ -162,6 +166,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint */ public function fail($other, $description, $not = false) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_REDIRECT_TO: $failure = 'Failed asserting response redirects to "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect37.php b/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect37.php index 2227d2183..0494c976f 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect37.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect37.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,10 +27,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_Redirect37 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -109,6 +109,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint public function evaluate($other, $assertType = null, $variable = FALSE) { if (!$other instanceof Zend_Controller_Response_Abstract) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Redirect constraint assertions require a response object'); } @@ -118,6 +119,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -130,6 +132,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint switch ($assertType) { case self::ASSERT_REDIRECT_TO: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No redirect URL provided against which to match'); } $this->_match = $match = $argv[2]; @@ -138,6 +141,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint : $this->_match($response, $match); case self::ASSERT_REDIRECT_REGEX: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No pattern provided against which to match redirect'); } $this->_match = $match = $argv[2]; @@ -174,6 +178,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint */ public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $cannot_be_used = NULL) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_REDIRECT_TO: $failure = 'Failed asserting response redirects to "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect41.php b/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect41.php index 902c1cfd5..6f6e91564 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect41.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/Redirect41.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,10 +27,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_Redirect41 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -109,6 +109,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint public function evaluate($other, $assertType = null, $variable = FALSE) { if (!$other instanceof Zend_Controller_Response_Abstract) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Redirect constraint assertions require a response object'); } @@ -118,6 +119,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -130,6 +132,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint switch ($assertType) { case self::ASSERT_REDIRECT_TO: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No redirect URL provided against which to match'); } $this->_match = $match = $argv[2]; @@ -138,6 +141,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint : $this->_match($response, $match); case self::ASSERT_REDIRECT_REGEX: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No pattern provided against which to match redirect'); } $this->_match = $match = $argv[2]; @@ -176,6 +180,7 @@ class Zend_Test_PHPUnit_Constraint_Redirect extends PHPUnit_Framework_Constraint */ public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = NULL) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_REDIRECT_TO: $failure = 'Failed asserting response redirects to "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader.php b/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader.php index 636700acf..178de0505 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader.php @@ -15,15 +15,24 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ if (version_compare(PHPUnit_Runner_Version::id(), '4.1', '>=')) { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ResponseHeader41.php'); + + class Zend_Test_PHPUnit_Constraint_ResponseHeader extends Zend_Test_PHPUnit_Constraint_ResponseHeader41 + {} } elseif (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ResponseHeader37.php'); + + class Zend_Test_PHPUnit_Constraint_ResponseHeader extends Zend_Test_PHPUnit_Constraint_ResponseHeader37 + {} } else { include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ResponseHeader34.php'); + + class Zend_Test_PHPUnit_Constraint_ResponseHeader extends Zend_Test_PHPUnit_Constraint_ResponseHeader34 + {} } diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader34.php b/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader34.php index 62cedc90c..3d37756d2 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader34.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader34.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,10 +27,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_ResponseHeader34 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -114,6 +114,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons public function evaluate($other, $assertType = null) { if (!$other instanceof Zend_Controller_Response_Abstract) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Header constraint assertions require a response object'); } @@ -123,6 +124,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -135,6 +137,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons switch ($assertType) { case self::ASSERT_RESPONSE_CODE: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No response code provided against which to match'); } $this->_code = $code = $argv[2]; @@ -143,6 +146,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_code($response, $code); case self::ASSERT_HEADER: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No header provided against which to match'); } $this->_header = $header = $argv[2]; @@ -151,6 +155,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_header($response, $header); case self::ASSERT_HEADER_CONTAINS: if (4 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . __FUNCTION__); } $this->_header = $header = $argv[2]; @@ -160,6 +165,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_headerContains($response, $header, $match); case self::ASSERT_HEADER_REGEX: if (4 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . __FUNCTION__); } $this->_header = $header = $argv[2]; @@ -168,6 +174,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons ? $this->_notHeaderRegex($response, $header, $match) : $this->_headerRegex($response, $header, $match); default: + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Invalid assertion type ' . __FUNCTION__); } } @@ -184,6 +191,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons */ public function fail($other, $description, $not = false) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_RESPONSE_CODE: $failure = 'Failed asserting response code "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader37.php b/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader37.php index df3fd5b6d..ad26f0eb6 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader37.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader37.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,10 +27,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_ResponseHeader37 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -122,6 +122,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons public function evaluate($response, $assertType = '', $variable = FALSE) { if (!$response instanceof Zend_Controller_Response_Abstract) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Header constraint assertions require a response object'); } @@ -131,6 +132,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -142,6 +144,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons switch ($assertType) { case self::ASSERT_RESPONSE_CODE: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No response code provided against which to match'); } $this->_code = $code = $argv[2]; @@ -150,6 +153,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_code($response, $code); case self::ASSERT_HEADER: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No header provided against which to match'); } $this->_header = $header = $argv[2]; @@ -158,6 +162,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_header($response, $header); case self::ASSERT_HEADER_CONTAINS: if (4 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . $assertType); } $this->_header = $header = $argv[2]; @@ -167,6 +172,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_headerContains($response, $header, $match); case self::ASSERT_HEADER_REGEX: if (4 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . $assertType); } $this->_header = $header = $argv[2]; @@ -175,6 +181,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons ? $this->_notHeaderRegex($response, $header, $match) : $this->_headerRegex($response, $header, $match); default: + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Invalid assertion type ' . $assertType); } } @@ -197,6 +204,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons */ public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $cannot_be_used = NULL) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_RESPONSE_CODE: $failure = 'Failed asserting response code "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader41.php b/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader41.php index 6d6c09ecf..7f244d43b 100644 --- a/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader41.php +++ b/library/vendor/Zend/Test/PHPUnit/Constraint/ResponseHeader41.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,10 +27,10 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Constraint +class Zend_Test_PHPUnit_Constraint_ResponseHeader41 extends PHPUnit_Framework_Constraint { /**#@+ * Assertion type constants @@ -122,6 +122,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons public function evaluate($response, $assertType = '', $variable = FALSE) { if (!$response instanceof Zend_Controller_Response_Abstract) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Header constraint assertions require a response object'); } @@ -131,6 +132,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons } if (!in_array($assertType, $this->_assertTypes)) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception(sprintf('Invalid assertion type "%s" provided to %s constraint', $assertType, __CLASS__)); } @@ -142,6 +144,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons switch ($assertType) { case self::ASSERT_RESPONSE_CODE: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No response code provided against which to match'); } $this->_code = $code = $argv[2]; @@ -150,6 +153,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_code($response, $code); case self::ASSERT_HEADER: if (3 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('No header provided against which to match'); } $this->_header = $header = $argv[2]; @@ -158,6 +162,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_header($response, $header); case self::ASSERT_HEADER_CONTAINS: if (4 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . $assertType); } $this->_header = $header = $argv[2]; @@ -167,6 +172,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons : $this->_headerContains($response, $header, $match); case self::ASSERT_HEADER_REGEX: if (4 > $argc) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Both a header name and content to match are required for ' . $assertType); } $this->_header = $header = $argv[2]; @@ -175,6 +181,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons ? $this->_notHeaderRegex($response, $header, $match) : $this->_headerRegex($response, $header, $match); default: + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; throw new Zend_Test_PHPUnit_Constraint_Exception('Invalid assertion type ' . $assertType); } } @@ -199,6 +206,7 @@ class Zend_Test_PHPUnit_Constraint_ResponseHeader extends PHPUnit_Framework_Cons */ public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = NULL) { + require_once 'Zend/Test/PHPUnit/Constraint/Exception.php'; switch ($this->_assertType) { case self::ASSERT_RESPONSE_CODE: $failure = 'Failed asserting response code "%s"'; diff --git a/library/vendor/Zend/Test/PHPUnit/ControllerTestCase.php b/library/vendor/Zend/Test/PHPUnit/ControllerTestCase.php index 684537277..69976f0d9 100644 --- a/library/vendor/Zend/Test/PHPUnit/ControllerTestCase.php +++ b/library/vendor/Zend/Test/PHPUnit/ControllerTestCase.php @@ -14,20 +14,25 @@ * * @category Zend * @package Zend_Test - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** @see Zend_Controller_Front */ +require_once 'Zend/Controller/Front.php'; /** @see Zend_Controller_Action_HelperBroker */ +require_once 'Zend/Controller/Action/HelperBroker.php'; /** @see Zend_Layout */ +require_once 'Zend/Layout.php'; /** @see Zend_Session */ +require_once 'Zend/Session.php'; /** @see Zend_Registry */ +require_once 'Zend/Registry.php'; /** * Functional testing scaffold for MVC applications @@ -36,7 +41,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_TestCase @@ -76,12 +81,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te * Overloading: prevent overloading to special properties * * @param string $name - * @param mixed $value - * @return void + * @param mixed $value + * @throws Zend_Exception */ public function __set($name, $value) { if (in_array($name, array('request', 'response', 'frontController'))) { + require_once 'Zend/Exception.php'; throw new Zend_Exception(sprintf('Setting %s object manually is not allowed', $name)); } $this->$name = $value; @@ -92,8 +98,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te * * Provides overloading for request, response, and frontController objects. * - * @param mixed $name - * @return void + * @param mixed $name + * @return null|Zend_Controller_Front|Zend_Controller_Request_HttpTestCase|Zend_Controller_Response_HttpTestCase */ public function __get($name) { @@ -113,8 +119,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te * Set up MVC app * * Calls {@link bootstrap()} by default - * - * @return void */ protected function setUp() { @@ -129,8 +133,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te * If {@link $bootstrap} is a callback, executes it; if it is a file, it include's * it. When done, sets the test case request and response objects into the * front controller. - * - * @return void */ final public function bootstrap() { @@ -142,6 +144,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te } elseif (is_callable($this->bootstrap)) { call_user_func($this->bootstrap); } elseif (is_string($this->bootstrap)) { + require_once 'Zend/Loader.php'; if (Zend_Loader::isReadable($this->bootstrap)) { include $this->bootstrap; } @@ -160,8 +163,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te * disables throwing exceptions, and disables returning the response. * Finally, dispatches the front controller. * - * @param string|null $url - * @return void + * @param string|null $url */ public function dispatch($url = null) { @@ -200,7 +202,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te * instance, and resets the action helper broker. * * @todo Need to update Zend_Layout to add a resetInstance() method - * @return void */ public function reset() { @@ -218,8 +219,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Rest all view placeholders - * - * @return void */ protected function _resetPlaceholders() { @@ -270,13 +269,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection * - * @param string $path CSS selector path - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $message */ public function assertQuery($path, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__)) { @@ -287,13 +286,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection * - * @param string $path CSS selector path - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $message */ public function assertNotQuery($path, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__)) { @@ -304,14 +303,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection; node should contain content * - * @param string $path CSS selector path - * @param string $match content that should be contained in matched nodes - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $match content that should be contained in matched nodes + * @param string $message */ public function assertQueryContentContains($path, $match, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__, $match)) { @@ -322,14 +321,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection; node should NOT contain content * - * @param string $path CSS selector path - * @param string $match content that should NOT be contained in matched nodes - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $match content that should NOT be contained in matched nodes + * @param string $message */ public function assertNotQueryContentContains($path, $match, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__, $match)) { @@ -340,14 +339,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection; node should match content * - * @param string $path CSS selector path - * @param string $pattern Pattern that should be contained in matched nodes - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $pattern Pattern that should be contained in matched nodes + * @param string $message */ public function assertQueryContentRegex($path, $pattern, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__, $pattern)) { @@ -358,14 +357,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection; node should NOT match content * - * @param string $path CSS selector path - * @param string $pattern pattern that should NOT be contained in matched nodes - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $pattern pattern that should NOT be contained in matched nodes + * @param string $message */ public function assertNotQueryContentRegex($path, $pattern, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__, $pattern)) { @@ -376,14 +375,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection; should contain exact number of nodes * - * @param string $path CSS selector path - * @param string $count Number of nodes that should match - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $count Number of nodes that should match + * @param string $message */ public function assertQueryCount($path, $count, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__, $count)) { @@ -394,14 +393,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection; should NOT contain exact number of nodes * - * @param string $path CSS selector path - * @param string $count Number of nodes that should NOT match - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $count Number of nodes that should NOT match + * @param string $message */ public function assertNotQueryCount($path, $count, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__, $count)) { @@ -412,14 +411,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection; should contain at least this number of nodes * - * @param string $path CSS selector path - * @param string $count Minimum number of nodes that should match - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $count Minimum number of nodes that should match + * @param string $message */ public function assertQueryCountMin($path, $count, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__, $count)) { @@ -430,14 +429,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against DOM selection; should contain no more than this number of nodes * - * @param string $path CSS selector path - * @param string $count Maximum number of nodes that should match - * @param string $message - * @return void + * @param string $path CSS selector path + * @param string $count Maximum number of nodes that should match + * @param string $message */ public function assertQueryCountMax($path, $count, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $content = $this->response->outputBody(); if (!$constraint->evaluate($content, __FUNCTION__, $count)) { @@ -448,8 +447,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Register XPath namespaces * - * @param array $xpathNamespaces - * @return void + * @param array $xpathNamespaces */ public function registerXpathNamespaces($xpathNamespaces) { @@ -459,13 +457,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection * - * @param string $path XPath path - * @param string $message - * @return void + * @param string $path XPath path + * @param string $message */ public function assertXpath($path, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -477,13 +475,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection * - * @param string $path XPath path - * @param string $message - * @return void + * @param string $path XPath path + * @param string $message */ public function assertNotXpath($path, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -495,14 +493,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection; node should contain content * - * @param string $path XPath path - * @param string $match content that should be contained in matched nodes - * @param string $message - * @return void + * @param string $path XPath path + * @param string $match content that should be contained in matched nodes + * @param string $message */ public function assertXpathContentContains($path, $match, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -514,14 +512,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection; node should NOT contain content * - * @param string $path XPath path - * @param string $match content that should NOT be contained in matched nodes - * @param string $message - * @return void + * @param string $path XPath path + * @param string $match content that should NOT be contained in matched nodes + * @param string $message */ public function assertNotXpathContentContains($path, $match, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -533,14 +531,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection; node should match content * - * @param string $path XPath path - * @param string $pattern Pattern that should be contained in matched nodes - * @param string $message - * @return void + * @param string $path XPath path + * @param string $pattern Pattern that should be contained in matched nodes + * @param string $message */ public function assertXpathContentRegex($path, $pattern, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -552,14 +550,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection; node should NOT match content * - * @param string $path XPath path - * @param string $pattern pattern that should NOT be contained in matched nodes - * @param string $message - * @return void + * @param string $path XPath path + * @param string $pattern pattern that should NOT be contained in matched nodes + * @param string $message */ public function assertNotXpathContentRegex($path, $pattern, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -571,14 +569,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection; should contain exact number of nodes * - * @param string $path XPath path - * @param string $count Number of nodes that should match - * @param string $message - * @return void + * @param string $path XPath path + * @param string $count Number of nodes that should match + * @param string $message */ public function assertXpathCount($path, $count, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -590,14 +588,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection; should NOT contain exact number of nodes * - * @param string $path XPath path - * @param string $count Number of nodes that should NOT match - * @param string $message - * @return void + * @param string $path XPath path + * @param string $count Number of nodes that should NOT match + * @param string $message */ public function assertNotXpathCount($path, $count, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -609,14 +607,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection; should contain at least this number of nodes * - * @param string $path XPath path - * @param string $count Minimum number of nodes that should match - * @param string $message - * @return void + * @param string $path XPath path + * @param string $count Minimum number of nodes that should match + * @param string $message */ public function assertXpathCountMin($path, $count, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -628,14 +626,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert against XPath selection; should contain no more than this number of nodes * - * @param string $path XPath path - * @param string $count Maximum number of nodes that should match - * @param string $message - * @return void + * @param string $path XPath path + * @param string $count Maximum number of nodes that should match + * @param string $message */ public function assertXpathCountMax($path, $count, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/DomQuery.php'; $constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path); $constraint->registerXpathNamespaces($this->_xpathNamespaces); $content = $this->response->outputBody(); @@ -647,12 +645,12 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that response is a redirect * - * @param string $message - * @return void + * @param string $message */ public function assertRedirect($message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/Redirect.php'; $constraint = new Zend_Test_PHPUnit_Constraint_Redirect(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__)) { @@ -663,12 +661,12 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that response is NOT a redirect * - * @param string $message - * @return void + * @param string $message */ public function assertNotRedirect($message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/Redirect.php'; $constraint = new Zend_Test_PHPUnit_Constraint_Redirect(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__)) { @@ -679,13 +677,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that response redirects to given URL * - * @param string $url - * @param string $message - * @return void + * @param string $url + * @param string $message */ public function assertRedirectTo($url, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/Redirect.php'; $constraint = new Zend_Test_PHPUnit_Constraint_Redirect(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__, $url)) { @@ -696,13 +694,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that response does not redirect to given URL * - * @param string $url - * @param string $message - * @return void + * @param string $url + * @param string $message */ public function assertNotRedirectTo($url, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/Redirect.php'; $constraint = new Zend_Test_PHPUnit_Constraint_Redirect(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__, $url)) { @@ -713,13 +711,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that redirect location matches pattern * - * @param string $pattern - * @param string $message - * @return void + * @param string $pattern + * @param string $message */ public function assertRedirectRegex($pattern, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/Redirect.php'; $constraint = new Zend_Test_PHPUnit_Constraint_Redirect(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__, $pattern)) { @@ -730,13 +728,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that redirect location does not match pattern * - * @param string $pattern - * @param string $message - * @return void + * @param string $pattern + * @param string $message */ public function assertNotRedirectRegex($pattern, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/Redirect.php'; $constraint = new Zend_Test_PHPUnit_Constraint_Redirect(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__, $pattern)) { @@ -747,13 +745,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert response code * - * @param int $code - * @param string $message - * @return void + * @param int $code + * @param string $message */ public function assertResponseCode($code, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/ResponseHeader.php'; $constraint = new Zend_Test_PHPUnit_Constraint_ResponseHeader(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__, $code)) { @@ -764,13 +762,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert response code * - * @param int $code - * @param string $message - * @return void + * @param int $code + * @param string $message */ public function assertNotResponseCode($code, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/ResponseHeader.php'; $constraint = new Zend_Test_PHPUnit_Constraint_ResponseHeader(); $constraint->setNegate(true); $response = $this->response; @@ -782,13 +780,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert response header exists * - * @param string $header - * @param string $message - * @return void + * @param string $header + * @param string $message */ public function assertHeader($header, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/ResponseHeader.php'; $constraint = new Zend_Test_PHPUnit_Constraint_ResponseHeader(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__, $header)) { @@ -799,13 +797,13 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert response header does not exist * - * @param string $header - * @param string $message - * @return void + * @param string $header + * @param string $message */ public function assertNotHeader($header, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/ResponseHeader.php'; $constraint = new Zend_Test_PHPUnit_Constraint_ResponseHeader(); $constraint->setNegate(true); $response = $this->response; @@ -817,14 +815,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert response header exists and contains the given string * - * @param string $header - * @param string $match - * @param string $message - * @return void + * @param string $header + * @param string $match + * @param string $message */ public function assertHeaderContains($header, $match, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/ResponseHeader.php'; $constraint = new Zend_Test_PHPUnit_Constraint_ResponseHeader(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__, $header, $match)) { @@ -835,14 +833,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert response header does not exist and/or does not contain the given string * - * @param string $header - * @param string $match - * @param string $message - * @return void + * @param string $header + * @param string $match + * @param string $message */ public function assertNotHeaderContains($header, $match, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/ResponseHeader.php'; $constraint = new Zend_Test_PHPUnit_Constraint_ResponseHeader(); $constraint->setNegate(true); $response = $this->response; @@ -854,14 +852,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert response header exists and matches the given pattern * - * @param string $header - * @param string $pattern - * @param string $message - * @return void + * @param string $header + * @param string $pattern + * @param string $message */ public function assertHeaderRegex($header, $pattern, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/ResponseHeader.php'; $constraint = new Zend_Test_PHPUnit_Constraint_ResponseHeader(); $response = $this->response; if (!$constraint->evaluate($response, __FUNCTION__, $header, $pattern)) { @@ -872,14 +870,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert response header does not exist and/or does not match the given regex * - * @param string $header - * @param string $pattern - * @param string $message - * @return void + * @param string $header + * @param string $pattern + * @param string $message */ public function assertNotHeaderRegex($header, $pattern, $message = '') { $this->_incrementAssertionCount(); + require_once 'Zend/Test/PHPUnit/Constraint/ResponseHeader.php'; $constraint = new Zend_Test_PHPUnit_Constraint_ResponseHeader(); $constraint->setNegate(true); $response = $this->response; @@ -891,9 +889,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that the last handled request used the given module * - * @param string $module - * @param string $message - * @return void + * @param string $module + * @param string $message */ public function assertModule($module, $message = '') { @@ -913,9 +910,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that the last handled request did NOT use the given module * - * @param string $module - * @param string $message - * @return void + * @param string $module + * @param string $message */ public function assertNotModule($module, $message = '') { @@ -932,9 +928,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that the last handled request used the given controller * - * @param string $controller - * @param string $message - * @return void + * @param string $controller + * @param string $message */ public function assertController($controller, $message = '') { @@ -956,7 +951,6 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te * * @param string $controller * @param string $message - * @return void */ public function assertNotController($controller, $message = '') { @@ -976,9 +970,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that the last handled request used the given action * - * @param string $action - * @param string $message - * @return void + * @param string $action + * @param string $message */ public function assertAction($action, $message = '') { @@ -995,9 +988,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that the last handled request did NOT use the given action * - * @param string $action - * @param string $message - * @return void + * @param string $action + * @param string $message */ public function assertNotAction($action, $message = '') { @@ -1014,9 +1006,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that the specified route was used * - * @param string $route - * @param string $message - * @return void + * @param string $route + * @param string $message */ public function assertRoute($route, $message = '') { @@ -1037,9 +1028,8 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Assert that the route matched is NOT as specified * - * @param string $route - * @param string $message - * @return void + * @param string $route + * @param string $message */ public function assertNotRoute($route, $message = '') { @@ -1075,6 +1065,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te public function getRequest() { if (null === $this->_request) { + require_once 'Zend/Controller/Request/HttpTestCase.php'; $this->_request = new Zend_Controller_Request_HttpTestCase; } return $this->_request; @@ -1088,6 +1079,7 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te public function getResponse() { if (null === $this->_response) { + require_once 'Zend/Controller/Response/HttpTestCase.php'; $this->_response = new Zend_Controller_Response_HttpTestCase; } return $this->_response; @@ -1101,18 +1093,22 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te public function getQuery() { if (null === $this->_query) { + require_once 'Zend/Dom/Query.php'; $this->_query = new Zend_Dom_Query; } return $this->_query; } - + /** * URL Helper - * - * @param array $urlOptions - * @param string $name - * @param bool $reset - * @param bool $encode + * + * @param array $urlOptions + * @param string $name + * @param bool $reset + * @param bool $encode + * @throws Exception + * @throws Zend_Controller_Router_Exception + * @return string */ public function url($urlOptions = array(), $name = null, $reset = false, $encode = true) { @@ -1126,7 +1122,14 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te } return $router->assemble($urlOptions, $name, $reset, $encode); } - + + /** + * Urlize options + * + * @param array $urlOptions + * @param bool $actionControllerModuleOnly + * @return mixed + */ public function urlizeOptions($urlOptions, $actionControllerModuleOnly = true) { $ccToDash = new Zend_Filter_Word_CamelCaseToDash(); @@ -1140,13 +1143,11 @@ abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_Te /** * Increment assertion count - * - * @return void */ protected function _incrementAssertionCount() { $stack = debug_backtrace(); - foreach (debug_backtrace() as $step) { + foreach ($stack as $step) { if (isset($step['object']) && $step['object'] instanceof PHPUnit_Framework_TestCase ) { diff --git a/library/vendor/Zend/Test/PHPUnit/DatabaseTestCase.php b/library/vendor/Zend/Test/PHPUnit/DatabaseTestCase.php index 9002f0ad1..128030974 100644 --- a/library/vendor/Zend/Test/PHPUnit/DatabaseTestCase.php +++ b/library/vendor/Zend/Test/PHPUnit/DatabaseTestCase.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,22 +23,27 @@ /** * @see Zend_Test_PHPUnit_Db_Operation_Truncate */ +require_once "Zend/Test/PHPUnit/Db/Operation/Truncate.php"; /** * @see Zend_Test_PHPUnit_Db_Operation_Insert */ +require_once "Zend/Test/PHPUnit/Db/Operation/Insert.php"; /** * @see Zend_Test_PHPUnit_Db_DataSet_DbTableDataSet */ +require_once "Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php"; /** * @see Zend_Test_PHPUnit_Db_DataSet_DbTable */ +require_once "Zend/Test/PHPUnit/Db/DataSet/DbTable.php"; /** * @see Zend_Test_PHPUnit_Db_DataSet_DbRowset */ +require_once "Zend/Test/PHPUnit/Db/DataSet/DbRowset.php"; /** * Generic Testcase for Zend Framework related DbUnit Testing with PHPUnit @@ -47,7 +52,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Test_PHPUnit_DatabaseTestCase extends PHPUnit_Extensions_Database_TestCase diff --git a/library/vendor/Zend/Test/PHPUnit/Db/Connection.php b/library/vendor/Zend/Test/PHPUnit/Db/Connection.php index ce32d2e5a..2b0e5c3c1 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/Connection.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/Connection.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Test_PHPUnit_Db_DataSet_QueryTable */ +require_once "Zend/Test/PHPUnit/Db/DataSet/QueryTable.php"; /** * @see Zend_Test_PHPUnit_Db_Metadata_Generic */ +require_once "Zend/Test/PHPUnit/Db/Metadata/Generic.php"; /** * Generic Abstraction of Zend_Db Connections in the PHPUnit Database Extension context. @@ -36,7 +38,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_Connection extends PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection diff --git a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php index b665f3397..d8437528d 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbRowset.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Db_Table_Rowset_Abstract */ +require_once "Zend/Db/Table/Rowset/Abstract.php"; /** * Use a Zend_Db Rowset as a datatable for assertions with other PHPUnit Database extension tables. @@ -31,7 +32,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_DataSet_DbRowset extends PHPUnit_Extensions_Database_DataSet_AbstractTable @@ -49,6 +50,7 @@ class Zend_Test_PHPUnit_Db_DataSet_DbRowset extends PHPUnit_Extensions_Database_ if($table !== null) { $tableName = $table->info('name'); } else { + require_once "Zend/Test/PHPUnit/Db/Exception.php"; throw new Zend_Test_PHPUnit_Db_Exception( 'No table name was given to Rowset Table and table name cannot be infered from the table, '. 'because the rowset is disconnected from database.' diff --git a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbTable.php b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbTable.php index 13e854f6c..37eaf430c 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbTable.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbTable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Db_Table_Abstract */ +require_once "Zend/Db/Table/Abstract.php"; /** * Use a Zend_Db_Table for assertions with other PHPUnit Database Extension table types. @@ -31,7 +32,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_DataSet_DbTable extends PHPUnit_Extensions_Database_DataSet_QueryTable diff --git a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php index fa2ed8765..ed7530564 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/DbTableDataSet.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Test_PHPUnit_Db_DataSet_DbTable */ +require_once "Zend/Test/PHPUnit/Db/DataSet/DbTable.php"; /** * Aggregate several Zend_Db_Table instances into a dataset. @@ -31,7 +32,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_DataSet_DbTableDataSet extends PHPUnit_Extensions_Database_DataSet_AbstractDataSet @@ -47,7 +48,6 @@ class Zend_Test_PHPUnit_Db_DataSet_DbTableDataSet extends PHPUnit_Extensions_Dat * By default a select * will be done on the given tablename. * * @param Zend_Db_Table_Abstract $table - * @param string|Zend_Db_Select $query * @param string $where * @param string $order * @param string $count diff --git a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php index 1b24c8f31..bd3f67daf 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Test_PHPUnit_Db_DataSet_QueryTable */ +require_once "Zend/Test/PHPUnit/Db/DataSet/QueryTable.php"; /** * @see Zend_Db_Select */ +require_once "Zend/Db/Select.php"; /** * Uses several query strings or Zend_Db_Select objects to form a dataset of tables for assertion with other datasets. @@ -35,7 +37,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_DataSet_QueryDataSet extends PHPUnit_Extensions_Database_DataSet_QueryDataSet @@ -48,6 +50,7 @@ class Zend_Test_PHPUnit_Db_DataSet_QueryDataSet extends PHPUnit_Extensions_Datab public function __construct(PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection) { if( !($databaseConnection instanceof Zend_Test_PHPUnit_Db_Connection) ) { + require_once "Zend/Test/PHPUnit/Db/Exception.php"; throw new Zend_Test_PHPUnit_Db_Exception("Zend_Test_PHPUnit_Db_DataSet_QueryDataSet only works with Zend_Test_PHPUnit_Db_Connection connections-"); } $this->databaseConnection = $databaseConnection; diff --git a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php index 4b02f9c3b..6100e8057 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_DataSet_QueryTable extends PHPUnit_Extensions_Database_DataSet_QueryTable @@ -35,13 +35,15 @@ class Zend_Test_PHPUnit_Db_DataSet_QueryTable extends PHPUnit_Extensions_Databas /** * Creates a new database query table object. * - * @param string $table_name - * @param string $query + * @param string $tableName + * @param string $query * @param PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection + * @throws Zend_Test_PHPUnit_Db_Exception */ public function __construct($tableName, $query, PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection) { if( !($databaseConnection instanceof Zend_Test_PHPUnit_Db_Connection) ) { + require_once "Zend/Test/PHPUnit/Db/Exception.php"; throw new Zend_Test_PHPUnit_Db_Exception("Zend_Test_PHPUnit_Db_DataSet_QueryTable only works with Zend_Test_PHPUnit_Db_Connection connections-"); } parent::__construct($tableName, $query, $databaseConnection); diff --git a/library/vendor/Zend/Test/PHPUnit/Db/Exception.php b/library/vendor/Zend/Test/PHPUnit/Db/Exception.php index c2e4aab9d..6cf4c5715 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/Exception.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Exception */ +require_once "Zend/Exception.php"; /** * Exception for Zend_Test_PHPUnit_Database package @@ -31,7 +32,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Test/PHPUnit/Db/Metadata/Generic.php b/library/vendor/Zend/Test/PHPUnit/Db/Metadata/Generic.php index 0f06b010a..d4b414494 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/Metadata/Generic.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/Metadata/Generic.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Db_Adapter_Abstract */ +require_once "Zend/Db/Adapter/Abstract.php"; /** * Generic Metadata accessor for the Zend_Db adapters @@ -31,7 +32,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_Metadata_Generic implements PHPUnit_Extensions_Database_DB_IMetaData @@ -61,7 +62,7 @@ class Zend_Test_PHPUnit_Db_Metadata_Generic implements PHPUnit_Extensions_Databa * Creates a new database meta data object using the given pdo connection * and schema name. * - * @param PDO $pdo + * @param Zend_Db_Adapter_Abstract $db * @param string $schema */ public final function __construct(Zend_Db_Adapter_Abstract $db, $schema) diff --git a/library/vendor/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php b/library/vendor/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php index 97842a3e2..7e4fa5e2e 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/Operation/DeleteAll.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Test_PHPUnit_Db_Connection */ +require_once "Zend/Test/PHPUnit/Db/Connection.php"; /** * Delete All Operation that can be executed on set up or tear down of a database tester. @@ -31,7 +32,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_Operation_DeleteAll implements PHPUnit_Extensions_Database_Operation_IDatabaseOperation @@ -43,6 +44,7 @@ class Zend_Test_PHPUnit_Db_Operation_DeleteAll implements PHPUnit_Extensions_Dat public function execute(PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection, PHPUnit_Extensions_Database_DataSet_IDataSet $dataSet) { if(!($connection instanceof Zend_Test_PHPUnit_Db_Connection)) { + require_once "Zend/Test/PHPUnit/Db/Exception.php"; throw new Zend_Test_PHPUnit_Db_Exception("Not a valid Zend_Test_PHPUnit_Db_Connection instance, ".get_class($connection)." given!"); } diff --git a/library/vendor/Zend/Test/PHPUnit/Db/Operation/Insert.php b/library/vendor/Zend/Test/PHPUnit/Db/Operation/Insert.php index b28e8dccf..7668d6c50 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/Operation/Insert.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/Operation/Insert.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Test_PHPUnit_Db_Connection */ +require_once "Zend/Test/PHPUnit/Db/Connection.php"; /** * Operation for Inserting on setup or teardown of a database tester. @@ -31,7 +32,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_Operation_Insert implements PHPUnit_Extensions_Database_Operation_IDatabaseOperation @@ -43,6 +44,7 @@ class Zend_Test_PHPUnit_Db_Operation_Insert implements PHPUnit_Extensions_Databa public function execute(PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection, PHPUnit_Extensions_Database_DataSet_IDataSet $dataSet) { if(!($connection instanceof Zend_Test_PHPUnit_Db_Connection)) { + require_once "Zend/Test/PHPUnit/Db/Exception.php"; throw new Zend_Test_PHPUnit_Db_Exception("Not a valid Zend_Test_PHPUnit_Db_Connection instance, ".get_class($connection)." given!"); } diff --git a/library/vendor/Zend/Test/PHPUnit/Db/Operation/Truncate.php b/library/vendor/Zend/Test/PHPUnit/Db/Operation/Truncate.php index 624971b9f..da7c643b7 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/Operation/Truncate.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/Operation/Truncate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Test_PHPUnit_Db_Connection */ +require_once "Zend/Test/PHPUnit/Db/Connection.php"; /** * Operation for Truncating on setup or teardown of a database tester. @@ -31,7 +32,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_Operation_Truncate implements PHPUnit_Extensions_Database_Operation_IDatabaseOperation @@ -45,6 +46,7 @@ class Zend_Test_PHPUnit_Db_Operation_Truncate implements PHPUnit_Extensions_Data public function execute(PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection, PHPUnit_Extensions_Database_DataSet_IDataSet $dataSet) { if(!($connection instanceof Zend_Test_PHPUnit_Db_Connection)) { + require_once "Zend/Test/PHPUnit/Db/Exception.php"; throw new Zend_Test_PHPUnit_Db_Exception("Not a valid Zend_Test_PHPUnit_Db_Connection instance, ".get_class($connection)." given!"); } @@ -79,6 +81,7 @@ class Zend_Test_PHPUnit_Db_Operation_Truncate implements PHPUnit_Extensions_Data } else { $db->query('IMPORT FROM /dev/null OF DEL REPLACE INTO '.$tableName); }*/ + require_once "Zend/Exception.php"; throw Zend_Exception("IBM Db2 TRUNCATE not supported."); } else if($this->_isMssqlOrOracle($db)) { $db->query('TRUNCATE TABLE '.$tableName); diff --git a/library/vendor/Zend/Test/PHPUnit/Db/SimpleTester.php b/library/vendor/Zend/Test/PHPUnit/Db/SimpleTester.php index 66e7daad5..901b4e713 100644 --- a/library/vendor/Zend/Test/PHPUnit/Db/SimpleTester.php +++ b/library/vendor/Zend/Test/PHPUnit/Db/SimpleTester.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Test_PHPUnit_Db_Operation_Truncate */ +require_once "Zend/Test/PHPUnit/Db/Operation/Truncate.php"; /** * @see Zend_Test_PHPUnit_Db_Operation_Insert */ +require_once "Zend/Test/PHPUnit/Db/Operation/Insert.php"; /** * Simple Tester for Database Tests when the Abstract Test Case cannot be used. @@ -35,7 +37,7 @@ * @category Zend * @package Zend_Test * @subpackage PHPUnit - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Test_PHPUnit_Db_SimpleTester extends PHPUnit_Extensions_Database_DefaultTester @@ -48,6 +50,7 @@ class Zend_Test_PHPUnit_Db_SimpleTester extends PHPUnit_Extensions_Database_Defa public function __construct(PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection) { if(!($connection instanceof Zend_Test_PHPUnit_Db_Connection)) { + require_once "Zend/Test/PHPUnit/Db/Exception.php"; throw new Zend_Test_PHPUnit_Db_Exception("Not a valid Zend_Test_PHPUnit_Db_Connection instance, ".get_class($connection)." given!"); } diff --git a/library/vendor/Zend/Text/Exception.php b/library/vendor/Zend/Text/Exception.php index 3c8509842..026e36cc4 100644 --- a/library/vendor/Zend/Text/Exception.php +++ b/library/vendor/Zend/Text/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * Zend_Exception */ +require_once 'Zend/Exception.php'; /** * Exception class for Zend_Text @@ -29,7 +30,7 @@ * @category Zend * @package Zend_Text * @uses Zend_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Text/Figlet.php b/library/vendor/Zend/Text/Figlet.php index 1affba3a9..9a4243045 100644 --- a/library/vendor/Zend/Text/Figlet.php +++ b/library/vendor/Zend/Text/Figlet.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text_Figlet - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Text_Figlet - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Figlet @@ -447,6 +447,7 @@ class Zend_Text_Figlet $textLength = @iconv_strlen($text, 'UTF-8'); if ($textLength === false) { + require_once 'Zend/Text/Figlet/Exception.php'; throw new Zend_Text_Figlet_Exception('$text is not encoded with ' . $encoding); } @@ -967,12 +968,14 @@ class Zend_Text_Figlet { // Check if the font file exists if (!file_exists($fontFile)) { + require_once 'Zend/Text/Figlet/Exception.php'; throw new Zend_Text_Figlet_Exception($fontFile . ': Font file not found'); } // Check if gzip support is required if (substr($fontFile, -3) === '.gz') { if (!function_exists('gzcompress')) { + require_once 'Zend/Text/Figlet/Exception.php'; throw new Zend_Text_Figlet_Exception('GZIP library is required for ' . 'gzip compressed font files'); } @@ -986,6 +989,7 @@ class Zend_Text_Figlet // Try to open the file $fp = fopen($fontFile, 'rb'); if ($fp === false) { + require_once 'Zend/Text/Figlet/Exception.php'; throw new Zend_Text_Figlet_Exception($fontFile . ': Could not open file'); } @@ -1009,6 +1013,7 @@ class Zend_Text_Figlet $this->_fontSmush); if ($magic !== self::FONTFILE_MAGIC_NUMBER || $numsRead < 5) { + require_once 'Zend/Text/Figlet/Exception.php'; throw new Zend_Text_Figlet_Exception($fontFile . ': Not a FIGlet 2 font file'); } diff --git a/library/vendor/Zend/Text/Figlet/Exception.php b/library/vendor/Zend/Text/Figlet/Exception.php index 91293c4bf..b501a84d3 100644 --- a/library/vendor/Zend/Text/Figlet/Exception.php +++ b/library/vendor/Zend/Text/Figlet/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Figlet - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * @see Zend_Text_Exception */ +require_once 'Zend/Text/Exception.php'; /** * Exception class for Zend_Figlet @@ -29,7 +30,7 @@ * @category Zend * @package Zend_Text_Figlet * @uses Zend_Text_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Figlet_Exception extends Zend_Text_Exception diff --git a/library/vendor/Zend/Text/Figlet/zend-framework.flf b/library/vendor/Zend/Text/Figlet/zend-framework.flf index 5d7445cf4..8b4ddc8be 100644 --- a/library/vendor/Zend/Text/Figlet/zend-framework.flf +++ b/library/vendor/Zend/Text/Figlet/zend-framework.flf @@ -17,7 +17,7 @@ Version: 1.0 obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately. - Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) ------------------------------------------------------------------------------- diff --git a/library/vendor/Zend/Text/MultiByte.php b/library/vendor/Zend/Text/MultiByte.php index a3f1b7a82..ad6a91656 100644 --- a/library/vendor/Zend/Text/MultiByte.php +++ b/library/vendor/Zend/Text/MultiByte.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Text - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_MultiByte diff --git a/library/vendor/Zend/Text/Table.php b/library/vendor/Zend/Text/Table.php index a82cf3948..9f0980232 100644 --- a/library/vendor/Zend/Text/Table.php +++ b/library/vendor/Zend/Text/Table.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Table @@ -130,6 +130,7 @@ class Zend_Text_Table // Check if column widths were set // @todo When column widths were not set, assume auto-sizing if ($this->_columnWidths === null) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('You must define the column widths'); } @@ -187,11 +188,13 @@ class Zend_Text_Table public function setColumnWidths(array $columnWidths) { if (count($columnWidths) === 0) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('You must supply at least one column'); } foreach ($columnWidths as $columnNum => $columnWidth) { if (is_int($columnWidth) === false or $columnWidth < 1) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('Column ' . $columnNum . ' has an invalid' . ' column width'); } @@ -255,6 +258,7 @@ class Zend_Text_Table $prefix = 'Zend_Text_Table_Decorator_'; $pathPrefix = 'Zend/Text/Table/Decorator/'; + require_once 'Zend/Loader/PluginLoader.php'; $this->_pluginLoader = new Zend_Loader_PluginLoader(array($prefix => $pathPrefix)); } @@ -326,14 +330,18 @@ class Zend_Text_Table public function appendRow($row) { if (!is_array($row) && !($row instanceof Zend_Text_Table_Row)) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('$row must be an array or instance of Zend_Text_Table_Row'); } if (is_array($row)) { if (count($row) > count($this->_columnWidths)) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('Row contains too many columns'); } + require_once 'Zend/Text/Table/Row.php'; + require_once 'Zend/Text/Table/Column.php'; $data = $row; $row = new Zend_Text_Table_Row(); @@ -365,6 +373,7 @@ class Zend_Text_Table { // There should be at least one row if (count($this->_rows) === 0) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('No rows were added to the table yet'); } diff --git a/library/vendor/Zend/Text/Table/Column.php b/library/vendor/Zend/Text/Table/Column.php index f57be501a..cd1547062 100644 --- a/library/vendor/Zend/Text/Table/Column.php +++ b/library/vendor/Zend/Text/Table/Column.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,17 +22,19 @@ /** * @see Zend_Text_Table */ +require_once 'Zend/Text/Table.php'; /** * @see Zend_Text_MultiByte */ +require_once 'Zend/Text/MultiByte.php'; /** * Column class for Zend_Text_Table_Row * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Table_Column @@ -110,6 +112,7 @@ class Zend_Text_Table_Column public function setContent($content, $charset = null) { if (is_string($content) === false) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('$content must be a string'); } @@ -144,6 +147,7 @@ class Zend_Text_Table_Column public function setAlign($align) { if (in_array($align, $this->_allowedAligns) === false) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('Invalid align supplied'); } @@ -162,6 +166,7 @@ class Zend_Text_Table_Column public function setColSpan($colSpan) { if (is_int($colSpan) === false or $colSpan < 1) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('$colSpan must be an integer and greater than 0'); } @@ -192,12 +197,14 @@ class Zend_Text_Table_Column public function render($columnWidth, $padding = 0) { if (is_int($columnWidth) === false or $columnWidth < 1) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('$columnWidth must be an integer and greater than 0'); } $columnWidth -= ($padding * 2); if ($columnWidth < 1) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('Padding (' . $padding . ') is greater than column width'); } diff --git a/library/vendor/Zend/Text/Table/Decorator/Ascii.php b/library/vendor/Zend/Text/Table/Decorator/Ascii.php index 3e993a77b..bfc6fb574 100644 --- a/library/vendor/Zend/Text/Table/Decorator/Ascii.php +++ b/library/vendor/Zend/Text/Table/Decorator/Ascii.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * @see Zend_Text_Table_Decorator_Interface */ +require_once 'Zend/Text/Table/Decorator/Interface.php'; /** * ASCII Decorator for Zend_Text_Table @@ -29,7 +30,7 @@ * @category Zend * @package Zend_Text_Table * @uses Zend_Text_Table_Decorator_Interface - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Table_Decorator_Ascii implements Zend_Text_Table_Decorator_Interface diff --git a/library/vendor/Zend/Text/Table/Decorator/Interface.php b/library/vendor/Zend/Text/Table/Decorator/Interface.php index 044376a0d..995d30399 100644 --- a/library/vendor/Zend/Text/Table/Decorator/Interface.php +++ b/library/vendor/Zend/Text/Table/Decorator/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Text_Table_Decorator_Interface diff --git a/library/vendor/Zend/Text/Table/Decorator/Unicode.php b/library/vendor/Zend/Text/Table/Decorator/Unicode.php index dd88336f1..e736afdd1 100644 --- a/library/vendor/Zend/Text/Table/Decorator/Unicode.php +++ b/library/vendor/Zend/Text/Table/Decorator/Unicode.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * @see Zend_Text_Table_Decorator_Interface */ +require_once 'Zend/Text/Table/Decorator/Interface.php'; /** * Unicode Decorator for Zend_Text_Table @@ -29,7 +30,7 @@ * @category Zend * @package Zend_Text_Table * @uses Zend_Text_Table_Decorator_Interface - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Table_Decorator_Unicode implements Zend_Text_Table_Decorator_Interface diff --git a/library/vendor/Zend/Text/Table/Exception.php b/library/vendor/Zend/Text/Table/Exception.php index 6f1b526ba..d39402f6d 100644 --- a/library/vendor/Zend/Text/Table/Exception.php +++ b/library/vendor/Zend/Text/Table/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * @see Zend_Text_Exception */ +require_once 'Zend/Text/Exception.php'; /** * Exception class for Zend_Text_Table @@ -29,7 +30,7 @@ * @category Zend * @package Zend_Text_Table * @uses Zend_Text_Exception - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Table_Exception extends Zend_Text_Exception diff --git a/library/vendor/Zend/Text/Table/Row.php b/library/vendor/Zend/Text/Table/Row.php index f4d1dfd0f..7af2bfc1f 100644 --- a/library/vendor/Zend/Text/Table/Row.php +++ b/library/vendor/Zend/Text/Table/Row.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Text_Table - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Text_Table_Row @@ -60,6 +60,7 @@ class Zend_Text_Table_Row extract($options, EXTR_IF_EXISTS); } + require_once 'Zend/Text/Table/Column.php'; $column = new Zend_Text_Table_Column($content, $align, $colSpan, $encoding); @@ -117,6 +118,7 @@ class Zend_Text_Table_Row public function getColumnWidths() { if ($this->_columnWidths === null) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('No columns were rendered yet'); } @@ -142,6 +144,7 @@ class Zend_Text_Table_Row // If there is no single column, create a column which spans over the // entire row if (count($this->_columns) === 0) { + require_once 'Zend/Text/Table/Column.php'; $this->appendColumn(new Zend_Text_Table_Column(null, null, count($columnWidths))); } @@ -155,6 +158,7 @@ class Zend_Text_Table_Row // Verify if there are enough column widths defined if (($colNum + $colSpan) > count($columnWidths)) { + require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('Too many columns'); } diff --git a/library/vendor/Zend/TimeSync.php b/library/vendor/Zend/TimeSync.php index a1c8011cb..bf56fe25a 100644 --- a/library/vendor/Zend/TimeSync.php +++ b/library/vendor/Zend/TimeSync.php @@ -15,7 +15,7 @@ * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,11 +23,12 @@ /** * Zend_Date */ +require_once 'Zend/Date.php'; /** * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_TimeSync implements IteratorAggregate @@ -163,6 +164,7 @@ class Zend_TimeSync implements IteratorAggregate if (isset($this->_timeservers[$alias]) === true) { $this->_current = $this->_timeservers[$alias]; } else { + require_once 'Zend/TimeSync/Exception.php'; throw new Zend_TimeSync_Exception("'$alias' does not point to valid timeserver"); } } @@ -183,6 +185,7 @@ class Zend_TimeSync implements IteratorAggregate if (isset(Zend_TimeSync::$options[$key]) === true) { return Zend_TimeSync::$options[$key]; } else { + require_once 'Zend/TimeSync/Exception.php'; throw new Zend_TimeSync_Exception("'$key' does not point to valid option"); } } @@ -201,12 +204,14 @@ class Zend_TimeSync implements IteratorAggregate if (isset($this->_current) && $this->_current !== false) { return $this->_current; } else { + require_once 'Zend/TimeSync/Exception.php'; throw new Zend_TimeSync_Exception('there is no timeserver set'); } } if (isset($this->_timeservers[$alias]) === true) { return $this->_timeservers[$alias]; } else { + require_once 'Zend/TimeSync/Exception.php'; throw new Zend_TimeSync_Exception("'$alias' does not point to valid timeserver"); } } @@ -234,6 +239,7 @@ class Zend_TimeSync implements IteratorAggregate */ public function getDate($locale = null) { + require_once 'Zend/TimeSync/Exception.php'; foreach ($this->_timeservers as $alias => $server) { $this->_current = $server; try { @@ -282,11 +288,13 @@ class Zend_TimeSync implements IteratorAggregate $protocol = ucfirst(strtolower($protocol)); if (!in_array($protocol, $this->_allowedSchemes)) { + require_once 'Zend/TimeSync/Exception.php'; throw new Zend_TimeSync_Exception("'$protocol' is not a supported protocol"); } $className = 'Zend_TimeSync_' . $protocol; if (!class_exists($className)) { + require_once 'Zend/Loader.php'; Zend_Loader::loadClass($className); } $timeServerObj = new $className($adress, $port); diff --git a/library/vendor/Zend/TimeSync/Exception.php b/library/vendor/Zend/TimeSync/Exception.php index 544cfd9a3..55c0bfc4e 100644 --- a/library/vendor/Zend/TimeSync/Exception.php +++ b/library/vendor/Zend/TimeSync/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * Zend_Exception */ +require_once 'Zend/Exception.php'; /** * Exception class for Zend_TimeSync * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_TimeSync_Exception extends Zend_Exception diff --git a/library/vendor/Zend/TimeSync/Ntp.php b/library/vendor/Zend/TimeSync/Ntp.php index 6827c1e62..a0f26b43a 100644 --- a/library/vendor/Zend/TimeSync/Ntp.php +++ b/library/vendor/Zend/TimeSync/Ntp.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * Zend_TimeSync_Protocol */ +require_once 'Zend/TimeSync/Protocol.php'; /** * NTP Protocol handling class * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_TimeSync_Ntp extends Zend_TimeSync_Protocol diff --git a/library/vendor/Zend/TimeSync/Protocol.php b/library/vendor/Zend/TimeSync/Protocol.php index 613ca9334..12dc6d9f9 100644 --- a/library/vendor/Zend/TimeSync/Protocol.php +++ b/library/vendor/Zend/TimeSync/Protocol.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_TimeSync_Protocol diff --git a/library/vendor/Zend/TimeSync/Sntp.php b/library/vendor/Zend/TimeSync/Sntp.php index 56c0109bd..e49d92932 100644 --- a/library/vendor/Zend/TimeSync/Sntp.php +++ b/library/vendor/Zend/TimeSync/Sntp.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * Zend_TimeSync_Protocol */ +require_once 'Zend/TimeSync/Protocol.php'; /** * SNTP Protocol handling class * * @category Zend * @package Zend_TimeSync - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_TimeSync_Sntp extends Zend_TimeSync_Protocol diff --git a/library/vendor/Zend/Tool/Framework/Action/Base.php b/library/vendor/Zend/Tool/Framework/Action/Base.php index 8be89092c..817c06c99 100644 --- a/library/vendor/Zend/Tool/Framework/Action/Base.php +++ b/library/vendor/Zend/Tool/Framework/Action/Base.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Action_Interface */ +require_once 'Zend/Tool/Framework/Action/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Action_Base implements Zend_Tool_Framework_Action_Interface diff --git a/library/vendor/Zend/Tool/Framework/Action/Exception.php b/library/vendor/Zend/Tool/Framework/Action/Exception.php index 0a25e6bbc..e6a0b7925 100644 --- a/library/vendor/Zend/Tool/Framework/Action/Exception.php +++ b/library/vendor/Zend/Tool/Framework/Action/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Exception */ +require_once 'Zend/Tool/Framework/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Action_Exception extends Zend_Tool_Framework_Exception diff --git a/library/vendor/Zend/Tool/Framework/Action/Interface.php b/library/vendor/Zend/Tool/Framework/Action/Interface.php index d323bab83..17f1ddb9e 100644 --- a/library/vendor/Zend/Tool/Framework/Action/Interface.php +++ b/library/vendor/Zend/Tool/Framework/Action/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Action_Interface diff --git a/library/vendor/Zend/Tool/Framework/Action/Repository.php b/library/vendor/Zend/Tool/Framework/Action/Repository.php index 68c923944..38262c01e 100644 --- a/library/vendor/Zend/Tool/Framework/Action/Repository.php +++ b/library/vendor/Zend/Tool/Framework/Action/Repository.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Action_Repository @@ -65,10 +66,12 @@ class Zend_Tool_Framework_Action_Repository $actionName = $action->getName(); if ($actionName == '' || $actionName == 'Base') { + require_once 'Zend/Tool/Framework/Action/Exception.php'; throw new Zend_Tool_Framework_Action_Exception('An action name for the provided action could not be determined.'); } if (!$overrideExistingAction && array_key_exists(strtolower($actionName), $this->_actions)) { + require_once 'Zend/Tool/Framework/Action/Exception.php'; throw new Zend_Tool_Framework_Action_Exception('An action by the name ' . $actionName . ' is already registered and $overrideExistingAction is set to false.'); } diff --git a/library/vendor/Zend/Tool/Framework/Client/Abstract.php b/library/vendor/Zend/Tool/Framework/Client/Abstract.php index a5502c9aa..6f342f8e1 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Abstract.php +++ b/library/vendor/Zend/Tool/Framework/Client/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Loader_Autoloader */ +require_once 'Zend/Loader/Autoloader.php'; /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framework_Registry_EnabledInterface @@ -111,6 +113,8 @@ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framewor // setup the debug log if (!$this->_debugLogger instanceof Zend_Log) { + require_once 'Zend/Log.php'; + require_once 'Zend/Log/Writer/Null.php'; $this->_debugLogger = new Zend_Log(new Zend_Log_Writer_Null()); } @@ -127,6 +131,7 @@ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framewor $this->_registry->getManifestRepository()->process(); if ($this instanceof Zend_Tool_Framework_Client_Interactive_InputInterface) { + require_once 'Zend/Tool/Framework/Client/Interactive/InputHandler.php'; } if ($this instanceof Zend_Tool_Framework_Client_Interactive_OutputInterface) { @@ -198,6 +203,7 @@ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framewor public function promptInteractiveInput($inputRequest) { if (!$this->hasInteractiveInput()) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('promptInteractive() cannot be called on a non-interactive client.'); } @@ -223,10 +229,12 @@ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framewor if ($this->_registry->getRequest()->isDispatchable()) { if ($this->_registry->getRequest()->getActionName() == null) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Client failed to setup the action name.'); } if ($this->_registry->getRequest()->getProviderName() == null) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Client failed to setup the provider name.'); } @@ -266,6 +274,7 @@ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framewor // ensure that we can pretend if this is a pretend request if ($request->isPretend() && (!$provider instanceof Zend_Tool_Framework_Provider_Pretendable)) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Dispatcher error - provider does not support pretend'); } @@ -274,6 +283,7 @@ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framewor $specialtyName = $this->_registry->getRequest()->getSpecialtyName(); if (!$actionableMethod = $providerSignature->getActionableMethodByActionName($actionName, $specialtyName)) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Dispatcher error - actionable method not found'); } @@ -292,10 +302,12 @@ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framewor $promptSting = $this->getMissingParameterPromptString($provider, $actionableMethod['action'], $methodParameterValue['name']); $parameterPromptValue = $this->promptInteractiveInput($promptSting)->getContent(); if ($parameterPromptValue == null) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Value supplied for required parameter "' . $methodParameterValue['name'] . '" is empty'); } $callParameters[] = $parameterPromptValue; } else { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('A required parameter "' . $methodParameterValue['name'] . '" was not supplied.'); } } else { @@ -313,6 +325,7 @@ abstract class Zend_Tool_Framework_Client_Abstract implements Zend_Tool_Framewor } elseif (method_exists($class, $methodName . 'Action')) { call_user_func_array(array($class, $methodName . 'Action'), $callParameters); } else { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Not a supported method.'); } } diff --git a/library/vendor/Zend/Tool/Framework/Client/Config.php b/library/vendor/Zend/Tool/Framework/Client/Config.php index da26dda17..4cc726e78 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Config.php +++ b/library/vendor/Zend/Tool/Framework/Client/Config.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Config @@ -66,6 +66,7 @@ class Zend_Tool_Framework_Client_Config public function setConfigFilepath($configFilepath) { if (!file_exists($configFilepath)) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Provided path to config ' . $configFilepath . ' does not exist'); } @@ -86,15 +87,19 @@ class Zend_Tool_Framework_Client_Config switch ($suffix) { case '.ini': + require_once 'Zend/Config/Ini.php'; $this->_config = new Zend_Config_Ini($configFilepath, null, array('allowModifications' => true)); break; case '.xml': + require_once 'Zend/Config/Xml.php'; $this->_config = new Zend_Config_Xml($configFilepath, null, array('allowModifications' => true)); break; case '.php': + require_once 'Zend/Config.php'; $this->_config = new Zend_Config(include $configFilepath, true); break; default: + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Unknown config file type ' . $suffix . ' at location ' . $configFilepath ); @@ -182,6 +187,7 @@ class Zend_Tool_Framework_Client_Config public function getConfigInstance() { if(!$this->exists()) { + require_once "Zend/Tool/Framework/Client/Exception.php"; throw new Zend_Tool_Framework_Client_Exception("Client has no persistent configuration."); } @@ -215,16 +221,20 @@ class Zend_Tool_Framework_Client_Config $suffix = substr($this->getConfigFilepath(), -4); switch($suffix) { case '.ini': + require_once "Zend/Config/Writer/Ini.php"; $writer = new Zend_Config_Writer_Ini(); $writer->setRenderWithoutSections(); break; case '.xml': + require_once "Zend/Config/Writer/Xml.php"; $writer = new Zend_Config_Writer_Xml(); break; case '.php': + require_once "Zend/Config/Writer/Array.php"; $writer = new Zend_Config_Writer_Array(); break; default: + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Unknown config file type ' . $suffix . ' at location ' . $this->getConfigFilepath() ); diff --git a/library/vendor/Zend/Tool/Framework/Client/Console.php b/library/vendor/Zend/Tool/Framework/Client/Console.php index a02aaccf6..ed4338a60 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Console.php +++ b/library/vendor/Zend/Tool/Framework/Client/Console.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,21 +23,24 @@ /** * @see Zend_Tool_Framework_Client_Abstract */ +require_once 'Zend/Tool/Framework/Client/Abstract.php'; /** * @see Zend_Tool_Framework_Client_Interactive_InputInterface */ +require_once 'Zend/Tool/Framework/Client/Interactive/InputInterface.php'; /** * @see Zend_Tool_Framework_Client_Interactive_OutputInterface */ +require_once 'Zend/Tool/Framework/Client/Interactive/OutputInterface.php'; /** * Zend_Tool_Framework_Client_Console - the CLI Client implementation for Zend_Tool_Framework * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * * @todo methods need more API documentation. diff --git a/library/vendor/Zend/Tool/Framework/Client/Console/ArgumentParser.php b/library/vendor/Zend/Tool/Framework/Client/Console/ArgumentParser.php index 606882b54..77d85c0f2 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Console/ArgumentParser.php +++ b/library/vendor/Zend/Tool/Framework/Client/Console/ArgumentParser.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Console_GetOpt */ +require_once 'Zend/Console/Getopt.php'; /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Console_ArgumentParser implements Zend_Tool_Framework_Registry_EnabledInterface @@ -115,6 +117,7 @@ class Zend_Tool_Framework_Client_Console_ArgumentParser implements Zend_Tool_Fra { if ($this->_request == null || $this->_response == null) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('The client registry must have both a request and response registered.'); } @@ -300,6 +303,7 @@ class Zend_Tool_Framework_Client_Console_ArgumentParser implements Zend_Tool_Fra // if no action, handle error if (!$actionMetadata) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Action \'' . $consoleActionName . '\' is not a valid action.'); } @@ -351,6 +355,7 @@ class Zend_Tool_Framework_Client_Console_ArgumentParser implements Zend_Tool_Fra } if (!$providerMetadata) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception( 'Provider \'' . $consoleProviderFull . '\' is not a valid provider.' ); @@ -382,6 +387,7 @@ class Zend_Tool_Framework_Client_Console_ArgumentParser implements Zend_Tool_Fra } if (!$providerSpecialtyMetadata) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception( 'Provider \'' . $consoleSpecialtyName . '\' is not a valid specialty.' ); @@ -510,6 +516,7 @@ class Zend_Tool_Framework_Client_Console_ArgumentParser implements Zend_Tool_Fra */ protected function _createHelpResponse($options = array()) { + require_once 'Zend/Tool/Framework/Client/Console/HelpSystem.php'; $helpSystem = new Zend_Tool_Framework_Client_Console_HelpSystem(); $helpSystem->setRegistry($this->_registry); diff --git a/library/vendor/Zend/Tool/Framework/Client/Console/HelpSystem.php b/library/vendor/Zend/Tool/Framework/Client/Console/HelpSystem.php index 27f162b98..42edea90b 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Console/HelpSystem.php +++ b/library/vendor/Zend/Tool/Framework/Client/Console/HelpSystem.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Console_HelpSystem @@ -159,6 +159,7 @@ class Zend_Tool_Framework_Client_Console_HelpSystem /** * @see Zend_Version */ + require_once 'Zend/Version.php'; $this->_response->appendContent('Zend Framework', array('color' => array('hiWhite'), 'separator' => false)); $this->_response->appendContent(' Command Line Console Tool v' . Zend_Version::VERSION . ''); return $this; diff --git a/library/vendor/Zend/Tool/Framework/Client/Console/Manifest.php b/library/vendor/Zend/Tool/Framework/Client/Console/Manifest.php index 2aaaab04f..db592db93 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Console/Manifest.php +++ b/library/vendor/Zend/Tool/Framework/Client/Console/Manifest.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,32 +23,38 @@ /** * @see Zend_Tool_Framework_Manifest_MetadataManifestable */ +require_once 'Zend/Tool/Framework/Manifest/MetadataManifestable.php'; /** * @see Zend_Filter */ +require_once 'Zend/Filter.php'; /** * @see Zend_Filter_Word_CamelCaseToDash */ +require_once 'Zend/Filter/Word/CamelCaseToDash.php'; /** * @see Zend_Filter_StringToLower */ +require_once 'Zend/Filter/StringToLower.php'; /** * @see Zend_Tool_Framework_Metadata_Tool */ +require_once 'Zend/Tool/Framework/Metadata/Tool.php'; /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * Zend_Tool_Framework_Client_ConsoleClient_Manifest * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Console_Manifest diff --git a/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/AlignCenter.php b/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/AlignCenter.php index d00941cae..09285d24e 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/AlignCenter.php +++ b/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/AlignCenter.php @@ -15,10 +15,11 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ +require_once "Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php"; /** * Try to align a given text central on the screen. @@ -26,7 +27,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Blockize.php b/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Blockize.php index 1dc0a25e0..a116bf5ab 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Blockize.php +++ b/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Blockize.php @@ -15,10 +15,11 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ +require_once "Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php"; /** * Take a text and block it into several lines of a fixed length. @@ -26,7 +27,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php b/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php index 5877f6bff..5d83feaee 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php +++ b/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Colorizer.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Console_ResponseDecorator_Colorizer diff --git a/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Indention.php b/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Indention.php index 138fccaed..a1372af97 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Indention.php +++ b/library/vendor/Zend/Tool/Framework/Client/Console/ResponseDecorator/Indention.php @@ -14,16 +14,17 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +require_once "Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php"; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Console_ResponseDecorator_Indention diff --git a/library/vendor/Zend/Tool/Framework/Client/Exception.php b/library/vendor/Zend/Tool/Framework/Client/Exception.php index b049b2d2f..32b38f442 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Exception.php +++ b/library/vendor/Zend/Tool/Framework/Client/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Exception */ +require_once 'Zend/Tool/Framework/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Exception extends Zend_Tool_Framework_Exception diff --git a/library/vendor/Zend/Tool/Framework/Client/Interactive/InputHandler.php b/library/vendor/Zend/Tool/Framework/Client/Interactive/InputHandler.php index f8b29a3b2..5e12d1222 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Interactive/InputHandler.php +++ b/library/vendor/Zend/Tool/Framework/Client/Interactive/InputHandler.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Interactive_InputHandler @@ -44,8 +44,10 @@ class Zend_Tool_Framework_Client_Interactive_InputHandler public function setInputRequest($inputRequest) { if (is_string($inputRequest)) { + require_once 'Zend/Tool/Framework/Client/Interactive/InputRequest.php'; $inputRequest = new Zend_Tool_Framework_Client_Interactive_InputRequest($inputRequest); } elseif (!$inputRequest instanceof Zend_Tool_Framework_Client_Interactive_InputRequest) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('promptInteractive() requires either a string or an instance of Zend_Tool_Framework_Client_Interactive_InputRequest.'); } @@ -58,8 +60,10 @@ class Zend_Tool_Framework_Client_Interactive_InputHandler $inputResponse = $this->_client->handleInteractiveInputRequest($this->_inputRequest); if (is_string($inputResponse)) { + require_once 'Zend/Tool/Framework/Client/Interactive/InputResponse.php'; $inputResponse = new Zend_Tool_Framework_Client_Interactive_InputResponse($inputResponse); } elseif (!$inputResponse instanceof Zend_Tool_Framework_Client_Interactive_InputResponse) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('The registered $_interactiveCallback for the client must either return a string or an instance of Zend_Tool_Framework_Client_Interactive_InputResponse.'); } diff --git a/library/vendor/Zend/Tool/Framework/Client/Interactive/InputInterface.php b/library/vendor/Zend/Tool/Framework/Client/Interactive/InputInterface.php index 39d5253e8..a12a833b5 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Interactive/InputInterface.php +++ b/library/vendor/Zend/Tool/Framework/Client/Interactive/InputInterface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Client_Interactive_InputInterface diff --git a/library/vendor/Zend/Tool/Framework/Client/Interactive/InputRequest.php b/library/vendor/Zend/Tool/Framework/Client/Interactive/InputRequest.php index c285d5578..5871bb169 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Interactive/InputRequest.php +++ b/library/vendor/Zend/Tool/Framework/Client/Interactive/InputRequest.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Interactive_InputRequest diff --git a/library/vendor/Zend/Tool/Framework/Client/Interactive/InputResponse.php b/library/vendor/Zend/Tool/Framework/Client/Interactive/InputResponse.php index 2f1a24ce7..5a6804385 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Interactive/InputResponse.php +++ b/library/vendor/Zend/Tool/Framework/Client/Interactive/InputResponse.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Interactive_InputResponse diff --git a/library/vendor/Zend/Tool/Framework/Client/Interactive/OutputInterface.php b/library/vendor/Zend/Tool/Framework/Client/Interactive/OutputInterface.php index 421ad7267..03ecfcc48 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Interactive/OutputInterface.php +++ b/library/vendor/Zend/Tool/Framework/Client/Interactive/OutputInterface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Client_Interactive_OutputInterface diff --git a/library/vendor/Zend/Tool/Framework/Client/Manifest.php b/library/vendor/Zend/Tool/Framework/Client/Manifest.php index fd6768806..5f66578ad 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Manifest.php +++ b/library/vendor/Zend/Tool/Framework/Client/Manifest.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,32 +23,38 @@ /** * @see Zend_Tool_Framework_Manifest_MetadataManifestable */ +require_once 'Zend/Tool/Framework/Manifest/MetadataManifestable.php'; /** * @see Zend_Filter */ +require_once 'Zend/Filter.php'; /** * @see Zend_Filter_Word_CamelCaseToDash */ +require_once 'Zend/Filter/Word/CamelCaseToDash.php'; /** * @see Zend_Filter_StringToLower */ +require_once 'Zend/Filter/StringToLower.php'; /** * @see Zend_Tool_Framework_Metadata_Tool */ +require_once 'Zend/Tool/Framework/Metadata/Tool.php'; /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * Zend_Tool_Framework_Client_ConsoleClient_Manifest * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Manifest diff --git a/library/vendor/Zend/Tool/Framework/Client/Request.php b/library/vendor/Zend/Tool/Framework/Client/Request.php index c38191114..c3896c680 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Request.php +++ b/library/vendor/Zend/Tool/Framework/Client/Request.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Request diff --git a/library/vendor/Zend/Tool/Framework/Client/Response.php b/library/vendor/Zend/Tool/Framework/Client/Response.php index fa932ee00..97998da89 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Response.php +++ b/library/vendor/Zend/Tool/Framework/Client/Response.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Response @@ -62,6 +62,7 @@ class Zend_Tool_Framework_Client_Response public function setContentCallback($callback) { if (!is_callable($callback)) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('The callback provided is not callable'); } $this->_callback = $callback; diff --git a/library/vendor/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php b/library/vendor/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php index 87641c1ca..ec29803da 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php +++ b/library/vendor/Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Client_Response_ContentDecorator_Interface diff --git a/library/vendor/Zend/Tool/Framework/Client/Response/ContentDecorator/Separator.php b/library/vendor/Zend/Tool/Framework/Client/Response/ContentDecorator/Separator.php index 966b9fcad..b6aa34fe8 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Response/ContentDecorator/Separator.php +++ b/library/vendor/Zend/Tool/Framework/Client/Response/ContentDecorator/Separator.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Client_Response_ContentDecorator_Interface */ +require_once 'Zend/Tool/Framework/Client/Response/ContentDecorator/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Response_ContentDecorator_Separator diff --git a/library/vendor/Zend/Tool/Framework/Client/Storage.php b/library/vendor/Zend/Tool/Framework/Client/Storage.php index 99d54dc08..1d4ebe205 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Storage.php +++ b/library/vendor/Zend/Tool/Framework/Client/Storage.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Client_Storage_AdapterInterface */ +require_once 'Zend/Tool/Framework/Client/Storage/AdapterInterface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Storage diff --git a/library/vendor/Zend/Tool/Framework/Client/Storage/AdapterInterface.php b/library/vendor/Zend/Tool/Framework/Client/Storage/AdapterInterface.php index c34e57260..e3e717ab9 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Storage/AdapterInterface.php +++ b/library/vendor/Zend/Tool/Framework/Client/Storage/AdapterInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Client_Storage_AdapterInterface diff --git a/library/vendor/Zend/Tool/Framework/Client/Storage/Directory.php b/library/vendor/Zend/Tool/Framework/Client/Storage/Directory.php index bfaa16bd1..f211e1ebc 100644 --- a/library/vendor/Zend/Tool/Framework/Client/Storage/Directory.php +++ b/library/vendor/Zend/Tool/Framework/Client/Storage/Directory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Client_Storage_AdapterInterface */ +require_once 'Zend/Tool/Framework/Client/Storage/AdapterInterface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Client_Storage_Directory diff --git a/library/vendor/Zend/Tool/Framework/Exception.php b/library/vendor/Zend/Tool/Framework/Exception.php index 80211d74b..970243c9d 100644 --- a/library/vendor/Zend/Tool/Framework/Exception.php +++ b/library/vendor/Zend/Tool/Framework/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Exception */ +require_once 'Zend/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Tool/Framework/Loader/Abstract.php b/library/vendor/Zend/Tool/Framework/Loader/Abstract.php index f9e496eb1..cb13d7713 100644 --- a/library/vendor/Zend/Tool/Framework/Loader/Abstract.php +++ b/library/vendor/Zend/Tool/Framework/Loader/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,13 +23,17 @@ /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; +require_once 'Zend/Tool/Framework/Loader/Interface.php'; +require_once 'Zend/Tool/Framework/Manifest/Interface.php'; +require_once 'Zend/Tool/Framework/Provider/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Tool_Framework_Loader_Abstract diff --git a/library/vendor/Zend/Tool/Framework/Loader/BasicLoader.php b/library/vendor/Zend/Tool/Framework/Loader/BasicLoader.php index a376f2617..d65921c45 100644 --- a/library/vendor/Zend/Tool/Framework/Loader/BasicLoader.php +++ b/library/vendor/Zend/Tool/Framework/Loader/BasicLoader.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,19 +23,24 @@ /** * @see Zend_Tool_Framework_Loader_Abstract */ +require_once 'Zend/Tool/Framework/Loader/Interface.php'; /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * @see Zend_Loader */ +require_once 'Zend/Loader.php'; +require_once 'Zend/Tool/Framework/Manifest/Interface.php'; +require_once 'Zend/Tool/Framework/Provider/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Loader_BasicLoader diff --git a/library/vendor/Zend/Tool/Framework/Loader/IncludePathLoader.php b/library/vendor/Zend/Tool/Framework/Loader/IncludePathLoader.php index f1a6acc14..237483538 100644 --- a/library/vendor/Zend/Tool/Framework/Loader/IncludePathLoader.php +++ b/library/vendor/Zend/Tool/Framework/Loader/IncludePathLoader.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Tool_Framework_Loader_Abstract */ +require_once 'Zend/Tool/Framework/Loader/Abstract.php'; /** * @see Zend_Tool_Framework_Loader_IncludePathLoader_RecursiveFilterIterator */ +require_once 'Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Loader_IncludePathLoader extends Zend_Tool_Framework_Loader_Abstract @@ -44,6 +46,7 @@ class Zend_Tool_Framework_Loader_IncludePathLoader extends Zend_Tool_Framework_L */ protected function _getFiles() { + require_once 'Zend/Loader.php'; $paths = Zend_Loader::explodeIncludePath(); // used for checking similarly named files diff --git a/library/vendor/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php b/library/vendor/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php index c66628014..50c9c7409 100644 --- a/library/vendor/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php +++ b/library/vendor/Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Loader_IncludePathLoader_RecursiveFilterIterator extends RecursiveFilterIterator diff --git a/library/vendor/Zend/Tool/Framework/Loader/Interface.php b/library/vendor/Zend/Tool/Framework/Loader/Interface.php index 15965ed8c..f734a7cc1 100644 --- a/library/vendor/Zend/Tool/Framework/Loader/Interface.php +++ b/library/vendor/Zend/Tool/Framework/Loader/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Loader_Interface diff --git a/library/vendor/Zend/Tool/Framework/Manifest/ActionManifestable.php b/library/vendor/Zend/Tool/Framework/Manifest/ActionManifestable.php index fe7356fcc..8306e6a15 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/ActionManifestable.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/ActionManifestable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Manifest_Interface */ +require_once 'Zend/Tool/Framework/Manifest/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Manifest_ActionManifestable extends Zend_Tool_Framework_Manifest_Interface diff --git a/library/vendor/Zend/Tool/Framework/Manifest/ActionMetadata.php b/library/vendor/Zend/Tool/Framework/Manifest/ActionMetadata.php index e5a9bab3b..573ccc611 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/ActionMetadata.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/ActionMetadata.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Manifest_ActionMetadata diff --git a/library/vendor/Zend/Tool/Framework/Manifest/Exception.php b/library/vendor/Zend/Tool/Framework/Manifest/Exception.php index 82dd0a4d1..479f2c2b3 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/Exception.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Exception */ +require_once 'Zend/Tool/Framework/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Manifest_Exception extends Zend_Tool_Framework_Exception diff --git a/library/vendor/Zend/Tool/Framework/Manifest/Indexable.php b/library/vendor/Zend/Tool/Framework/Manifest/Indexable.php index f9c914dd5..532c2ceb8 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/Indexable.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/Indexable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Manifest_Indexable extends Zend_Tool_Framework_Manifest_Interface diff --git a/library/vendor/Zend/Tool/Framework/Manifest/Interface.php b/library/vendor/Zend/Tool/Framework/Manifest/Interface.php index d508686e1..81677a068 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/Interface.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Manifest_Interface diff --git a/library/vendor/Zend/Tool/Framework/Manifest/Metadata.php b/library/vendor/Zend/Tool/Framework/Manifest/Metadata.php index 7a4d54f41..f816b9da8 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/Metadata.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/Metadata.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Manifest_Metadata diff --git a/library/vendor/Zend/Tool/Framework/Manifest/MetadataManifestable.php b/library/vendor/Zend/Tool/Framework/Manifest/MetadataManifestable.php index fef88c019..d6e439797 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/MetadataManifestable.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/MetadataManifestable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Manifest_Interface.php */ +require_once 'Zend/Tool/Framework/Manifest/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Manifest_MetadataManifestable extends Zend_Tool_Framework_Manifest_Interface diff --git a/library/vendor/Zend/Tool/Framework/Manifest/ProviderManifestable.php b/library/vendor/Zend/Tool/Framework/Manifest/ProviderManifestable.php index 45f0232f0..ab54d5d6b 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/ProviderManifestable.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/ProviderManifestable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Manifest_Interface.php */ +require_once 'Zend/Tool/Framework/Manifest/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Manifest_ProviderManifestable extends Zend_Tool_Framework_Manifest_Interface diff --git a/library/vendor/Zend/Tool/Framework/Manifest/ProviderMetadata.php b/library/vendor/Zend/Tool/Framework/Manifest/ProviderMetadata.php index d0527a99c..bff1d378f 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/ProviderMetadata.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/ProviderMetadata.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Manifest_ProviderMetadata diff --git a/library/vendor/Zend/Tool/Framework/Manifest/Repository.php b/library/vendor/Zend/Tool/Framework/Manifest/Repository.php index 3c98ba101..31aa4e4ed 100644 --- a/library/vendor/Zend/Tool/Framework/Manifest/Repository.php +++ b/library/vendor/Zend/Tool/Framework/Manifest/Repository.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Manifest_Repository @@ -101,6 +102,7 @@ class Zend_Tool_Framework_Manifest_Repository } if (!$provider instanceof Zend_Tool_Framework_Provider_Interface) { + require_once 'Zend/Tool/Framework/Manifest/Exception.php'; throw new Zend_Tool_Framework_Manifest_Exception( 'A provider provided by the ' . get_class($manifest) . ' does not implement Zend_Tool_Framework_Provider_Interface' @@ -177,11 +179,13 @@ class Zend_Tool_Framework_Manifest_Repository foreach ($metadatas as $metadata) { if (is_array($metadata)) { if (!class_exists('Zend_Tool_Framework_Metadata_Dynamic')) { + require_once 'Zend/Tool/Framework/Metadata/Dynamic.php'; } $metadata = new Zend_Tool_Framework_Metadata_Dynamic($metadata); } if (!$metadata instanceof Zend_Tool_Framework_Metadata_Interface) { + require_once 'Zend/Tool/Framework/Manifest/Exception.php'; throw new Zend_Tool_Framework_Manifest_Exception( 'A Zend_Tool_Framework_Metadata_Interface object was not found in manifest ' . get_class($manifest) ); diff --git a/library/vendor/Zend/Tool/Framework/Metadata/Attributable.php b/library/vendor/Zend/Tool/Framework/Metadata/Attributable.php index f2163c506..869f5d5e2 100644 --- a/library/vendor/Zend/Tool/Framework/Metadata/Attributable.php +++ b/library/vendor/Zend/Tool/Framework/Metadata/Attributable.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Metadata_Attributable diff --git a/library/vendor/Zend/Tool/Framework/Metadata/Basic.php b/library/vendor/Zend/Tool/Framework/Metadata/Basic.php index 8a6d3a0e0..4e59a9812 100644 --- a/library/vendor/Zend/Tool/Framework/Metadata/Basic.php +++ b/library/vendor/Zend/Tool/Framework/Metadata/Basic.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Tool_Framework_Metadata_Interface */ +require_once 'Zend/Tool/Framework/Metadata/Interface.php'; /** * @see Zend_Tool_Framework_Metadata_Attributable */ +require_once 'Zend/Tool/Framework/Metadata/Attributable.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Metadata_Basic diff --git a/library/vendor/Zend/Tool/Framework/Metadata/Dynamic.php b/library/vendor/Zend/Tool/Framework/Metadata/Dynamic.php index 8304355d8..2fbf6af62 100644 --- a/library/vendor/Zend/Tool/Framework/Metadata/Dynamic.php +++ b/library/vendor/Zend/Tool/Framework/Metadata/Dynamic.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Tool_Framework_Metadata_Interface */ +require_once 'Zend/Tool/Framework/Metadata/Interface.php'; /** * @see Zend_Tool_Framework_Metadata_Attributable */ +require_once 'Zend/Tool/Framework/Metadata/Attributable.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Metadata_Dynamic @@ -188,6 +190,7 @@ class Zend_Tool_Framework_Metadata_Dynamic } elseif (array_key_exists($name, $this->_dynamicAttributes)) { return $this->_dynamicAttributes[$name]; } else { + require_once 'Zend/Tool/Framework/Registry/Exception.php'; throw new Zend_Tool_Framework_Registry_Exception('Property ' . $name . ' was not located in this metadata.'); } } @@ -208,6 +211,7 @@ class Zend_Tool_Framework_Metadata_Dynamic return $this; } // { +// require_once 'Zend/Tool/Framework/Registry/Exception.php'; // throw new Zend_Tool_Framework_Registry_Exception('Property ' . $name . ' was not located in this registry.'); // } } diff --git a/library/vendor/Zend/Tool/Framework/Metadata/Interface.php b/library/vendor/Zend/Tool/Framework/Metadata/Interface.php index 80e50bfce..d7e327bf3 100644 --- a/library/vendor/Zend/Tool/Framework/Metadata/Interface.php +++ b/library/vendor/Zend/Tool/Framework/Metadata/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Metadata_Interface diff --git a/library/vendor/Zend/Tool/Framework/Metadata/Tool.php b/library/vendor/Zend/Tool/Framework/Metadata/Tool.php index 7ffbed892..24c73c63c 100644 --- a/library/vendor/Zend/Tool/Framework/Metadata/Tool.php +++ b/library/vendor/Zend/Tool/Framework/Metadata/Tool.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Metadata_Basic */ +require_once 'Zend/Tool/Framework/Metadata/Basic.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Metadata_Tool extends Zend_Tool_Framework_Metadata_Basic diff --git a/library/vendor/Zend/Tool/Framework/Provider/Abstract.php b/library/vendor/Zend/Tool/Framework/Provider/Abstract.php index 0242e918b..889ce00be 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/Abstract.php +++ b/library/vendor/Zend/Tool/Framework/Provider/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Tool_Framework_Provider_Interface */ +require_once 'Zend/Tool/Framework/Provider/Interface.php'; /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** @@ -38,7 +40,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Tool_Framework_Provider_Abstract diff --git a/library/vendor/Zend/Tool/Framework/Provider/DocblockManifestable.php b/library/vendor/Zend/Tool/Framework/Provider/DocblockManifestable.php index 1d8bb9a5b..19bd7d6d7 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/DocblockManifestable.php +++ b/library/vendor/Zend/Tool/Framework/Provider/DocblockManifestable.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Provider_DocblockManifestInterface diff --git a/library/vendor/Zend/Tool/Framework/Provider/Exception.php b/library/vendor/Zend/Tool/Framework/Provider/Exception.php index ff2972ae5..6e328d1fa 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/Exception.php +++ b/library/vendor/Zend/Tool/Framework/Provider/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Exception */ +require_once 'Zend/Tool/Framework/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Provider_Exception extends Zend_Tool_Framework_Exception diff --git a/library/vendor/Zend/Tool/Framework/Provider/Initializable.php b/library/vendor/Zend/Tool/Framework/Provider/Initializable.php index a147a81b4..2e3e10684 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/Initializable.php +++ b/library/vendor/Zend/Tool/Framework/Provider/Initializable.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Interactable.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Provider_Initializable diff --git a/library/vendor/Zend/Tool/Framework/Provider/Interactable.php b/library/vendor/Zend/Tool/Framework/Provider/Interactable.php index 1c2f4c5db..bc9d5449f 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/Interactable.php +++ b/library/vendor/Zend/Tool/Framework/Provider/Interactable.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Provider_Interactable diff --git a/library/vendor/Zend/Tool/Framework/Provider/Interface.php b/library/vendor/Zend/Tool/Framework/Provider/Interface.php index 0684fd373..085164755 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/Interface.php +++ b/library/vendor/Zend/Tool/Framework/Provider/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Provider_Interface diff --git a/library/vendor/Zend/Tool/Framework/Provider/Pretendable.php b/library/vendor/Zend/Tool/Framework/Provider/Pretendable.php index 6722c40d7..dde07def8 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/Pretendable.php +++ b/library/vendor/Zend/Tool/Framework/Provider/Pretendable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Provider_Pretendable diff --git a/library/vendor/Zend/Tool/Framework/Provider/Repository.php b/library/vendor/Zend/Tool/Framework/Provider/Repository.php index 2aef4eca6..b5aa53d35 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/Repository.php +++ b/library/vendor/Zend/Tool/Framework/Provider/Repository.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Tool_Framework_Provider_Signature */ +require_once 'Zend/Tool/Framework/Provider/Signature.php'; /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Provider_Repository @@ -110,6 +112,7 @@ class Zend_Tool_Framework_Provider_Repository (array_key_exists($providerName, $this->_unprocessedProviders) || array_key_exists($providerName, $this->_providers))) { + require_once 'Zend/Tool/Framework/Provider/Exception.php'; throw new Zend_Tool_Framework_Provider_Exception('A provider by the name ' . $providerName . ' is already registered and $overrideExistingProvider is set to false.'); } diff --git a/library/vendor/Zend/Tool/Framework/Provider/Signature.php b/library/vendor/Zend/Tool/Framework/Provider/Signature.php index a55f81b47..1bfbcb4bf 100644 --- a/library/vendor/Zend/Tool/Framework/Provider/Signature.php +++ b/library/vendor/Zend/Tool/Framework/Provider/Signature.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,14 +23,17 @@ /** * @see Zend_Reflection_Class */ +require_once 'Zend/Reflection/Class.php'; /** * @see Zend_Tool_Framework_Registry */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * @see Zend_Tool_Framework_Action_Base */ +require_once 'Zend/Tool/Framework/Action/Base.php'; /** * The purpose of Zend_Tool_Framework_Provider_Signature is to derive @@ -38,7 +41,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Registry_EnabledInterface @@ -256,6 +259,7 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi if ($this->_providerReflection->hasMethod('getSpecialties')) { $specialties = $this->_provider->getSpecialties(); if (!is_array($specialties)) { + require_once 'Zend/Tool/Framework/Provider/Exception.php'; throw new Zend_Tool_Framework_Provider_Exception( 'Provider ' . get_class($this->_provider) . ' must return an array for method getSpecialties().' ); @@ -264,6 +268,7 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi $defaultProperties = $this->_providerReflection->getDefaultProperties(); $specialties = (isset($defaultProperties['_specialties'])) ? $defaultProperties['_specialties'] : array(); if (!is_array($specialties)) { + require_once 'Zend/Tool/Framework/Provider/Exception.php'; throw new Zend_Tool_Framework_Provider_Exception( 'Provider ' . get_class($this->_provider) . '\'s property $_specialties must be an array.' ); diff --git a/library/vendor/Zend/Tool/Framework/Registry.php b/library/vendor/Zend/Tool/Framework/Registry.php index c9784fa63..cd1d034ca 100644 --- a/library/vendor/Zend/Tool/Framework/Registry.php +++ b/library/vendor/Zend/Tool/Framework/Registry.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Registry_Interface */ +require_once 'Zend/Tool/Framework/Registry/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Interface @@ -141,6 +142,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function getConfig() { if ($this->_config === null) { + require_once 'Zend/Tool/Framework/Client/Config.php'; $this->setConfig(new Zend_Tool_Framework_Client_Config()); } @@ -167,6 +169,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function getStorage() { if ($this->_storage === null) { + require_once 'Zend/Tool/Framework/Client/Storage.php'; $this->setStorage(new Zend_Tool_Framework_Client_Storage()); } @@ -196,6 +199,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function getLoader() { if ($this->_loader === null) { + require_once 'Zend/Tool/Framework/Loader/IncludePathLoader.php'; $this->setLoader(new Zend_Tool_Framework_Loader_IncludePathLoader()); } @@ -225,6 +229,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function getActionRepository() { if ($this->_actionRepository == null) { + require_once 'Zend/Tool/Framework/Action/Repository.php'; $this->setActionRepository(new Zend_Tool_Framework_Action_Repository()); } @@ -254,6 +259,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function getProviderRepository() { if ($this->_providerRepository == null) { + require_once 'Zend/Tool/Framework/Provider/Repository.php'; $this->setProviderRepository(new Zend_Tool_Framework_Provider_Repository()); } @@ -283,6 +289,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function getManifestRepository() { if ($this->_manifestRepository == null) { + require_once 'Zend/Tool/Framework/Manifest/Repository.php'; $this->setManifestRepository(new Zend_Tool_Framework_Manifest_Repository()); } @@ -309,6 +316,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function getRequest() { if ($this->_request == null) { + require_once 'Zend/Tool/Framework/Client/Request.php'; $this->setRequest(new Zend_Tool_Framework_Client_Request()); } @@ -335,6 +343,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function getResponse() { if ($this->_response == null) { + require_once 'Zend/Tool/Framework/Client/Response.php'; $this->setResponse(new Zend_Tool_Framework_Client_Response()); } @@ -352,6 +361,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter if (method_exists($this, 'get' . $name)) { return $this->{'get' . $name}(); } else { + require_once 'Zend/Tool/Framework/Registry/Exception.php'; throw new Zend_Tool_Framework_Registry_Exception('Property ' . $name . ' was not located in this registry.'); } } @@ -368,6 +378,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter $this->{'set' . $name}($value); return; } else { + require_once 'Zend/Tool/Framework/Registry/Exception.php'; throw new Zend_Tool_Framework_Registry_Exception('Property ' . $name . ' was not located in this registry.'); } } @@ -381,6 +392,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function isObjectRegistryEnablable($object) { if (!is_object($object)) { + require_once 'Zend/Tool/Framework/Registry/Exception.php'; throw new Zend_Tool_Framework_Registry_Exception('isObjectRegistryEnablable() expects an object.'); } @@ -396,6 +408,7 @@ class Zend_Tool_Framework_Registry implements Zend_Tool_Framework_Registry_Inter public function enableRegistryOnObject($object) { if (!$this->isObjectRegistryEnablable($object)) { + require_once 'Zend/Tool/Framework/Registry/Exception.php'; throw new Zend_Tool_Framework_Registry_Exception('Object provided is not registry enablable, check first with Zend_Tool_Framework_Registry::isObjectRegistryEnablable()'); } diff --git a/library/vendor/Zend/Tool/Framework/Registry/EnabledInterface.php b/library/vendor/Zend/Tool/Framework/Registry/EnabledInterface.php index d971114a4..5a97c8bd3 100644 --- a/library/vendor/Zend/Tool/Framework/Registry/EnabledInterface.php +++ b/library/vendor/Zend/Tool/Framework/Registry/EnabledInterface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Registry_EnabledInterface diff --git a/library/vendor/Zend/Tool/Framework/Registry/Exception.php b/library/vendor/Zend/Tool/Framework/Registry/Exception.php index 20402de83..29e0bcae5 100644 --- a/library/vendor/Zend/Tool/Framework/Registry/Exception.php +++ b/library/vendor/Zend/Tool/Framework/Registry/Exception.php @@ -14,16 +14,17 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +require_once 'Zend/Tool/Framework/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_Registry_Exception extends Zend_Tool_Framework_Exception diff --git a/library/vendor/Zend/Tool/Framework/Registry/Interface.php b/library/vendor/Zend/Tool/Framework/Registry/Interface.php index 35e953f2e..6636583e7 100644 --- a/library/vendor/Zend/Tool/Framework/Registry/Interface.php +++ b/library/vendor/Zend/Tool/Framework/Registry/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Framework_Registry_Interface diff --git a/library/vendor/Zend/Tool/Framework/System/Action/Create.php b/library/vendor/Zend/Tool/Framework/System/Action/Create.php index b7970f19d..396f9f6d8 100644 --- a/library/vendor/Zend/Tool/Framework/System/Action/Create.php +++ b/library/vendor/Zend/Tool/Framework/System/Action/Create.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Framework_Action_Base */ +require_once 'Zend/Tool/Framework/Action/Base.php'; /** @@ -34,7 +35,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_System_Action_Create extends Zend_Tool_Framework_Action_Base diff --git a/library/vendor/Zend/Tool/Framework/System/Action/Delete.php b/library/vendor/Zend/Tool/Framework/System/Action/Delete.php index be49e0c13..3437ffb51 100644 --- a/library/vendor/Zend/Tool/Framework/System/Action/Delete.php +++ b/library/vendor/Zend/Tool/Framework/System/Action/Delete.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Framework_Action_Base */ +require_once 'Zend/Tool/Framework/Action/Base.php'; /** @@ -34,7 +35,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_System_Action_Delete extends Zend_Tool_Framework_Action_Base diff --git a/library/vendor/Zend/Tool/Framework/System/Manifest.php b/library/vendor/Zend/Tool/Framework/System/Manifest.php index 0dc9fabe2..632b549e3 100644 --- a/library/vendor/Zend/Tool/Framework/System/Manifest.php +++ b/library/vendor/Zend/Tool/Framework/System/Manifest.php @@ -15,16 +15,24 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +require_once 'Zend/Tool/Framework/Manifest/ProviderManifestable.php'; +require_once 'Zend/Tool/Framework/Manifest/ActionManifestable.php'; +require_once 'Zend/Tool/Framework/System/Provider/Version.php'; +require_once 'Zend/Tool/Framework/System/Provider/Config.php'; +require_once 'Zend/Tool/Framework/System/Provider/Phpinfo.php'; +require_once 'Zend/Tool/Framework/System/Provider/Manifest.php'; +require_once 'Zend/Tool/Framework/System/Action/Create.php'; +require_once 'Zend/Tool/Framework/System/Action/Delete.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_System_Manifest diff --git a/library/vendor/Zend/Tool/Framework/System/Provider/Config.php b/library/vendor/Zend/Tool/Framework/System/Provider/Config.php index a2dba51f7..685a60789 100644 --- a/library/vendor/Zend/Tool/Framework/System/Provider/Config.php +++ b/library/vendor/Zend/Tool/Framework/System/Provider/Config.php @@ -15,25 +15,29 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * @see Zend_Tool_Framework_Provider_Abstract */ +require_once "Zend/Tool/Framework/Provider/Abstract.php"; /** * @see Zend_Config */ +require_once "Zend/Config.php"; /** * @see Zend_Config_Writer_Ini */ +require_once "Zend/Config/Writer/Ini.php"; /** * @see Zend_Loader */ +require_once "Zend/Loader.php"; /** * Configuration Provider @@ -42,7 +46,7 @@ * @package Zend_Tool * @package Framework * @uses Zend_Tool_Framework_Provider_Abstract - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -70,6 +74,7 @@ class Zend_Tool_Framework_System_Provider_Config extends Zend_Tool_Framework_Pro $resp = $this->_registry->getResponse(); if ($userConfig->exists()) { + require_once "Zend/Tool/Framework/Exception.php"; throw new Zend_Tool_Framework_Exception( "A configuration already exists, cannot create a new one."); } @@ -104,6 +109,7 @@ class Zend_Tool_Framework_System_Provider_Config extends Zend_Tool_Framework_Pro return $homeDirectory; } } + require_once "Zend/Tool/Framework/Exception.php"; throw new Zend_Tool_Framework_Exception("Cannot detect user home directory, set ZF_HOME enviroment variable."); } @@ -194,6 +200,7 @@ class Zend_Tool_Framework_System_Provider_Config extends Zend_Tool_Framework_Pro Zend_Loader::loadClass($className); $reflClass = new ReflectionClass($className); if (!in_array("Zend_Tool_Framework_Provider_Interface", $reflClass->getInterfaceNames())) { + require_once "Zend/Tool/Framework/Exception.php"; throw new Zend_Tool_Framework_Exception("Given class is not a provider"); } $this->_doEnable($className); @@ -226,11 +233,13 @@ class Zend_Tool_Framework_System_Provider_Config extends Zend_Tool_Framework_Pro array("color" => "green", "aligncenter" => true) ); } else { + require_once "Zend/Tool/Framework/Exception.php"; throw new Zend_Tool_Framework_Exception( "Could not write user configuration to persistence." ); } } else { + require_once "Zend/Tool/Framework/Exception.php"; throw new Zend_Tool_Framework_Exception( "Provider/Manifest '".$className."' is already enabled." ); @@ -245,6 +254,7 @@ class Zend_Tool_Framework_System_Provider_Config extends Zend_Tool_Framework_Pro Zend_Loader::loadClass($className); $reflClass = new ReflectionClass($className); if (!in_array("Zend_Tool_Framework_Manifest_Interface", $reflClass->getInterfaceNames())) { + require_once "Zend/Tool/Framework/Exception.php"; throw new Zend_Tool_Framework_Exception("Given class is not a manifest."); } $this->_doEnable($className); @@ -282,11 +292,13 @@ class Zend_Tool_Framework_System_Provider_Config extends Zend_Tool_Framework_Pro array("color" => "green", "aligncenter" => true) ); } else { + require_once "Zend/Tool/Framework/Exception.php"; throw new Zend_Tool_Framework_Exception( "Could not write user configuration to persistence." ); } } else { + require_once "Zend/Tool/Framework/Exception.php"; throw new Zend_Tool_Framework_Exception( "Provider/Manifest '".$className."' is not enabled." ); diff --git a/library/vendor/Zend/Tool/Framework/System/Provider/Manifest.php b/library/vendor/Zend/Tool/Framework/System/Provider/Manifest.php index 64a9b817a..83f903523 100644 --- a/library/vendor/Zend/Tool/Framework/System/Provider/Manifest.php +++ b/library/vendor/Zend/Tool/Framework/System/Provider/Manifest.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Tool_Framework_Registry_EnabledInterface */ +require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php'; /** * @see Zend_Tool_Framework_Provider_Interface */ +require_once 'Zend/Tool/Framework/Provider/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_System_Provider_Manifest diff --git a/library/vendor/Zend/Tool/Framework/System/Provider/Phpinfo.php b/library/vendor/Zend/Tool/Framework/System/Provider/Phpinfo.php index 2f9d4441e..2b10bb6b9 100644 --- a/library/vendor/Zend/Tool/Framework/System/Provider/Phpinfo.php +++ b/library/vendor/Zend/Tool/Framework/System/Provider/Phpinfo.php @@ -14,16 +14,17 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +require_once 'Zend/Tool/Framework/Provider/Interface.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_System_Provider_Phpinfo implements Zend_Tool_Framework_Provider_Interface diff --git a/library/vendor/Zend/Tool/Framework/System/Provider/Version.php b/library/vendor/Zend/Tool/Framework/System/Provider/Version.php index 19d21a5c6..afaf933e3 100644 --- a/library/vendor/Zend/Tool/Framework/System/Provider/Version.php +++ b/library/vendor/Zend/Tool/Framework/System/Provider/Version.php @@ -14,18 +14,21 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +require_once 'Zend/Tool/Framework/Registry.php'; +require_once 'Zend/Tool/Framework/Provider/Interface.php'; +require_once 'Zend/Version.php'; /** * Version Provider * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Framework_System_Provider_Version diff --git a/library/vendor/Zend/Tool/Project/Context/Content/Engine.php b/library/vendor/Zend/Tool/Project/Context/Content/Engine.php index 65af83fab..e28ca8cb2 100644 --- a/library/vendor/Zend/Tool/Project/Context/Content/Engine.php +++ b/library/vendor/Zend/Tool/Project/Context/Content/Engine.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Tool_Project_Context_Content_Engine_CodeGenerator */ +require_once 'Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php'; /** * @see Zend_Tool_Project_Context_Content_Engine_Phtml */ +require_once 'Zend/Tool/Project/Context/Content/Engine/Phtml.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -36,7 +38,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Content_Engine diff --git a/library/vendor/Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php b/library/vendor/Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php index 29038188a..b29346782 100644 --- a/library/vendor/Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php +++ b/library/vendor/Zend/Tool/Project/Context/Content/Engine/CodeGenerator.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Content_Engine_CodeGenerator diff --git a/library/vendor/Zend/Tool/Project/Context/Content/Engine/Phtml.php b/library/vendor/Zend/Tool/Project/Context/Content/Engine/Phtml.php index 982e28ec5..7a7cbef0a 100644 --- a/library/vendor/Zend/Tool/Project/Context/Content/Engine/Phtml.php +++ b/library/vendor/Zend/Tool/Project/Context/Content/Engine/Phtml.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Content_Engine_Phtml diff --git a/library/vendor/Zend/Tool/Project/Context/Exception.php b/library/vendor/Zend/Tool/Project/Context/Exception.php index 1357bdb0a..458f2e5d5 100644 --- a/library/vendor/Zend/Tool/Project/Context/Exception.php +++ b/library/vendor/Zend/Tool/Project/Context/Exception.php @@ -14,16 +14,17 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +require_once 'Zend/Tool/Project/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Exception extends Zend_Tool_Project_Exception diff --git a/library/vendor/Zend/Tool/Project/Context/Filesystem/Abstract.php b/library/vendor/Zend/Tool/Project/Context/Filesystem/Abstract.php index 94cf4c761..23e2d8aab 100644 --- a/library/vendor/Zend/Tool/Project/Context/Filesystem/Abstract.php +++ b/library/vendor/Zend/Tool/Project/Context/Filesystem/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Interface */ +require_once 'Zend/Tool/Project/Context/Interface.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Tool_Project_Context_Interface diff --git a/library/vendor/Zend/Tool/Project/Context/Filesystem/Directory.php b/library/vendor/Zend/Tool/Project/Context/Filesystem/Directory.php index 33816b889..12e9435b3 100644 --- a/library/vendor/Zend/Tool/Project/Context/Filesystem/Directory.php +++ b/library/vendor/Zend/Tool/Project/Context/Filesystem/Directory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Abstract */ +require_once 'Zend/Tool/Project/Context/Filesystem/Abstract.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Filesystem_Directory extends Zend_Tool_Project_Context_Filesystem_Abstract diff --git a/library/vendor/Zend/Tool/Project/Context/Filesystem/File.php b/library/vendor/Zend/Tool/Project/Context/Filesystem/File.php index 75e9e52ec..645a4b763 100644 --- a/library/vendor/Zend/Tool/Project/Context/Filesystem/File.php +++ b/library/vendor/Zend/Tool/Project/Context/Filesystem/File.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Abstract */ +require_once 'Zend/Tool/Project/Context/Filesystem/Abstract.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Filesystem_File extends Zend_Tool_Project_Context_Filesystem_Abstract diff --git a/library/vendor/Zend/Tool/Project/Context/Interface.php b/library/vendor/Zend/Tool/Project/Context/Interface.php index 0301ce49a..6eb2af6f5 100644 --- a/library/vendor/Zend/Tool/Project/Context/Interface.php +++ b/library/vendor/Zend/Tool/Project/Context/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -27,7 +27,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Project_Context_Interface diff --git a/library/vendor/Zend/Tool/Project/Context/Repository.php b/library/vendor/Zend/Tool/Project/Context/Repository.php index 153b27f4d..8a9d8f4c1 100644 --- a/library/vendor/Zend/Tool/Project/Context/Repository.php +++ b/library/vendor/Zend/Tool/Project/Context/Repository.php @@ -14,16 +14,19 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +require_once 'Zend/Tool/Project/Context/System/Interface.php'; +require_once 'Zend/Tool/Project/Context/System/TopLevelRestrictable.php'; +require_once 'Zend/Tool/Project/Context/System/NotOverwritable.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Repository implements Countable @@ -81,6 +84,7 @@ class Zend_Tool_Project_Context_Repository implements Countable public function addContextClass($contextClass) { if (!class_exists($contextClass)) { + require_once 'Zend/Loader.php'; Zend_Loader::loadClass($contextClass); } $reflectionContextClass = new ReflectionClass($contextClass); @@ -108,6 +112,7 @@ class Zend_Tool_Project_Context_Repository implements Countable $normalName = $this->_normalizeName($context->getName()); if (isset($this->_shortContextNames[$normalName]) && ($this->_contexts[$this->_shortContextNames[$normalName]]['isOverwritable'] === false) ) { + require_once 'Zend/Tool/Project/Context/Exception.php'; throw new Zend_Tool_Project_Context_Exception('Context ' . $context->getName() . ' is not overwriteable.'); } @@ -126,6 +131,7 @@ class Zend_Tool_Project_Context_Repository implements Countable public function getContext($name) { if (!$this->hasContext($name)) { + require_once 'Zend/Tool/Project/Context/Exception.php'; throw new Zend_Tool_Project_Context_Exception('Context by name ' . $name . ' does not exist in the registry.'); } diff --git a/library/vendor/Zend/Tool/Project/Context/System/Interface.php b/library/vendor/Zend/Tool/Project/Context/System/Interface.php index 650bf68b1..f79faa973 100644 --- a/library/vendor/Zend/Tool/Project/Context/System/Interface.php +++ b/library/vendor/Zend/Tool/Project/Context/System/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Project_Context_System_Interface diff --git a/library/vendor/Zend/Tool/Project/Context/System/NotOverwritable.php b/library/vendor/Zend/Tool/Project/Context/System/NotOverwritable.php index d4fc69c18..19f7e89d4 100644 --- a/library/vendor/Zend/Tool/Project/Context/System/NotOverwritable.php +++ b/library/vendor/Zend/Tool/Project/Context/System/NotOverwritable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Project_Context_System_NotOverwritable diff --git a/library/vendor/Zend/Tool/Project/Context/System/ProjectDirectory.php b/library/vendor/Zend/Tool/Project/Context/System/ProjectDirectory.php index 9e063613b..8dce0473f 100644 --- a/library/vendor/Zend/Tool/Project/Context/System/ProjectDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/System/ProjectDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,18 +23,22 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * @see Zend_Tool_Project_Context_System_Interface */ +require_once 'Zend/Tool/Project/Context/System/Interface.php'; /** * @see Zend_Tool_Project_Context_System_TopLevelRestrictable */ +require_once 'Zend/Tool/Project/Context/System/TopLevelRestrictable.php'; /** * @see Zend_Tool_Project_Context_System_NotOverwritable */ +require_once 'Zend/Tool/Project/Context/System/NotOverwritable.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -44,7 +48,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_System_ProjectDirectory @@ -86,6 +90,7 @@ class Zend_Tool_Project_Context_System_ProjectDirectory // if not, exception. if ($projectDirectory == null) { + require_once 'Zend/Tool/Project/Exception.php'; throw new Zend_Tool_Project_Exception('projectDirectory cannot find the directory for this project.'); } @@ -107,6 +112,7 @@ class Zend_Tool_Project_Context_System_ProjectDirectory if ($registry->getClient()->isInteractive()) { // @todo prompt for override } else { + require_once 'Zend/Tool/Project/Context/Exception.php'; throw new Zend_Tool_Project_Context_Exception('This directory is not empty, project creation aborted.'); } break; diff --git a/library/vendor/Zend/Tool/Project/Context/System/ProjectProfileFile.php b/library/vendor/Zend/Tool/Project/Context/System/ProjectProfileFile.php index bc1c7f397..dfaa573af 100644 --- a/library/vendor/Zend/Tool/Project/Context/System/ProjectProfileFile.php +++ b/library/vendor/Zend/Tool/Project/Context/System/ProjectProfileFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,18 +23,22 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * @see Zend_Tool_Project_Context_System_Interface */ +require_once 'Zend/Tool/Project/Context/System/Interface.php'; /** * @see Zend_Tool_Project_Context_System_NotOverwritable */ +require_once 'Zend/Tool/Project/Context/System/NotOverwritable.php'; /** * @see Zend_Tool_Project_Profile_FileParser_Xml */ +require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -44,7 +48,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_System_ProjectProfileFile diff --git a/library/vendor/Zend/Tool/Project/Context/System/ProjectProvidersDirectory.php b/library/vendor/Zend/Tool/Project/Context/System/ProjectProvidersDirectory.php index 5959cc990..52fb266fa 100644 --- a/library/vendor/Zend/Tool/Project/Context/System/ProjectProvidersDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/System/ProjectProvidersDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,14 +23,17 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * @see Zend_Tool_Project_Context_System_Interface */ +require_once 'Zend/Tool/Project/Context/System/Interface.php'; /** * @see Zend_Tool_Project_Context_System_NotOverwritable */ +require_once 'Zend/Tool/Project/Context/System/NotOverwritable.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -40,7 +43,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_System_ProjectProvidersDirectory diff --git a/library/vendor/Zend/Tool/Project/Context/System/TopLevelRestrictable.php b/library/vendor/Zend/Tool/Project/Context/System/TopLevelRestrictable.php index 1784037da..5680bb253 100644 --- a/library/vendor/Zend/Tool/Project/Context/System/TopLevelRestrictable.php +++ b/library/vendor/Zend/Tool/Project/Context/System/TopLevelRestrictable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Project_Context_System_TopLevelRestrictable diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/AbstractClassFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/AbstractClassFile.php index 90f7a0c3d..dc58b2419 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/AbstractClassFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/AbstractClassFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Tool_Project_Context_Zf_AbstractClassFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ActionMethod.php b/library/vendor/Zend/Tool/Project/Context/Zf/ActionMethod.php index d35a2bcac..0ff7a9539 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ActionMethod.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ActionMethod.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Tool_Project_Context_Interface */ +require_once 'Zend/Tool/Project/Context/Interface.php'; /** * @see Zend_Reflection_File */ +require_once 'Zend/Reflection/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -36,7 +38,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Context_Interface @@ -74,6 +76,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con $this->_resource->setAppendable(false); $this->_controllerResource = $this->_resource->getParentResource(); if (!$this->_controllerResource->getContext() instanceof Zend_Tool_Project_Context_Zf_ControllerFile) { + require_once 'Zend/Tool/Project/Context/Exception.php'; throw new Zend_Tool_Project_Context_Exception('ActionMethod must be a sub resource of a ControllerFile'); } // make the ControllerFile node appendable so we can tack on the actionMethod. @@ -85,6 +88,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con * This code block is now commented, its doing to much for init() * if ($this->_controllerPath != '' && self::hasActionMethod($this->_controllerPath, $this->_actionName)) { + require_once 'Zend/Tool/Project/Context/Exception.php'; throw new Zend_Tool_Project_Context_Exception('An action named ' . $this->_actionName . 'Action already exists in this controller'); } */ @@ -156,6 +160,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con public function create() { if (self::createActionMethod($this->_controllerPath, $this->_actionName) === false) { + require_once 'Zend/Tool/Project/Context/Exception.php'; throw new Zend_Tool_Project_Context_Exception( 'Could not create action within controller ' . $this->_controllerPath . ' with action name ' . $this->_actionName diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ApisDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ApisDirectory.php index f7a04a550..540482b6e 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ApisDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ApisDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ApisDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ApplicationConfigFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/ApplicationConfigFile.php index 07cf68c03..da74e4dbe 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ApplicationConfigFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ApplicationConfigFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ApplicationConfigFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ApplicationDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ApplicationDirectory.php index b7291611e..14b9353b6 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ApplicationDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ApplicationDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ApplicationDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/BootstrapFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/BootstrapFile.php index 9550bb7cb..e815c9deb 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/BootstrapFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/BootstrapFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_BootstrapFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/CacheDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/CacheDirectory.php index 5047a7cbc..d6b37ca7f 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/CacheDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/CacheDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_CacheDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ConfigFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/ConfigFile.php index 94d392598..9be50e476 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ConfigFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ConfigFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ConfigFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ConfigsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ConfigsDirectory.php index b8ab87aac..a6efc2e59 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ConfigsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ConfigsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ConfigsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ControllerFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/ControllerFile.php index ac6b8fa35..d6df9711a 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ControllerFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ControllerFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ControllersDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ControllersDirectory.php index 8c8ba636d..fe6cd4dc1 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ControllersDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ControllersDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ControllersDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/DataDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/DataDirectory.php index d255645e8..396716e16 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/DataDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/DataDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_DataDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/DbTableDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/DbTableDirectory.php index 5d3f2a445..ff4d54ece 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/DbTableDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/DbTableDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_DbTableDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/DbTableFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/DbTableFile.php index ce92ee60d..306ae80d3 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/DbTableFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/DbTableFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_DbTableFile extends Zend_Tool_Project_Context_Zf_AbstractClassFile diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/DocsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/DocsDirectory.php index 7212cffe0..cc047ea17 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/DocsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/DocsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: DataDirectory.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_DocsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/FormFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/FormFile.php index 3acbe3011..7308e28e6 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/FormFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/FormFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Zf_AbstractClassFile */ +require_once 'Zend/Tool/Project/Context/Zf/AbstractClassFile.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_FormFile extends Zend_Tool_Project_Context_Zf_AbstractClassFile diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/FormsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/FormsDirectory.php index 2844ee958..433733d7a 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/FormsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/FormsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_FormsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/HtaccessFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/HtaccessFile.php index 45384226a..fa6753f59 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/HtaccessFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/HtaccessFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_HtaccessFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/LayoutScriptFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/LayoutScriptFile.php index 472a42689..da549adb3 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/LayoutScriptFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/LayoutScriptFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_LayoutScriptFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/LayoutScriptsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/LayoutScriptsDirectory.php index f56a1af47..52df0b412 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/LayoutScriptsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/LayoutScriptsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_LayoutScriptsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/LayoutsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/LayoutsDirectory.php index 7de019d21..d9f7062e8 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/LayoutsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/LayoutsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_LayoutsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/LibraryDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/LibraryDirectory.php index c5b9e284c..9d81cee35 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/LibraryDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/LibraryDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_LibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/LocalesDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/LocalesDirectory.php index 1c31fe9af..f30054cd5 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/LocalesDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/LocalesDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_LocalesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/LogsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/LogsDirectory.php index 0d475c129..e626f6216 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/LogsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/LogsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_LogsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ModelFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/ModelFile.php index 26e2dff4a..5b2f5bc60 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ModelFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ModelFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * Zend_Tool_Project_Context_Zf_AbstractClassFile */ +require_once 'Zend/Tool/Project/Context/Zf/AbstractClassFile.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ModelFile extends Zend_Tool_Project_Context_Zf_AbstractClassFile diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ModelsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ModelsDirectory.php index 66e0fee33..45b6f5a26 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ModelsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ModelsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ModelsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ModuleDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ModuleDirectory.php index 307f841e7..ea55228e1 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ModuleDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ModuleDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ModuleDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ModulesDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ModulesDirectory.php index 1382600e3..06c793c94 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ModulesDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ModulesDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ModulesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ProjectProviderFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/ProjectProviderFile.php index a361a52c3..e1d668b11 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ProjectProviderFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ProjectProviderFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * @see Zend_CodeGenerator_Php_File */ +require_once 'Zend/CodeGenerator/Php/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -36,7 +38,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/PublicDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/PublicDirectory.php index b46c1c2b5..5ab3b1b0e 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/PublicDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/PublicDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_PublicDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/PublicImagesDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/PublicImagesDirectory.php index 409574b60..da221f71a 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/PublicImagesDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/PublicImagesDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_PublicImagesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/PublicIndexFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/PublicIndexFile.php index d3cd88ee1..1ed4b08f9 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/PublicIndexFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/PublicIndexFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_PublicIndexFile extends Zend_Tool_Project_Context_Filesystem_File @@ -77,6 +78,7 @@ set_include_path(implode(PATH_SEPARATOR, array( ))); /** Zend_Application */ +require_once 'Zend/Application.php'; // Create application, bootstrap, and run \$application = new Zend_Application( diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/PublicScriptsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/PublicScriptsDirectory.php index 0ddbcffa6..fe44d8009 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/PublicScriptsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/PublicScriptsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_PublicScriptsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/PublicStylesheetsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/PublicStylesheetsDirectory.php index 6e5d33f41..3143f4990 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/PublicStylesheetsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/PublicStylesheetsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_PublicStylesheetsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/SearchIndexesDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/SearchIndexesDirectory.php index 500dd198c..efd4a2180 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/SearchIndexesDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/SearchIndexesDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_SearchIndexesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ServicesDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ServicesDirectory.php index 4cb883bfc..76a4583b0 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ServicesDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ServicesDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ServicesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/SessionsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/SessionsDirectory.php index 0dccb9b04..9febc4c1c 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/SessionsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/SessionsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_SessionsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TemporaryDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/TemporaryDirectory.php index fc7b30be7..32605f8b9 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TemporaryDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TemporaryDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TemporaryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationActionMethod.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationActionMethod.php index 48cb51551..369c41f54 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationActionMethod.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationActionMethod.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: ActionMethod.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -23,10 +23,12 @@ /** * @see Zend_Tool_Project_Context_Interface */ +require_once 'Zend/Tool/Project/Context/Interface.php'; /** * @see Zend_Reflection_File */ +require_once 'Zend/Reflection/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -36,7 +38,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestApplicationActionMethod implements Zend_Tool_Project_Context_Interface @@ -74,6 +76,7 @@ class Zend_Tool_Project_Context_Zf_TestApplicationActionMethod implements Zend_T $this->_resource->setAppendable(false); $this->_testApplicationControllerResource = $this->_resource->getParentResource(); if (!$this->_testApplicationControllerResource->getContext() instanceof Zend_Tool_Project_Context_Zf_TestApplicationControllerFile) { + require_once 'Zend/Tool/Project/Context/Exception.php'; throw new Zend_Tool_Project_Context_Exception('ActionMethod must be a sub resource of a TestApplicationControllerFile'); } // make the ControllerFile node appendable so we can tack on the actionMethod. @@ -138,6 +141,7 @@ class Zend_Tool_Project_Context_Zf_TestApplicationActionMethod implements Zend_T $file = $this->_testApplicationControllerPath; if (!file_exists($file)) { + require_once 'Zend/Tool/Project/Context/Exception.php'; throw new Zend_Tool_Project_Context_Exception( 'Could not create action within test controller ' . $file . ' with action name ' . $this->_forActionName diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationBootstrapFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationBootstrapFile.php index 5a1f841c3..5352aed9b 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationBootstrapFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationBootstrapFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestApplicationBootstrapFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationControllerDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationControllerDirectory.php index 1db9f9d60..4399dda92 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationControllerDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationControllerDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestApplicationControllerDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationControllerFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationControllerFile.php index 2b2459d78..4515b8075 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationControllerFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationControllerFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestApplicationControllerFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationDirectory.php index 0197e83ed..8ec3297b7 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestApplicationDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationModuleDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationModuleDirectory.php index 9c6781ac8..a1213b5dc 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationModuleDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationModuleDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: TestApplicationControllerDirectory.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestApplicationModuleDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationModulesDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationModulesDirectory.php index 41ed075fe..e4d60986e 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationModulesDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestApplicationModulesDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: TestApplicationControllerDirectory.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestApplicationModulesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryBootstrapFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryBootstrapFile.php index 7f492e73c..cf251c5e0 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryBootstrapFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryBootstrapFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestLibraryBootstrapFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryDirectory.php index e581445b8..da7b9e8a9 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestLibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryFile.php index 3f9926b68..1e9923e82 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestLibraryFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryNamespaceDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryNamespaceDirectory.php index fd195c738..645683456 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryNamespaceDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestLibraryNamespaceDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestLibraryNamespaceDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestPHPUnitBootstrapFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestPHPUnitBootstrapFile.php index 80aa09eaf..1ebf07976 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestPHPUnitBootstrapFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestPHPUnitBootstrapFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: TestApplicationBootstrapFile.php 20096 2010-01-06 02:05:09Z bkarwin $ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestPHPUnitBootstrapFile extends Zend_Tool_Project_Context_Filesystem_File @@ -76,6 +77,7 @@ set_include_path(implode(PATH_SEPARATOR, array( get_include_path(), ))); +require_once 'Zend/Loader/Autoloader.php'; Zend_Loader_Autoloader::getInstance(); EOS diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestPHPUnitConfigFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestPHPUnitConfigFile.php index fac80169f..73b71f974 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestPHPUnitConfigFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestPHPUnitConfigFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestPHPUnitConfigFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/TestsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/TestsDirectory.php index 4a25f72d0..17213a15a 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/TestsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/TestsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_TestsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/UploadsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/UploadsDirectory.php index 19918a295..499b8c901 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/UploadsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/UploadsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_UploadsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ViewControllerScriptsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ViewControllerScriptsDirectory.php index dd87fbc68..296d6e11f 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ViewControllerScriptsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ViewControllerScriptsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,18 +23,22 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * @see Zend_Filter */ +require_once 'Zend/Filter.php'; /** * @see Zend_Filter_Word_CamelCaseToDash */ +require_once 'Zend/Filter/Word/CamelCaseToDash.php'; /** * @see Zend_Filter_StringToLower */ +require_once 'Zend/Filter/StringToLower.php'; /** @@ -45,7 +49,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ViewControllerScriptsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ViewFiltersDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ViewFiltersDirectory.php index 75393e7cb..6e124c91f 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ViewFiltersDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ViewFiltersDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ViewFiltersDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ViewHelpersDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ViewHelpersDirectory.php index 097034b43..9b650df5c 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ViewHelpersDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ViewHelpersDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ViewHelpersDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ViewScriptFile.php b/library/vendor/Zend/Tool/Project/Context/Zf/ViewScriptFile.php index 7914e83e5..943bd3831 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ViewScriptFile.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ViewScriptFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,18 +23,22 @@ /** * @see Zend_Tool_Project_Context_Filesystem_File */ +require_once 'Zend/Tool/Project/Context/Filesystem/File.php'; /** * @see Zend_Filter */ +require_once 'Zend/Filter.php'; /** * @see Zend_Filter_Word_CamelCaseToDash */ +require_once 'Zend/Filter/Word/CamelCaseToDash.php'; /** * @see Zend_Filter_StringToLower */ +require_once 'Zend/Filter/StringToLower.php'; /** @@ -45,7 +49,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ViewScriptFile extends Zend_Tool_Project_Context_Filesystem_File diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ViewScriptsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ViewScriptsDirectory.php index 4ff80f3cf..a73aea9d4 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ViewScriptsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ViewScriptsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ViewScriptsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ViewsDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ViewsDirectory.php index e9117e245..aeddb528e 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ViewsDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ViewsDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ViewsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory diff --git a/library/vendor/Zend/Tool/Project/Context/Zf/ZfStandardLibraryDirectory.php b/library/vendor/Zend/Tool/Project/Context/Zf/ZfStandardLibraryDirectory.php index b68852f56..6060bffb0 100644 --- a/library/vendor/Zend/Tool/Project/Context/Zf/ZfStandardLibraryDirectory.php +++ b/library/vendor/Zend/Tool/Project/Context/Zf/ZfStandardLibraryDirectory.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Tool_Project_Context_Filesystem_Directory */ +require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -32,7 +33,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Context_Zf_ZfStandardLibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory @@ -86,6 +87,7 @@ class Zend_Tool_Project_Context_Zf_ZfStandardLibraryDirectory extends Zend_Tool_ */ protected function _getZfPath() { + require_once 'Zend/Loader.php'; foreach (Zend_Loader::explodeIncludePath() as $includePath) { if (!file_exists($includePath) || $includePath[0] == '.') { continue; diff --git a/library/vendor/Zend/Tool/Project/Exception.php b/library/vendor/Zend/Tool/Project/Exception.php index 279b3bd5d..fa2531403 100644 --- a/library/vendor/Zend/Tool/Project/Exception.php +++ b/library/vendor/Zend/Tool/Project/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Exception */ +require_once 'Zend/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Tool/Project/Profile.php b/library/vendor/Zend/Tool/Project/Profile.php index ce3d9e0d0..6429e3e81 100644 --- a/library/vendor/Zend/Tool/Project/Profile.php +++ b/library/vendor/Zend/Tool/Project/Profile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Tool_Project_Profile_FileParser_Xml */ +require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php'; /** * @see Zend_Tool_Project_Profile_Resource_Container */ +require_once 'Zend/Tool/Project/Profile/Resource/Container.php'; /** * This class is the front most class for utilizing Zend_Tool_Project @@ -36,7 +38,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Container @@ -80,6 +82,7 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta */ public function getIterator() { + require_once 'Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php'; return new RecursiveIteratorIterator( new Zend_Tool_Project_Profile_Iterator_EnabledResourceFilter($this), @@ -95,6 +98,7 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta public function loadFromData() { if (!isset($this->_attributes['profileData'])) { + require_once 'Zend/Tool/Project/Exception.php'; throw new Zend_Tool_Project_Exception('loadFromData() must have "profileData" set.'); } @@ -146,18 +150,21 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta { // if no data is supplied, need either a projectProfileFile or a projectDirectory if (!isset($this->_attributes['projectProfileFile']) && !isset($this->_attributes['projectDirectory'])) { + require_once 'Zend/Tool/Project/Exception.php'; throw new Zend_Tool_Project_Exception('loadFromFile() must have at least "projectProfileFile" or "projectDirectory" set.'); } if (isset($this->_attributes['projectProfileFile'])) { $projectProfileFilePath = $this->_attributes['projectProfileFile']; if (!file_exists($projectProfileFilePath)) { + require_once 'Zend/Tool/Project/Exception.php'; throw new Zend_Tool_Project_Exception('"projectProfileFile" was supplied but file was not found at location ' . $projectProfileFilePath); } $this->_attributes['projectDirectory'] = dirname($projectProfileFilePath); } else { $projectProfileFilePath = rtrim($this->_attributes['projectDirectory'], '/\\') . '/.zfproject.xml'; if (!file_exists($projectProfileFilePath)) { + require_once 'Zend/Tool/Project/Exception.php'; throw new Zend_Tool_Project_Exception('"projectDirectory" was supplied but no profile file file was not found at location ' . $projectProfileFilePath); } $this->_attributes['projectProfileFile'] = $projectProfileFilePath; @@ -187,6 +194,7 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta } if ($file == null) { + require_once 'Zend/Tool/Project/Exception.php'; throw new Zend_Tool_Project_Exception('storeToFile() must have a "projectProfileFile" attribute set.'); } diff --git a/library/vendor/Zend/Tool/Project/Profile/Exception.php b/library/vendor/Zend/Tool/Project/Profile/Exception.php index 088a3c897..35c65f547 100644 --- a/library/vendor/Zend/Tool/Project/Profile/Exception.php +++ b/library/vendor/Zend/Tool/Project/Profile/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Project_Exception */ +require_once 'Zend/Tool/Project/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Profile_Exception extends Zend_Tool_Project_Exception diff --git a/library/vendor/Zend/Tool/Project/Profile/FileParser/Interface.php b/library/vendor/Zend/Tool/Project/Profile/FileParser/Interface.php index 01cc13ba2..b37f7a018 100644 --- a/library/vendor/Zend/Tool/Project/Profile/FileParser/Interface.php +++ b/library/vendor/Zend/Tool/Project/Profile/FileParser/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Tool_Project_Profile_FileParser_Interface diff --git a/library/vendor/Zend/Tool/Project/Profile/FileParser/Xml.php b/library/vendor/Zend/Tool/Project/Profile/FileParser/Xml.php index 0a07481cb..828e7daee 100644 --- a/library/vendor/Zend/Tool/Project/Profile/FileParser/Xml.php +++ b/library/vendor/Zend/Tool/Project/Profile/FileParser/Xml.php @@ -15,16 +15,20 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ +require_once 'Zend/Tool/Project/Profile/FileParser/Interface.php'; +require_once 'Zend/Tool/Project/Context/Repository.php'; +require_once 'Zend/Tool/Project/Profile.php'; +require_once 'Zend/Tool/Project/Profile/Resource.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Profile_FileParser_Interface diff --git a/library/vendor/Zend/Tool/Project/Profile/Iterator/ContextFilter.php b/library/vendor/Zend/Tool/Project/Profile/Iterator/ContextFilter.php index e6729cf05..b074614e4 100644 --- a/library/vendor/Zend/Tool/Project/Profile/Iterator/ContextFilter.php +++ b/library/vendor/Zend/Tool/Project/Profile/Iterator/ContextFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIterator diff --git a/library/vendor/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php b/library/vendor/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php index 1f165160a..65b46b6ff 100644 --- a/library/vendor/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php +++ b/library/vendor/Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Profile_Iterator_EnabledResourceFilter extends RecursiveFilterIterator diff --git a/library/vendor/Zend/Tool/Project/Profile/Resource.php b/library/vendor/Zend/Tool/Project/Profile/Resource.php index 338d84368..58b08cd5d 100644 --- a/library/vendor/Zend/Tool/Project/Profile/Resource.php +++ b/library/vendor/Zend/Tool/Project/Profile/Resource.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,17 +23,19 @@ /** * @see Zend_Tool_Project_Profile_Resource_Container */ +require_once 'Zend/Tool/Project/Profile/Resource/Container.php'; /** * @see Zend_Tool_Project_Context_Repository */ +require_once 'Zend/Tool/Project/Context/Repository.php'; /** * This class is an iterator that will iterate only over enabled resources * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Profile_Resource extends Zend_Tool_Project_Profile_Resource_Container diff --git a/library/vendor/Zend/Tool/Project/Profile/Resource/Container.php b/library/vendor/Zend/Tool/Project/Profile/Resource/Container.php index 2774950e4..4f06f6f55 100644 --- a/library/vendor/Zend/Tool/Project/Profile/Resource/Container.php +++ b/library/vendor/Zend/Tool/Project/Profile/Resource/Container.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,13 +23,14 @@ /** * @see Zend_Tool_Project_Profile_Resource_SearchConstraints */ +require_once 'Zend/Tool/Project/Profile/Resource/SearchConstraints.php'; /** * This class is an iterator that will iterate only over enabled resources * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator, Countable @@ -104,6 +105,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator, if (count($currentConstraint->params) > 0) { $currentResourceAttributes = $currentResource->getAttributes(); if (!is_array($currentConstraint->params)) { + require_once 'Zend/Tool/Project/Profile/Exception.php'; throw new Zend_Tool_Project_Profile_Exception('Search parameter specifics must be in the form of an array for key "' . $currentConstraint->name .'"'); } @@ -143,6 +145,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator, { if (!$appendResourceOrSearchConstraints instanceof Zend_Tool_Project_Profile_Resource_Container) { if (($parentResource = $this->search($appendResourceOrSearchConstraints)) == false) { + require_once 'Zend/Tool/Project/Profile/Exception.php'; throw new Zend_Tool_Project_Profile_Exception('No node was found to append to.'); } } else { @@ -168,9 +171,11 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator, if ($contextRegistry->hasContext($context)) { $context = $contextRegistry->getContext($context); } else { + require_once 'Zend/Tool/Project/Profile/Exception.php'; throw new Zend_Tool_Project_Profile_Exception('Context by name ' . $context . ' was not found in the context registry.'); } } elseif (!$context instanceof Zend_Tool_Project_Context_Interface) { + require_once 'Zend/Tool/Project/Profile/Exception.php'; throw new Zend_Tool_Project_Profile_Exception('Context must be of type string or Zend_Tool_Project_Context_Interface.'); } diff --git a/library/vendor/Zend/Tool/Project/Profile/Resource/SearchConstraints.php b/library/vendor/Zend/Tool/Project/Profile/Resource/SearchConstraints.php index 1b03cef13..e43bbeb77 100644 --- a/library/vendor/Zend/Tool/Project/Profile/Resource/SearchConstraints.php +++ b/library/vendor/Zend/Tool/Project/Profile/Resource/SearchConstraints.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Profile_Resource_SearchConstraints diff --git a/library/vendor/Zend/Tool/Project/Provider/Abstract.php b/library/vendor/Zend/Tool/Project/Provider/Abstract.php index 55a770a21..66bf1e239 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Abstract.php +++ b/library/vendor/Zend/Tool/Project/Provider/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,28 +23,34 @@ /** * @see Zend_Tool_Project_Profile */ +require_once 'Zend/Tool/Project/Profile.php'; /** * @see Zend_Tool_Framework_Provider_Abstract */ +require_once 'Zend/Tool/Framework/Provider/Abstract.php'; /** * @see Zend_Tool_Project_Context_Repository */ +require_once 'Zend/Tool/Project/Context/Repository.php'; /** * @see Zend_Tool_Project_Profile_FileParser_Xml */ +require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php'; /** * @see Zend_Tool_Framework_Registry */ +require_once 'Zend/Tool/Framework/Registry.php'; +require_once 'Zend/Tool/Framework/Provider/Initializable.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Tool_Project_Provider_Abstract @@ -181,6 +187,7 @@ abstract class Zend_Tool_Project_Provider_Abstract { $profile = $this->_loadProfile(); if ($profile === false) { + require_once 'Zend/Tool/Project/Provider/Exception.php'; throw new Zend_Tool_Project_Provider_Exception('A project profile was not found in the current working directory.'); } return $profile; @@ -227,6 +234,7 @@ abstract class Zend_Tool_Project_Provider_Abstract } if (!class_exists('Zend_Tool_Project_Context_Content_Engine')) { + require_once 'Zend/Tool/Project/Context/Content/Engine.php'; } $engine = new Zend_Tool_Project_Context_Content_Engine($storage); diff --git a/library/vendor/Zend/Tool/Project/Provider/Action.php b/library/vendor/Zend/Tool/Project/Provider/Action.php index 379e3116c..7c96ae7ab 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Action.php +++ b/library/vendor/Zend/Tool/Project/Provider/Action.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @see Zend_Tool_Framework_Provider_Pretendable */ +require_once 'Zend/Tool/Framework/Provider/Pretendable.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Action @@ -134,6 +136,7 @@ class Zend_Tool_Project_Provider_Action $response = $this->_registry->getResponse(); // determine if testing is enabled in the project + require_once 'Zend/Tool/Project/Provider/Test.php'; $testingEnabled = Zend_Tool_Project_Provider_Test::isTestingEnabled($this->_loadedProfile); if ($testingEnabled && !Zend_Tool_Project_Provider_Test::isPHPUnitAvailable()) { diff --git a/library/vendor/Zend/Tool/Project/Provider/Application.php b/library/vendor/Zend/Tool/Project/Provider/Application.php index 394aeee83..d65f7feba 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Application.php +++ b/library/vendor/Zend/Tool/Project/Provider/Application.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Application diff --git a/library/vendor/Zend/Tool/Project/Provider/Controller.php b/library/vendor/Zend/Tool/Project/Provider/Controller.php index 3781693d0..606eea0c9 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Controller.php +++ b/library/vendor/Zend/Tool/Project/Provider/Controller.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Controller @@ -117,6 +117,7 @@ class Zend_Tool_Project_Provider_Controller $response = $this->_registry->getResponse(); // determine if testing is enabled in the project + require_once 'Zend/Tool/Project/Provider/Test.php'; $testingEnabled = Zend_Tool_Project_Provider_Test::isTestingEnabled($this->_loadedProfile); if ($testingEnabled && !Zend_Tool_Project_Provider_Test::isPHPUnitAvailable()) { diff --git a/library/vendor/Zend/Tool/Project/Provider/DbAdapter.php b/library/vendor/Zend/Tool/Project/Provider/DbAdapter.php index fac32ebdb..61e77084b 100644 --- a/library/vendor/Zend/Tool/Project/Provider/DbAdapter.php +++ b/library/vendor/Zend/Tool/Project/Provider/DbAdapter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @see Zend_Tool_Framework_Provider_Interactable */ +require_once 'Zend/Tool/Framework/Provider/Interactable.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_DbAdapter diff --git a/library/vendor/Zend/Tool/Project/Provider/DbTable.php b/library/vendor/Zend/Tool/Project/Provider/DbTable.php index 07be93826..128e51982 100644 --- a/library/vendor/Zend/Tool/Project/Provider/DbTable.php +++ b/library/vendor/Zend/Tool/Project/Provider/DbTable.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_DbTable diff --git a/library/vendor/Zend/Tool/Project/Provider/Exception.php b/library/vendor/Zend/Tool/Project/Provider/Exception.php index bdfbc54c0..a3dc659fb 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Exception.php +++ b/library/vendor/Zend/Tool/Project/Provider/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Project_Exception */ +require_once 'Zend/Tool/Project/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Exception extends Zend_Tool_Project_Exception diff --git a/library/vendor/Zend/Tool/Project/Provider/Form.php b/library/vendor/Zend/Tool/Project/Provider/Form.php index a7101905c..165074271 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Form.php +++ b/library/vendor/Zend/Tool/Project/Provider/Form.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Form extends Zend_Tool_Project_Provider_Abstract diff --git a/library/vendor/Zend/Tool/Project/Provider/Layout.php b/library/vendor/Zend/Tool/Project/Provider/Layout.php index 953811343..320de1e39 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Layout.php +++ b/library/vendor/Zend/Tool/Project/Provider/Layout.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Layout extends Zend_Tool_Project_Provider_Abstract implements Zend_Tool_Framework_Provider_Pretendable diff --git a/library/vendor/Zend/Tool/Project/Provider/Manifest.php b/library/vendor/Zend/Tool/Project/Provider/Manifest.php index 74b9d5ff0..d1f28beeb 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Manifest.php +++ b/library/vendor/Zend/Tool/Project/Provider/Manifest.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Framework_Manifest_ProviderManifestable */ +require_once 'Zend/Tool/Framework/Manifest/ProviderManifestable.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Manifest implements diff --git a/library/vendor/Zend/Tool/Project/Provider/Model.php b/library/vendor/Zend/Tool/Project/Provider/Model.php index 308d02fa3..71f8015e4 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Model.php +++ b/library/vendor/Zend/Tool/Project/Provider/Model.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Model extends Zend_Tool_Project_Provider_Abstract diff --git a/library/vendor/Zend/Tool/Project/Provider/Module.php b/library/vendor/Zend/Tool/Project/Provider/Module.php index 44cc73a86..44898ce87 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Module.php +++ b/library/vendor/Zend/Tool/Project/Provider/Module.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,23 +23,27 @@ /** * @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @see Zend_Tool_Framework_Provider_Pretendable */ +require_once 'Zend/Tool/Framework/Provider/Pretendable.php'; /** * @see Zend_Tool_Project_Profile_Iterator_ContextFilter */ +require_once 'Zend/Tool/Project/Profile/Iterator/ContextFilter.php'; /** * @see Zend_Tool_Project_Profile_Iterator_EnabledResourceFilter */ +require_once 'Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Module @@ -133,6 +137,7 @@ class Zend_Tool_Project_Provider_Module $this->_loadProfile(self::NO_PROFILE_THROW_EXCEPTION); // determine if testing is enabled in the project + require_once 'Zend/Tool/Project/Provider/Test.php'; //$testingEnabled = Zend_Tool_Project_Provider_Test::isTestingEnabled($this->_loadedProfile); $resources = self::createResources($this->_loadedProfile, $name); diff --git a/library/vendor/Zend/Tool/Project/Provider/Profile.php b/library/vendor/Zend/Tool/Project/Provider/Profile.php index be3bcdcdd..c0d4dd2e8 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Profile.php +++ b/library/vendor/Zend/Tool/Project/Provider/Profile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Profile extends Zend_Tool_Project_Provider_Abstract diff --git a/library/vendor/Zend/Tool/Project/Provider/Project.php b/library/vendor/Zend/Tool/Project/Provider/Project.php index 165f800f6..30d04b60c 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Project.php +++ b/library/vendor/Zend/Tool/Project/Provider/Project.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Project @@ -53,6 +54,7 @@ class Zend_Tool_Project_Provider_Project if (!file_exists($path)) { $created = mkdir($path); if (!$created) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('Could not create requested project directory \'' . $path . '\''); } } @@ -62,6 +64,7 @@ class Zend_Tool_Project_Provider_Project $profile = $this->_loadProfile(self::NO_PROFILE_RETURN_FALSE, $path); if ($profile !== false) { + require_once 'Zend/Tool/Framework/Client/Exception.php'; throw new Zend_Tool_Framework_Client_Exception('A project already exists here'); } diff --git a/library/vendor/Zend/Tool/Project/Provider/ProjectProvider.php b/library/vendor/Zend/Tool/Project/Provider/ProjectProvider.php index 75c5efbd9..440080679 100644 --- a/library/vendor/Zend/Tool/Project/Provider/ProjectProvider.php +++ b/library/vendor/Zend/Tool/Project/Provider/ProjectProvider.php @@ -14,17 +14,18 @@ * * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_ProjectProvider extends Zend_Tool_Project_Provider_Abstract @@ -45,6 +46,7 @@ class Zend_Tool_Project_Provider_ProjectProvider extends Zend_Tool_Project_Provi /** * @see Zend_Tool_Project_Provider_Exception */ + require_once 'Zend/Tool/Project/Provider/Exception.php'; throw new Zend_Tool_Project_Provider_Exception('Zend_Tool_Project_Provider_Controller::createResource() expects \"projectProviderName\" is the name of a project provider resource to create.'); } diff --git a/library/vendor/Zend/Tool/Project/Provider/Test.php b/library/vendor/Zend/Tool/Project/Provider/Test.php index 4627e104f..31316027b 100644 --- a/library/vendor/Zend/Tool/Project/Provider/Test.php +++ b/library/vendor/Zend/Tool/Project/Provider/Test.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,17 @@ /** * @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @see Zend_Tool_Project_Provider_Exception */ +require_once 'Zend/Tool/Project/Provider/Exception.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_Test extends Zend_Tool_Project_Provider_Abstract diff --git a/library/vendor/Zend/Tool/Project/Provider/View.php b/library/vendor/Zend/Tool/Project/Provider/View.php index ebd163e06..6ecccf1db 100644 --- a/library/vendor/Zend/Tool/Project/Provider/View.php +++ b/library/vendor/Zend/Tool/Project/Provider/View.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Tool * @subpackage Framework - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,11 +23,12 @@ /** * @see Zend_Tool_Project_Provider_Abstract */ +require_once 'Zend/Tool/Project/Provider/Abstract.php'; /** * @category Zend * @package Zend_Tool - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Tool_Project_Provider_View extends Zend_Tool_Project_Provider_Abstract @@ -45,10 +46,12 @@ class Zend_Tool_Project_Provider_View extends Zend_Tool_Project_Provider_Abstrac public static function createResource(Zend_Tool_Project_Profile $profile, $actionName, $controllerName, $moduleName = null) { if (!is_string($actionName)) { + require_once 'Zend/Tool/Project/Provider/Exception.php'; throw new Zend_Tool_Project_Provider_Exception('Zend_Tool_Project_Provider_View::createResource() expects \"actionName\" is the name of a controller resource to create.'); } if (!is_string($controllerName)) { + require_once 'Zend/Tool/Project/Provider/Exception.php'; throw new Zend_Tool_Project_Provider_Exception('Zend_Tool_Project_Provider_View::createResource() expects \"controllerName\" is the name of a controller resource to create.'); } @@ -65,6 +68,7 @@ class Zend_Tool_Project_Provider_View extends Zend_Tool_Project_Provider_Abstrac $profileSearchParams[] = 'viewScriptsDirectory'; if (($viewScriptsDirectory = $profile->search($profileSearchParams, $noModuleSearch)) === false) { + require_once 'Zend/Tool/Project/Provider/Exception.php'; throw new Zend_Tool_Project_Provider_Exception('This project does not have a viewScriptsDirectory resource.'); } @@ -90,6 +94,7 @@ class Zend_Tool_Project_Provider_View extends Zend_Tool_Project_Provider_Abstrac { if ($controllerName == '' || $actionNameOrSimpleName == '') { + require_once 'Zend/Tool/Project/Provider/Exception.php'; throw new Zend_Tool_Project_Provider_Exception('ControllerName and/or ActionName are empty.'); } diff --git a/library/vendor/Zend/Translate.php b/library/vendor/Zend/Translate.php index 6264d225a..46bec43dc 100644 --- a/library/vendor/Zend/Translate.php +++ b/library/vendor/Zend/Translate.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,16 +22,18 @@ /** * @see Zend_Loader */ +require_once 'Zend/Loader.php'; /** * @see Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate { @@ -61,7 +63,9 @@ class Zend_Translate { /** * Generates the standard translation object * - * @param array|Zend_Config $options Options to use + * @param array|Zend_Config|Zend_Translate_Adapter $options Options to use + * @param string|array [$content] Path to content, or content itself + * @param string|Zend_Locale [$locale] * @throws Zend_Translate_Exception */ public function __construct($options = array()) @@ -94,7 +98,9 @@ class Zend_Translate { /** * Sets a new adapter * - * @param array|Zend_Config $options Options to use + * @param array|Zend_Config|Zend_Translate_Adapter $options Options to use + * @param string|array [$content] Path to content, or content itself + * @param string|Zend_Locale [$locale] * @throws Zend_Translate_Exception */ public function setAdapter($options = array()) @@ -137,6 +143,7 @@ class Zend_Translate { unset($options['adapter']); $this->_adapter = new $adapter($options); if (!$this->_adapter instanceof Zend_Translate_Adapter) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception("Adapter " . $adapter . " does not extend Zend_Translate_Adapter"); } } @@ -211,6 +218,7 @@ class Zend_Translate { if (method_exists($this->_adapter, $method)) { return call_user_func_array(array($this->_adapter, $method), $options); } + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception("Unknown method '" . $method . "' called!"); } } diff --git a/library/vendor/Zend/Translate/Adapter.php b/library/vendor/Zend/Translate/Adapter.php index 6d8ac47c0..efaaa05a2 100644 --- a/library/vendor/Zend/Translate/Adapter.php +++ b/library/vendor/Zend/Translate/Adapter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Zend_Translate_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Locale */ +require_once 'Zend/Locale.php'; /** * @see Zend_Translate_Plural */ +require_once 'Zend/Translate/Plural.php'; /** * Basic adapter class for each translation source adapter @@ -34,7 +36,7 @@ * @category Zend * @package Zend_Translate * @subpackage Zend_Translate_Adapter - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Translate_Adapter { @@ -117,7 +119,9 @@ abstract class Zend_Translate_Adapter { /** * Generates the adapter * - * @param array|Zend_Config $options Translation options for this adapter + * @param string|array|Zend_Config $options Translation options for this adapter + * @param string|array [$content] + * @param string|Zend_Locale [$locale] * @throws Zend_Translate_Exception * @return void */ @@ -212,6 +216,7 @@ abstract class Zend_Translate_Adapter { } if (!isset($options['content']) || empty($options['content'])) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception("Required option 'content' is missing"); } @@ -221,6 +226,7 @@ abstract class Zend_Translate_Adapter { } if ((array_key_exists('log', $options)) && !($options['log'] instanceof Zend_Log)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Instance of Zend_Log expected for option log'); } @@ -233,6 +239,7 @@ abstract class Zend_Translate_Adapter { $options['locale'] = Zend_Locale::findLocale($options['locale']); } } catch (Zend_Locale_Exception $e) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception("The given Language '{$options['locale']}' does not exist", 0, $e); } @@ -346,6 +353,7 @@ abstract class Zend_Translate_Adapter { } else if ((isset($this->_options[$key]) and ($this->_options[$key] != $option)) or !isset($this->_options[$key])) { if (($key == 'log') && !($option instanceof Zend_Log)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Instance of Zend_Log expected for option log'); } @@ -423,6 +431,7 @@ abstract class Zend_Translate_Adapter { try { $locale = Zend_Locale::findLocale($locale); } catch (Zend_Locale_Exception $e) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception("The given Language ({$locale}) does not exist", 0, $e); } @@ -611,6 +620,7 @@ abstract class Zend_Translate_Adapter { try { $options['locale'] = Zend_Locale::findLocale($options['locale']); } catch (Zend_Locale_Exception $e) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception("The given Language '{$options['locale']}' does not exist", 0, $e); } @@ -948,6 +958,7 @@ abstract class Zend_Translate_Adapter { */ public static function clearCache($tag = null) { + require_once 'Zend/Cache.php'; if (self::$_cacheTags) { if ($tag == null) { $tag = 'Zend_Translate'; diff --git a/library/vendor/Zend/Translate/Adapter/Array.php b/library/vendor/Zend/Translate/Adapter/Array.php index fbbe2161e..2dd298eb0 100644 --- a/library/vendor/Zend/Translate/Adapter/Array.php +++ b/library/vendor/Zend/Translate/Adapter/Array.php @@ -14,21 +14,23 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_Array extends Zend_Translate_Adapter @@ -55,6 +57,7 @@ class Zend_Translate_Adapter_Array extends Zend_Translate_Adapter } } if (!is_array($data)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception("Error including array or file '".$data."'"); } diff --git a/library/vendor/Zend/Translate/Adapter/Csv.php b/library/vendor/Zend/Translate/Adapter/Csv.php index 15ff356fe..300de2768 100644 --- a/library/vendor/Zend/Translate/Adapter/Csv.php +++ b/library/vendor/Zend/Translate/Adapter/Csv.php @@ -14,21 +14,23 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_Csv extends Zend_Translate_Adapter @@ -83,6 +85,7 @@ class Zend_Translate_Adapter_Csv extends Zend_Translate_Adapter $options = $options + $this->_options; $this->_file = @fopen($filename, 'rb'); if (!$this->_file) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Error opening translation file \'' . $filename . '\'.'); } diff --git a/library/vendor/Zend/Translate/Adapter/Gettext.php b/library/vendor/Zend/Translate/Adapter/Gettext.php index b9cd02245..81a7841ea 100644 --- a/library/vendor/Zend/Translate/Adapter/Gettext.php +++ b/library/vendor/Zend/Translate/Adapter/Gettext.php @@ -14,19 +14,21 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_Gettext extends Zend_Translate_Adapter { @@ -66,10 +68,12 @@ class Zend_Translate_Adapter_Gettext extends Zend_Translate_Adapter { $this->_bigEndian = false; $this->_file = @fopen($filename, 'rb'); if (!$this->_file) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Error opening translation file \'' . $filename . '\'.'); } if (@filesize($filename) < 10) { @fclose($this->_file); + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('\'' . $filename . '\' is not a gettext file'); } @@ -81,6 +85,7 @@ class Zend_Translate_Adapter_Gettext extends Zend_Translate_Adapter { $this->_bigEndian = true; } else { @fclose($this->_file); + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('\'' . $filename . '\' is not a gettext file'); } // read revision - not supported for now diff --git a/library/vendor/Zend/Translate/Adapter/Ini.php b/library/vendor/Zend/Translate/Adapter/Ini.php index 595b2f8c6..7935f20ee 100644 --- a/library/vendor/Zend/Translate/Adapter/Ini.php +++ b/library/vendor/Zend/Translate/Adapter/Ini.php @@ -14,19 +14,21 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_Ini extends Zend_Translate_Adapter @@ -47,6 +49,7 @@ class Zend_Translate_Adapter_Ini extends Zend_Translate_Adapter { $this->_data = array(); if (!file_exists($data)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception("Ini file '".$data."' not found"); } diff --git a/library/vendor/Zend/Translate/Adapter/Qt.php b/library/vendor/Zend/Translate/Adapter/Qt.php index 7b9122196..db543ff64 100644 --- a/library/vendor/Zend/Translate/Adapter/Qt.php +++ b/library/vendor/Zend/Translate/Adapter/Qt.php @@ -14,24 +14,28 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** @see Zend_Xml_Security */ +require_once 'Zend/Xml/Security.php'; /** @See Zend_Xml_Exception */ +require_once 'Zend/Xml/Exception.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_Qt extends Zend_Translate_Adapter { @@ -61,6 +65,7 @@ class Zend_Translate_Adapter_Qt extends Zend_Translate_Adapter { { $this->_data = array(); if (!is_readable($filename)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.'); } @@ -76,6 +81,7 @@ class Zend_Translate_Adapter_Qt extends Zend_Translate_Adapter { try { Zend_Xml_Security::scanFile($filename); } catch (Zend_Xml_Exception $e) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception( $e->getMessage() ); @@ -87,6 +93,7 @@ class Zend_Translate_Adapter_Qt extends Zend_Translate_Adapter { xml_get_current_line_number($this->_file), $filename); xml_parser_free($this->_file); + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception($ex); } diff --git a/library/vendor/Zend/Translate/Adapter/Tbx.php b/library/vendor/Zend/Translate/Adapter/Tbx.php index b69bcd1a5..107107c4e 100644 --- a/library/vendor/Zend/Translate/Adapter/Tbx.php +++ b/library/vendor/Zend/Translate/Adapter/Tbx.php @@ -14,24 +14,28 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** @see Zend_Xml_Security */ +require_once 'Zend/Xml/Security.php'; /** @see Zend_Xml_Exception */ +require_once 'Zend/Xml/Exception.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_Tbx extends Zend_Translate_Adapter { @@ -58,6 +62,7 @@ class Zend_Translate_Adapter_Tbx extends Zend_Translate_Adapter { { $this->_data = array(); if (!is_readable($filename)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.'); } @@ -71,6 +76,7 @@ class Zend_Translate_Adapter_Tbx extends Zend_Translate_Adapter { try { Zend_Xml_Security::scanFile($filename); } catch (Zend_Xml_Exception $e) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception( $e->getMessage() ); @@ -82,6 +88,7 @@ class Zend_Translate_Adapter_Tbx extends Zend_Translate_Adapter { xml_get_current_line_number($this->_file), $filename); xml_parser_free($this->_file); + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception($ex); } diff --git a/library/vendor/Zend/Translate/Adapter/Tmx.php b/library/vendor/Zend/Translate/Adapter/Tmx.php index 4bb2d61f5..d6572592d 100644 --- a/library/vendor/Zend/Translate/Adapter/Tmx.php +++ b/library/vendor/Zend/Translate/Adapter/Tmx.php @@ -14,24 +14,28 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** @see Zend_Xml_Security */ +require_once 'Zend/Xml/Security.php'; /** @See Zend_Xml_Exception */ +require_once 'Zend/Xml/Exception.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_Tmx extends Zend_Translate_Adapter { @@ -59,6 +63,7 @@ class Zend_Translate_Adapter_Tmx extends Zend_Translate_Adapter { { $this->_data = array(); if (!is_readable($filename)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.'); } @@ -76,6 +81,7 @@ class Zend_Translate_Adapter_Tmx extends Zend_Translate_Adapter { try { Zend_Xml_Security::scanFile($filename); } catch (Zend_Xml_Exception $e) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception( $e->getMessage() ); @@ -87,6 +93,7 @@ class Zend_Translate_Adapter_Tmx extends Zend_Translate_Adapter { xml_get_current_line_number($this->_file), $filename); xml_parser_free($this->_file); + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception($ex); } diff --git a/library/vendor/Zend/Translate/Adapter/Xliff.php b/library/vendor/Zend/Translate/Adapter/Xliff.php index 1a5bbdd82..e8c664bd5 100644 --- a/library/vendor/Zend/Translate/Adapter/Xliff.php +++ b/library/vendor/Zend/Translate/Adapter/Xliff.php @@ -14,24 +14,28 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** @see Zend_Xml_Security */ +require_once 'Zend/Xml/Security.php'; /** @See Zend_Xml_Exception */ +require_once 'Zend/Xml/Exception.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_Xliff extends Zend_Translate_Adapter { @@ -63,6 +67,7 @@ class Zend_Translate_Adapter_Xliff extends Zend_Translate_Adapter { { $this->_data = array(); if (!is_readable($filename)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.'); } @@ -83,6 +88,7 @@ class Zend_Translate_Adapter_Xliff extends Zend_Translate_Adapter { try { Zend_Xml_Security::scanFile($filename); } catch (Zend_Xml_Exception $e) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception( $e->getMessage() ); @@ -94,6 +100,7 @@ class Zend_Translate_Adapter_Xliff extends Zend_Translate_Adapter { xml_get_current_line_number($this->_file), $filename); xml_parser_free($this->_file); + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception($ex); } diff --git a/library/vendor/Zend/Translate/Adapter/XmlTm.php b/library/vendor/Zend/Translate/Adapter/XmlTm.php index 0e9d6de72..87d22695e 100644 --- a/library/vendor/Zend/Translate/Adapter/XmlTm.php +++ b/library/vendor/Zend/Translate/Adapter/XmlTm.php @@ -14,24 +14,28 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_Translate_Adapter */ +require_once 'Zend/Translate/Adapter.php'; /** @see Zend_Xml_Security */ +require_once 'Zend/Xml/Security.php'; /** @See Zend_Xml_Exception */ +require_once 'Zend/Xml/Exception.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Adapter_XmlTm extends Zend_Translate_Adapter { @@ -58,6 +62,7 @@ class Zend_Translate_Adapter_XmlTm extends Zend_Translate_Adapter { $this->_data = array(); $this->_lang = $locale; if (!is_readable($filename)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.'); } @@ -71,6 +76,7 @@ class Zend_Translate_Adapter_XmlTm extends Zend_Translate_Adapter { try { Zend_Xml_Security::scanFile($filename); } catch (Zend_Xml_Exception $e) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception( $e->getMessage() ); @@ -82,6 +88,7 @@ class Zend_Translate_Adapter_XmlTm extends Zend_Translate_Adapter { xml_get_current_line_number($this->_file), $filename); xml_parser_free($this->_file); + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception($ex); } diff --git a/library/vendor/Zend/Translate/Exception.php b/library/vendor/Zend/Translate/Exception.php index 396a94cf7..7309a98b2 100644 --- a/library/vendor/Zend/Translate/Exception.php +++ b/library/vendor/Zend/Translate/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,12 +23,13 @@ /** * Zend_Exception */ +require_once 'Zend/Exception.php'; /** * @category Zend * @package Zend_Translate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Translate/Plural.php b/library/vendor/Zend/Translate/Plural.php index 3a83e8789..69140a4a2 100644 --- a/library/vendor/Zend/Translate/Plural.php +++ b/library/vendor/Zend/Translate/Plural.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Locale - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Translate_Plural @@ -65,6 +65,7 @@ class Zend_Translate_Plural } switch($locale) { + case 'az': case 'bo': case 'dz': case 'id': @@ -83,7 +84,6 @@ class Zend_Translate_Plural break; case 'af': - case 'az': case 'bn': case 'bg': case 'ca': @@ -215,6 +215,7 @@ class Zend_Translate_Plural } if (!is_callable($rule)) { + require_once 'Zend/Translate/Exception.php'; throw new Zend_Translate_Exception('The given rule can not be called'); } diff --git a/library/vendor/Zend/Uri.php b/library/vendor/Zend/Uri.php index 3bcd9c5d8..e1660d8bf 100644 --- a/library/vendor/Zend/Uri.php +++ b/library/vendor/Zend/Uri.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Uri - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Uri - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Uri @@ -101,11 +101,13 @@ abstract class Zend_Uri $schemeSpecific = isset($uri[1]) === true ? $uri[1] : ''; if (strlen($scheme) === 0) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('An empty string was supplied for the scheme'); } // Security check: $scheme is used to load a class file, so only alphanumerics are allowed. if (ctype_alnum($scheme) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Illegal scheme supplied, only alphanumeric characters are permitted'); } @@ -124,20 +126,24 @@ abstract class Zend_Uri case 'mailto': // TODO default: + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("Scheme \"$scheme\" is not supported"); break; } } + require_once 'Zend/Loader.php'; try { Zend_Loader::loadClass($className); } catch (Exception $e) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("\"$className\" not found"); } $schemeHandler = new $className($scheme, $schemeSpecific); if (! $schemeHandler instanceof Zend_Uri) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("\"$className\" is not an instance of Zend_Uri"); } diff --git a/library/vendor/Zend/Uri/Exception.php b/library/vendor/Zend/Uri/Exception.php index 58ef6d1d6..f5a497edd 100644 --- a/library/vendor/Zend/Uri/Exception.php +++ b/library/vendor/Zend/Uri/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Uri - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Exception */ +require_once 'Zend/Exception.php'; /** * Exceptions for Zend_Uri * * @category Zend * @package Zend_Uri - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Uri_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Uri/Http.php b/library/vendor/Zend/Uri/Http.php index 4ae5a325c..b99f9f816 100644 --- a/library/vendor/Zend/Uri/Http.php +++ b/library/vendor/Zend/Uri/Http.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Uri - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,10 +22,12 @@ /** * @see Zend_Uri */ +require_once 'Zend/Uri.php'; /** * @see Zend_Validate_Hostname */ +require_once 'Zend/Validate/Hostname.php'; /** * HTTP(S) URI handler @@ -33,7 +35,7 @@ * @category Zend * @package Zend_Uri * @uses Zend_Uri - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Uri_Http extends Zend_Uri @@ -150,6 +152,7 @@ class Zend_Uri_Http extends Zend_Uri // Validate the URI if ($this->valid() === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Invalid URI supplied'); } } @@ -167,6 +170,7 @@ class Zend_Uri_Http extends Zend_Uri public static function fromString($uri) { if (is_string($uri) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('$uri is not a string'); } @@ -175,6 +179,7 @@ class Zend_Uri_Http extends Zend_Uri $schemeSpecific = isset($uri[1]) === true ? $uri[1] : ''; if (in_array($scheme, array('http', 'https')) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("Invalid scheme: '$scheme'"); } @@ -196,6 +201,7 @@ class Zend_Uri_Http extends Zend_Uri $pattern = '~^((//)([^/?#]*))([^?#]*)(\?([^#]*))?(#(.*))?$~'; $status = @preg_match($pattern, $schemeSpecific, $matches); if ($status === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Internal error: scheme-specific decomposition failed'); } @@ -214,6 +220,7 @@ class Zend_Uri_Http extends Zend_Uri $pattern = '~^(([^:@]*)(:([^@]*))?@)?((?(?=[[])[[][^]]+[]]|[^:]+))(:(.*))?$~'; $status = @preg_match($pattern, $combo, $matches); if ($status === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Internal error: authority decomposition failed'); } @@ -236,6 +243,7 @@ class Zend_Uri_Http extends Zend_Uri public function getUri() { if ($this->valid() === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('One or more parts of the URI are invalid'); } @@ -308,6 +316,7 @@ class Zend_Uri_Http extends Zend_Uri self::CHAR_ALNUM . self::CHAR_MARK . ';:&=+$,' . '])+$/', $username); if ($status === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Internal error: username validation failed'); } @@ -324,6 +333,7 @@ class Zend_Uri_Http extends Zend_Uri public function setUsername($username) { if ($this->validateUsername($username) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("Username \"$username\" is not a valid HTTP username"); } @@ -373,6 +383,7 @@ class Zend_Uri_Http extends Zend_Uri self::CHAR_ALNUM . self::CHAR_MARK . ';:&=+$,' . '])+$/', $password); if ($status === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Internal error: password validation failed.'); } @@ -389,6 +400,7 @@ class Zend_Uri_Http extends Zend_Uri public function setPassword($password) { if ($this->validatePassword($password) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("Password \"$password\" is not a valid HTTP password."); } @@ -443,6 +455,7 @@ class Zend_Uri_Http extends Zend_Uri public function setHost($host) { if ($this->validateHost($host) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("Host \"$host\" is not a valid HTTP host"); } @@ -494,6 +507,7 @@ class Zend_Uri_Http extends Zend_Uri public function setPort($port) { if ($this->validatePort($port) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("Port \"$port\" is not a valid HTTP port."); } @@ -536,6 +550,7 @@ class Zend_Uri_Http extends Zend_Uri $pattern = '/^' . $this->_regex['path'] . '$/'; $status = @preg_match($pattern, $path); if ($status === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Internal error: path validation failed'); } @@ -552,6 +567,7 @@ class Zend_Uri_Http extends Zend_Uri public function setPath($path) { if ($this->validatePath($path) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("Path \"$path\" is not a valid HTTP path"); } @@ -612,6 +628,7 @@ class Zend_Uri_Http extends Zend_Uri $pattern = '/^' . $this->_regex['uric'] . '*$/'; $status = @preg_match($pattern, $query); if ($status === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Internal error: query validation failed'); } @@ -676,6 +693,7 @@ class Zend_Uri_Http extends Zend_Uri // Make sure the query is valid, and set it if ($this->validateQuery($query) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("'$query' is not a valid query string"); } @@ -718,6 +736,7 @@ class Zend_Uri_Http extends Zend_Uri $pattern = '/^' . $this->_regex['uric'] . '*$/'; $status = @preg_match($pattern, $fragment); if ($status === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception('Internal error: fragment validation failed'); } @@ -734,6 +753,7 @@ class Zend_Uri_Http extends Zend_Uri public function setFragment($fragment) { if ($this->validateFragment($fragment) === false) { + require_once 'Zend/Uri/Exception.php'; throw new Zend_Uri_Exception("Fragment \"$fragment\" is not a valid HTTP fragment"); } diff --git a/library/vendor/Zend/Validate.php b/library/vendor/Zend/Validate.php index ab2144cf2..956d3119d 100644 --- a/library/vendor/Zend/Validate.php +++ b/library/vendor/Zend/Validate.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Interface */ +require_once 'Zend/Validate/Interface.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate implements Zend_Validate_Interface @@ -197,6 +198,7 @@ class Zend_Validate implements Zend_Validate_Interface $className = ucfirst($classBaseName); try { if (!class_exists($className, false)) { + require_once 'Zend/Loader.php'; foreach($namespaces as $namespace) { $class = $namespace . '_' . $className; $file = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php'; @@ -238,6 +240,7 @@ class Zend_Validate implements Zend_Validate_Interface // fallthrough and continue for missing validation classes } + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Validate class not found from basename '$classBaseName'"); } @@ -248,6 +251,7 @@ class Zend_Validate implements Zend_Validate_Interface */ public static function getMessageLength() { + require_once 'Zend/Validate/Abstract.php'; return Zend_Validate_Abstract::getMessageLength(); } @@ -258,6 +262,7 @@ class Zend_Validate implements Zend_Validate_Interface */ public static function setMessageLength($length = -1) { + require_once 'Zend/Validate/Abstract.php'; Zend_Validate_Abstract::setMessageLength($length); } @@ -268,6 +273,7 @@ class Zend_Validate implements Zend_Validate_Interface */ public static function getDefaultTranslator($translator = null) { + require_once 'Zend/Validate/Abstract.php'; return Zend_Validate_Abstract::getDefaultTranslator(); } @@ -278,6 +284,7 @@ class Zend_Validate implements Zend_Validate_Interface */ public static function setDefaultTranslator($translator = null) { + require_once 'Zend/Validate/Abstract.php'; Zend_Validate_Abstract::setDefaultTranslator($translator); } } diff --git a/library/vendor/Zend/Validate/Abstract.php b/library/vendor/Zend/Validate/Abstract.php index fa9d24644..87998c576 100644 --- a/library/vendor/Zend/Validate/Abstract.php +++ b/library/vendor/Zend/Validate/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Interface */ +require_once 'Zend/Validate/Interface.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Validate_Abstract implements Zend_Validate_Interface @@ -148,6 +149,7 @@ abstract class Zend_Validate_Abstract implements Zend_Validate_Interface } if (!isset($this->_messageTemplates[$messageKey])) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("No message template exists for key '$messageKey'"); } @@ -189,6 +191,7 @@ abstract class Zend_Validate_Abstract implements Zend_Validate_Interface /** * @see Zend_Validate_Exception */ + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("No property exists by the name '$property'"); } @@ -342,6 +345,7 @@ abstract class Zend_Validate_Abstract implements Zend_Validate_Interface * Set translation object * * @param Zend_Translate|Zend_Translate_Adapter|null $translator + * @throws Zend_Validate_Exception * @return Zend_Validate_Abstract */ public function setTranslator($translator = null) @@ -351,6 +355,7 @@ abstract class Zend_Validate_Abstract implements Zend_Validate_Interface } elseif ($translator instanceof Zend_Translate) { $this->_translator = $translator->getAdapter(); } else { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid translator specified'); } return $this; @@ -388,7 +393,7 @@ abstract class Zend_Validate_Abstract implements Zend_Validate_Interface * Set default translation object for all validate objects * * @param Zend_Translate|Zend_Translate_Adapter|null $translator - * @return void + * @throws Zend_Validate_Exception */ public static function setDefaultTranslator($translator = null) { @@ -397,6 +402,7 @@ abstract class Zend_Validate_Abstract implements Zend_Validate_Interface } elseif ($translator instanceof Zend_Translate) { self::$_defaultTranslator = $translator->getAdapter(); } else { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid translator specified'); } } @@ -409,6 +415,7 @@ abstract class Zend_Validate_Abstract implements Zend_Validate_Interface public static function getDefaultTranslator() { if (null === self::$_defaultTranslator) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Translate')) { $translator = Zend_Registry::get('Zend_Translate'); if ($translator instanceof Zend_Translate_Adapter) { diff --git a/library/vendor/Zend/Validate/Alnum.php b/library/vendor/Zend/Validate/Alnum.php index c01dca634..509183021 100644 --- a/library/vendor/Zend/Validate/Alnum.php +++ b/library/vendor/Zend/Validate/Alnum.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Alnum extends Zend_Validate_Abstract @@ -64,8 +65,7 @@ class Zend_Validate_Alnum extends Zend_Validate_Abstract /** * Sets default option values for this instance * - * @param boolean|Zend_Config $allowWhiteSpace - * @return void + * @param boolean|Zend_Config $allowWhiteSpace */ public function __construct($allowWhiteSpace = false) { @@ -132,6 +132,7 @@ class Zend_Validate_Alnum extends Zend_Validate_Abstract /** * @see Zend_Filter_Alnum */ + require_once 'Zend/Filter/Alnum.php'; self::$_filter = new Zend_Filter_Alnum(); } diff --git a/library/vendor/Zend/Validate/Alpha.php b/library/vendor/Zend/Validate/Alpha.php index c4a7ea617..c9ea9828f 100644 --- a/library/vendor/Zend/Validate/Alpha.php +++ b/library/vendor/Zend/Validate/Alpha.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Alpha extends Zend_Validate_Abstract @@ -64,8 +65,7 @@ class Zend_Validate_Alpha extends Zend_Validate_Abstract /** * Sets default option values for this instance * - * @param boolean|Zend_Config $allowWhiteSpace - * @return void + * @param boolean|Zend_Config $allowWhiteSpace */ public function __construct($allowWhiteSpace = false) { @@ -132,6 +132,7 @@ class Zend_Validate_Alpha extends Zend_Validate_Abstract /** * @see Zend_Filter_Alpha */ + require_once 'Zend/Filter/Alpha.php'; self::$_filter = new Zend_Filter_Alpha(); } diff --git a/library/vendor/Zend/Validate/Barcode.php b/library/vendor/Zend/Validate/Barcode.php index 4e7a9f39a..4d48d5160 100644 --- a/library/vendor/Zend/Validate/Barcode.php +++ b/library/vendor/Zend/Validate/Barcode.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,15 +22,17 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @see Zend_Loader */ +require_once 'Zend/Loader.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode extends Zend_Validate_Abstract @@ -75,7 +77,6 @@ class Zend_Validate_Barcode extends Zend_Validate_Abstract * * @param string|Zend_Config| * Zend_Validate_Barcode_BarcodeAdapter $adapter Barcode adapter to use - * @return void * @throws Zend_Validate_Exception */ public function __construct($adapter) @@ -98,6 +99,7 @@ class Zend_Validate_Barcode extends Zend_Validate_Abstract if (array_key_exists('adapter', $adapter)) { $adapter = $adapter['adapter']; } else { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Missing option 'adapter'"); } } @@ -123,12 +125,13 @@ class Zend_Validate_Barcode extends Zend_Validate_Abstract * * @param string|Zend_Validate_Barcode $adapter Barcode adapter to use * @param array $options Options for this adapter - * @return void + * @return $this * @throws Zend_Validate_Exception */ public function setAdapter($adapter, $options = null) { $adapter = ucfirst(strtolower($adapter)); + require_once 'Zend/Loader.php'; if (Zend_Loader::isReadable('Zend/Validate/Barcode/' . $adapter. '.php')) { $adapter = 'Zend_Validate_Barcode_' . $adapter; } @@ -139,6 +142,7 @@ class Zend_Validate_Barcode extends Zend_Validate_Abstract $this->_adapter = new $adapter($options); if (!$this->_adapter instanceof Zend_Validate_Barcode_AdapterInterface) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception( "Adapter " . $adapter . " does not implement Zend_Validate_Barcode_AdapterInterface" ); diff --git a/library/vendor/Zend/Validate/Barcode/AdapterAbstract.php b/library/vendor/Zend/Validate/Barcode/AdapterAbstract.php index 7bdea8e18..05dc2b9fa 100644 --- a/library/vendor/Zend/Validate/Barcode/AdapterAbstract.php +++ b/library/vendor/Zend/Validate/Barcode/AdapterAbstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterInterface */ +require_once 'Zend/Validate/Barcode/AdapterInterface.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/AdapterInterface.php b/library/vendor/Zend/Validate/Barcode/AdapterInterface.php index 4531aefc8..8e96effbf 100644 --- a/library/vendor/Zend/Validate/Barcode/AdapterInterface.php +++ b/library/vendor/Zend/Validate/Barcode/AdapterInterface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Validate_Barcode_AdapterInterface @@ -62,7 +62,7 @@ interface Zend_Validate_Barcode_AdapterInterface * Sets the checksum validation * * @param boolean $check - * @return Zend_Validate_Barcode_Adapter Provides fluid interface + * @return Zend_Validate_Barcode_Adapter Provides a fluent interface */ public function setCheck($check); } diff --git a/library/vendor/Zend/Validate/Barcode/Code25.php b/library/vendor/Zend/Validate/Barcode/Code25.php index a8168776f..a42048787 100644 --- a/library/vendor/Zend/Validate/Barcode/Code25.php +++ b/library/vendor/Zend/Validate/Barcode/Code25.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Code25 extends Zend_Validate_Barcode_AdapterAbstract @@ -53,8 +54,6 @@ class Zend_Validate_Barcode_Code25 extends Zend_Validate_Barcode_AdapterAbstract * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Code25interleaved.php b/library/vendor/Zend/Validate/Barcode/Code25interleaved.php index c1c16cfbf..479aa0320 100644 --- a/library/vendor/Zend/Validate/Barcode/Code25interleaved.php +++ b/library/vendor/Zend/Validate/Barcode/Code25interleaved.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Code25interleaved extends Zend_Validate_Barcode_AdapterAbstract @@ -53,8 +54,6 @@ class Zend_Validate_Barcode_Code25interleaved extends Zend_Validate_Barcode_Adap * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Code39.php b/library/vendor/Zend/Validate/Barcode/Code39.php index 811d2b28a..37b2f13af 100644 --- a/library/vendor/Zend/Validate/Barcode/Code39.php +++ b/library/vendor/Zend/Validate/Barcode/Code39.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Code39 extends Zend_Validate_Barcode_AdapterAbstract @@ -66,8 +67,6 @@ class Zend_Validate_Barcode_Code39 extends Zend_Validate_Barcode_AdapterAbstract * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Code39ext.php b/library/vendor/Zend/Validate/Barcode/Code39ext.php index 3a6b56808..cd99c363c 100644 --- a/library/vendor/Zend/Validate/Barcode/Code39ext.php +++ b/library/vendor/Zend/Validate/Barcode/Code39ext.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Code39ext extends Zend_Validate_Barcode_AdapterAbstract @@ -47,8 +48,6 @@ class Zend_Validate_Barcode_Code39ext extends Zend_Validate_Barcode_AdapterAbstr * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Code93.php b/library/vendor/Zend/Validate/Barcode/Code93.php index 7989b5cce..e09ba17ec 100644 --- a/library/vendor/Zend/Validate/Barcode/Code93.php +++ b/library/vendor/Zend/Validate/Barcode/Code93.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Code93 extends Zend_Validate_Barcode_AdapterAbstract @@ -67,8 +68,6 @@ class Zend_Validate_Barcode_Code93 extends Zend_Validate_Barcode_AdapterAbstract * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Code93ext.php b/library/vendor/Zend/Validate/Barcode/Code93ext.php index 3d0ff2b20..6879a8937 100644 --- a/library/vendor/Zend/Validate/Barcode/Code93ext.php +++ b/library/vendor/Zend/Validate/Barcode/Code93ext.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Code93ext extends Zend_Validate_Barcode_AdapterAbstract @@ -47,8 +48,6 @@ class Zend_Validate_Barcode_Code93ext extends Zend_Validate_Barcode_AdapterAbstr * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Ean12.php b/library/vendor/Zend/Validate/Barcode/Ean12.php index 3bcf35b7b..e185233f5 100644 --- a/library/vendor/Zend/Validate/Barcode/Ean12.php +++ b/library/vendor/Zend/Validate/Barcode/Ean12.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Ean12 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Ean13.php b/library/vendor/Zend/Validate/Barcode/Ean13.php index 75789b880..8daf54237 100644 --- a/library/vendor/Zend/Validate/Barcode/Ean13.php +++ b/library/vendor/Zend/Validate/Barcode/Ean13.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Ean13 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Ean14.php b/library/vendor/Zend/Validate/Barcode/Ean14.php index 2cb5a2ab1..12cf49bbc 100644 --- a/library/vendor/Zend/Validate/Barcode/Ean14.php +++ b/library/vendor/Zend/Validate/Barcode/Ean14.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Ean14 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Ean18.php b/library/vendor/Zend/Validate/Barcode/Ean18.php index 892b4c853..0f3df06b5 100644 --- a/library/vendor/Zend/Validate/Barcode/Ean18.php +++ b/library/vendor/Zend/Validate/Barcode/Ean18.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Ean18 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Ean2.php b/library/vendor/Zend/Validate/Barcode/Ean2.php index 159a5fba0..e2cec4b11 100644 --- a/library/vendor/Zend/Validate/Barcode/Ean2.php +++ b/library/vendor/Zend/Validate/Barcode/Ean2.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Ean2 extends Zend_Validate_Barcode_AdapterAbstract @@ -47,8 +48,6 @@ class Zend_Validate_Barcode_Ean2 extends Zend_Validate_Barcode_AdapterAbstract * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Ean5.php b/library/vendor/Zend/Validate/Barcode/Ean5.php index 2bba83399..ff5b4bb2a 100644 --- a/library/vendor/Zend/Validate/Barcode/Ean5.php +++ b/library/vendor/Zend/Validate/Barcode/Ean5.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Ean5 extends Zend_Validate_Barcode_AdapterAbstract @@ -47,8 +48,6 @@ class Zend_Validate_Barcode_Ean5 extends Zend_Validate_Barcode_AdapterAbstract * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Ean8.php b/library/vendor/Zend/Validate/Barcode/Ean8.php index f19b51e2c..6b1caa973 100644 --- a/library/vendor/Zend/Validate/Barcode/Ean8.php +++ b/library/vendor/Zend/Validate/Barcode/Ean8.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Ean8 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Gtin12.php b/library/vendor/Zend/Validate/Barcode/Gtin12.php index e682bc071..65ff5b9a2 100644 --- a/library/vendor/Zend/Validate/Barcode/Gtin12.php +++ b/library/vendor/Zend/Validate/Barcode/Gtin12.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Gtin12 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Gtin13.php b/library/vendor/Zend/Validate/Barcode/Gtin13.php index 0ed60be4f..382dccd72 100644 --- a/library/vendor/Zend/Validate/Barcode/Gtin13.php +++ b/library/vendor/Zend/Validate/Barcode/Gtin13.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Gtin13 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Gtin14.php b/library/vendor/Zend/Validate/Barcode/Gtin14.php index 3f43d882e..6f291b8e3 100644 --- a/library/vendor/Zend/Validate/Barcode/Gtin14.php +++ b/library/vendor/Zend/Validate/Barcode/Gtin14.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Gtin14 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Identcode.php b/library/vendor/Zend/Validate/Barcode/Identcode.php index 9a8bd9d9e..3f622fa63 100644 --- a/library/vendor/Zend/Validate/Barcode/Identcode.php +++ b/library/vendor/Zend/Validate/Barcode/Identcode.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Identcode extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Intelligentmail.php b/library/vendor/Zend/Validate/Barcode/Intelligentmail.php index 06518c124..cfa2a82e6 100644 --- a/library/vendor/Zend/Validate/Barcode/Intelligentmail.php +++ b/library/vendor/Zend/Validate/Barcode/Intelligentmail.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_IntelligentMail extends Zend_Validate_Barcode_AdapterAbstract @@ -47,8 +48,6 @@ class Zend_Validate_Barcode_IntelligentMail extends Zend_Validate_Barcode_Adapte * Constructor * * Sets check flag to false. - * - * @return void */ public function __construct() { diff --git a/library/vendor/Zend/Validate/Barcode/Issn.php b/library/vendor/Zend/Validate/Barcode/Issn.php index 7b6ff2d0a..a74fa5379 100644 --- a/library/vendor/Zend/Validate/Barcode/Issn.php +++ b/library/vendor/Zend/Validate/Barcode/Issn.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Issn extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Itf14.php b/library/vendor/Zend/Validate/Barcode/Itf14.php index fab7a423c..4adc7447b 100644 --- a/library/vendor/Zend/Validate/Barcode/Itf14.php +++ b/library/vendor/Zend/Validate/Barcode/Itf14.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Itf14 extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Leitcode.php b/library/vendor/Zend/Validate/Barcode/Leitcode.php index f523b900c..b41b079ea 100644 --- a/library/vendor/Zend/Validate/Barcode/Leitcode.php +++ b/library/vendor/Zend/Validate/Barcode/Leitcode.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Leitcode extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Planet.php b/library/vendor/Zend/Validate/Barcode/Planet.php index 74ff62c40..227bc25d2 100644 --- a/library/vendor/Zend/Validate/Barcode/Planet.php +++ b/library/vendor/Zend/Validate/Barcode/Planet.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Planet extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Postnet.php b/library/vendor/Zend/Validate/Barcode/Postnet.php index a66fb365e..5aed312cb 100644 --- a/library/vendor/Zend/Validate/Barcode/Postnet.php +++ b/library/vendor/Zend/Validate/Barcode/Postnet.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Postnet extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Royalmail.php b/library/vendor/Zend/Validate/Barcode/Royalmail.php index b17a0ea11..98fa38e64 100644 --- a/library/vendor/Zend/Validate/Barcode/Royalmail.php +++ b/library/vendor/Zend/Validate/Barcode/Royalmail.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Royalmail extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Sscc.php b/library/vendor/Zend/Validate/Barcode/Sscc.php index 2dde1a533..e624d7d79 100644 --- a/library/vendor/Zend/Validate/Barcode/Sscc.php +++ b/library/vendor/Zend/Validate/Barcode/Sscc.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Sscc extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Upca.php b/library/vendor/Zend/Validate/Barcode/Upca.php index 8f894c958..7757f2b1b 100644 --- a/library/vendor/Zend/Validate/Barcode/Upca.php +++ b/library/vendor/Zend/Validate/Barcode/Upca.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Upca extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Barcode/Upce.php b/library/vendor/Zend/Validate/Barcode/Upce.php index 907bc0365..1b2482578 100644 --- a/library/vendor/Zend/Validate/Barcode/Upce.php +++ b/library/vendor/Zend/Validate/Barcode/Upce.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Barcode_AdapterAbstract */ +require_once 'Zend/Validate/Barcode/AdapterAbstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Barcode_Upce extends Zend_Validate_Barcode_AdapterAbstract diff --git a/library/vendor/Zend/Validate/Between.php b/library/vendor/Zend/Validate/Between.php index 9532dff3c..53b68261d 100644 --- a/library/vendor/Zend/Validate/Between.php +++ b/library/vendor/Zend/Validate/Between.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Between extends Zend_Validate_Abstract @@ -93,7 +94,7 @@ class Zend_Validate_Between extends Zend_Validate_Abstract * 'inclusive' => boolean, inclusive border values * * @param array|Zend_Config $options - * @return void + * @throws Zend_Validate_Exception */ public function __construct($options) { @@ -114,6 +115,7 @@ class Zend_Validate_Between extends Zend_Validate_Abstract } if (!array_key_exists('min', $options) || !array_key_exists('max', $options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Missing option. 'min' and 'max' has to be given"); } diff --git a/library/vendor/Zend/Validate/Callback.php b/library/vendor/Zend/Validate/Callback.php index 8029a5fcb..bb12ecf78 100644 --- a/library/vendor/Zend/Validate/Callback.php +++ b/library/vendor/Zend/Validate/Callback.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Callback extends Zend_Validate_Abstract @@ -68,10 +69,8 @@ class Zend_Validate_Callback extends Zend_Validate_Abstract /** * Sets validator options * - * @param string|array $callback - * @param mixed $max - * @param boolean $inclusive - * @return void + * @param mixed $callback + * @throws Zend_Validate_Exception */ public function __construct($callback = null) { @@ -87,6 +86,7 @@ class Zend_Validate_Callback extends Zend_Validate_Abstract } if (null === ($initializedCallack = $this->getCallback())) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('No callback registered'); } } @@ -105,11 +105,13 @@ class Zend_Validate_Callback extends Zend_Validate_Abstract * Sets the callback * * @param string|array $callback + * @throws Zend_Validate_Exception * @return Zend_Validate_Callback Provides a fluent interface */ public function setCallback($callback) { if (!is_callable($callback)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid callback given'); } $this->_callback = $callback; @@ -129,7 +131,7 @@ class Zend_Validate_Callback extends Zend_Validate_Abstract /** * Sets options for the callback * - * @param mixed $max + * @param mixed $options * @return Zend_Validate_Callback Provides a fluent interface */ public function setOptions($options) diff --git a/library/vendor/Zend/Validate/Ccnum.php b/library/vendor/Zend/Validate/Ccnum.php index 3a3e1e1eb..c3c7029a3 100644 --- a/library/vendor/Zend/Validate/Ccnum.php +++ b/library/vendor/Zend/Validate/Ccnum.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Ccnum extends Zend_Validate_Abstract @@ -79,6 +80,7 @@ class Zend_Validate_Ccnum extends Zend_Validate_Abstract /** * @see Zend_Filter_Digits */ + require_once 'Zend/Filter/Digits.php'; self::$_filter = new Zend_Filter_Digits(); } diff --git a/library/vendor/Zend/Validate/CreditCard.php b/library/vendor/Zend/Validate/CreditCard.php index ca6816190..170b62250 100644 --- a/library/vendor/Zend/Validate/CreditCard.php +++ b/library/vendor/Zend/Validate/CreditCard.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_CreditCard extends Zend_Validate_Abstract @@ -135,7 +136,7 @@ class Zend_Validate_CreditCard extends Zend_Validate_Abstract /** * Constructor * - * @param string|array $type OPTIONAL Type of CCI to allow + * @param string|array|Zend_Config $options OPTIONAL Type of CCI to allow */ public function __construct($options = array()) { @@ -175,7 +176,7 @@ class Zend_Validate_CreditCard extends Zend_Validate_Abstract * Sets CCIs which are accepted by validation * * @param string|array $type Type to allow for validation - * @return Zend_Validate_CreditCard Provides a fluid interface + * @return Zend_Validate_CreditCard Provides a fluent interface */ public function setType($type) { @@ -187,7 +188,7 @@ class Zend_Validate_CreditCard extends Zend_Validate_Abstract * Adds a CCI to be accepted by validation * * @param string|array $type Type to allow for validation - * @return Zend_Validate_CreditCard Provides a fluid interface + * @return Zend_Validate_CreditCard Provides a fluent interface */ public function addType($type) { @@ -221,11 +222,14 @@ class Zend_Validate_CreditCard extends Zend_Validate_Abstract /** * Sets a new callback for service validation * - * @param unknown_type $service + * @param mixed $service + * @throws Zend_Validate_Exception + * @return $this */ public function setService($service) { if (!is_callable($service)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid callback given'); } @@ -297,6 +301,7 @@ class Zend_Validate_CreditCard extends Zend_Validate_Abstract if (!empty($this->_service)) { try { + require_once 'Zend/Validate/Callback.php'; $callback = new Zend_Validate_Callback($this->_service); $callback->setOptions($this->_type); if (!$callback->isValid($value)) { diff --git a/library/vendor/Zend/Validate/Date.php b/library/vendor/Zend/Validate/Date.php index 257c26933..e875aaf55 100644 --- a/library/vendor/Zend/Validate/Date.php +++ b/library/vendor/Zend/Validate/Date.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Date extends Zend_Validate_Abstract @@ -70,8 +71,7 @@ class Zend_Validate_Date extends Zend_Validate_Abstract /** * Sets validator options * - * @param string|Zend_Config $options OPTIONAL - * @return void + * @param string|array|Zend_Config $options OPTIONAL */ public function __construct($options = array()) { @@ -92,6 +92,7 @@ class Zend_Validate_Date extends Zend_Validate_Abstract } if (!array_key_exists('locale', $options)) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Locale')) { $options['locale'] = Zend_Registry::get('Zend_Locale'); } @@ -120,6 +121,7 @@ class Zend_Validate_Date extends Zend_Validate_Abstract */ public function setLocale($locale = null) { + require_once 'Zend/Locale.php'; $this->_locale = Zend_Locale::findLocale($locale); return $this; } @@ -168,6 +170,7 @@ class Zend_Validate_Date extends Zend_Validate_Abstract if (($this->_format !== null) || ($this->_locale !== null) || is_array($value) || $value instanceof Zend_Date) { + require_once 'Zend/Date.php'; if (!Zend_Date::isDate($value, $this->_format, $this->_locale)) { if ($this->_checkFormat($value) === false) { $this->_error(self::FALSEFORMAT); @@ -204,6 +207,7 @@ class Zend_Validate_Date extends Zend_Validate_Abstract private function _checkFormat($value) { try { + require_once 'Zend/Locale/Format.php'; $parsed = Zend_Locale_Format::getDate($value, array( 'date_format' => $this->_format, 'format_type' => 'iso', 'fix_date' => false)); diff --git a/library/vendor/Zend/Validate/Db/Abstract.php b/library/vendor/Zend/Validate/Db/Abstract.php index 2c1fc30bf..ffee51f26 100644 --- a/library/vendor/Zend/Validate/Db/Abstract.php +++ b/library/vendor/Zend/Validate/Db/Abstract.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Class for Database record validation @@ -29,7 +30,7 @@ * @category Zend * @package Zend_Validate * @uses Zend_Validate_Abstract - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract @@ -96,6 +97,7 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract * 'adapter' => An optional database adapter to use * * @param array|Zend_Config $options Options to use for this validator + * @throws Zend_Validate_Exception */ public function __construct($options) { @@ -121,10 +123,12 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract } if (!array_key_exists('table', $options) && !array_key_exists('schema', $options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Table or Schema option missing!'); } if (!array_key_exists('field', $options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Field option missing!'); } @@ -149,6 +153,7 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract /** * Returns the set adapter * + * @throws Zend_Validate_Exception * @return Zend_Db_Adapter */ public function getAdapter() @@ -159,6 +164,7 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract if ($this->_adapter === null) { $this->_adapter = Zend_Db_Table_Abstract::getDefaultAdapter(); if (null === $this->_adapter) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('No database adapter present'); } } @@ -169,11 +175,13 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract * Sets a new database adapter * * @param Zend_Db_Adapter_Abstract $adapter + * @throws Zend_Validate_Exception * @return Zend_Validate_Db_Abstract */ public function setAdapter($adapter) { if (!($adapter instanceof Zend_Db_Adapter_Abstract)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Adapter option must be a database adapter!'); } @@ -273,6 +281,7 @@ abstract class Zend_Validate_Db_Abstract extends Zend_Validate_Abstract * Sets the select object to be used by the validator * * @param Zend_Db_Select $select + * @throws Zend_Validate_Exception * @return Zend_Validate_Db_Abstract */ public function setSelect($select) diff --git a/library/vendor/Zend/Validate/Db/NoRecordExists.php b/library/vendor/Zend/Validate/Db/NoRecordExists.php index 34a23b5d7..4dba8bc63 100644 --- a/library/vendor/Zend/Validate/Db/NoRecordExists.php +++ b/library/vendor/Zend/Validate/Db/NoRecordExists.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * @see Zend_Validate_Db_Abstract */ +require_once 'Zend/Validate/Db/Abstract.php'; /** * Confirms a record does not exist in a table. @@ -29,7 +30,7 @@ * @category Zend * @package Zend_Validate * @uses Zend_Validate_Db_Abstract - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Db_NoRecordExists extends Zend_Validate_Db_Abstract diff --git a/library/vendor/Zend/Validate/Db/RecordExists.php b/library/vendor/Zend/Validate/Db/RecordExists.php index 94d74e4df..540af13bc 100644 --- a/library/vendor/Zend/Validate/Db/RecordExists.php +++ b/library/vendor/Zend/Validate/Db/RecordExists.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * @see Zend_Validate_Db_Abstract */ +require_once 'Zend/Validate/Db/Abstract.php'; /** * Confirms a record exists in a table. @@ -29,7 +30,7 @@ * @category Zend * @package Zend_Validate * @uses Zend_Validate_Db_Abstract - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Db_RecordExists extends Zend_Validate_Db_Abstract diff --git a/library/vendor/Zend/Validate/Digits.php b/library/vendor/Zend/Validate/Digits.php index 1c10a9fba..411c4c5b3 100644 --- a/library/vendor/Zend/Validate/Digits.php +++ b/library/vendor/Zend/Validate/Digits.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Digits extends Zend_Validate_Abstract @@ -76,6 +77,7 @@ class Zend_Validate_Digits extends Zend_Validate_Abstract } if (null === self::$_filter) { + require_once 'Zend/Filter/Digits.php'; self::$_filter = new Zend_Filter_Digits(); } diff --git a/library/vendor/Zend/Validate/EmailAddress.php b/library/vendor/Zend/Validate/EmailAddress.php index e5e9d04c4..8bffcaec3 100644 --- a/library/vendor/Zend/Validate/EmailAddress.php +++ b/library/vendor/Zend/Validate/EmailAddress.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,15 +22,17 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @see Zend_Validate_Hostname */ +require_once 'Zend/Validate/Hostname.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract @@ -61,7 +63,7 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract ); /** - * As of RFC5753 (JAN 2010), the following blocks are no logner reserved: + * As of RFC5753 (JAN 2010), the following blocks are no longer reserved: * - 128.0.0.0/16 * - 191.255.0.0/16 * - 223.255.255.0/24 @@ -130,8 +132,7 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract * 'mx' => If MX check should be enabled, boolean * 'deep' => If a deep MX check should be done, boolean * - * @param array|Zend_Config $options OPTIONAL - * @return void + * @param array|string|Zend_Config $options OPTIONAL */ public function __construct($options = array()) { @@ -169,7 +170,7 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract * Set options for the email validator * * @param array $options - * @return Zend_Validate_EmailAddress fluid interface + * @return Zend_Validate_EmailAddress Provides a fluent inteface */ public function setOptions(array $options = array()) { @@ -240,7 +241,7 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract /** * @param Zend_Validate_Hostname $hostnameValidator OPTIONAL * @param int $allow OPTIONAL - * @return void + * @return $this */ public function setHostnameValidator(Zend_Validate_Hostname $hostnameValidator = null, $allow = Zend_Validate_Hostname::ALLOW_DNS) { @@ -281,11 +282,13 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract * This only applies when DNS hostnames are validated * * @param boolean $mx Set allowed to true to validate for MX records, and false to not validate them - * @return Zend_Validate_EmailAddress Fluid Interface + * @throws Zend_Validate_Exception + * @return Zend_Validate_EmailAddress Provides a fluent inteface */ public function setValidateMx($mx) { if ((bool) $mx && !$this->validateMxSupported()) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('MX checking not available on this system'); } @@ -307,7 +310,7 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract * Set whether we check MX record should be a deep validation * * @param boolean $deep Set deep to true to perform a deep validation process for MX records - * @return Zend_Validate_EmailAddress Fluid Interface + * @return Zend_Validate_EmailAddress Provides a fluent inteface */ public function setDeepMxCheck($deep) { @@ -330,7 +333,7 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract * or only the local part of the email address * * @param boolean $domain - * @return Zend_Validate_EmailAddress Fluid Interface + * @return Zend_Validate_EmailAddress Provides a fluent inteface */ public function setDomainCheck($domain = true) { @@ -446,7 +449,14 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract private function _validateMXRecords() { $mxHosts = array(); - $result = getmxrr($this->_hostname, $mxHosts); + $hostname = $this->_hostname; + + //decode IDN domain name if possible + if (function_exists('idn_to_ascii')) { + $hostname = idn_to_ascii($this->_hostname); + } + + $result = getmxrr($hostname, $mxHosts); if (!$result) { $this->_error(self::INVALID_MX_RECORD); } else if ($this->_options['deep'] && function_exists('checkdnsrr')) { diff --git a/library/vendor/Zend/Validate/Exception.php b/library/vendor/Zend/Validate/Exception.php index 12d1e5c73..4a4e2b2cb 100644 --- a/library/vendor/Zend/Validate/Exception.php +++ b/library/vendor/Zend/Validate/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Exception */ +require_once 'Zend/Exception.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Validate/File/Count.php b/library/vendor/Zend/Validate/File/Count.php index eee298d14..aa822dfb1 100644 --- a/library/vendor/Zend/Validate/File/Count.php +++ b/library/vendor/Zend/Validate/File/Count.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validator for counting all given files * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Count extends Zend_Validate_Abstract @@ -100,7 +101,7 @@ class Zend_Validate_File_Count extends Zend_Validate_Abstract * 'max': Maximum filecount * * @param integer|array|Zend_Config $options Options for the adapter - * @return void + * @throws Zend_Validate_Exception */ public function __construct($options) { @@ -109,6 +110,7 @@ class Zend_Validate_File_Count extends Zend_Validate_Abstract } elseif (is_string($options) || is_numeric($options)) { $options = array('max' => $options); } elseif (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } @@ -150,11 +152,13 @@ class Zend_Validate_File_Count extends Zend_Validate_Abstract } if (!is_string($min) and !is_numeric($min)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } $min = (integer) $min; if (($this->_max !== null) && ($min > $this->_max)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The minimum must be less than or equal to the maximum file count, but $min >" . " {$this->_max}"); } @@ -187,11 +191,13 @@ class Zend_Validate_File_Count extends Zend_Validate_Abstract } if (!is_string($max) and !is_numeric($max)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } $max = (integer) $max; if (($this->_min !== null) && ($max < $this->_min)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The maximum must be greater than or equal to the minimum file count, but " . "$max < {$this->_min}"); } @@ -204,6 +210,7 @@ class Zend_Validate_File_Count extends Zend_Validate_Abstract * Adds a file for validation * * @param string|array $file + * @return $this */ public function addFile($file) { diff --git a/library/vendor/Zend/Validate/File/Crc32.php b/library/vendor/Zend/Validate/File/Crc32.php index c932d5fd9..9fd47271c 100644 --- a/library/vendor/Zend/Validate/File/Crc32.php +++ b/library/vendor/Zend/Validate/File/Crc32.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_Hash */ +require_once 'Zend/Validate/File/Hash.php'; /** * Validator for the crc32 hash of given files * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Crc32 extends Zend_Validate_File_Hash @@ -60,7 +61,8 @@ class Zend_Validate_File_Crc32 extends Zend_Validate_File_Hash * Sets validator options * * @param string|array|Zend_Config $options - * @return void + * @throws Zend_Validate_Exception + * @return Zend_Validate_File_Crc32 */ public function __construct($options) { @@ -69,6 +71,7 @@ class Zend_Validate_File_Crc32 extends Zend_Validate_File_Hash } elseif (is_scalar($options)) { $options = array('hash1' => $options); } elseif (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid options to validator provided'); } @@ -155,6 +158,7 @@ class Zend_Validate_File_Crc32 extends Zend_Validate_File_Hash public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_FOUND); } diff --git a/library/vendor/Zend/Validate/File/ExcludeExtension.php b/library/vendor/Zend/Validate/File/ExcludeExtension.php index 7ad0e6f6d..e894af6a3 100644 --- a/library/vendor/Zend/Validate/File/ExcludeExtension.php +++ b/library/vendor/Zend/Validate/File/ExcludeExtension.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/File/Extension.php'; /** * Validator for the excluding file extensions * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_ExcludeExtension extends Zend_Validate_File_Extension @@ -60,6 +61,7 @@ class Zend_Validate_File_ExcludeExtension extends Zend_Validate_File_Extension public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_FOUND); } diff --git a/library/vendor/Zend/Validate/File/ExcludeMimeType.php b/library/vendor/Zend/Validate/File/ExcludeMimeType.php index f12bc8daa..27d4f5ac3 100644 --- a/library/vendor/Zend/Validate/File/ExcludeMimeType.php +++ b/library/vendor/Zend/Validate/File/ExcludeMimeType.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_MimeType */ +require_once 'Zend/Validate/File/MimeType.php'; /** * Validator for the mime type of a file * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_ExcludeMimeType extends Zend_Validate_File_MimeType @@ -67,6 +68,7 @@ class Zend_Validate_File_ExcludeMimeType extends Zend_Validate_File_MimeType } // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_READABLE); } diff --git a/library/vendor/Zend/Validate/File/Exists.php b/library/vendor/Zend/Validate/File/Exists.php index 153cead5d..8da1ccdd7 100644 --- a/library/vendor/Zend/Validate/File/Exists.php +++ b/library/vendor/Zend/Validate/File/Exists.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validator which checks if the file already exists in the directory * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Exists extends Zend_Validate_Abstract @@ -62,7 +63,7 @@ class Zend_Validate_File_Exists extends Zend_Validate_Abstract * Sets validator options * * @param string|array|Zend_Config $directory - * @return void + * @throws Zend_Validate_Exception */ public function __construct($directory = array()) { @@ -71,6 +72,7 @@ class Zend_Validate_File_Exists extends Zend_Validate_Abstract } else if (is_string($directory)) { $directory = explode(',', $directory); } else if (!is_array($directory)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } @@ -111,6 +113,7 @@ class Zend_Validate_File_Exists extends Zend_Validate_Abstract * Adds the file directory which will be checked * * @param string|array $directory The directory to add for validation + * @throws Zend_Validate_Exception * @return Zend_Validate_File_Extension Provides a fluent interface */ public function addDirectory($directory) @@ -120,6 +123,7 @@ class Zend_Validate_File_Exists extends Zend_Validate_Abstract if (is_string($directory)) { $directory = explode(',', $directory); } else if (!is_array($directory)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } diff --git a/library/vendor/Zend/Validate/File/Extension.php b/library/vendor/Zend/Validate/File/Extension.php index 7a6041f7a..92f9f06a8 100644 --- a/library/vendor/Zend/Validate/File/Extension.php +++ b/library/vendor/Zend/Validate/File/Extension.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validator for the file extension of a file * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Extension extends Zend_Validate_Abstract @@ -70,8 +71,7 @@ class Zend_Validate_File_Extension extends Zend_Validate_Abstract /** * Sets validator options * - * @param string|array|Zend_Config $options - * @return void + * @param string|array|Zend_Config $options */ public function __construct($options) { @@ -186,6 +186,7 @@ class Zend_Validate_File_Extension extends Zend_Validate_Abstract public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_FOUND); } diff --git a/library/vendor/Zend/Validate/File/FilesSize.php b/library/vendor/Zend/Validate/File/FilesSize.php index fcdbdf96f..b64813341 100644 --- a/library/vendor/Zend/Validate/File/FilesSize.php +++ b/library/vendor/Zend/Validate/File/FilesSize.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_Size */ +require_once 'Zend/Validate/File/Size.php'; /** * Validator for the size of all files which will be validated in sum * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_FilesSize extends Zend_Validate_File_Size @@ -63,7 +64,7 @@ class Zend_Validate_File_FilesSize extends Zend_Validate_File_Size * It also accepts an array with the keys 'min' and 'max' * * @param integer|array|Zend_Config $options Options for this validator - * @return void + * @throws Zend_Validate_Exception */ public function __construct($options) { @@ -75,6 +76,7 @@ class Zend_Validate_File_FilesSize extends Zend_Validate_File_Size } elseif (is_scalar($options)) { $options = array('max' => $options); } elseif (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid options to validator provided'); } @@ -102,6 +104,7 @@ class Zend_Validate_File_FilesSize extends Zend_Validate_File_Size */ public function isValid($value, $file = null) { + require_once 'Zend/Loader.php'; if (is_string($value)) { $value = array($value); } diff --git a/library/vendor/Zend/Validate/File/Hash.php b/library/vendor/Zend/Validate/File/Hash.php index 2a669fd83..54b036756 100644 --- a/library/vendor/Zend/Validate/File/Hash.php +++ b/library/vendor/Zend/Validate/File/Hash.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validator for the hash of given files * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Hash extends Zend_Validate_Abstract @@ -60,7 +61,7 @@ class Zend_Validate_File_Hash extends Zend_Validate_Abstract * Sets validator options * * @param string|array $options - * @return void + * @throws Zend_Validate_Exception */ public function __construct($options) { @@ -69,6 +70,7 @@ class Zend_Validate_File_Hash extends Zend_Validate_Abstract } elseif (is_scalar($options)) { $options = array('hash1' => $options); } elseif (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid options to validator provided'); } @@ -107,6 +109,7 @@ class Zend_Validate_File_Hash extends Zend_Validate_Abstract * Adds the hash for one or multiple files * * @param string|array $options + * @throws Zend_Validate_Exception * @return Zend_Validate_File_Hash Provides a fluent interface */ public function addHash($options) @@ -114,6 +117,7 @@ class Zend_Validate_File_Hash extends Zend_Validate_Abstract if (is_string($options)) { $options = array($options); } else if (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("False parameter given"); } @@ -126,6 +130,7 @@ class Zend_Validate_File_Hash extends Zend_Validate_Abstract } if (!in_array($algorithm, $known)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Unknown algorithm '{$algorithm}'"); } @@ -148,6 +153,7 @@ class Zend_Validate_File_Hash extends Zend_Validate_Abstract public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_FOUND); } diff --git a/library/vendor/Zend/Validate/File/ImageSize.php b/library/vendor/Zend/Validate/File/ImageSize.php index 65e057d04..871fef84f 100644 --- a/library/vendor/Zend/Validate/File/ImageSize.php +++ b/library/vendor/Zend/Validate/File/ImageSize.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validator for the image size of a image file * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract @@ -119,7 +120,7 @@ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract * - maxwidth * * @param Zend_Config|array $options - * @return void + * @throws Zend_Validate_Exception */ public function __construct($options) { @@ -139,6 +140,7 @@ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract } } } else if (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } @@ -203,6 +205,7 @@ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract { if (isset($options['minwidth'])) { if (($this->_maxwidth !== null) and ($options['minwidth'] > $this->_maxwidth)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The minimum image width must be less than or equal to the " . " maximum image width, but {$options['minwidth']} > {$this->_maxwidth}"); } @@ -210,6 +213,7 @@ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract if (isset($options['maxheight'])) { if (($this->_maxheight !== null) and ($options['minheight'] > $this->_maxheight)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The minimum image height must be less than or equal to the " . " maximum image height, but {$options['minheight']} > {$this->_maxheight}"); } @@ -238,6 +242,7 @@ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract { if (isset($options['maxwidth'])) { if (($this->_minwidth !== null) and ($options['maxwidth'] < $this->_minwidth)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The maximum image width must be greater than or equal to the " . "minimum image width, but {$options['maxwidth']} < {$this->_minwidth}"); } @@ -245,6 +250,7 @@ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract if (isset($options['maxheight'])) { if (($this->_minheight !== null) and ($options['maxheight'] < $this->_minheight)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The maximum image height must be greater than or equal to the " . "minimum image height, but {$options['maxheight']} < {$this->_minwidth}"); } @@ -302,6 +308,7 @@ class Zend_Validate_File_ImageSize extends Zend_Validate_Abstract public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_READABLE); } diff --git a/library/vendor/Zend/Validate/File/IsCompressed.php b/library/vendor/Zend/Validate/File/IsCompressed.php index 2478b4f0b..ce59423bd 100644 --- a/library/vendor/Zend/Validate/File/IsCompressed.php +++ b/library/vendor/Zend/Validate/File/IsCompressed.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_MimeType */ +require_once 'Zend/Validate/File/MimeType.php'; /** * Validator which checks if the file already exists in the directory * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_IsCompressed extends Zend_Validate_File_MimeType @@ -52,8 +53,7 @@ class Zend_Validate_File_IsCompressed extends Zend_Validate_File_MimeType /** * Sets validator options * - * @param string|array|Zend_Config $compression - * @return void + * @param string|array|Zend_Config $mimetype */ public function __construct($mimetype = array()) { diff --git a/library/vendor/Zend/Validate/File/IsImage.php b/library/vendor/Zend/Validate/File/IsImage.php index 4fe2dce48..09a6e42ab 100644 --- a/library/vendor/Zend/Validate/File/IsImage.php +++ b/library/vendor/Zend/Validate/File/IsImage.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_MimeType */ +require_once 'Zend/Validate/File/MimeType.php'; /** * Validator which checks if the file already exists in the directory * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_IsImage extends Zend_Validate_File_MimeType @@ -52,8 +53,7 @@ class Zend_Validate_File_IsImage extends Zend_Validate_File_MimeType /** * Sets validator options * - * @param string|array|Zend_Config $mimetype - * @return void + * @param string|array|Zend_Config $mimetype */ public function __construct($mimetype = array()) { diff --git a/library/vendor/Zend/Validate/File/Md5.php b/library/vendor/Zend/Validate/File/Md5.php index 2e3d6e2b3..bfe0b6046 100644 --- a/library/vendor/Zend/Validate/File/Md5.php +++ b/library/vendor/Zend/Validate/File/Md5.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_Hash */ +require_once 'Zend/Validate/File/Hash.php'; /** * Validator for the md5 hash of given files * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Md5 extends Zend_Validate_File_Hash @@ -62,7 +63,8 @@ class Zend_Validate_File_Md5 extends Zend_Validate_File_Hash * $hash is the hash we accept for the file $file * * @param string|array $options - * @return void + * @throws Zend_Validate_Exception + * @return Zend_Validate_File_Md5 */ public function __construct($options) { @@ -71,6 +73,7 @@ class Zend_Validate_File_Md5 extends Zend_Validate_File_Hash } elseif (is_scalar($options)) { $options = array('hash1' => $options); } elseif (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid options to validator provided'); } @@ -91,7 +94,6 @@ class Zend_Validate_File_Md5 extends Zend_Validate_File_Hash * Sets the md5 hash for one or multiple files * * @param string|array $options - * @param string $algorithm (Deprecated) Algorithm to use, fixed to md5 * @return Zend_Validate_File_Hash Provides a fluent interface */ public function setHash($options) @@ -121,7 +123,6 @@ class Zend_Validate_File_Md5 extends Zend_Validate_File_Hash * Adds the md5 hash for one or multiple files * * @param string|array $options - * @param string $algorithm (Deprecated) Algorithm to use, fixed to md5 * @return Zend_Validate_File_Hash Provides a fluent interface */ public function addHash($options) @@ -159,6 +160,7 @@ class Zend_Validate_File_Md5 extends Zend_Validate_File_Hash public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_FOUND); } diff --git a/library/vendor/Zend/Validate/File/MimeType.php b/library/vendor/Zend/Validate/File/MimeType.php index 57d86703c..874148836 100644 --- a/library/vendor/Zend/Validate/File/MimeType.php +++ b/library/vendor/Zend/Validate/File/MimeType.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validator for the mime type of a file * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract @@ -126,7 +127,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract * Mimetype to accept * * @param string|array $mimetype MimeType - * @return void + * @throws Zend_Validate_Exception */ public function __construct($mimetype) { @@ -135,6 +136,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract } elseif (is_string($mimetype)) { $mimetype = explode(',', $mimetype); } elseif (!is_array($mimetype)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Invalid options to validator provided"); } @@ -170,6 +172,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract !(@ini_get("safe_mode") == 'On' || @ini_get("safe_mode") === 1) && $this->shouldTryCommonMagicFiles() // @see ZF-11784 ) { + require_once 'Zend/Validate/Exception.php'; foreach ($this->_magicFiles as $file) { // supressing errors which are thrown due to openbase_dir restrictions try { @@ -198,7 +201,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract * * @param string $file * @throws Zend_Validate_Exception When finfo can not read the magicfile - * @return Zend_Validate_File_MimeType Provides fluid interface + * @return Zend_Validate_File_MimeType Provides a fluent interface */ public function setMagicFile($file) { @@ -206,8 +209,10 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract $this->_magicfile = null; } else if (!(class_exists('finfo', false))) { $this->_magicfile = null; + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Magicfile can not be set. There is no finfo extension installed'); } else if (!is_file($file) || !is_readable($file)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('The given magicfile can not be read'); } else { $const = defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; @@ -216,6 +221,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract restore_error_handler(); if (empty($this->_finfo)) { $this->_finfo = null; + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception( sprintf('The given magicfile ("%s") is not accepted by finfo', $file), null, @@ -269,8 +275,8 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract * Defines if the http header should be used * Note that this is unsave and therefor the default value is false * - * @param boolean $checkHeader - * @return Zend_Validate_File_MimeType Provides fluid interface + * @param boolean $headerCheck + * @return Zend_Validate_File_MimeType Provides a fluent interface */ public function enableHeaderCheck($headerCheck = true) { @@ -312,6 +318,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract * Adds the mimetypes * * @param string|array $mimetype The mimetypes to add for validation + * @throws Zend_Validate_Exception * @return Zend_Validate_File_Extension Provides a fluent interface */ public function addMimeType($mimetype) @@ -321,6 +328,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract if (is_string($mimetype)) { $mimetype = explode(',', $mimetype); } elseif (!is_array($mimetype)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Invalid options to validator provided"); } @@ -369,6 +377,7 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract } // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_READABLE); } @@ -455,12 +464,10 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract /** * Saves the provided error information by finfo_open to this instance * - * @param integer $errno - * @param string $errstr - * @param string $errfile - * @param integer $errline - * @param array $errcontext - * @return void + * @param integer $errno + * @param string $errstr + * @param string $errfile + * @param integer $errline */ protected function _errorHandler($errno, $errstr, $errfile, $errline) { diff --git a/library/vendor/Zend/Validate/File/NotExists.php b/library/vendor/Zend/Validate/File/NotExists.php index 033756140..bf58dce22 100644 --- a/library/vendor/Zend/Validate/File/NotExists.php +++ b/library/vendor/Zend/Validate/File/NotExists.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_Exists */ +require_once 'Zend/Validate/File/Exists.php'; /** * Validator which checks if the destination file does not exist * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_NotExists extends Zend_Validate_File_Exists diff --git a/library/vendor/Zend/Validate/File/Sha1.php b/library/vendor/Zend/Validate/File/Sha1.php index 6d78cac2e..e4076139b 100644 --- a/library/vendor/Zend/Validate/File/Sha1.php +++ b/library/vendor/Zend/Validate/File/Sha1.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_Hash */ +require_once 'Zend/Validate/File/Hash.php'; /** * Validator for the sha1 hash of given files * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Sha1 extends Zend_Validate_File_Hash @@ -62,7 +63,8 @@ class Zend_Validate_File_Sha1 extends Zend_Validate_File_Hash * $hash is the hash we accept for the file $file * * @param string|array $options - * @return void + * @throws Zend_Validate_Exception + * @return Zend_Validate_File_Sha1 */ public function __construct($options) { @@ -71,6 +73,7 @@ class Zend_Validate_File_Sha1 extends Zend_Validate_File_Hash } elseif (is_scalar($options)) { $options = array('hash1' => $options); } elseif (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid options to validator provided'); } @@ -157,6 +160,7 @@ class Zend_Validate_File_Sha1 extends Zend_Validate_File_Hash public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_FOUND); } diff --git a/library/vendor/Zend/Validate/File/Size.php b/library/vendor/Zend/Validate/File/Size.php index af3a0128b..bc9dea0d2 100644 --- a/library/vendor/Zend/Validate/File/Size.php +++ b/library/vendor/Zend/Validate/File/Size.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validator for the maximum size of a file up to a max of 2GB * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Size extends Zend_Validate_Abstract @@ -98,6 +99,7 @@ class Zend_Validate_File_Size extends Zend_Validate_Abstract * 'bytestring': Use bytestring or real size for messages * * @param integer|array $options Options for the adapter + * @throws Zend_Validate_Exception */ public function __construct($options) { @@ -106,6 +108,7 @@ class Zend_Validate_File_Size extends Zend_Validate_Abstract } elseif (is_string($options) || is_numeric($options)) { $options = array('max' => $options); } elseif (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } @@ -179,12 +182,14 @@ class Zend_Validate_File_Size extends Zend_Validate_Abstract public function setMin($min) { if (!is_string($min) and !is_numeric($min)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } $min = (integer) $this->_fromByteString($min); $max = $this->getMax(true); if (($max !== null) && ($min > $max)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The minimum must be less than or equal to the maximum filesize, but $min >" . " $max"); } @@ -219,12 +224,14 @@ class Zend_Validate_File_Size extends Zend_Validate_Abstract public function setMax($max) { if (!is_string($max) && !is_numeric($max)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ('Invalid options to validator provided'); } $max = (integer) $this->_fromByteString($max); $min = $this->getMin(true); if (($min !== null) && ($max < $min)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The maximum must be greater than or equal to the minimum filesize, but " . "$max < $min"); } @@ -268,6 +275,7 @@ class Zend_Validate_File_Size extends Zend_Validate_Abstract public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_FOUND); } diff --git a/library/vendor/Zend/Validate/File/Upload.php b/library/vendor/Zend/Validate/File/Upload.php index 842f1dc1e..5eae76984 100644 --- a/library/vendor/Zend/Validate/File/Upload.php +++ b/library/vendor/Zend/Validate/File/Upload.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validator for the maximum size of a file up to a max of 2GB * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_Upload extends Zend_Validate_Abstract @@ -77,8 +78,7 @@ class Zend_Validate_File_Upload extends Zend_Validate_Abstract * If no files are given the $_FILES array will be used automatically. * NOTE: This validator will only work with HTTP POST uploads! * - * @param array|Zend_Config $files Array of files in syntax of Zend_File_Transfer - * @return void + * @param array|Zend_Config $files Array of files in syntax of Zend_File_Transfer */ public function __construct($files = array()) { @@ -92,7 +92,7 @@ class Zend_Validate_File_Upload extends Zend_Validate_Abstract /** * Returns the array of set files * - * @param string $files (Optional) The file to return in detail + * @param string $file (Optional) The file to return in detail * @return array * @throws Zend_Validate_Exception If file is not found */ @@ -111,6 +111,7 @@ class Zend_Validate_File_Upload extends Zend_Validate_Abstract } if (count($return) === 0) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The file '$file' was not found"); } @@ -155,6 +156,7 @@ class Zend_Validate_File_Upload extends Zend_Validate_Abstract * * @param string $value Single file to check for upload errors, when giving null the $_FILES array * from initialization will be used + * @param string|null $file * @return boolean */ public function isValid($value, $file = null) diff --git a/library/vendor/Zend/Validate/File/WordCount.php b/library/vendor/Zend/Validate/File/WordCount.php index ad2abbcec..42c79a5bd 100644 --- a/library/vendor/Zend/Validate/File/WordCount.php +++ b/library/vendor/Zend/Validate/File/WordCount.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_File_Count */ +require_once 'Zend/Validate/File/Count.php'; /** * Validator for counting all words in a file * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_File_WordCount extends Zend_Validate_File_Count @@ -63,6 +64,7 @@ class Zend_Validate_File_WordCount extends Zend_Validate_File_Count public function isValid($value, $file = null) { // Is file readable ? + require_once 'Zend/Loader.php'; if (!Zend_Loader::isReadable($value)) { return $this->_throw($file, self::NOT_FOUND); } diff --git a/library/vendor/Zend/Validate/Float.php b/library/vendor/Zend/Validate/Float.php index f34efa1a3..f0879a541 100644 --- a/library/vendor/Zend/Validate/Float.php +++ b/library/vendor/Zend/Validate/Float.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,15 +22,17 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @see Zend_Locale_Format */ +require_once 'Zend/Locale/Format.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Float extends Zend_Validate_Abstract @@ -68,6 +70,7 @@ class Zend_Validate_Float extends Zend_Validate_Abstract } if (empty($locale)) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Locale')) { $locale = Zend_Registry::get('Zend_Locale'); } @@ -88,9 +91,11 @@ class Zend_Validate_Float extends Zend_Validate_Abstract * Sets the locale to use * * @param string|Zend_Locale $locale + * @return $this */ public function setLocale($locale = null) { + require_once 'Zend/Locale.php'; $this->_locale = Zend_Locale::findLocale($locale); return $this; } diff --git a/library/vendor/Zend/Validate/GreaterThan.php b/library/vendor/Zend/Validate/GreaterThan.php index 91b8d6d8b..5dd0579cd 100644 --- a/library/vendor/Zend/Validate/GreaterThan.php +++ b/library/vendor/Zend/Validate/GreaterThan.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_GreaterThan extends Zend_Validate_Abstract @@ -59,7 +60,7 @@ class Zend_Validate_GreaterThan extends Zend_Validate_Abstract * Sets validator options * * @param mixed|Zend_Config $min - * @return void + * @throws Zend_Validate_Exception */ public function __construct($min) { @@ -71,6 +72,7 @@ class Zend_Validate_GreaterThan extends Zend_Validate_Abstract if (array_key_exists('min', $min)) { $min = $min['min']; } else { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Missing option 'min'"); } } diff --git a/library/vendor/Zend/Validate/Hex.php b/library/vendor/Zend/Validate/Hex.php index f58997fad..c6f780974 100644 --- a/library/vendor/Zend/Validate/Hex.php +++ b/library/vendor/Zend/Validate/Hex.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Hex extends Zend_Validate_Abstract diff --git a/library/vendor/Zend/Validate/Hostname.php b/library/vendor/Zend/Validate/Hostname.php index 7c4eb5656..6554d2f29 100644 --- a/library/vendor/Zend/Validate/Hostname.php +++ b/library/vendor/Zend/Validate/Hostname.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,10 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @see Zend_Validate_Ip */ +require_once 'Zend/Validate/Ip.php'; /** * Please note there are two standalone test scripts for testing IDN characters due to problems @@ -39,7 +41,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Hostname extends Zend_Validate_Abstract @@ -108,13 +110,14 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract /** * Array of valid top-level-domains * - * Version 2014071001, Last Updated Fri Jul 11 07:07:01 2014 UTC + * Version 2014112800, Last Updated Fri Nov 28 07:07:01 2014 UTC * * @see http://data.iana.org/TLD/tlds-alpha-by-domain.txt List of all TLDs by domain * @see http://www.iana.org/domains/root/db/ Official list of supported TLDs * @var array */ protected $_validTlds = array( + 'abogado', 'ac', 'academy', 'accountants', @@ -129,8 +132,11 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'ai', 'airforce', 'al', + 'allfinanz', + 'alsace', 'am', 'an', + 'android', 'ao', 'aq', 'ar', @@ -143,6 +149,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'at', 'attorney', 'au', + 'auction', 'audio', 'autos', 'aw', @@ -150,6 +157,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'axa', 'az', 'ba', + 'band', 'bar', 'bargains', 'bayern', @@ -170,18 +178,23 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'bj', 'black', 'blackfriday', + 'bloomberg', 'blue', 'bm', 'bmw', 'bn', + 'bnpparibas', 'bo', + 'boo', 'boutique', 'br', 'brussels', 'bs', 'bt', + 'budapest', 'build', 'builders', + 'business', 'buzz', 'bv', 'bw', @@ -190,15 +203,18 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'bzh', 'ca', 'cab', + 'cal', 'camera', 'camp', 'cancerresearch', 'capetown', 'capital', + 'caravan', 'cards', 'care', 'career', 'careers', + 'casa', 'cash', 'cat', 'catering', @@ -206,11 +222,14 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'cd', 'center', 'ceo', + 'cern', 'cf', 'cg', 'ch', + 'channel', 'cheap', 'christmas', + 'chrome', 'church', 'ci', 'citic', @@ -219,12 +238,14 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'cl', 'claims', 'cleaning', + 'click', 'clinic', 'clothing', 'club', 'cm', 'cn', 'co', + 'coach', 'codes', 'coffee', 'college', @@ -244,6 +265,8 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'cr', 'credit', 'creditcard', + 'cricket', + 'crs', 'cruises', 'cu', 'cuisinella', @@ -251,17 +274,22 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'cw', 'cx', 'cy', + 'cymru', 'cz', + 'dad', 'dance', 'dating', + 'day', 'de', 'deals', 'degree', + 'delivery', 'democrat', 'dental', 'dentist', 'desi', 'diamonds', + 'diet', 'digital', 'direct', 'directory', @@ -273,24 +301,30 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'do', 'domains', 'durban', + 'dvag', 'dz', + 'eat', 'ec', 'edu', 'education', 'ee', 'eg', 'email', + 'emerck', + 'energy', 'engineer', 'engineering', 'enterprises', 'equipment', 'er', 'es', + 'esq', 'estate', 'et', 'eu', 'eus', 'events', + 'everbank', 'exchange', 'expert', 'exposed', @@ -300,6 +334,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'fi', 'finance', 'financial', + 'firmdale', 'fish', 'fishing', 'fitness', @@ -307,11 +342,15 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'fk', 'flights', 'florist', + 'flsmidth', + 'fly', 'fm', 'fo', 'foo', + 'forsale', 'foundation', 'fr', + 'frl', 'frogans', 'fund', 'furniture', @@ -320,21 +359,28 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'gal', 'gallery', 'gb', + 'gbiz', 'gd', 'ge', + 'gent', 'gf', 'gg', 'gh', 'gi', 'gift', + 'gifts', 'gives', 'gl', 'glass', + 'gle', 'global', 'globo', 'gm', + 'gmail', 'gmo', + 'gmx', 'gn', + 'google', 'gop', 'gov', 'gp', @@ -354,6 +400,9 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'gy', 'hamburg', 'haus', + 'healthcare', + 'help', + 'here', 'hiphop', 'hiv', 'hk', @@ -364,18 +413,23 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'homes', 'horse', 'host', + 'hosting', 'house', + 'how', 'hr', 'ht', 'hu', + 'ibm', 'id', 'ie', 'il', 'im', + 'immo', 'immobilien', 'in', 'industries', 'info', + 'ing', 'ink', 'institute', 'insure', @@ -408,16 +462,21 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'koeln', 'kp', 'kr', + 'krd', 'kred', 'kw', 'ky', 'kz', 'la', + 'lacaixa', 'land', 'lawyer', 'lb', 'lc', + 'lds', 'lease', + 'legal', + 'lgbt', 'li', 'life', 'lighting', @@ -431,12 +490,14 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'lr', 'ls', 'lt', + 'ltda', 'lu', 'luxe', 'luxury', 'lv', 'ly', 'ma', + 'madrid', 'maison', 'management', 'mango', @@ -448,6 +509,8 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'media', 'meet', 'melbourne', + 'meme', + 'memorial', 'menu', 'mg', 'mh', @@ -463,9 +526,12 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'moda', 'moe', 'monash', + 'money', + 'mormon', 'mortgage', 'moscow', 'motorcycles', + 'mov', 'mp', 'mq', 'mr', @@ -485,9 +551,13 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'nc', 'ne', 'net', + 'network', 'neustar', + 'new', + 'nexus', 'nf', 'ng', + 'ngo', 'nhk', 'ni', 'ninja', @@ -495,23 +565,30 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'no', 'np', 'nr', + 'nra', + 'nrw', 'nu', 'nyc', 'nz', 'okinawa', 'om', + 'ong', 'onl', + 'ooo', 'org', 'organic', + 'otsuka', 'ovh', 'pa', 'paris', 'partners', 'parts', + 'party', 'pe', 'pf', 'pg', 'ph', + 'pharmacy', 'photo', 'photography', 'photos', @@ -519,18 +596,25 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'pics', 'pictures', 'pink', + 'pizza', 'pk', 'pl', 'place', 'plumbing', 'pm', 'pn', + 'pohl', + 'poker', 'post', 'pr', + 'praxi', 'press', 'pro', + 'prod', 'productions', + 'prof', 'properties', + 'property', 'ps', 'pt', 'pub', @@ -540,34 +624,43 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'qpon', 'quebec', 're', + 'realtor', 'recipes', 'red', 'rehab', 'reise', 'reisen', + 'reit', 'ren', 'rentals', 'repair', 'report', 'republican', 'rest', + 'restaurant', 'reviews', 'rich', 'rio', + 'rip', 'ro', 'rocks', 'rodeo', 'rs', + 'rsvp', 'ru', 'ruhr', 'rw', 'ryukyu', 'sa', 'saarland', + 'sarl', 'sb', 'sc', + 'sca', + 'scb', 'schmidt', 'schule', + 'science', 'scot', 'sd', 'se', @@ -592,6 +685,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'solutions', 'soy', 'space', + 'spiegel', 'sr', 'st', 'su', @@ -604,8 +698,11 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'sv', 'sx', 'sy', + 'sydney', 'systems', 'sz', + 'taipei', + 'tatar', 'tattoo', 'tax', 'tc', @@ -627,6 +724,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'today', 'tokyo', 'tools', + 'top', 'town', 'toys', 'tp', @@ -635,6 +733,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'training', 'travel', 'tt', + 'tui', 'tv', 'tw', 'tz', @@ -643,6 +742,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'uk', 'university', 'uno', + 'uol', 'us', 'uy', 'uz', @@ -667,22 +767,31 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'voto', 'voyage', 'vu', + 'wales', 'wang', 'watch', 'webcam', 'website', 'wed', + 'wedding', 'wf', + 'whoswho', 'wien', 'wiki', + 'williamhill', + 'wme', + 'work', 'works', + 'world', 'ws', 'wtc', 'wtf', + 'xn--1qqw23a', 'xn--3bst00m', 'xn--3ds443g', 'xn--3e0b707e', 'xn--45brj9c', + 'xn--45q11c', 'xn--4gbrim', 'xn--55qw42g', 'xn--55qx5d', @@ -699,10 +808,12 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'xn--czr694b', 'xn--czru2d', 'xn--d1acj3b', + 'xn--d1alf', 'xn--fiq228c5hs', 'xn--fiq64b', 'xn--fiqs8s', 'xn--fiqz9s', + 'xn--flw351e', 'xn--fpcrj9c3d', 'xn--fzc2c9e2c', 'xn--gecrj9c', @@ -726,19 +837,26 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'xn--mgberp4a5d4ar', 'xn--mgbx4cd0ab', 'xn--ngbc5azd', + 'xn--node', 'xn--nqv7f', 'xn--nqv7fs00ema', 'xn--o3cw4h', 'xn--ogbpf8fl', + 'xn--p1acf', 'xn--p1ai', 'xn--pgbs0dh', 'xn--q9jyb4c', + 'xn--qcka1pmc', 'xn--rhqv96g', 'xn--s9brj9c', 'xn--ses554g', 'xn--unup4y', + 'xn--vermgensberater-ctb', + 'xn--vermgensberatung-pwb', + 'xn--vhquv', 'xn--wgbh1c', 'xn--wgbl6a', + 'xn--xhq521b', 'xn--xkc2al3hye2a', 'xn--xkc2dl3a5ee0h', 'xn--yfro4i67o', @@ -747,13 +865,110 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'xxx', 'xyz', 'yachts', + 'yandex', 'ye', + 'yoga', 'yokohama', + 'youtube', 'yt', 'za', + 'zip', 'zm', 'zone', 'zw', + '测试', + 'परीक्षा', + '佛山', + '集团', + '在线', + '한국', + 'ভারত', + '八卦', + 'موقع', + 'বাংলা', + '公益', + '公司', + '移动', + '我爱你', + 'москва', + 'испытание', + 'қаз', + 'онлайн', + 'сайт', + 'срб', + 'бел', + '테스트', + 'орг', + '삼성', + 'சிங்கப்பூர்', + '商标', + '商城', + 'дети', + 'мкд', + 'טעסט', + '中文网', + '中信', + '中国', + '中國', + '谷歌', + 'భారత్', + 'ලංකා', + '測試', + 'ભારત', + 'भारत', + 'آزمایشی', + 'பரிட்சை', + 'संगठन', + '网络', + 'укр', + '香港', + 'δοκιμή', + 'إختبار', + '台湾', + '台灣', + '手机', + 'мон', + 'الجزائر', + 'عمان', + 'ایران', + 'امارات', + 'بازار', + 'پاکستان', + 'الاردن', + 'بھارت', + 'المغرب', + 'السعودية', + 'سودان', + 'عراق', + 'مليسيا', + 'شبكة', + 'გე', + '机构', + '组织机构', + 'ไทย', + 'سورية', + 'рус', + 'рф', + 'تونس', + 'みんな', + 'グーグル', + '世界', + 'ਭਾਰਤ', + '网址', + '游戏', + 'vermögensberater', + 'vermögensberatung', + '企业', + 'مصر', + 'قطر', + '广东', + 'இலங்கை', + 'இந்தியா', + 'հայ', + '新加坡', + 'فلسطين', + 'テスト', + '政务', ); /** @@ -827,7 +1042,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'CH' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿœ]{1,63}$/iu'), 'CL' => array(1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu'), 'CN' => 'Hostname/Cn.php', - 'COM' => 'Zend/Validate/Hostname/Com.php', + 'COM' => 'Hostname/Com.php', 'DE' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'DK' => array(1 => '/^[\x{002d}0-9a-zäéöüæøå]{1,63}$/iu'), 'ES' => array(1 => '/^[\x{002d}0-9a-zàáçèéíïñòóúü·]{1,63}$/iu'), @@ -836,11 +1051,13 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 3 => '/^[\x{002d}0-9a-zșț]{1,63}$/iu', 4 => '/^[\x{002d}0-9a-zΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ]{1,63}$/iu', 5 => '/^[\x{002d}0-9a-zабвгдежзийклмнопрстуфхцчшщъыьэюя]{1,63}$/iu', - 6 => '/^[\x{002d}0-9a-zἀ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷῂῃῄῆῇῐ-ΐῖῗῠ-ῧῲῳῴῶῷ]{1,63}$/iu'), + 6 => '/^[\x{002d}0-9a-zἀ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ὼώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷῂῃῄῆῇῐ-ῒΐῖῗῠ-ῧῲῳῴῶῷ]{1,63}$/iu'), 'FI' => array(1 => '/^[\x{002d}0-9a-zäåö]{1,63}$/iu'), 'GR' => array(1 => '/^[\x{002d}0-9a-zΆΈΉΊΌΎ-ΡΣ-ώἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼῂῃῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲῳῴῶ-ῼ]{1,63}$/iu'), - 'HK' => 'Zend/Validate/Hostname/Cn.php', + 'HK' => 'Hostname/Cn.php', 'HU' => array(1 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu'), + 'IL' => array(1 => '/^[\x{002d}0-9\x{05D0}-\x{05EA}]{1,63}$/iu', + 2 => '/^[\x{002d}0-9a-z]{1,63}$/i'), 'INFO'=> array(1 => '/^[\x{002d}0-9a-zäåæéöøü]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-záæéíðóöúýþ]{1,63}$/iu', @@ -851,15 +1068,16 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 8 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu'), 'IO' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'IS' => array(1 => '/^[\x{002d}0-9a-záéýúíóþæöð]{1,63}$/iu'), - 'JP' => 'Zend/Validate/Hostname/Jp.php', + 'IT' => array(1 => '/^[\x{002d}0-9a-zàâäèéêëìîïòôöùûüæœçÿß-]{1,63}$/iu'), + 'JP' => 'Hostname/Jp.php', 'KR' => array(1 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu'), 'LI' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿœ]{1,63}$/iu'), 'LT' => array(1 => '/^[\x{002d}0-9ąčęėįšųūž]{1,63}$/iu'), 'MD' => array(1 => '/^[\x{002d}0-9ăâîşţ]{1,63}$/iu'), 'MUSEUM' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćċčďđēėęěğġģħīįıķĺļľłńņňŋōőœŕŗřśşšţťŧūůűųŵŷźżžǎǐǒǔ\x{01E5}\x{01E7}\x{01E9}\x{01EF}ə\x{0292}ẁẃẅỳ]{1,63}$/iu'), - 'NET' => 'Zend/Validate/Hostname/Com.php', + 'NET' => 'Hostname/Com.php', 'NO' => array(1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'), - 'NU' => 'Zend/Validate/Hostname/Com.php', + 'NU' => 'Hostname/Com.php', 'ORG' => array(1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-záäåæéëíðóöøúüýþ]{1,63}$/iu', @@ -915,15 +1133,31 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract 'SJ' => array(1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'), 'TH' => array(1 => '/^[\x{002d}0-9a-z\x{0E01}-\x{0E3A}\x{0E40}-\x{0E4D}\x{0E50}-\x{0E59}]{1,63}$/iu'), 'TM' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēėęěĝġģĥħīįĵķĺļľŀłńņňŋőœŕŗřśŝşšţťŧūŭůűųŵŷźżž]{1,63}$/iu'), - 'TW' => 'Zend/Validate/Hostname/Cn.php', + 'TW' => 'Hostname/Cn.php', 'TR' => array(1 => '/^[\x{002d}0-9a-zğıüşöç]{1,63}$/iu'), 'UA' => array(1 => '/^[\x{002d}0-9a-zабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџґӂʼ]{1,63}$/iu'), 'VE' => array(1 => '/^[\x{002d}0-9a-záéíóúüñ]{1,63}$/iu'), 'VN' => array(1 => '/^[ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíòóôõùúýĂăĐđĨĩŨũƠơƯư\x{1EA0}-\x{1EF9}]{1,63}$/iu'), - 'ایران' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), - '中国' => 'Zend/Validate/Hostname/Cn.php', - '公司' => 'Zend/Validate/Hostname/Cn.php', - '网络' => 'Zend/Validate/Hostname/Cn.php' + 'мон' => array(1 => '/^[\x{002d}0-9\x{0430}-\x{044F}]{1,63}$/iu'), + 'срб' => array(1 => '/^[\x{002d}0-9а-ик-шђјљњћџ]{1,63}$/iu'), + 'сайт' => array(1 => '/^[\x{002d}0-9а-яёіїѝйўґг]{1,63}$/iu'), + 'онлайн' => array(1 => '/^[\x{002d}0-9а-яёіїѝйўґг]{1,63}$/iu'), + '中国' => 'Hostname/Cn.php', + '中國' => 'Hostname/Cn.php', + 'ලංකා' => array(1 => '/^[\x{0d80}-\x{0dff}]{1,63}$/iu'), + '香港' => 'Hostname/Cn.php', + '台湾' => 'Hostname/Cn.php', + '台灣' => 'Hostname/Cn.php', + 'امارات' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), + 'الاردن' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), + 'السعودية' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), + 'ไทย' => array(1 => '/^[\x{002d}0-9a-z\x{0E01}-\x{0E3A}\x{0E40}-\x{0E4D}\x{0E50}-\x{0E59}]{1,63}$/iu'), + 'рф' => array(1 => '/^[\x{002d}0-9а-яё]{1,63}$/iu'), + 'تونس' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), + 'مصر' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), + 'இலங்கை' => array(1 => '/^[\x{0b80}-\x{0bff}]{1,63}$/iu'), + 'فلسطين' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), + 'شبكة' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), ); protected $_idnLength = array( @@ -952,12 +1186,8 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract /** * Sets validator options * - * @param integer $allow OPTIONAL Set what types of hostname to allow (default ALLOW_DNS) - * @param boolean $validateIdn OPTIONAL Set whether IDN domains are validated (default true) - * @param boolean $validateTld OPTIONAL Set whether the TLD element of a hostname is validated (default true) - * @param Zend_Validate_Ip $ipValidator OPTIONAL - * @return void * @see http://www.iana.org/cctld/specifications-policies-cctlds-01apr02.htm Technical Specifications for ccTLDs + * @param array $options Validator options */ public function __construct($options = array()) { @@ -1034,7 +1264,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract /** * @param Zend_Validate_Ip $ipValidator OPTIONAL - * @return void; + * @return Zend_Validate_Hostname */ public function setIpValidator(Zend_Validate_Ip $ipValidator = null) { @@ -1084,6 +1314,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract * This only applies when DNS hostnames are validated * * @param boolean $allowed Set allowed to true to validate IDNs, and false to not validate them + * @return $this */ public function setValidateIdn ($allowed) { @@ -1107,6 +1338,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract * This only applies when DNS hostnames are validated * * @param boolean $allowed Set allowed to true to validate TLDs, and false to not validate them + * @return $this */ public function setValidateTld ($allowed) { @@ -1186,10 +1418,8 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract do { // First check TLD $matches = array(); - if (preg_match('/([^.]{2,63})$/i', end($domainParts), $matches) || - (end($domainParts) == 'ایران') || (end($domainParts) == '中国') || - (end($domainParts) == '公司') || (end($domainParts) == '网络')) { - + if (preg_match('/([^.]{2,63})$/iu', end($domainParts), $matches) + || (array_key_exists(end($domainParts), $this->_validIdns))) { reset($domainParts); // Hostname characters are: *(label dot)(label dot label); max 254 chars @@ -1198,13 +1428,17 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract // ldh: alpha / digit / dash // Match TLD against known list - $this->_tld = strtolower($matches[1]); + $this->_tld = $matches[1]; if ($this->_options['tld']) { - if (!in_array($this->_tld, $this->_validTlds)) { + if (!in_array(strtolower($this->_tld), $this->_validTlds) + && !in_array($this->_tld, $this->_validTlds)) { $this->_error(self::UNKNOWN_TLD); $status = false; break; } + // We have already validated that the TLD is fine. We don't want it to go through the below + // checks as new UTF-8 TLDs will incorrectly fail if there is no IDN regex for it. + array_pop($domainParts); } /** @@ -1250,7 +1484,7 @@ class Zend_Validate_Hostname extends Zend_Validate_Abstract // Check each domain part $checked = false; foreach($regexChars as $regexKey => $regexChar) { - $status = @preg_match($regexChar, $domainPart); + $status = preg_match($regexChar, $domainPart); if ($status > 0) { $length = 63; if (array_key_exists(strtoupper($this->_tld), $this->_idnLength) diff --git a/library/vendor/Zend/Validate/Hostname/Biz.php b/library/vendor/Zend/Validate/Hostname/Biz.php index d4a09f2d5..eb1bea22d 100644 --- a/library/vendor/Zend/Validate/Hostname/Biz.php +++ b/library/vendor/Zend/Validate/Hostname/Biz.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ return array( diff --git a/library/vendor/Zend/Validate/Hostname/Cn.php b/library/vendor/Zend/Validate/Hostname/Cn.php index 254f292dd..816e499a9 100644 --- a/library/vendor/Zend/Validate/Hostname/Cn.php +++ b/library/vendor/Zend/Validate/Hostname/Cn.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ return array( diff --git a/library/vendor/Zend/Validate/Hostname/Com.php b/library/vendor/Zend/Validate/Hostname/Com.php index 3111fe07a..873dd522b 100644 --- a/library/vendor/Zend/Validate/Hostname/Com.php +++ b/library/vendor/Zend/Validate/Hostname/Com.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ return array( @@ -184,8 +184,6 @@ return array( 68 => '/^[\x{A000}-\x{A48F}]{1,63}$/iu', 69 => '/^[\x{A490}-\x{A4CF}]{1,63}$/iu', 70 => '/^[\x{AC00}-\x{D7AF}]{1,63}$/iu', - 71 => '/^[\x{D800}-\x{DB7F}]{1,63}$/iu', - 72 => '/^[\x{DC00}-\x{DFFF}]{1,63}$/iu', 73 => '/^[\x{F900}-\x{FAFF}]{1,63}$/iu', 74 => '/^[\x{FB00}-\x{FB4F}]{1,63}$/iu', 75 => '/^[\x{FB50}-\x{FDFF}]{1,63}$/iu', diff --git a/library/vendor/Zend/Validate/Hostname/Jp.php b/library/vendor/Zend/Validate/Hostname/Jp.php index a66ca39c7..caca994b9 100644 --- a/library/vendor/Zend/Validate/Hostname/Jp.php +++ b/library/vendor/Zend/Validate/Hostname/Jp.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ return array( diff --git a/library/vendor/Zend/Validate/Iban.php b/library/vendor/Zend/Validate/Iban.php index 7ff58f275..e19c1a8d0 100644 --- a/library/vendor/Zend/Validate/Iban.php +++ b/library/vendor/Zend/Validate/Iban.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,13 +22,14 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validates IBAN Numbers (International Bank Account Numbers) * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Iban extends Zend_Validate_Abstract @@ -131,8 +132,7 @@ class Zend_Validate_Iban extends Zend_Validate_Abstract /** * Sets validator options * - * @param string|Zend_Config|Zend_Locale $locale OPTIONAL - * @return void + * @param string|Zend_Config|Zend_Locale $locale OPTIONAL */ public function __construct($locale = null) { @@ -149,6 +149,7 @@ class Zend_Validate_Iban extends Zend_Validate_Abstract } if (empty($locale)) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Locale')) { $locale = Zend_Registry::get('Zend_Locale'); } @@ -173,13 +174,17 @@ class Zend_Validate_Iban extends Zend_Validate_Abstract * Sets the locale option * * @param string|Zend_Locale $locale + * @throws Zend_Locale_Exception + * @throws Zend_Validate_Exception * @return Zend_Validate_Date provides a fluent interface */ public function setLocale($locale = null) { if ($locale !== false) { + require_once 'Zend/Locale.php'; $locale = Zend_Locale::findLocale($locale); if (strlen($locale) < 4) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Region must be given for IBAN validation'); } } diff --git a/library/vendor/Zend/Validate/Identical.php b/library/vendor/Zend/Validate/Identical.php index e3fbc9d64..97f3b8cce 100644 --- a/library/vendor/Zend/Validate/Identical.php +++ b/library/vendor/Zend/Validate/Identical.php @@ -14,17 +14,18 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Identical extends Zend_Validate_Abstract @@ -63,8 +64,7 @@ class Zend_Validate_Identical extends Zend_Validate_Abstract /** * Sets validator options * - * @param mixed $token - * @return void + * @param mixed $token */ public function __construct($token = null) { @@ -120,6 +120,7 @@ class Zend_Validate_Identical extends Zend_Validate_Abstract * Sets the strict parameter * * @param Zend_Validate_Identical + * @return $this */ public function setStrict($strict) { diff --git a/library/vendor/Zend/Validate/InArray.php b/library/vendor/Zend/Validate/InArray.php index 9a0e9f35d..3f3ec243a 100644 --- a/library/vendor/Zend/Validate/InArray.php +++ b/library/vendor/Zend/Validate/InArray.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_InArray extends Zend_Validate_Abstract @@ -64,14 +65,15 @@ class Zend_Validate_InArray extends Zend_Validate_Abstract /** * Sets validator options * - * @param array|Zend_Config $haystack - * @return void + * @param array|Zend_Config $options Validator options + * @throws Zend_Validate_Exception */ public function __construct($options) { if ($options instanceof Zend_Config) { $options = $options->toArray(); } else if (!is_array($options)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Array expected as parameter'); } else { $count = func_num_args(); diff --git a/library/vendor/Zend/Validate/Int.php b/library/vendor/Zend/Validate/Int.php index 0a186d78e..1bcf31dba 100644 --- a/library/vendor/Zend/Validate/Int.php +++ b/library/vendor/Zend/Validate/Int.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,15 +22,17 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @see Zend_Locale_Format */ +require_once 'Zend/Locale/Format.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Int extends Zend_Validate_Abstract @@ -68,6 +70,7 @@ class Zend_Validate_Int extends Zend_Validate_Abstract } if (empty($locale)) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Locale')) { $locale = Zend_Registry::get('Zend_Locale'); } @@ -90,9 +93,11 @@ class Zend_Validate_Int extends Zend_Validate_Abstract * Sets the locale to use * * @param string|Zend_Locale $locale + * @return $this */ public function setLocale($locale = null) { + require_once 'Zend/Locale.php'; $this->_locale = Zend_Locale::findLocale($locale); return $this; } diff --git a/library/vendor/Zend/Validate/Interface.php b/library/vendor/Zend/Validate/Interface.php index 7fb9d4d04..f1d0883c3 100644 --- a/library/vendor/Zend/Validate/Interface.php +++ b/library/vendor/Zend/Validate/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Validate_Interface diff --git a/library/vendor/Zend/Validate/Ip.php b/library/vendor/Zend/Validate/Ip.php index 6d3f8adf7..ede95e92c 100644 --- a/library/vendor/Zend/Validate/Ip.php +++ b/library/vendor/Zend/Validate/Ip.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Ip extends Zend_Validate_Abstract @@ -56,7 +57,6 @@ class Zend_Validate_Ip extends Zend_Validate_Abstract * Sets validator options * * @param array $options OPTIONAL Options to set, see the manual for all available options - * @return void */ public function __construct($options = array()) { @@ -90,6 +90,7 @@ class Zend_Validate_Ip extends Zend_Validate_Abstract * Sets the options for this validator * * @param array $options + * @throws Zend_Validate_Exception * @return Zend_Validate_Ip */ public function setOptions($options) @@ -103,6 +104,7 @@ class Zend_Validate_Ip extends Zend_Validate_Abstract } if (!$this->_options['allowipv4'] && !$this->_options['allowipv6']) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Nothing to validate. Check your options'); } @@ -139,6 +141,7 @@ class Zend_Validate_Ip extends Zend_Validate_Abstract * Validates an IPv4 address * * @param string $value + * @return bool */ protected function _validateIPv4($value) { $ip2long = ip2long($value); diff --git a/library/vendor/Zend/Validate/Isbn.php b/library/vendor/Zend/Validate/Isbn.php index a501e99e0..86c0c5c49 100644 --- a/library/vendor/Zend/Validate/Isbn.php +++ b/library/vendor/Zend/Validate/Isbn.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Isbn extends Zend_Validate_Abstract @@ -66,7 +67,6 @@ class Zend_Validate_Isbn extends Zend_Validate_Abstract * * @param Zend_Config|array $options * @throws Zend_Validate_Exception When $options is not valid - * @return void */ public function __construct($options = array()) { @@ -78,6 +78,7 @@ class Zend_Validate_Isbn extends Zend_Validate_Abstract /** * @see Zend_Validate_Exception */ + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid options provided.'); } @@ -225,6 +226,7 @@ class Zend_Validate_Isbn extends Zend_Validate_Abstract /** * @see Zend_Validate_Exception */ + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid ISBN separator.'); } @@ -256,6 +258,7 @@ class Zend_Validate_Isbn extends Zend_Validate_Abstract /** * @see Zend_Validate_Exception */ + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Invalid ISBN type'); } diff --git a/library/vendor/Zend/Validate/Ldap/Dn.php b/library/vendor/Zend/Validate/Ldap/Dn.php index a784487ed..3033cec1e 100644 --- a/library/vendor/Zend/Validate/Ldap/Dn.php +++ b/library/vendor/Zend/Validate/Ldap/Dn.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Abstract.php 24807 2012-05-15 12:10:42Z adamlundrigan $ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Interface */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Ldap_Dn extends Zend_Validate_Abstract diff --git a/library/vendor/Zend/Validate/LessThan.php b/library/vendor/Zend/Validate/LessThan.php index 11885e3c7..41c28115b 100644 --- a/library/vendor/Zend/Validate/LessThan.php +++ b/library/vendor/Zend/Validate/LessThan.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_LessThan extends Zend_Validate_Abstract @@ -58,7 +59,7 @@ class Zend_Validate_LessThan extends Zend_Validate_Abstract * Sets validator options * * @param mixed|Zend_Config $max - * @return void + * @throws Zend_Validate_Exception */ public function __construct($max) { @@ -70,6 +71,7 @@ class Zend_Validate_LessThan extends Zend_Validate_Abstract if (array_key_exists('max', $max)) { $max = $max['max']; } else { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Missing option 'max'"); } } diff --git a/library/vendor/Zend/Validate/NotEmpty.php b/library/vendor/Zend/Validate/NotEmpty.php index 93f36dbd9..1bb3ceb82 100644 --- a/library/vendor/Zend/Validate/NotEmpty.php +++ b/library/vendor/Zend/Validate/NotEmpty.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_NotEmpty extends Zend_Validate_Abstract @@ -138,6 +139,7 @@ class Zend_Validate_NotEmpty extends Zend_Validate_Abstract } if (!is_int($type) || ($type < 0) || ($type > self::ALL)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Unknown type'); } diff --git a/library/vendor/Zend/Validate/PostCode.php b/library/vendor/Zend/Validate/PostCode.php index ffcbf1bb5..7f00d04db 100644 --- a/library/vendor/Zend/Validate/PostCode.php +++ b/library/vendor/Zend/Validate/PostCode.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,15 +22,17 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @see Zend_Locale_Format */ +require_once 'Zend/Locale/Format.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_PostCode extends Zend_Validate_Abstract @@ -76,6 +78,7 @@ class Zend_Validate_PostCode extends Zend_Validate_Abstract } if (empty($options)) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Locale')) { $this->setLocale(Zend_Registry::get('Zend_Locale')); } @@ -95,6 +98,7 @@ class Zend_Validate_PostCode extends Zend_Validate_Abstract $format = $this->getFormat(); if (empty($format)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("A postcode-format string has to be given for validation"); } } @@ -115,14 +119,16 @@ class Zend_Validate_PostCode extends Zend_Validate_Abstract * @param string|Zend_Locale $locale * @throws Zend_Validate_Exception On unrecognised region * @throws Zend_Validate_Exception On not detected format - * @return Zend_Validate_PostCode Provides fluid interface + * @return Zend_Validate_PostCode Provides a fluent interface */ public function setLocale($locale = null) { + require_once 'Zend/Locale.php'; $this->_locale = Zend_Locale::findLocale($locale); $locale = new Zend_Locale($this->_locale); $region = $locale->getRegion(); if (empty($region)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Unable to detect a region for the locale '$locale'"); } @@ -133,6 +139,7 @@ class Zend_Validate_PostCode extends Zend_Validate_Abstract ); if (empty($format)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Unable to detect a postcode format for the region '{$locale->getRegion()}'"); } @@ -155,11 +162,12 @@ class Zend_Validate_PostCode extends Zend_Validate_Abstract * * @param string $format * @throws Zend_Validate_Exception On empty format - * @return Zend_Validate_PostCode Provides fluid interface + * @return Zend_Validate_PostCode Provides a fluent interface */ public function setFormat($format) { if (empty($format) || !is_string($format)) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("A postcode-format string has to be given for validation"); } diff --git a/library/vendor/Zend/Validate/Regex.php b/library/vendor/Zend/Validate/Regex.php index 337e2ab25..5b4360a22 100644 --- a/library/vendor/Zend/Validate/Regex.php +++ b/library/vendor/Zend/Validate/Regex.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Regex extends Zend_Validate_Abstract @@ -63,7 +64,6 @@ class Zend_Validate_Regex extends Zend_Validate_Abstract * * @param string|Zend_Config $pattern * @throws Zend_Validate_Exception On missing 'pattern' parameter - * @return void */ public function __construct($pattern) { @@ -75,6 +75,7 @@ class Zend_Validate_Regex extends Zend_Validate_Abstract if (array_key_exists('pattern', $pattern)) { $pattern = $pattern['pattern']; } else { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Missing option 'pattern'"); } } @@ -105,6 +106,7 @@ class Zend_Validate_Regex extends Zend_Validate_Abstract $status = @preg_match($this->_pattern, "Test"); if (false === $status) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("Internal error while using the pattern '$this->_pattern'"); } diff --git a/library/vendor/Zend/Validate/Sitemap/Changefreq.php b/library/vendor/Zend/Validate/Sitemap/Changefreq.php index 376628094..b9f653f43 100644 --- a/library/vendor/Zend/Validate/Sitemap/Changefreq.php +++ b/library/vendor/Zend/Validate/Sitemap/Changefreq.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Validate * @subpackage Sitemap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validates whether a given value is valid as a sitemap value @@ -32,7 +33,7 @@ * @category Zend * @package Zend_Validate * @subpackage Sitemap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Sitemap_Changefreq extends Zend_Validate_Abstract diff --git a/library/vendor/Zend/Validate/Sitemap/Lastmod.php b/library/vendor/Zend/Validate/Sitemap/Lastmod.php index a28861336..1e81828f1 100644 --- a/library/vendor/Zend/Validate/Sitemap/Lastmod.php +++ b/library/vendor/Zend/Validate/Sitemap/Lastmod.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Validate * @subpackage Sitemap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validates whether a given value is valid as a sitemap value @@ -32,7 +33,7 @@ * @category Zend * @package Zend_Validate * @subpackage Sitemap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Sitemap_Lastmod extends Zend_Validate_Abstract diff --git a/library/vendor/Zend/Validate/Sitemap/Loc.php b/library/vendor/Zend/Validate/Sitemap/Loc.php index 03b171246..24c78ed8a 100644 --- a/library/vendor/Zend/Validate/Sitemap/Loc.php +++ b/library/vendor/Zend/Validate/Sitemap/Loc.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Validate * @subpackage Sitemap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @see Zend_Uri */ +require_once 'Zend/Uri.php'; /** * Validates whether a given value is valid as a sitemap value @@ -36,7 +38,7 @@ * @category Zend * @package Zend_Validate * @subpackage Sitemap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Sitemap_Loc extends Zend_Validate_Abstract diff --git a/library/vendor/Zend/Validate/Sitemap/Priority.php b/library/vendor/Zend/Validate/Sitemap/Priority.php index ac2d6e098..0f85f0997 100644 --- a/library/vendor/Zend/Validate/Sitemap/Priority.php +++ b/library/vendor/Zend/Validate/Sitemap/Priority.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Validate * @subpackage Sitemap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * Validates whether a given value is valid as a sitemap value @@ -32,7 +33,7 @@ * @category Zend * @package Zend_Validate * @subpackage Sitemap - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_Sitemap_Priority extends Zend_Validate_Abstract diff --git a/library/vendor/Zend/Validate/StringLength.php b/library/vendor/Zend/Validate/StringLength.php index 732df0e30..b562c42fd 100644 --- a/library/vendor/Zend/Validate/StringLength.php +++ b/library/vendor/Zend/Validate/StringLength.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,11 +22,12 @@ /** * @see Zend_Validate_Abstract */ +require_once 'Zend/Validate/Abstract.php'; /** * @category Zend * @package Zend_Validate - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Validate_StringLength extends Zend_Validate_Abstract @@ -78,8 +79,7 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract /** * Sets validator options * - * @param integer|array|Zend_Config $options - * @return void + * @param integer|array|Zend_Config $options */ public function __construct($options = array()) { @@ -136,6 +136,7 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract /** * @see Zend_Validate_Exception */ + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The minimum must be less than or equal to the maximum length, but $min >" . " $this->_max"); } @@ -168,6 +169,7 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract /** * @see Zend_Validate_Exception */ + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception("The maximum must be greater than or equal to the minimum length, but " . "$max < $this->_min"); } else { @@ -191,6 +193,7 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract * Sets a new encoding to use * * @param string $encoding + * @throws Zend_Validate_Exception * @return Zend_Validate_StringLength */ public function setEncoding($encoding = null) @@ -205,6 +208,7 @@ class Zend_Validate_StringLength extends Zend_Validate_Abstract $result = ini_set('default_charset', $encoding); } if (!$result) { + require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception('Given encoding not supported on this OS!'); } diff --git a/library/vendor/Zend/Version.php b/library/vendor/Zend/Version.php index f9a9636bf..e6567dde3 100644 --- a/library/vendor/Zend/Version.php +++ b/library/vendor/Zend/Version.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Version - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * * @category Zend * @package Zend_Version - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ final class Zend_Version @@ -32,7 +32,7 @@ final class Zend_Version /** * Zend Framework version identification - see compareVersion() */ - const VERSION = '1.12.9'; + const VERSION = '1.12.15'; /** * The latest stable version Zend Framework available diff --git a/library/vendor/Zend/View.php b/library/vendor/Zend/View.php index 3d8c917eb..6b8f3e565 100644 --- a/library/vendor/Zend/View.php +++ b/library/vendor/Zend/View.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,15 +23,65 @@ /** * Abstract master class for extension. */ +require_once 'Zend/View/Abstract.php'; /** * Concrete class for handling view scripts. * - * @category Zend - * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License + * @category Zend + * @package Zend_View + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * + * Convenience methods for build in helpers (@see __call): + * + * @method string baseUrl($file = null) + * @method string currency($value = null, $currency = null) + * @method Zend_View_Helper_Cycle cycle(array $data = array(), $name = Zend_View_Helper_Cycle::DEFAULT_NAME) + * @method Zend_View_Helper_Doctype doctype($doctype = null) + * @method string fieldset($name, $content, $attribs = null) + * @method string form($name, $attribs = null, $content = false) + * @method string formButton($name, $value = null, $attribs = null) + * @method string formCheckbox($name, $value = null, $attribs = null, array $checkedOptions = null) + * @method string formErrors($errors, array $options = null) + * @method string formFile($name, $attribs = null) + * @method string formHidden($name, $value = null, array $attribs = null) + * @method string formImage($name, $value = null, $attribs = null) + * @method string formLabel($name, $value = null, array $attribs = null) + * @method string formMultiCheckbox($name, $value = null, $attribs = null, $options = null, $listsep = "
\n") + * @method string formNote($name, $value = null) + * @method string formPassword($name, $value = null, $attribs = null) + * @method string formRadio($name, $value = null, $attribs = null, $options = null, $listsep = "
\n") + * @method string formReset($name = '', $value = 'Reset', $attribs = null) + * @method string formSelect($name, $value = null, $attribs = null, $options = null, $listsep = "
\n") + * @method string formSubmit($name, $value = null, $attribs = null) + * @method string formText($name, $value = null, $attribs = null) + * @method string formTextarea($name, $value = null, $attribs = null) + * @method Zend_View_Helper_Gravatar gravatar($email = "", $options = array(), $attribs = array()) + * @method Zend_View_Helper_HeadLink headLink(array $attributes = null, $placement = Zend_View_Helper_Placeholder_Container_Abstract::APPEND) + * @method Zend_View_Helper_HeadMeta headMeta($content = null, $keyValue = null, $keyType = 'name', $modifiers = array(), $placement = Zend_View_Helper_Placeholder_Container_Abstract::APPEND) + * @method Zend_View_Helper_HeadScript headScript($mode = Zend_View_Helper_HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript') + * @method Zend_View_Helper_HeadStyle headStyle($content = null, $placement = 'APPEND', $attributes = array()) + * @method Zend_View_Helper_HeadTitle headTitle($title = null, $setType = null) + * @method string htmlFlash($data, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlList(array $items, $ordered = false, $attribs = false, $escape = true) + * @method string htmlObject($data, $type, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlPage($data, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlQuicktime($data, array $attribs = array(), array $params = array(), $content = null) + * @method Zend_View_Helper_InlineScript inlineScript($mode = Zend_View_Helper_HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript') + * @method string|void json($data, $keepLayouts = false, $encodeData = true) + * @method Zend_View_Helper_Layout layout() + * @method Zend_View_Helper_Navigation navigation(Zend_Navigation_Container $container = null) + * @method string paginationControl(Zend_Paginator $paginator = null, $scrollingStyle = null, $partial = null, $params = null) + * @method string partial($name = null, $module = null, $model = null) + * @method string partialLoop($name = null, $module = null, $model = null) + * @method Zend_View_Helper_Placeholder_Container_Abstract placeholder($name) + * @method void renderToPlaceholder($script, $placeholder) + * @method string serverUrl($requestUri = null) + * @method string translate($messageid = null) + * @method string url(array $urlOptions = array(), $name = null, $reset = false, $encode = true) + * @method Zend_Http_UserAgent userAgent(Zend_Http_UserAgent $userAgent = null) */ class Zend_View extends Zend_View_Abstract { @@ -60,6 +110,7 @@ class Zend_View extends Zend_View_Abstract $this->_useViewStream = (bool) ini_get('short_open_tag') ? false : true; if ($this->_useViewStream) { if (!in_array('zend.view', stream_get_wrappers())) { + require_once 'Zend/View/Stream.php'; stream_wrapper_register('zend.view', 'Zend_View_Stream'); } } diff --git a/library/vendor/Zend/View/Abstract.php b/library/vendor/Zend/View/Abstract.php index 571830cf0..ffcefee19 100644 --- a/library/vendor/Zend/View/Abstract.php +++ b/library/vendor/Zend/View/Abstract.php @@ -14,23 +14,26 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** @see Zend_Loader */ +require_once 'Zend/Loader.php'; /** @see Zend_Loader_PluginLoader */ +require_once 'Zend/Loader/PluginLoader.php'; /** @see Zend_View_Interface */ +require_once 'Zend/View/Interface.php'; /** * Abstract class for Zend_View to help enforce private constructs. * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Abstract implements Zend_View_Interface @@ -306,6 +309,7 @@ abstract class Zend_View_Abstract implements Zend_View_Interface return; } + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Setting private or protected class members is not allowed'); $e->setView($this); throw $e; @@ -469,6 +473,7 @@ abstract class Zend_View_Abstract implements Zend_View_Interface { $type = strtolower($type); if (!in_array($type, $this->_loaderTypes)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('Invalid plugin loader type "%s"', $type)); $e->setView($this); throw $e; @@ -488,6 +493,7 @@ abstract class Zend_View_Abstract implements Zend_View_Interface { $type = strtolower($type); if (!in_array($type, $this->_loaderTypes)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('Invalid plugin loader type "%s"; cannot retrieve', $type)); $e->setView($this); throw $e; @@ -575,6 +581,7 @@ abstract class Zend_View_Abstract implements Zend_View_Interface public function registerHelper($helper, $name) { if (!is_object($helper)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('View helper must be an object'); $e->setView($this); throw $e; @@ -582,6 +589,7 @@ abstract class Zend_View_Abstract implements Zend_View_Interface if (!$helper instanceof Zend_View_Interface) { if (!method_exists($helper, $name)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception( 'View helper must implement Zend_View_Interface or have a method matching the name provided' ); @@ -794,6 +802,7 @@ abstract class Zend_View_Abstract implements Zend_View_Interface if (is_string($spec)) { // assign by name and value if ('_' == substr($spec, 0, 1)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Setting private or protected class members is not allowed'); $e->setView($this); throw $e; @@ -810,11 +819,13 @@ abstract class Zend_View_Abstract implements Zend_View_Interface $this->$key = $val; } if ($error) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Setting private or protected class members is not allowed'); $e->setView($this); throw $e; } } else { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('assign() expects a string or array, received ' . gettype($spec)); $e->setView($this); throw $e; @@ -951,12 +962,14 @@ abstract class Zend_View_Abstract implements Zend_View_Interface protected function _script($name) { if ($this->isLfiProtectionOn() && preg_match('#\.\.[\\\/]#', $name)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Requested scripts may not include parent directory traversal ("../", "..\\" notation)'); $e->setView($this); throw $e; } if (0 == count($this->_path['script'])) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('no view script directory set; unable to determine location for view script'); $e->setView($this); throw $e; @@ -968,6 +981,7 @@ abstract class Zend_View_Abstract implements Zend_View_Interface } } + require_once 'Zend/View/Exception.php'; $message = "script '$name' not found in path (" . implode(PATH_SEPARATOR, $this->_path['script']) . ")"; diff --git a/library/vendor/Zend/View/Exception.php b/library/vendor/Zend/View/Exception.php index 6eabf491c..93078bcf8 100644 --- a/library/vendor/Zend/View/Exception.php +++ b/library/vendor/Zend/View/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,6 +23,7 @@ /** * Zend_Exception */ +require_once 'Zend/Exception.php'; /** @@ -30,7 +31,7 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Exception extends Zend_Exception diff --git a/library/vendor/Zend/View/Helper/Abstract.php b/library/vendor/Zend/View/Helper/Abstract.php index 4c2d6f406..da481bbe3 100644 --- a/library/vendor/Zend/View/Helper/Abstract.php +++ b/library/vendor/Zend/View/Helper/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,12 +23,13 @@ /** * @see Zend_View_Helper_Interface */ +require_once 'Zend/View/Helper/Interface.php'; /** * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Helper_Abstract implements Zend_View_Helper_Interface diff --git a/library/vendor/Zend/View/Helper/Action.php b/library/vendor/Zend/View/Helper/Action.php index 8bacc41cd..a4b83af58 100644 --- a/library/vendor/Zend/View/Helper/Action.php +++ b/library/vendor/Zend/View/Helper/Action.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for rendering output of a controller action * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Action extends Zend_View_Helper_Abstract @@ -64,6 +65,7 @@ class Zend_View_Helper_Action extends Zend_View_Helper_Abstract $front = Zend_Controller_Front::getInstance(); $modules = $front->getControllerDirectory(); if (empty($modules)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Action helper depends on valid front controller instance'); $e->setView($this->view); throw $e; @@ -73,6 +75,7 @@ class Zend_View_Helper_Action extends Zend_View_Helper_Abstract $response = $front->getResponse(); if (empty($request) || empty($response)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Action view helper requires both a registered request and response object in the front controller instance'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/BaseUrl.php b/library/vendor/Zend/View/Helper/BaseUrl.php index f42c6a9f2..8af36bbdd 100644 --- a/library/vendor/Zend/View/Helper/BaseUrl.php +++ b/library/vendor/Zend/View/Helper/BaseUrl.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** @see Zend_View_Helper_Abstract */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for retrieving the BaseUrl * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_BaseUrl extends Zend_View_Helper_Abstract @@ -81,6 +82,7 @@ class Zend_View_Helper_BaseUrl extends Zend_View_Helper_Abstract { if ($this->_baseUrl === null) { /** @see Zend_Controller_Front */ + require_once 'Zend/Controller/Front.php'; $baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl(); // Remove scriptname, eg. index.php from baseUrl diff --git a/library/vendor/Zend/View/Helper/Currency.php b/library/vendor/Zend/View/Helper/Currency.php index 3ce7e3583..592185f71 100644 --- a/library/vendor/Zend/View/Helper/Currency.php +++ b/library/vendor/Zend/View/Helper/Currency.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Currency view helper * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Currency extends Zend_View_Helper_Abstract @@ -48,6 +49,7 @@ class Zend_View_Helper_Currency extends Zend_View_Helper_Abstract public function __construct($currency = null) { if ($currency === null) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Currency')) { $currency = Zend_Registry::get('Zend_Currency'); } @@ -71,6 +73,7 @@ class Zend_View_Helper_Currency extends Zend_View_Helper_Abstract } if (is_string($currency) || ($currency instanceof Zend_Locale)) { + require_once 'Zend/Locale.php'; if (Zend_Locale::isLocale($currency)) { $currency = array('locale' => $currency); } @@ -97,6 +100,7 @@ class Zend_View_Helper_Currency extends Zend_View_Helper_Abstract public function setCurrency($currency = null) { if (!$currency instanceof Zend_Currency) { + require_once 'Zend/Currency.php'; $currency = new Zend_Currency($currency); } $this->_currency = $currency; diff --git a/library/vendor/Zend/View/Helper/Cycle.php b/library/vendor/Zend/View/Helper/Cycle.php index 955251dcf..eb5fd5132 100644 --- a/library/vendor/Zend/View/Helper/Cycle.php +++ b/library/vendor/Zend/View/Helper/Cycle.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Cycle implements Iterator diff --git a/library/vendor/Zend/View/Helper/DeclareVars.php b/library/vendor/Zend/View/Helper/DeclareVars.php index 259ffc7be..4663d4a41 100644 --- a/library/vendor/Zend/View/Helper/DeclareVars.php +++ b/library/vendor/Zend/View/Helper/DeclareVars.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for declaring default values of template variables * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_DeclareVars extends Zend_View_Helper_Abstract diff --git a/library/vendor/Zend/View/Helper/Doctype.php b/library/vendor/Zend/View/Helper/Doctype.php index 4e9cd0655..ca63b4dea 100644 --- a/library/vendor/Zend/View/Helper/Doctype.php +++ b/library/vendor/Zend/View/Helper/Doctype.php @@ -15,21 +15,23 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Registry */ +require_once 'Zend/Registry.php'; /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for setting and retrieving the doctype * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Doctype extends Zend_View_Helper_Abstract @@ -130,6 +132,7 @@ class Zend_View_Helper_Doctype extends Zend_View_Helper_Abstract break; default: if (substr($doctype, 0, 9) != 'setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/Fieldset.php b/library/vendor/Zend/View/Helper/Fieldset.php index 915c3fdcc..fce37b934 100644 --- a/library/vendor/Zend/View/Helper/Fieldset.php +++ b/library/vendor/Zend/View/Helper/Fieldset.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_FormElement */ +require_once 'Zend/View/Helper/FormElement.php'; /** * Helper for rendering fieldsets * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Fieldset extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/Form.php b/library/vendor/Zend/View/Helper/Form.php index 1e5dffa32..514bdd901 100644 --- a/library/vendor/Zend/View/Helper/Form.php +++ b/library/vendor/Zend/View/Helper/Form.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_FormElement */ +require_once 'Zend/View/Helper/FormElement.php'; /** * Helper for rendering HTML forms * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Form extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormButton.php b/library/vendor/Zend/View/Helper/FormButton.php index 435e16d2d..abdd9f8f3 100644 --- a/library/vendor/Zend/View/Helper/FormButton.php +++ b/library/vendor/Zend/View/Helper/FormButton.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormButton extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormCheckbox.php b/library/vendor/Zend/View/Helper/FormCheckbox.php index 3b9be34e0..fd6f4ae5b 100644 --- a/library/vendor/Zend/View/Helper/FormCheckbox.php +++ b/library/vendor/Zend/View/Helper/FormCheckbox.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormCheckbox extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormElement.php b/library/vendor/Zend/View/Helper/FormElement.php index 816018572..8c1373b38 100644 --- a/library/vendor/Zend/View/Helper/FormElement.php +++ b/library/vendor/Zend/View/Helper/FormElement.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_View_Helper_HtmlElement */ +require_once 'Zend/View/Helper/HtmlElement.php'; /** * Base helper for form elements. Extend this, don't use it on its own. @@ -30,7 +31,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Helper_FormElement extends Zend_View_Helper_HtmlElement @@ -65,6 +66,7 @@ abstract class Zend_View_Helper_FormElement extends Zend_View_Helper_HtmlElement } elseif ($translator instanceof Zend_Translate) { $this->_translator = $translator->getAdapter(); } else { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid translator specified'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/FormErrors.php b/library/vendor/Zend/View/Helper/FormErrors.php index 7ed8d7340..4e092b115 100644 --- a/library/vendor/Zend/View/Helper/FormErrors.php +++ b/library/vendor/Zend/View/Helper/FormErrors.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -31,7 +32,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormErrors extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormFile.php b/library/vendor/Zend/View/Helper/FormFile.php index 2a40bd28d..1ea7bfc85 100644 --- a/library/vendor/Zend/View/Helper/FormFile.php +++ b/library/vendor/Zend/View/Helper/FormFile.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormFile extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormHidden.php b/library/vendor/Zend/View/Helper/FormHidden.php index cbad00199..fbd2b7396 100644 --- a/library/vendor/Zend/View/Helper/FormHidden.php +++ b/library/vendor/Zend/View/Helper/FormHidden.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormHidden extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormImage.php b/library/vendor/Zend/View/Helper/FormImage.php index 67849949e..be3daa3d0 100644 --- a/library/vendor/Zend/View/Helper/FormImage.php +++ b/library/vendor/Zend/View/Helper/FormImage.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormImage extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormLabel.php b/library/vendor/Zend/View/Helper/FormLabel.php index ffa25f2ee..f4e034f9b 100644 --- a/library/vendor/Zend/View/Helper/FormLabel.php +++ b/library/vendor/Zend/View/Helper/FormLabel.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_View_Helper_FormElement **/ +require_once 'Zend/View/Helper/FormElement.php'; /** * Form label helper @@ -28,7 +29,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormLabel extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormMultiCheckbox.php b/library/vendor/Zend/View/Helper/FormMultiCheckbox.php index f19698f52..49386cc45 100644 --- a/library/vendor/Zend/View/Helper/FormMultiCheckbox.php +++ b/library/vendor/Zend/View/Helper/FormMultiCheckbox.php @@ -15,13 +15,14 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_View_Helper_FormRadio */ +require_once 'Zend/View/Helper/FormRadio.php'; /** @@ -30,7 +31,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormMultiCheckbox extends Zend_View_Helper_FormRadio diff --git a/library/vendor/Zend/View/Helper/FormNote.php b/library/vendor/Zend/View/Helper/FormNote.php index d1ebc0e6d..e051fdcc3 100644 --- a/library/vendor/Zend/View/Helper/FormNote.php +++ b/library/vendor/Zend/View/Helper/FormNote.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormNote extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormPassword.php b/library/vendor/Zend/View/Helper/FormPassword.php index 1359eacbd..cb42c4b75 100644 --- a/library/vendor/Zend/View/Helper/FormPassword.php +++ b/library/vendor/Zend/View/Helper/FormPassword.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormPassword extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormRadio.php b/library/vendor/Zend/View/Helper/FormRadio.php index cc2a52ff1..fa26a076b 100644 --- a/library/vendor/Zend/View/Helper/FormRadio.php +++ b/library/vendor/Zend/View/Helper/FormRadio.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormRadio extends Zend_View_Helper_FormElement @@ -123,6 +124,7 @@ class Zend_View_Helper_FormRadio extends Zend_View_Helper_FormElement $value = (array) $value; // Set up the filter - Alnum + hyphen + underscore + require_once 'Zend/Filter/PregReplace.php'; $pattern = @preg_match('/\pL/u', 'a') ? '/[^\p{L}\p{N}\-\_]/u' // Unicode : '/[^a-zA-Z0-9\-\_]/'; // No Unicode diff --git a/library/vendor/Zend/View/Helper/FormReset.php b/library/vendor/Zend/View/Helper/FormReset.php index 6859d985b..a4e62826d 100644 --- a/library/vendor/Zend/View/Helper/FormReset.php +++ b/library/vendor/Zend/View/Helper/FormReset.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormReset extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormSelect.php b/library/vendor/Zend/View/Helper/FormSelect.php index 87460ba74..8654f3d0e 100644 --- a/library/vendor/Zend/View/Helper/FormSelect.php +++ b/library/vendor/Zend/View/Helper/FormSelect.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormSelect extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormSubmit.php b/library/vendor/Zend/View/Helper/FormSubmit.php index b5b237e3d..72223e203 100644 --- a/library/vendor/Zend/View/Helper/FormSubmit.php +++ b/library/vendor/Zend/View/Helper/FormSubmit.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormSubmit extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormText.php b/library/vendor/Zend/View/Helper/FormText.php index dad1dd06c..9b9f58135 100644 --- a/library/vendor/Zend/View/Helper/FormText.php +++ b/library/vendor/Zend/View/Helper/FormText.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormText extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/FormTextarea.php b/library/vendor/Zend/View/Helper/FormTextarea.php index 3556cd530..c384fc4da 100644 --- a/library/vendor/Zend/View/Helper/FormTextarea.php +++ b/library/vendor/Zend/View/Helper/FormTextarea.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Abstract class for extension */ +require_once 'Zend/View/Helper/FormElement.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_FormTextarea extends Zend_View_Helper_FormElement diff --git a/library/vendor/Zend/View/Helper/Gravatar.php b/library/vendor/Zend/View/Helper/Gravatar.php index 1afc4cb11..dab1f799f 100644 --- a/library/vendor/Zend/View/Helper/Gravatar.php +++ b/library/vendor/Zend/View/Helper/Gravatar.php @@ -21,6 +21,7 @@ */ /** Zend_View_Helper_HtmlElement */ +require_once 'Zend/View/Helper/HtmlElement.php'; /** * Helper for retrieving avatars from gravatar.com @@ -193,6 +194,7 @@ class Zend_View_Helper_Gravatar extends Zend_View_Helper_HtmlElement $this->_options['rating'] = $rating; break; default: + require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception(sprintf( 'The rating value "%s" is not allowed', $rating diff --git a/library/vendor/Zend/View/Helper/HeadLink.php b/library/vendor/Zend/View/Helper/HeadLink.php index 355b1b34a..61bf0a29d 100644 --- a/library/vendor/Zend/View/Helper/HeadLink.php +++ b/library/vendor/Zend/View/Helper/HeadLink.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Placeholder_Container_Standalone */ +require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php'; /** * Zend_Layout_View_Helper_HeadLink @@ -29,8 +30,16 @@ * @uses Zend_View_Helper_Placeholder_Container_Standalone * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method $this appendAlternate($href, $type, $title, $extras) + * @method $this appendStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array()) + * @method $this offsetSetAlternate($index, $href, $type, $title, $extras) + * @method $this offsetSetStylesheet($index, $href, $media = 'screen', $conditionalStylesheet = false, array $extras = array()) + * @method $this prependAlternate($href, $type, $title, $extras) + * @method $this prependStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array()) + * @method $this setAlternate($href, $type, $title, $extras) + * @method $this setStylesheet($href, $media = 'screen', $conditionalStylesheet = false, array $extras = array()) */ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_Standalone { @@ -150,6 +159,7 @@ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_S } if (1 > $argc) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('%s requires at least one argument', $method)); $e->setView($this->view); throw $e; @@ -207,6 +217,7 @@ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_S public function append($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('append() expects a data token; please use one of the custom append*() methods'); $e->setView($this->view); throw $e; @@ -225,6 +236,7 @@ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_S public function offsetSet($index, $value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('offsetSet() expects a data token; please use one of the custom offsetSet*() methods'); $e->setView($this->view); throw $e; @@ -242,6 +254,7 @@ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_S public function prepend($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('prepend() expects a data token; please use one of the custom prepend*() methods'); $e->setView($this->view); throw $e; @@ -259,6 +272,7 @@ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_S public function set($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('set() expects a data token; please use one of the custom set*() methods'); $e->setView($this->view); throw $e; @@ -305,7 +319,10 @@ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_S && !empty($attributes['conditionalStylesheet']) && is_string($attributes['conditionalStylesheet'])) { - $link = ''; + if (str_replace(' ', '', $attributes['conditionalStylesheet']) === '!IE') { + $link = '' . $link . ''; } return $link; @@ -413,6 +430,7 @@ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_S public function createDataAlternate(array $args) { if (3 > count($args)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('Alternate tags require 3 arguments; %s provided', count($args))); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/HeadMeta.php b/library/vendor/Zend/View/Helper/HeadMeta.php index 5df0d79b3..de58edd5d 100644 --- a/library/vendor/Zend/View/Helper/HeadMeta.php +++ b/library/vendor/Zend/View/Helper/HeadMeta.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Placeholder_Container_Standalone */ +require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php'; /** * Zend_Layout_View_Helper_HeadMeta @@ -29,8 +30,21 @@ * @uses Zend_View_Helper_Placeholder_Container_Standalone * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method $this appendHttpEquiv($keyValue, $content, $conditionalHttpEquiv) + * @method $this appendName($keyValue, $content, $conditionalName) + * @method $this appendProperty($property, $content, $modifiers) + * @method $this offsetSetHttpEquiv($index, $keyValue, $content, $conditionalHttpEquiv) + * @method $this offsetSetName($index, $keyValue, $content, $conditionalName) + * @method $this offsetSetProperty($index, $property, $content, $modifiers) + * @method $this prependHttpEquiv($keyValue, $content, $conditionalHttpEquiv) + * @method $this prependName($keyValue, $content, $conditionalName) + * @method $this prependProperty($property, $content, $modifiers) + * @method $this setCharset($charset) + * @method $this setHttpEquiv($keyValue, $content, $modifiers) + * @method $this setName($keyValue, $content, $modifiers) + * @method $this setProperty($property, $content, $modifiers) */ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_Standalone { @@ -100,6 +114,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S case 'Property': return 'property'; default: + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('Invalid type "%s" passed to _normalizeType', $type)); $e->setView($this->view); throw $e; @@ -143,6 +158,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S } if (2 > $argc) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Too few arguments provided; requires key value, and content'); $e->setView($this->view); throw $e; @@ -225,6 +241,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S public function append($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid value passed to append; please use appendMeta()'); $e->setView($this->view); throw $e; @@ -244,6 +261,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S public function offsetSet($index, $value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid value passed to offsetSet; please use offsetSetName() or offsetSetHttpEquiv()'); $e->setView($this->view); throw $e; @@ -262,6 +280,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S public function offsetUnset($index) { if (!in_array($index, $this->getContainer()->getKeys())) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid index passed to offsetUnset()'); $e->setView($this->view); throw $e; @@ -280,6 +299,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S public function prepend($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid value passed to prepend; please use prependMeta()'); $e->setView($this->view); throw $e; @@ -298,6 +318,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S public function set($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid value passed to set; please use setMeta()'); $e->setView($this->view); throw $e; @@ -325,6 +346,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S public function itemToString(stdClass $item) { if (!in_array($item->type, $this->_typeKeys)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('Invalid type "%s" provided for meta', $item->type)); $e->setView($this->view); throw $e; @@ -335,6 +357,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S foreach ($item->modifiers as $key => $value) { if (!is_null($this->view) && $this->view->doctype()->isHtml5() && $key == 'scheme') { + require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception('Invalid modifier ' . '"scheme" provided; not supported by HTML5'); } @@ -371,6 +394,9 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S && !empty($item->modifiers['conditional']) && is_string($item->modifiers['conditional'])) { + if (str_replace(' ', '', $item->modifiers['conditional']) === '!IE') { + $meta = '' . $meta . ''; } diff --git a/library/vendor/Zend/View/Helper/HeadScript.php b/library/vendor/Zend/View/Helper/HeadScript.php index 6e62321e5..062bed1b0 100644 --- a/library/vendor/Zend/View/Helper/HeadScript.php +++ b/library/vendor/Zend/View/Helper/HeadScript.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Placeholder_Container_Standalone */ +require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php'; /** * Helper for setting and retrieving script elements for HTML head section @@ -28,8 +29,16 @@ * @uses Zend_View_Helper_Placeholder_Container_Standalone * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method $this appendFile($src, $type = 'text/javascript', array $attrs = array()) + * @method $this appendScript($script, $type = 'text/javascript', array $attrs = array()) + * @method $this offsetSetFile($index, $src, $type = 'text/javascript', array $attrs = array()) + * @method $this offsetSetScript($index, $script, $type = 'text/javascript', array $attrs = array()) + * @method $this prependFile($src, $type = 'text/javascript', array $attrs = array()) + * @method $this prependScript($script, $type = 'text/javascript', array $attrs = array()) + * @method $this setFile($src, $type = 'text/javascript', array $attrs = array()) + * @method $this setScript($script, $type = 'text/javascript', array $attrs = array()) */ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container_Standalone { @@ -141,6 +150,7 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container public function captureStart($captureType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND, $type = 'text/javascript', $attrs = array()) { if ($this->_captureLock) { + require_once 'Zend/View/Helper/Placeholder/Container/Exception.php'; $e = new Zend_View_Helper_Placeholder_Container_Exception('Cannot nest headScript captures'); $e->setView($this->view); throw $e; @@ -202,6 +212,7 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container { if (preg_match('/^(?Pset|(ap|pre)pend|offsetSet)(?PFile|Script)$/', $method, $matches)) { if (1 > count($args)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('Method "%s" requires at least one argument', $method)); $e->setView($this->view); throw $e; @@ -215,6 +226,7 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container if ('offsetSet' == $action) { $index = array_shift($args); if (1 > count($args)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('Method "%s" requires at least two arguments, an index and source', $method)); $e->setView($this->view); throw $e; @@ -306,6 +318,7 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container public function append($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid argument passed to append(); please use one of the helper methods, appendScript() or appendFile()'); $e->setView($this->view); throw $e; @@ -323,6 +336,7 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container public function prepend($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid argument passed to prepend(); please use one of the helper methods, prependScript() or prependFile()'); $e->setView($this->view); throw $e; @@ -340,6 +354,7 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container public function set($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid argument passed to set(); please use one of the helper methods, setScript() or setFile()'); $e->setView($this->view); throw $e; @@ -358,6 +373,7 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container public function offsetSet($index, $value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid argument passed to offsetSet(); please use one of the helper methods, offsetSetScript() or offsetSetFile()'); $e->setView($this->view); throw $e; @@ -439,7 +455,11 @@ class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container && !empty($item->attributes['conditional']) && is_string($item->attributes['conditional'])) { - $html = $indent . ''; + // inner wrap with comment end and start if !IE + if (str_replace(' ', '', $item->attributes['conditional']) === '!IE') { + $html = '' . $html . ''; } else { $html = $indent . $html; } diff --git a/library/vendor/Zend/View/Helper/HeadStyle.php b/library/vendor/Zend/View/Helper/HeadStyle.php index b5bed9faf..fc571bc9e 100644 --- a/library/vendor/Zend/View/Helper/HeadStyle.php +++ b/library/vendor/Zend/View/Helper/HeadStyle.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Placeholder_Container_Standalone */ +require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php'; /** * Helper for setting and retrieving stylesheets @@ -28,8 +29,12 @@ * @uses Zend_View_Helper_Placeholder_Container_Standalone * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method $this appendStyle($content, array $attributes = array()) + * @method $this offsetSetStyle($index, $content, array $attributes = array()) + * @method $this prependStyle($content, array $attributes = array()) + * @method $this setStyle($content, array $attributes = array()) */ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_Standalone { @@ -145,6 +150,7 @@ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_ } if (1 > $argc) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf('Method "%s" requires minimally content for the stylesheet', $method)); $e->setView($this->view); throw $e; @@ -198,6 +204,7 @@ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_ public function append($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid value passed to append; please use appendStyle()'); $e->setView($this->view); throw $e; @@ -216,6 +223,7 @@ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_ public function offsetSet($index, $value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid value passed to offsetSet; please use offsetSetStyle()'); $e->setView($this->view); throw $e; @@ -233,6 +241,7 @@ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_ public function prepend($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid value passed to prepend; please use prependStyle()'); $e->setView($this->view); throw $e; @@ -250,6 +259,7 @@ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_ public function set($value) { if (!$this->_isValid($value)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Invalid value passed to set; please use setStyle()'); $e->setView($this->view); throw $e; @@ -268,6 +278,7 @@ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_ public function captureStart($type = Zend_View_Helper_Placeholder_Container_Abstract::APPEND, $attrs = null) { if ($this->_captureLock) { + require_once 'Zend/View/Helper/Placeholder/Container/Exception.php'; $e = new Zend_View_Helper_Placeholder_Container_Exception('Cannot nest headStyle captures'); $e->setView($this->view); throw $e; @@ -363,7 +374,10 @@ class Zend_View_Helper_HeadStyle extends Zend_View_Helper_Placeholder_Container_ . ''; if (null == $escapeStart && null == $escapeEnd) { - $html = ''; + if (str_replace(' ', '', $item->attributes['conditional']) === '!IE') { + $html = '' . $html . ''; } return $html; diff --git a/library/vendor/Zend/View/Helper/HeadTitle.php b/library/vendor/Zend/View/Helper/HeadTitle.php index 7796e13d7..8f3d9d0db 100644 --- a/library/vendor/Zend/View/Helper/HeadTitle.php +++ b/library/vendor/Zend/View/Helper/HeadTitle.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Placeholder_Container_Standalone */ +require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php'; /** * Helper for setting and retrieving title element for HTML head @@ -28,7 +29,7 @@ * @uses Zend_View_Helper_Placeholder_Container_Standalone * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_HeadTitle extends Zend_View_Helper_Placeholder_Container_Standalone @@ -99,6 +100,7 @@ class Zend_View_Helper_HeadTitle extends Zend_View_Helper_Placeholder_Container_ Zend_View_Helper_Placeholder_Container_Abstract::SET, Zend_View_Helper_Placeholder_Container_Abstract::PREPEND ))) { + require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception("You must use a valid attach order: 'PREPEND', 'APPEND' or 'SET'"); } @@ -129,6 +131,7 @@ class Zend_View_Helper_HeadTitle extends Zend_View_Helper_Placeholder_Container_ } elseif ($translate instanceof Zend_Translate) { $this->_translator = $translate->getAdapter(); } else { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception("You must set an instance of Zend_Translate or Zend_Translate_Adapter"); $e->setView($this->view); throw $e; @@ -147,6 +150,7 @@ class Zend_View_Helper_HeadTitle extends Zend_View_Helper_Placeholder_Container_ public function getTranslator() { if (null === $this->_translator) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Translate')) { $this->setTranslator(Zend_Registry::get('Zend_Translate')); } diff --git a/library/vendor/Zend/View/Helper/HtmlElement.php b/library/vendor/Zend/View/Helper/HtmlElement.php index 91a92d1bc..263fcd32d 100644 --- a/library/vendor/Zend/View/Helper/HtmlElement.php +++ b/library/vendor/Zend/View/Helper/HtmlElement.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,12 +23,13 @@ /** * @see Zend_View_Helper_Abstract */ +require_once 'Zend/View/Helper/Abstract.php'; /** * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Helper_HtmlElement extends Zend_View_Helper_Abstract @@ -116,6 +117,7 @@ abstract class Zend_View_Helper_HtmlElement extends Zend_View_Helper_Abstract // Don't escape event attributes; _do_ substitute double quotes with singles if (!is_scalar($val)) { // non-scalar data should be cast to JSON first + require_once 'Zend/Json.php'; $val = Zend_Json::encode($val); } // Escape single quotes inside event attribute values. diff --git a/library/vendor/Zend/View/Helper/HtmlFlash.php b/library/vendor/Zend/View/Helper/HtmlFlash.php index 1f40d3f7d..3edcf1afc 100644 --- a/library/vendor/Zend/View/Helper/HtmlFlash.php +++ b/library/vendor/Zend/View/Helper/HtmlFlash.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,12 +23,13 @@ /** * @see Zend_View_Helper_HtmlObject */ +require_once 'Zend/View/Helper/HtmlObject.php'; /** * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_HtmlFlash extends Zend_View_Helper_HtmlObject diff --git a/library/vendor/Zend/View/Helper/HtmlList.php b/library/vendor/Zend/View/Helper/HtmlList.php index 255347744..471ade480 100644 --- a/library/vendor/Zend/View/Helper/HtmlList.php +++ b/library/vendor/Zend/View/Helper/HtmlList.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Zend_View_Helper_FormELement */ +require_once 'Zend/View/Helper/FormElement.php'; /** * Helper for ordered and unordered lists @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_HtmlList extends Zend_View_Helper_FormElement @@ -49,6 +50,7 @@ class Zend_View_Helper_HtmlList extends Zend_View_Helper_FormElement public function htmlList(array $items, $ordered = false, $attribs = false, $escape = true) { if (!is_array($items)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('First param must be an array'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/HtmlObject.php b/library/vendor/Zend/View/Helper/HtmlObject.php index 95091b36b..1eddfea5e 100644 --- a/library/vendor/Zend/View/Helper/HtmlObject.php +++ b/library/vendor/Zend/View/Helper/HtmlObject.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,12 +23,13 @@ /** * @see Zend_View_Helper_HtmlElement */ +require_once 'Zend/View/Helper/HtmlElement.php'; /** * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_HtmlObject extends Zend_View_Helper_HtmlElement diff --git a/library/vendor/Zend/View/Helper/HtmlPage.php b/library/vendor/Zend/View/Helper/HtmlPage.php index 9a1c5a754..e7b8b0f20 100644 --- a/library/vendor/Zend/View/Helper/HtmlPage.php +++ b/library/vendor/Zend/View/Helper/HtmlPage.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,12 +23,13 @@ /** * @see Zend_View_Helper_HtmlObject */ +require_once 'Zend/View/Helper/HtmlObject.php'; /** * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_HtmlPage extends Zend_View_Helper_HtmlObject diff --git a/library/vendor/Zend/View/Helper/HtmlQuicktime.php b/library/vendor/Zend/View/Helper/HtmlQuicktime.php index 479493355..6c200dbce 100644 --- a/library/vendor/Zend/View/Helper/HtmlQuicktime.php +++ b/library/vendor/Zend/View/Helper/HtmlQuicktime.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,12 +23,13 @@ /** * @see Zend_View_Helper_HtmlObject */ +require_once 'Zend/View/Helper/HtmlObject.php'; /** * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_HtmlQuicktime extends Zend_View_Helper_HtmlObject diff --git a/library/vendor/Zend/View/Helper/InlineScript.php b/library/vendor/Zend/View/Helper/InlineScript.php index 52b29d6f1..978c6b812 100644 --- a/library/vendor/Zend/View/Helper/InlineScript.php +++ b/library/vendor/Zend/View/Helper/InlineScript.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_HeadScript */ +require_once 'Zend/View/Helper/HeadScript.php'; /** * Helper for setting and retrieving script elements for inclusion in HTML body @@ -29,7 +30,7 @@ * @uses Zend_View_Helper_Head_Script * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_InlineScript extends Zend_View_Helper_HeadScript diff --git a/library/vendor/Zend/View/Helper/Interface.php b/library/vendor/Zend/View/Helper/Interface.php index 7f61df96a..c7e761b2a 100644 --- a/library/vendor/Zend/View/Helper/Interface.php +++ b/library/vendor/Zend/View/Helper/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_View_Helper_Interface diff --git a/library/vendor/Zend/View/Helper/Json.php b/library/vendor/Zend/View/Helper/Json.php index c61f1e0ed..61b21ec93 100644 --- a/library/vendor/Zend/View/Helper/Json.php +++ b/library/vendor/Zend/View/Helper/Json.php @@ -15,23 +15,26 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Json */ +require_once 'Zend/Json.php'; /** Zend_Controller_Front */ +require_once 'Zend/Controller/Front.php'; /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for simplifying JSON responses * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Json extends Zend_View_Helper_Abstract @@ -73,6 +76,7 @@ class Zend_View_Helper_Json extends Zend_View_Helper_Abstract $data = Zend_Json::encode($data, null, $options); } if (!$keepLayouts) { + require_once 'Zend/Layout.php'; $layout = Zend_Layout::getMvcInstance(); if ($layout instanceof Zend_Layout) { $layout->disableLayout(); diff --git a/library/vendor/Zend/View/Helper/Layout.php b/library/vendor/Zend/View/Helper/Layout.php index cb229ff72..286a9e38e 100644 --- a/library/vendor/Zend/View/Helper/Layout.php +++ b/library/vendor/Zend/View/Helper/Layout.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * View helper for retrieving layout object * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Layout extends Zend_View_Helper_Abstract @@ -43,6 +44,7 @@ class Zend_View_Helper_Layout extends Zend_View_Helper_Abstract public function getLayout() { if (null === $this->_layout) { + require_once 'Zend/Layout.php'; $this->_layout = Zend_Layout::getMvcInstance(); if (null === $this->_layout) { // Implicitly creates layout object diff --git a/library/vendor/Zend/View/Helper/Navigation.php b/library/vendor/Zend/View/Helper/Navigation.php index e58a1ede6..2e82ef6a2 100644 --- a/library/vendor/Zend/View/Helper/Navigation.php +++ b/library/vendor/Zend/View/Helper/Navigation.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_View_Helper_Navigation_HelperAbstract */ +require_once 'Zend/View/Helper/Navigation/HelperAbstract.php'; /** * Proxy helper for retrieving navigational helpers and forwarding calls @@ -30,8 +31,12 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License + * @method Zend_View_Helper_Navigation_Breadcrumbs breadcrumbs + * @method Zend_View_Helper_Navigation_Links links + * @method Zend_View_Helper_Navigation_Menu menu + * @method Zend_View_Helper_Navigation_Sitemap sitemap */ class Zend_View_Helper_Navigation extends Zend_View_Helper_Navigation_HelperAbstract @@ -181,6 +186,7 @@ class Zend_View_Helper_Navigation if (!$helper instanceof Zend_View_Helper_Navigation_Helper) { if ($strict) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf( 'Proxy helper "%s" is not an instance of ' . 'Zend_View_Helper_Navigation_Helper', diff --git a/library/vendor/Zend/View/Helper/Navigation/Breadcrumbs.php b/library/vendor/Zend/View/Helper/Navigation/Breadcrumbs.php index 9c81b420c..10755c3df 100644 --- a/library/vendor/Zend/View/Helper/Navigation/Breadcrumbs.php +++ b/library/vendor/Zend/View/Helper/Navigation/Breadcrumbs.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_View_Helper_Navigation_HelperAbstract */ +require_once 'Zend/View/Helper/Navigation/HelperAbstract.php'; /** * Helper for printing breadcrumbs @@ -30,7 +31,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Navigation_Breadcrumbs @@ -258,6 +259,7 @@ class Zend_View_Helper_Navigation_Breadcrumbs } if (empty($partial)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception( 'Unable to render menu: No partial view script provided' ); @@ -289,6 +291,7 @@ class Zend_View_Helper_Navigation_Breadcrumbs if (is_array($partial)) { if (count($partial) != 2) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception( 'Unable to render menu: A view partial supplied as ' . 'an array must contain two values: partial view ' diff --git a/library/vendor/Zend/View/Helper/Navigation/Helper.php b/library/vendor/Zend/View/Helper/Navigation/Helper.php index 2bb160727..e7d587816 100644 --- a/library/vendor/Zend/View/Helper/Navigation/Helper.php +++ b/library/vendor/Zend/View/Helper/Navigation/Helper.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_View_Helper_Navigation_Helper diff --git a/library/vendor/Zend/View/Helper/Navigation/HelperAbstract.php b/library/vendor/Zend/View/Helper/Navigation/HelperAbstract.php index d10228bb6..2e733e442 100644 --- a/library/vendor/Zend/View/Helper/Navigation/HelperAbstract.php +++ b/library/vendor/Zend/View/Helper/Navigation/HelperAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,10 +23,12 @@ /** * @see Zend_View_Helper_Navigation_Helper */ +require_once 'Zend/View/Helper/Navigation/Helper.php'; /** * @see Zend_View_Helper_HtmlElement */ +require_once 'Zend/View/Helper/HtmlElement.php'; /** * Base class for navigational helpers @@ -34,7 +36,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Helper_Navigation_HelperAbstract @@ -188,6 +190,7 @@ abstract class Zend_View_Helper_Navigation_HelperAbstract { if (null === $this->_container) { // try to fetch from registry first + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Navigation')) { $nav = Zend_Registry::get('Zend_Navigation'); if ($nav instanceof Zend_Navigation_Container) { @@ -196,6 +199,7 @@ abstract class Zend_View_Helper_Navigation_HelperAbstract } // nothing found in registry, create new container + require_once 'Zend/Navigation.php'; $this->_container = new Zend_Navigation(); } @@ -420,6 +424,7 @@ abstract class Zend_View_Helper_Navigation_HelperAbstract public function getTranslator() { if (null === $this->_translator) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Translate')) { $this->setTranslator(Zend_Registry::get('Zend_Translate')); } @@ -483,6 +488,7 @@ abstract class Zend_View_Helper_Navigation_HelperAbstract $role instanceof Zend_Acl_Role_Interface) { $this->_role = $role; } else { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf( '$role must be a string, null, or an instance of ' . 'Zend_Acl_Role_Interface; %s given', @@ -946,7 +952,7 @@ abstract class Zend_View_Helper_Navigation_HelperAbstract * Sets default ACL role(s) to use when iterating pages if not explicitly * set later with {@link setRole()} * - * @param midex $role [optional] role to set. Expects null, + * @param mixed $role [optional] role to set. Expects null, * string, or an instance of * {@link Zend_Acl_Role_Interface}. * Default is null, which sets no default @@ -961,6 +967,7 @@ abstract class Zend_View_Helper_Navigation_HelperAbstract $role instanceof Zend_Acl_Role_Interface) { self::$_defaultRole = $role; } else { + require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception( '$role must be null|string|Zend_Acl_Role_Interface' ); diff --git a/library/vendor/Zend/View/Helper/Navigation/Links.php b/library/vendor/Zend/View/Helper/Navigation/Links.php index e600c6d47..5d05c1008 100644 --- a/library/vendor/Zend/View/Helper/Navigation/Links.php +++ b/library/vendor/Zend/View/Helper/Navigation/Links.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_View_Helper_Navigation_HelperAbstract */ +require_once 'Zend/View/Helper/Navigation/HelperAbstract.php'; /** * Helper for printing elements @@ -30,7 +31,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Navigation_Links @@ -269,6 +270,7 @@ class Zend_View_Helper_Navigation_Links public function findRelation(Zend_Navigation_Page $page, $rel, $type) { if (!in_array($rel, array('rel', 'rev'))) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf( 'Invalid argument: $rel must be "rel" or "rev"; "%s" given', $rel)); @@ -707,6 +709,7 @@ class Zend_View_Helper_Navigation_Links public function renderLink(Zend_Navigation_Page $page, $attrib, $relation) { if (!in_array($attrib, array('rel', 'rev'))) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf( 'Invalid relation attribute "%s", must be "rel" or "rev"', $attrib)); diff --git a/library/vendor/Zend/View/Helper/Navigation/Menu.php b/library/vendor/Zend/View/Helper/Navigation/Menu.php index 0405b8887..da3faee84 100644 --- a/library/vendor/Zend/View/Helper/Navigation/Menu.php +++ b/library/vendor/Zend/View/Helper/Navigation/Menu.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_View_Helper_Navigation_HelperAbstract */ +require_once 'Zend/View/Helper/Navigation/HelperAbstract.php'; /** * Helper for rendering menus from navigation containers @@ -30,7 +31,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Navigation_Menu @@ -1037,6 +1038,7 @@ class Zend_View_Helper_Navigation_Menu } if (empty($partial)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception( 'Unable to render menu: No partial view script provided' ); @@ -1050,6 +1052,7 @@ class Zend_View_Helper_Navigation_Menu if (is_array($partial)) { if (count($partial) != 2) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception( 'Unable to render menu: A view partial supplied as ' . 'an array must contain two values: partial view ' diff --git a/library/vendor/Zend/View/Helper/Navigation/Sitemap.php b/library/vendor/Zend/View/Helper/Navigation/Sitemap.php index a3b71fa2b..b93808a2c 100644 --- a/library/vendor/Zend/View/Helper/Navigation/Sitemap.php +++ b/library/vendor/Zend/View/Helper/Navigation/Sitemap.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @see Zend_View_Helper_Navigation_HelperAbstract */ +require_once 'Zend/View/Helper/Navigation/HelperAbstract.php'; /** * Helper for printing sitemaps @@ -32,7 +33,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Navigation_Sitemap @@ -185,6 +186,7 @@ class Zend_View_Helper_Navigation_Sitemap */ public function setServerUrl($serverUrl) { + require_once 'Zend/Uri.php'; $uri = Zend_Uri::factory($serverUrl); $uri->setFragment(''); $uri->setPath(''); @@ -193,6 +195,7 @@ class Zend_View_Helper_Navigation_Sitemap if ($uri->valid()) { $this->_serverUrl = $uri->getUri(); } else { + require_once 'Zend/Uri/Exception.php'; $e = new Zend_Uri_Exception(sprintf( 'Invalid server URL: "%s"', $serverUrl)); @@ -293,6 +296,10 @@ class Zend_View_Helper_Navigation_Sitemap // check if we should validate using our own validators if ($this->getUseSitemapValidators()) { + require_once 'Zend/Validate/Sitemap/Changefreq.php'; + require_once 'Zend/Validate/Sitemap/Lastmod.php'; + require_once 'Zend/Validate/Sitemap/Loc.php'; + require_once 'Zend/Validate/Sitemap/Priority.php'; // create validators $locValidator = new Zend_Validate_Sitemap_Loc(); @@ -341,6 +348,7 @@ class Zend_View_Helper_Navigation_Sitemap if ($this->getUseSitemapValidators() && !$locValidator->isValid($url)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf( 'Encountered an invalid URL for Sitemap XML: "%s"', $url)); @@ -398,6 +406,7 @@ class Zend_View_Helper_Navigation_Sitemap // validate using schema if specified if ($this->getUseSchemaValidation()) { if (!@$dom->schemaValidate(self::SITEMAP_XSD)) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception(sprintf( 'Sitemap is invalid according to XML Schema at "%s"', self::SITEMAP_XSD)); diff --git a/library/vendor/Zend/View/Helper/PaginationControl.php b/library/vendor/Zend/View/Helper/PaginationControl.php index b12505044..6f5929a22 100644 --- a/library/vendor/Zend/View/Helper/PaginationControl.php +++ b/library/vendor/Zend/View/Helper/PaginationControl.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_PaginationControl @@ -94,6 +94,7 @@ class Zend_View_Helper_PaginationControl /** * @see Zend_View_Exception */ + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('No paginator instance provided or incorrect type'); $e->setView($this->view); @@ -106,6 +107,7 @@ class Zend_View_Helper_PaginationControl /** * @see Zend_View_Exception */ + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('No view partial provided and no default set'); $e->setView($this->view); throw $e; @@ -125,6 +127,7 @@ class Zend_View_Helper_PaginationControl /** * @see Zend_View_Exception */ + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('A view partial supplied as an array must contain two values: the filename and its module'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/Partial.php b/library/vendor/Zend/View/Helper/Partial.php index b726f3d7a..733f563b9 100644 --- a/library/vendor/Zend/View/Helper/Partial.php +++ b/library/vendor/Zend/View/Helper/Partial.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for rendering a template fragment in its own variable scope. * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Partial extends Zend_View_Helper_Abstract @@ -75,8 +76,10 @@ class Zend_View_Helper_Partial extends Zend_View_Helper_Abstract } if ((null !== $module) && is_string($module)) { + require_once 'Zend/Controller/Front.php'; $moduleDir = Zend_Controller_Front::getInstance()->getControllerDirectory($module); if (null === $moduleDir) { + require_once 'Zend/View/Helper/Partial/Exception.php'; $e = new Zend_View_Helper_Partial_Exception('Cannot render partial; module does not exist'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/Partial/Exception.php b/library/vendor/Zend/View/Helper/Partial/Exception.php index a4ed78b28..9355fd352 100644 --- a/library/vendor/Zend/View/Helper/Partial/Exception.php +++ b/library/vendor/Zend/View/Helper/Partial/Exception.php @@ -15,13 +15,14 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Exception */ +require_once 'Zend/View/Exception.php'; /** @@ -30,7 +31,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Partial_Exception extends Zend_View_Exception diff --git a/library/vendor/Zend/View/Helper/PartialLoop.php b/library/vendor/Zend/View/Helper/PartialLoop.php index 3a3089027..4f90da191 100644 --- a/library/vendor/Zend/View/Helper/PartialLoop.php +++ b/library/vendor/Zend/View/Helper/PartialLoop.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Partial */ +require_once 'Zend/View/Helper/Partial.php'; /** * Helper for rendering a template fragment in its own variable scope; iterates @@ -28,7 +29,7 @@ * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_PartialLoop extends Zend_View_Helper_Partial @@ -69,6 +70,7 @@ class Zend_View_Helper_PartialLoop extends Zend_View_Helper_Partial && (!$model instanceof Traversable) && (is_object($model) && !method_exists($model, 'toArray')) ) { + require_once 'Zend/View/Helper/Partial/Exception.php'; $e = new Zend_View_Helper_Partial_Exception('PartialLoop helper requires iterable data'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/Placeholder.php b/library/vendor/Zend/View/Helper/Placeholder.php index c9122de30..c726b401d 100644 --- a/library/vendor/Zend/View/Helper/Placeholder.php +++ b/library/vendor/Zend/View/Helper/Placeholder.php @@ -15,14 +15,16 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Placeholder_Registry */ +require_once 'Zend/View/Helper/Placeholder/Registry.php'; /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for passing data between otherwise segregated Views. It's called @@ -32,7 +34,7 @@ * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Placeholder extends Zend_View_Helper_Abstract diff --git a/library/vendor/Zend/View/Helper/Placeholder/Container.php b/library/vendor/Zend/View/Helper/Placeholder/Container.php index 56e015d96..10e706d3b 100644 --- a/library/vendor/Zend/View/Helper/Placeholder/Container.php +++ b/library/vendor/Zend/View/Helper/Placeholder/Container.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Placeholder_Container_Abstract */ +require_once 'Zend/View/Helper/Placeholder/Container/Abstract.php'; /** * Container for placeholder values * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Placeholder_Container extends Zend_View_Helper_Placeholder_Container_Abstract diff --git a/library/vendor/Zend/View/Helper/Placeholder/Container/Abstract.php b/library/vendor/Zend/View/Helper/Placeholder/Container/Abstract.php index 02a562e23..0f9cbab47 100644 --- a/library/vendor/Zend/View/Helper/Placeholder/Container/Abstract.php +++ b/library/vendor/Zend/View/Helper/Placeholder/Container/Abstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -25,7 +25,7 @@ * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Helper_Placeholder_Container_Abstract extends ArrayObject @@ -260,6 +260,7 @@ abstract class Zend_View_Helper_Placeholder_Container_Abstract extends ArrayObje public function captureStart($type = Zend_View_Helper_Placeholder_Container_Abstract::APPEND, $key = null) { if ($this->_captureLock) { + require_once 'Zend/View/Helper/Placeholder/Container/Exception.php'; $e = new Zend_View_Helper_Placeholder_Container_Exception('Cannot nest placeholder captures for the same placeholder'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/Placeholder/Container/Exception.php b/library/vendor/Zend/View/Helper/Placeholder/Container/Exception.php index ceb40d352..da15f6e74 100644 --- a/library/vendor/Zend/View/Helper/Placeholder/Container/Exception.php +++ b/library/vendor/Zend/View/Helper/Placeholder/Container/Exception.php @@ -15,13 +15,14 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Exception */ +require_once 'Zend/View/Exception.php'; /** @@ -30,7 +31,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Placeholder_Container_Exception extends Zend_View_Exception diff --git a/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php b/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php index fddc73775..deeca4de3 100644 --- a/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php +++ b/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php @@ -15,21 +15,23 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Placeholder_Registry */ +require_once 'Zend/View/Helper/Placeholder/Registry.php'; /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Base class for targetted placeholder helpers * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Helper_Placeholder_Container_Standalone extends Zend_View_Helper_Abstract implements IteratorAggregate, Countable, ArrayAccess @@ -228,6 +230,7 @@ abstract class Zend_View_Helper_Placeholder_Container_Standalone extends Zend_Vi return $return; } + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('Method "' . $method . '" does not exist'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/Placeholder/Registry.php b/library/vendor/Zend/View/Helper/Placeholder/Registry.php index 2e3f9ef34..b4a10c8c8 100644 --- a/library/vendor/Zend/View/Helper/Placeholder/Registry.php +++ b/library/vendor/Zend/View/Helper/Placeholder/Registry.php @@ -15,23 +15,26 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Registry */ +require_once 'Zend/Registry.php'; /** Zend_View_Helper_Placeholder_Container_Abstract */ +require_once 'Zend/View/Helper/Placeholder/Container/Abstract.php'; /** Zend_View_Helper_Placeholder_Container */ +require_once 'Zend/View/Helper/Placeholder/Container.php'; /** * Registry for placeholder containers * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Placeholder_Registry @@ -157,11 +160,13 @@ class Zend_View_Helper_Placeholder_Registry public function setContainerClass($name) { if (!class_exists($name)) { + require_once 'Zend/Loader.php'; Zend_Loader::loadClass($name); } $reflection = new ReflectionClass($name); if (!$reflection->isSubclassOf(new ReflectionClass('Zend_View_Helper_Placeholder_Container_Abstract'))) { + require_once 'Zend/View/Helper/Placeholder/Registry/Exception.php'; $e = new Zend_View_Helper_Placeholder_Registry_Exception('Invalid Container class specified'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/Placeholder/Registry/Exception.php b/library/vendor/Zend/View/Helper/Placeholder/Registry/Exception.php index a96f7ee0d..6bffa198a 100644 --- a/library/vendor/Zend/View/Helper/Placeholder/Registry/Exception.php +++ b/library/vendor/Zend/View/Helper/Placeholder/Registry/Exception.php @@ -15,13 +15,14 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Exception */ +require_once 'Zend/View/Exception.php'; /** @@ -30,7 +31,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Placeholder_Registry_Exception extends Zend_View_Exception diff --git a/library/vendor/Zend/View/Helper/RenderToPlaceholder.php b/library/vendor/Zend/View/Helper/RenderToPlaceholder.php index aaf179c2c..fd2d3e1ef 100644 --- a/library/vendor/Zend/View/Helper/RenderToPlaceholder.php +++ b/library/vendor/Zend/View/Helper/RenderToPlaceholder.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Renders a template and stores the rendered output as a placeholder @@ -28,7 +29,7 @@ * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/library/vendor/Zend/View/Helper/ServerUrl.php b/library/vendor/Zend/View/Helper/ServerUrl.php index 75fabf72f..c38ec8bc8 100644 --- a/library/vendor/Zend/View/Helper/ServerUrl.php +++ b/library/vendor/Zend/View/Helper/ServerUrl.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_ServerUrl diff --git a/library/vendor/Zend/View/Helper/Translate.php b/library/vendor/Zend/View/Helper/Translate.php index 817233f51..f66a560b0 100644 --- a/library/vendor/Zend/View/Helper/Translate.php +++ b/library/vendor/Zend/View/Helper/Translate.php @@ -15,21 +15,23 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_Locale */ +require_once 'Zend/Locale.php'; /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Translation view helper * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Translate extends Zend_View_Helper_Abstract @@ -110,6 +112,7 @@ class Zend_View_Helper_Translate extends Zend_View_Helper_Abstract } else if ($translate instanceof Zend_Translate) { $this->_translator = $translate->getAdapter(); } else { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('You must set an instance of Zend_Translate or Zend_Translate_Adapter'); $e->setView($this->view); throw $e; @@ -126,6 +129,7 @@ class Zend_View_Helper_Translate extends Zend_View_Helper_Abstract public function getTranslator() { if ($this->_translator === null) { + require_once 'Zend/Registry.php'; if (Zend_Registry::isRegistered('Zend_Translate')) { $this->setTranslator(Zend_Registry::get('Zend_Translate')); } @@ -145,6 +149,7 @@ class Zend_View_Helper_Translate extends Zend_View_Helper_Abstract { $translate = $this->getTranslator(); if ($translate === null) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('You must set an instance of Zend_Translate or Zend_Translate_Adapter'); $e->setView($this->view); throw $e; @@ -164,6 +169,7 @@ class Zend_View_Helper_Translate extends Zend_View_Helper_Abstract { $translate = $this->getTranslator(); if ($translate === null) { + require_once 'Zend/View/Exception.php'; $e = new Zend_View_Exception('You must set an instance of Zend_Translate or Zend_Translate_Adapter'); $e->setView($this->view); throw $e; diff --git a/library/vendor/Zend/View/Helper/Url.php b/library/vendor/Zend/View/Helper/Url.php index a8cf4e022..fbf7b690e 100644 --- a/library/vendor/Zend/View/Helper/Url.php +++ b/library/vendor/Zend/View/Helper/Url.php @@ -15,19 +15,20 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Abstract.php */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for making easy links and getting urls that depend on the routes and router * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_Url extends Zend_View_Helper_Abstract diff --git a/library/vendor/Zend/View/Helper/UserAgent.php b/library/vendor/Zend/View/Helper/UserAgent.php index 1c0cae977..708ccda65 100644 --- a/library/vendor/Zend/View/Helper/UserAgent.php +++ b/library/vendor/Zend/View/Helper/UserAgent.php @@ -15,18 +15,19 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_View_Helper_Abstract */ +require_once 'Zend/View/Helper/Abstract.php'; /** * Helper for interacting with UserAgent instance * * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_UserAgent extends Zend_View_Helper_Abstract @@ -74,6 +75,7 @@ class Zend_View_Helper_UserAgent extends Zend_View_Helper_Abstract public function getUserAgent() { if (null === $this->_userAgent) { + require_once 'Zend/Http/UserAgent.php'; $this->setUserAgent(new Zend_Http_UserAgent()); } return $this->_userAgent; diff --git a/library/vendor/Zend/View/Interface.php b/library/vendor/Zend/View/Interface.php index 7ff43b96c..496ec7108 100644 --- a/library/vendor/Zend/View/Interface.php +++ b/library/vendor/Zend/View/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -25,7 +25,7 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_View_Interface diff --git a/library/vendor/Zend/View/Stream.php b/library/vendor/Zend/View/Stream.php index b1467a5d0..ae8d52419 100644 --- a/library/vendor/Zend/View/Stream.php +++ b/library/vendor/Zend/View/Stream.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -34,7 +34,7 @@ * * @category Zend * @package Zend_View - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Stream diff --git a/library/vendor/Zend/Wildfire/Channel/HttpHeaders.php b/library/vendor/Zend/Wildfire/Channel/HttpHeaders.php index 6a25bcbde..383808948 100644 --- a/library/vendor/Zend/Wildfire/Channel/HttpHeaders.php +++ b/library/vendor/Zend/Wildfire/Channel/HttpHeaders.php @@ -15,22 +15,28 @@ * @category Zend * @package Zend_Wildfire * @subpackage Channel - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_Wildfire_Channel_Interface */ +require_once 'Zend/Wildfire/Channel/Interface.php'; /** Zend_Controller_Request_Abstract */ +require_once('Zend/Controller/Request/Abstract.php'); /** Zend_Controller_Response_Abstract */ +require_once('Zend/Controller/Response/Abstract.php'); /** Zend_Controller_Plugin_Abstract */ +require_once 'Zend/Controller/Plugin/Abstract.php'; /** Zend_Wildfire_Protocol_JsonStream */ +require_once 'Zend/Wildfire/Protocol/JsonStream.php'; /** Zend_Controller_Front **/ +require_once 'Zend/Controller/Front.php'; /** * Implements communication via HTTP request and response headers for Wildfire Protocols. @@ -38,7 +44,7 @@ * @category Zend * @package Zend_Wildfire * @subpackage Channel - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Wildfire_Channel_HttpHeaders extends Zend_Controller_Plugin_Abstract implements Zend_Wildfire_Channel_Interface @@ -77,14 +83,17 @@ class Zend_Wildfire_Channel_HttpHeaders extends Zend_Controller_Plugin_Abstract public static function init($class = null) { if (self::$_instance !== null) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Singleton instance of Zend_Wildfire_Channel_HttpHeaders already exists!'); } if ($class !== null) { if (!is_string($class)) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Third argument is not a class string'); } if (!class_exists($class)) { + require_once 'Zend/Loader.php'; Zend_Loader::loadClass($class); } @@ -92,6 +101,7 @@ class Zend_Wildfire_Channel_HttpHeaders extends Zend_Controller_Plugin_Abstract if (!self::$_instance instanceof Zend_Wildfire_Channel_HttpHeaders) { self::$_instance = null; + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Invalid class to third argument. Must be subclass of Zend_Wildfire_Channel_HttpHeaders.'); } } else { @@ -158,6 +168,7 @@ class Zend_Wildfire_Channel_HttpHeaders extends Zend_Controller_Plugin_Abstract case Zend_Wildfire_Protocol_JsonStream::PROTOCOL_URI; return new Zend_Wildfire_Protocol_JsonStream(); } + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Tyring to initialize unknown protocol for URI "'.$uri.'".'); } @@ -303,6 +314,7 @@ class Zend_Wildfire_Channel_HttpHeaders extends Zend_Controller_Plugin_Abstract $this->setRequest($controller->getRequest()); } if (!$this->_request) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Request objects not initialized.'); } return $this->_request; @@ -323,6 +335,7 @@ class Zend_Wildfire_Channel_HttpHeaders extends Zend_Controller_Plugin_Abstract } } if (!$this->_response) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Response objects not initialized.'); } return $this->_response; diff --git a/library/vendor/Zend/Wildfire/Channel/Interface.php b/library/vendor/Zend/Wildfire/Channel/Interface.php index 916282d17..fccec351c 100644 --- a/library/vendor/Zend/Wildfire/Channel/Interface.php +++ b/library/vendor/Zend/Wildfire/Channel/Interface.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Wildfire - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,7 +22,7 @@ /** * @category Zend * @package Zend_Wildfire - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Wildfire_Channel_Interface diff --git a/library/vendor/Zend/Wildfire/Exception.php b/library/vendor/Zend/Wildfire/Exception.php index 51d021d28..ec2897967 100644 --- a/library/vendor/Zend/Wildfire/Exception.php +++ b/library/vendor/Zend/Wildfire/Exception.php @@ -14,19 +14,20 @@ * * @category Zend * @package Zend_Wildfire - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @version $Id$ * @license http://framework.zend.com/license/new-bsd New BSD License */ /** Zend_Exception */ +require_once 'Zend/Exception.php'; /** * @category Zend * @package Zend_Wildfire - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Wildfire_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Wildfire/Plugin/FirePhp.php b/library/vendor/Zend/Wildfire/Plugin/FirePhp.php index 6e3c031aa..416d2057e 100644 --- a/library/vendor/Zend/Wildfire/Plugin/FirePhp.php +++ b/library/vendor/Zend/Wildfire/Plugin/FirePhp.php @@ -15,20 +15,25 @@ * @category Zend * @package Zend_Wildfire * @subpackage Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_Controller_Request_Abstract */ +require_once('Zend/Controller/Request/Abstract.php'); /** Zend_Controller_Response_Abstract */ +require_once('Zend/Controller/Response/Abstract.php'); /** Zend_Wildfire_Channel_HttpHeaders */ +require_once 'Zend/Wildfire/Channel/HttpHeaders.php'; /** Zend_Wildfire_Protocol_JsonStream */ +require_once 'Zend/Wildfire/Protocol/JsonStream.php'; /** Zend_Wildfire_Plugin_Interface */ +require_once 'Zend/Wildfire/Plugin/Interface.php'; /** * Primary class for communicating with the FirePHP Firefox Extension. @@ -36,7 +41,7 @@ * @category Zend * @package Zend_Wildfire * @subpackage Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Wildfire_Plugin_FirePhp implements Zend_Wildfire_Plugin_Interface @@ -170,19 +175,23 @@ class Zend_Wildfire_Plugin_FirePhp implements Zend_Wildfire_Plugin_Interface public static function init($class = null) { if (self::$_instance !== null) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Singleton instance of Zend_Wildfire_Plugin_FirePhp already exists!'); } if ($class !== null) { if (!is_string($class)) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Third argument is not a class string'); } if (!class_exists($class)) { + require_once 'Zend/Loader.php'; Zend_Loader::loadClass($class); } self::$_instance = new $class(); if (!self::$_instance instanceof Zend_Wildfire_Plugin_FirePhp) { self::$_instance = null; + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Invalid class to third argument. Must be subclass of Zend_Wildfire_Plugin_FirePhp.'); } } else { @@ -458,6 +467,7 @@ class Zend_Wildfire_Plugin_FirePhp implements Zend_Wildfire_Plugin_Interface case self::GROUP_END: break; default: + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Log style "'.$meta['Type'].'" not recognized!'); break; } @@ -545,9 +555,11 @@ class Zend_Wildfire_Plugin_FirePhp implements Zend_Wildfire_Plugin_Interface case self::STRUCTURE_URI_DUMP: if (!isset($data['key'])) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('You must supply a key.'); } if (!array_key_exists('data',$data)) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('You must supply data.'); } @@ -567,9 +579,11 @@ class Zend_Wildfire_Plugin_FirePhp implements Zend_Wildfire_Plugin_Interface !is_array($data['meta']) || !array_key_exists('Type',$data['meta'])) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('You must supply a "Type" in the meta information.'); } if (!array_key_exists('data',$data)) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('You must supply data.'); } @@ -585,6 +599,7 @@ class Zend_Wildfire_Plugin_FirePhp implements Zend_Wildfire_Plugin_Interface $value)); default: + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Structure of name "'.$structure.'" is not recognized.'); break; } diff --git a/library/vendor/Zend/Wildfire/Plugin/FirePhp/Message.php b/library/vendor/Zend/Wildfire/Plugin/FirePhp/Message.php index 070b02717..78e98005a 100644 --- a/library/vendor/Zend/Wildfire/Plugin/FirePhp/Message.php +++ b/library/vendor/Zend/Wildfire/Plugin/FirePhp/Message.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Wildfire * @subpackage Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -28,7 +28,7 @@ * @category Zend * @package Zend_Wildfire * @subpackage Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Wildfire_Plugin_FirePhp_Message diff --git a/library/vendor/Zend/Wildfire/Plugin/FirePhp/TableMessage.php b/library/vendor/Zend/Wildfire/Plugin/FirePhp/TableMessage.php index 101d5632d..c4366df8d 100644 --- a/library/vendor/Zend/Wildfire/Plugin/FirePhp/TableMessage.php +++ b/library/vendor/Zend/Wildfire/Plugin/FirePhp/TableMessage.php @@ -15,14 +15,16 @@ * @category Zend * @package Zend_Wildfire * @subpackage Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_Wildfire_Plugin_FirePhp */ +require_once 'Zend/Wildfire/Plugin/FirePhp.php'; /** Zend_Wildfire_Plugin_FirePhp_Message */ +require_once 'Zend/Wildfire/Plugin/FirePhp/Message.php'; /** * A message envelope that can be updated for the duration of the requet before @@ -31,7 +33,7 @@ * @category Zend * @package Zend_Wildfire * @subpackage Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Wildfire_Plugin_FirePhp_TableMessage extends Zend_Wildfire_Plugin_FirePhp_Message @@ -107,6 +109,7 @@ class Zend_Wildfire_Plugin_FirePhp_TableMessage extends Zend_Wildfire_Plugin_Fir $count = $this->getRowCount(); if($index < 0 || $index > $count-1) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Row index('.$index.') out of bounds('.$count.')!'); } @@ -125,6 +128,7 @@ class Zend_Wildfire_Plugin_FirePhp_TableMessage extends Zend_Wildfire_Plugin_Fir $count = $this->getRowCount(); if($index < 0 || $index > $count-1) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Row index('.$index.') out of bounds('.$count.')!'); } @@ -152,6 +156,7 @@ class Zend_Wildfire_Plugin_FirePhp_TableMessage extends Zend_Wildfire_Plugin_Fir $count = $this->getRowCount(); if($count==0) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Cannot get last row as no rows exist!'); } diff --git a/library/vendor/Zend/Wildfire/Plugin/Interface.php b/library/vendor/Zend/Wildfire/Plugin/Interface.php index eb79bec64..2943ca8e8 100644 --- a/library/vendor/Zend/Wildfire/Plugin/Interface.php +++ b/library/vendor/Zend/Wildfire/Plugin/Interface.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Wildfire * @subpackage Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,7 +24,7 @@ * @category Zend * @package Zend_Wildfire * @subpackage Plugin - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Wildfire_Plugin_Interface diff --git a/library/vendor/Zend/Wildfire/Protocol/JsonStream.php b/library/vendor/Zend/Wildfire/Protocol/JsonStream.php index 87af4a91c..bb793cd0b 100644 --- a/library/vendor/Zend/Wildfire/Protocol/JsonStream.php +++ b/library/vendor/Zend/Wildfire/Protocol/JsonStream.php @@ -15,16 +15,19 @@ * @category Zend * @package Zend_Wildfire * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_Wildfire_Plugin_Interface */ +require_once 'Zend/Wildfire/Plugin/Interface.php'; /** Zend_Wildfire_Channel_Interface */ +require_once 'Zend/Wildfire/Channel/Interface.php'; /** Zend_Json */ +require_once 'Zend/Json.php'; /** * Encodes messages into the Wildfire JSON Stream Communication Protocol. @@ -32,7 +35,7 @@ * @category Zend * @package Zend_Wildfire * @subpackage Protocol - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Wildfire_Protocol_JsonStream @@ -155,6 +158,7 @@ class Zend_Wildfire_Protocol_JsonStream public function getPayload(Zend_Wildfire_Channel_Interface $channel) { if (!$channel instanceof Zend_Wildfire_Channel_HttpHeaders) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('The '.get_class($channel).' channel is not supported by the '.get_class($this).' protocol.'); } @@ -213,6 +217,7 @@ class Zend_Wildfire_Protocol_JsonStream $message_index++; if ($message_index > 99999) { + require_once 'Zend/Wildfire/Exception.php'; throw new Zend_Wildfire_Exception('Maximum number (99,999) of messages reached!'); } } diff --git a/library/vendor/Zend/Xml/Exception.php b/library/vendor/Zend/Xml/Exception.php index baa0ffcfe..b58c24951 100644 --- a/library/vendor/Zend/Xml/Exception.php +++ b/library/vendor/Zend/Xml/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Xml - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,12 +23,13 @@ /** * @see Zend_Exception */ +require_once 'Zend/Exception.php'; /** * @category Zend * @package Zend_Xml - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Xml_Exception extends Zend_Exception diff --git a/library/vendor/Zend/Xml/Security.php b/library/vendor/Zend/Xml/Security.php index 2fa7e158f..d95d4f81e 100644 --- a/library/vendor/Zend/Xml/Security.php +++ b/library/vendor/Zend/Xml/Security.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_Xml - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,7 +23,7 @@ /** * @category Zend * @package Zend_Xml_SecurityScan - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Xml_Security @@ -34,12 +34,14 @@ class Zend_Xml_Security * Heuristic scan to detect entity in XML * * @param string $xml - * @throws Zend_Xml_Exception + * @throws Zend_Xml_Exception If entity expansion or external entity declaration was discovered. */ protected static function heuristicScan($xml) { - if (strpos($xml, 'loadXml($xml, LIBXML_NONET); restore_error_handler(); - // Entity load to previous setting - if (!self::isPhpFpm()) { - libxml_disable_entity_loader($loadEntities); - libxml_use_internal_errors($useInternalXmlErrors); - } - if (!$result) { + // Entity load to previous setting + if (!self::isPhpFpm()) { + libxml_disable_entity_loader($loadEntities); + libxml_use_internal_errors($useInternalXmlErrors); + } return false; } @@ -107,12 +108,19 @@ class Zend_Xml_Security foreach ($dom->childNodes as $child) { if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { if ($child->entities->length > 0) { + require_once 'Exception.php'; throw new Zend_Xml_Exception(self::ENTITY_DETECT); } } } } + // Entity load to previous setting + if (!self::isPhpFpm()) { + libxml_disable_entity_loader($loadEntities); + libxml_use_internal_errors($useInternalXmlErrors); + } + if (isset($simpleXml)) { $result = simplexml_import_dom($dom); if (!$result instanceof SimpleXMLElement) { @@ -134,6 +142,7 @@ class Zend_Xml_Security public static function scanFile($file, DOMDocument $dom = null) { if (!file_exists($file)) { + require_once 'Exception.php'; throw new Zend_Xml_Exception( "The file $file specified doesn't exist" ); @@ -144,13 +153,336 @@ class Zend_Xml_Security /** * Return true if PHP is running with PHP-FPM * + * This method is mainly used to determine whether or not heuristic checks + * (vs libxml checks) should be made, due to threading issues in libxml; + * under php-fpm, threading becomes a concern. + * + * However, PHP versions 5.5.22+ and 5.6.6+ contain a patch to the + * libxml support in PHP that makes the libxml checks viable; in such + * versions, this method will return false to enforce those checks, which + * are more strict and accurate than the heuristic checks. + * * @return boolean */ public static function isPhpFpm() { - if (substr(php_sapi_name(), 0, 3) === 'fpm') { + $isVulnerableVersion = ( + version_compare(PHP_VERSION, '5.5.22', 'lt') + || ( + version_compare(PHP_VERSION, '5.6', 'gte') + && version_compare(PHP_VERSION, '5.6.6', 'lt') + ) + ); + + if (substr(php_sapi_name(), 0, 3) === 'fpm' && $isVulnerableVersion) { return true; } return false; } + + /** + * Determine and return the string(s) to use for the $generator) { + $prefix = call_user_func($generator, '<' . '?xml'); + if (0 === strncmp($xml, $prefix, strlen($prefix))) { + return $encoding; + } + } + + // Fallback + return 'UTF-8'; + } + + /** + * Attempt to detect the specified XML encoding. + * + * Using the file's encoding, determines if an "encoding" attribute is + * present and well-formed in the XML declaration; if so, it returns a + * list with both the ASCII representation of that declaration and the + * original file encoding. + * + * If not, a list containing only the provided file encoding is returned. + * + * @param string $xml + * @param string $fileEncoding + * @return string[] Potential XML encodings + */ + protected static function detectXmlEncoding($xml, $fileEncoding) + { + $encodingMap = self::getAsciiEncodingMap(); + $generator = $encodingMap[$fileEncoding]; + $encAttr = call_user_func($generator, 'encoding="'); + $quote = call_user_func($generator, '"'); + $close = call_user_func($generator, '>'); + + $closePos = strpos($xml, $close); + if (false === $closePos) { + return array($fileEncoding); + } + + $encPos = strpos($xml, $encAttr); + if (false === $encPos + || $encPos > $closePos + ) { + return array($fileEncoding); + } + + $encPos += strlen($encAttr); + $quotePos = strpos($xml, $quote, $encPos); + if (false === $quotePos) { + return array($fileEncoding); + } + + $encoding = self::substr($xml, $encPos, $quotePos); + return array( + // Following line works because we're only supporting 8-bit safe encodings at this time. + str_replace('\0', '', $encoding), // detected encoding + $fileEncoding, // file encoding + ); + } + + /** + * Return a list of BOM maps. + * + * Returns a list of common encoding -> BOM maps, along with the character + * length to compare against. + * + * @link https://en.wikipedia.org/wiki/Byte_order_mark + * @return array + */ + protected static function getBomMap() + { + return array( + array( + 'encoding' => 'UTF-32BE', + 'bom' => pack('CCCC', 0x00, 0x00, 0xfe, 0xff), + 'length' => 4, + ), + array( + 'encoding' => 'UTF-32LE', + 'bom' => pack('CCCC', 0xff, 0xfe, 0x00, 0x00), + 'length' => 4, + ), + array( + 'encoding' => 'GB-18030', + 'bom' => pack('CCCC', 0x84, 0x31, 0x95, 0x33), + 'length' => 4, + ), + array( + 'encoding' => 'UTF-16BE', + 'bom' => pack('CC', 0xfe, 0xff), + 'length' => 2, + ), + array( + 'encoding' => 'UTF-16LE', + 'bom' => pack('CC', 0xff, 0xfe), + 'length' => 2, + ), + array( + 'encoding' => 'UTF-8', + 'bom' => pack('CCC', 0xef, 0xbb, 0xbf), + 'length' => 3, + ), + ); + } + + /** + * Return a map of encoding => generator pairs. + * + * Returns a map of encoding => generator pairs, where the generator is a + * callable that accepts a string and returns the appropriate byte order + * sequence of that string for the encoding. + * + * @return array + */ + protected static function getAsciiEncodingMap() + { + return array( + 'UTF-32BE' => array(__CLASS__, 'encodeToUTF32BE'), + 'UTF-32LE' => array(__CLASS__, 'encodeToUTF32LE'), + 'UTF-32odd1' => array(__CLASS__, 'encodeToUTF32odd1'), + 'UTF-32odd2' => array(__CLASS__, 'encodeToUTF32odd2'), + 'UTF-16BE' => array(__CLASS__, 'encodeToUTF16BE'), + 'UTF-16LE' => array(__CLASS__, 'encodeToUTF16LE'), + 'UTF-8' => array(__CLASS__, 'encodeToUTF8'), + 'GB-18030' => array(__CLASS__, 'encodeToUTF8'), + ); + } + + /** + * Binary-safe substr. + * + * substr() is not binary-safe; this method loops by character to ensure + * multi-byte characters are aggregated correctly. + * + * @param string $string + * @param int $start + * @param int $end + * @return string + */ + protected static function substr($string, $start, $end) + { + $substr = ''; + for ($i = $start; $i < $end; $i += 1) { + $substr .= $string[$i]; + } + return $substr; + } + + /** + * Generate an entity comparison based on the given encoding. + * + * This patch is internal only, and public only so it can be used as a + * callable to pass to array_map. + * + * @internal + * @param string $encoding + * @return string + */ + public static function generateEntityComparison($encoding) + { + $encodingMap = self::getAsciiEncodingMap(); + $generator = isset($encodingMap[$encoding]) ? $encodingMap[$encoding] : $encodingMap['UTF-8']; + return call_user_func($generator, 'getMessage(), $httpResponse->getStatus()); @@ -375,6 +383,7 @@ class Zend_XmlRpc_Client * Exception thrown when an XML-RPC fault is returned * @see Zend_XmlRpc_Client_FaultException */ + require_once 'Zend/XmlRpc/Client/FaultException.php'; throw new Zend_XmlRpc_Client_FaultException($fault->getMessage(), $fault->getCode()); } diff --git a/library/vendor/Zend/XmlRpc/Client/Exception.php b/library/vendor/Zend/XmlRpc/Client/Exception.php index 96cb7730c..d82601da6 100644 --- a/library/vendor/Zend/XmlRpc/Client/Exception.php +++ b/library/vendor/Zend/XmlRpc/Client/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Zend_XmlRpc_Exception */ +require_once 'Zend/XmlRpc/Exception.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Client_Exception extends Zend_XmlRpc_Exception diff --git a/library/vendor/Zend/XmlRpc/Client/FaultException.php b/library/vendor/Zend/XmlRpc/Client/FaultException.php index 34b9f9e4c..14ffac3ad 100644 --- a/library/vendor/Zend/XmlRpc/Client/FaultException.php +++ b/library/vendor/Zend/XmlRpc/Client/FaultException.php @@ -15,13 +15,14 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_XmlRpc_Client_Exception */ +require_once 'Zend/XmlRpc/Client/Exception.php'; /** @@ -30,7 +31,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Client_FaultException extends Zend_XmlRpc_Client_Exception diff --git a/library/vendor/Zend/XmlRpc/Client/HttpException.php b/library/vendor/Zend/XmlRpc/Client/HttpException.php index f62c57f4c..c4186acde 100644 --- a/library/vendor/Zend/XmlRpc/Client/HttpException.php +++ b/library/vendor/Zend/XmlRpc/Client/HttpException.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Zend_XmlRpc_Exception */ +require_once 'Zend/XmlRpc/Client/Exception.php'; /** @@ -33,7 +34,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Client_HttpException extends Zend_XmlRpc_Client_Exception diff --git a/library/vendor/Zend/XmlRpc/Client/IntrospectException.php b/library/vendor/Zend/XmlRpc/Client/IntrospectException.php index 07104867d..51fb30e8d 100644 --- a/library/vendor/Zend/XmlRpc/Client/IntrospectException.php +++ b/library/vendor/Zend/XmlRpc/Client/IntrospectException.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Zend_XmlRpc_Client_Exception */ +require_once 'Zend/XmlRpc/Client/Exception.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Client_IntrospectException extends Zend_XmlRpc_Client_Exception diff --git a/library/vendor/Zend/XmlRpc/Client/ServerIntrospection.php b/library/vendor/Zend/XmlRpc/Client/ServerIntrospection.php index 2008c3c72..68848d111 100644 --- a/library/vendor/Zend/XmlRpc/Client/ServerIntrospection.php +++ b/library/vendor/Zend/XmlRpc/Client/ServerIntrospection.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Client_ServerIntrospection @@ -56,6 +56,7 @@ class Zend_XmlRpc_Client_ServerIntrospection { $methods = $this->listMethods(); + require_once 'Zend/XmlRpc/Client/FaultException.php'; try { $signatures = $this->getSignatureForEachMethodByMulticall($methods); } catch (Zend_XmlRpc_Client_FaultException $e) { @@ -94,11 +95,13 @@ class Zend_XmlRpc_Client_ServerIntrospection if (! is_array($serverSignatures)) { $type = gettype($serverSignatures); $error = "Multicall return is malformed. Expected array, got $type"; + require_once 'Zend/XmlRpc/Client/IntrospectException.php'; throw new Zend_XmlRpc_Client_IntrospectException($error); } if (count($serverSignatures) != count($methods)) { $error = 'Bad number of signatures received from multicall'; + require_once 'Zend/XmlRpc/Client/IntrospectException.php'; throw new Zend_XmlRpc_Client_IntrospectException($error); } @@ -143,6 +146,7 @@ class Zend_XmlRpc_Client_ServerIntrospection $signature = $this->_system->methodSignature($method); if (!is_array($signature)) { $error = 'Invalid signature for method "' . $method . '"'; + require_once 'Zend/XmlRpc/Client/IntrospectException.php'; throw new Zend_XmlRpc_Client_IntrospectException($error); } return $signature; diff --git a/library/vendor/Zend/XmlRpc/Client/ServerProxy.php b/library/vendor/Zend/XmlRpc/Client/ServerProxy.php index 4973d3c86..516619773 100644 --- a/library/vendor/Zend/XmlRpc/Client/ServerProxy.php +++ b/library/vendor/Zend/XmlRpc/Client/ServerProxy.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Client - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Client_ServerProxy diff --git a/library/vendor/Zend/XmlRpc/Exception.php b/library/vendor/Zend/XmlRpc/Exception.php index fa132ea5a..d3350515a 100644 --- a/library/vendor/Zend/XmlRpc/Exception.php +++ b/library/vendor/Zend/XmlRpc/Exception.php @@ -14,7 +14,7 @@ * * @category Zend * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,12 +23,13 @@ /** * Zend_Exception */ +require_once 'Zend/Exception.php'; /** * @category Zend * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Exception extends Zend_Exception diff --git a/library/vendor/Zend/XmlRpc/Fault.php b/library/vendor/Zend/XmlRpc/Fault.php index 37cf68e22..25a5b7d01 100644 --- a/library/vendor/Zend/XmlRpc/Fault.php +++ b/library/vendor/Zend/XmlRpc/Fault.php @@ -14,7 +14,7 @@ * * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -22,6 +22,7 @@ /** * Zend_XmlRpc_Value */ +require_once 'Zend/XmlRpc/Value.php'; /** * XMLRPC Faults @@ -35,7 +36,7 @@ * * @category Zend * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Fault @@ -193,6 +194,7 @@ class Zend_XmlRpc_Fault public function loadXml($fault) { if (!is_string($fault)) { + require_once 'Zend/XmlRpc/Exception.php'; throw new Zend_XmlRpc_Exception('Invalid XML provided to fault'); } @@ -200,6 +202,7 @@ class Zend_XmlRpc_Fault $xml = @new SimpleXMLElement($fault); } catch (Exception $e) { // Not valid XML + require_once 'Zend/XmlRpc/Exception.php'; throw new Zend_XmlRpc_Exception('Failed to parse XML fault: ' . $e->getMessage(), 500, $e); } @@ -211,6 +214,7 @@ class Zend_XmlRpc_Fault if (!$xml->fault->value->struct) { // not a proper fault + require_once 'Zend/XmlRpc/Exception.php'; throw new Zend_XmlRpc_Exception('Invalid fault structure', 500); } @@ -226,6 +230,7 @@ class Zend_XmlRpc_Fault } if (empty($code) && empty($message)) { + require_once 'Zend/XmlRpc/Exception.php'; throw new Zend_XmlRpc_Exception('Fault code and string required'); } @@ -256,6 +261,7 @@ class Zend_XmlRpc_Fault public static function isFault($xml) { $fault = new self(); + require_once 'Zend/XmlRpc/Exception.php'; try { $isFault = $fault->loadXml($xml); } catch (Zend_XmlRpc_Exception $e) { diff --git a/library/vendor/Zend/XmlRpc/Generator/DomDocument.php b/library/vendor/Zend/XmlRpc/Generator/DomDocument.php index 8067804dd..88bc05fa0 100644 --- a/library/vendor/Zend/XmlRpc/Generator/DomDocument.php +++ b/library/vendor/Zend/XmlRpc/Generator/DomDocument.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Generator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @var Zend_XmlRpc_Generator_GeneratorAbstract */ +require_once 'Zend/XmlRpc/Generator/GeneratorAbstract.php'; /** * DOMDocument based implementation of a XML/RPC generator diff --git a/library/vendor/Zend/XmlRpc/Generator/GeneratorAbstract.php b/library/vendor/Zend/XmlRpc/Generator/GeneratorAbstract.php index b5b93ed53..03afcd696 100644 --- a/library/vendor/Zend/XmlRpc/Generator/GeneratorAbstract.php +++ b/library/vendor/Zend/XmlRpc/Generator/GeneratorAbstract.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Generator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/XmlRpc/Generator/XmlWriter.php b/library/vendor/Zend/XmlRpc/Generator/XmlWriter.php index 3683ff6e4..a84e11d3b 100644 --- a/library/vendor/Zend/XmlRpc/Generator/XmlWriter.php +++ b/library/vendor/Zend/XmlRpc/Generator/XmlWriter.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Generator - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * @var Zend_XmlRpc_Generator_GeneratorAbstract */ +require_once 'Zend/XmlRpc/Generator/GeneratorAbstract.php'; /** * XML generator adapter based on XMLWriter diff --git a/library/vendor/Zend/XmlRpc/Request.php b/library/vendor/Zend/XmlRpc/Request.php index 8f4274893..73bb9670a 100644 --- a/library/vendor/Zend/XmlRpc/Request.php +++ b/library/vendor/Zend/XmlRpc/Request.php @@ -14,21 +14,25 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * Zend_XmlRpc_Value */ +require_once 'Zend/XmlRpc/Value.php'; /** * Zend_XmlRpc_Fault */ +require_once 'Zend/XmlRpc/Fault.php'; /** @see Zend_Xml_Security */ +require_once 'Zend/Xml/Security.php'; /** @see Zend_Xml_Exception */ +require_once 'Zend/Xml/Exception.php'; /** * XmlRpc Request object @@ -43,7 +47,7 @@ * * @category Zend * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/XmlRpc/Request/Http.php b/library/vendor/Zend/XmlRpc/Request/Http.php index 62990d566..df058a1a8 100644 --- a/library/vendor/Zend/XmlRpc/Request/Http.php +++ b/library/vendor/Zend/XmlRpc/Request/Http.php @@ -14,13 +14,14 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * Zend_XmlRpc_Request */ +require_once 'Zend/XmlRpc/Request.php'; /** * XmlRpc Request object -- Request via HTTP @@ -31,7 +32,7 @@ * * @category Zend * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -62,6 +63,7 @@ class Zend_XmlRpc_Request_Http extends Zend_XmlRpc_Request { $xml = @file_get_contents('php://input'); if (!$xml) { + require_once 'Zend/XmlRpc/Fault.php'; $this->_fault = new Zend_XmlRpc_Fault(630); return; } diff --git a/library/vendor/Zend/XmlRpc/Request/Stdin.php b/library/vendor/Zend/XmlRpc/Request/Stdin.php index 783ed2a61..d6bb539e1 100644 --- a/library/vendor/Zend/XmlRpc/Request/Stdin.php +++ b/library/vendor/Zend/XmlRpc/Request/Stdin.php @@ -14,13 +14,14 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * Zend_XmlRpc_Request */ +require_once 'Zend/XmlRpc/Request.php'; /** * XmlRpc Request object -- Request via STDIN @@ -31,7 +32,7 @@ * * @category Zend * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/XmlRpc/Response.php b/library/vendor/Zend/XmlRpc/Response.php index b54c6db22..be5a6cbb4 100644 --- a/library/vendor/Zend/XmlRpc/Response.php +++ b/library/vendor/Zend/XmlRpc/Response.php @@ -14,21 +14,25 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * Zend_XmlRpc_Value */ +require_once 'Zend/XmlRpc/Value.php'; /** * Zend_XmlRpc_Fault */ +require_once 'Zend/XmlRpc/Fault.php'; /** @see Zend_Xml_Security */ +require_once 'Zend/Xml/Security.php'; /** @see Zend_Xml_Exception */ +require_once 'Zend/Xml/Exception.php'; /** * XmlRpc Response @@ -37,7 +41,7 @@ * * @category Zend * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -204,6 +208,7 @@ class Zend_XmlRpc_Response try { if (!isset($xml->params) || !isset($xml->params->param) || !isset($xml->params->param->value)) { + require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception('Missing XML-RPC value in XML'); } $valueXml = $xml->params->param->value->asXML(); diff --git a/library/vendor/Zend/XmlRpc/Response/Http.php b/library/vendor/Zend/XmlRpc/Response/Http.php index b6ffe754c..5bc246ba6 100644 --- a/library/vendor/Zend/XmlRpc/Response/Http.php +++ b/library/vendor/Zend/XmlRpc/Response/Http.php @@ -14,13 +14,14 @@ * * @category Zend * @package Zend_Controller - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * Zend_XmlRpc_Response */ +require_once 'Zend/XmlRpc/Response.php'; /** * HTTP response @@ -28,7 +29,7 @@ * @uses Zend_XmlRpc_Response * @category Zend * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ diff --git a/library/vendor/Zend/XmlRpc/Server.php b/library/vendor/Zend/XmlRpc/Server.php index 700e016b5..1c747084b 100644 --- a/library/vendor/Zend/XmlRpc/Server.php +++ b/library/vendor/Zend/XmlRpc/Server.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,49 +23,64 @@ /** * Extends Zend_Server_Abstract */ +require_once 'Zend/Server/Abstract.php'; /** * XMLRPC Request */ +require_once 'Zend/XmlRpc/Request.php'; /** * XMLRPC Response */ +require_once 'Zend/XmlRpc/Response.php'; /** * XMLRPC HTTP Response */ +require_once 'Zend/XmlRpc/Response/Http.php'; /** * XMLRPC server fault class */ +require_once 'Zend/XmlRpc/Server/Fault.php'; /** * XMLRPC server system methods class */ +require_once 'Zend/XmlRpc/Server/System.php'; /** * Convert PHP to and from xmlrpc native types */ +require_once 'Zend/XmlRpc/Value.php'; /** * Reflection API for function/method introspection */ +require_once 'Zend/Server/Reflection.php'; /** * Zend_Server_Reflection_Function_Abstract */ +require_once 'Zend/Server/Reflection/Function/Abstract.php'; /** * Specifically grab the Zend_Server_Reflection_Method for manually setting up * system.* methods and handling callbacks in {@link loadFunctions()}. */ +require_once 'Zend/Server/Reflection/Method.php'; /** * An XML-RPC server implementation * * Example: * + * require_once 'Zend/XmlRpc/Server.php'; + * require_once 'Zend/XmlRpc/Server/Cache.php'; + * require_once 'Zend/XmlRpc/Server/Fault.php'; + * require_once 'My/Exception.php'; + * require_once 'My/Fault/Observer.php'; * * // Instantiate server * $server = new Zend_XmlRpc_Server(); @@ -76,6 +91,8 @@ * * // Get or build dispatch table: * if (!Zend_XmlRpc_Server_Cache::get($filename, $server)) { + * require_once 'Some/Service/Class.php'; + * require_once 'Another/Service/Class.php'; * * // Attach Some_Service_Class in 'some' namespace * $server->setClass('Some_Service_Class', 'some'); @@ -94,7 +111,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Server extends Zend_Server_Abstract @@ -191,6 +208,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract { $system = $this->getSystem(); if (!method_exists($system, $method)) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Unknown instance method called on server: ' . $method); } return call_user_func_array(array($system, $method), $params); @@ -215,6 +233,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract public function addFunction($function, $namespace = '') { if (!is_string($function) && !is_array($function)) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Unable to attach function; invalid', 611); } @@ -227,6 +246,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract $function = (array) $function; foreach ($function as $func) { if (!is_string($func) || !function_exists($func)) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Unable to attach function; invalid', 611); } $reflection = Zend_Server_Reflection::reflectFunction($func, $argv, $namespace); @@ -254,16 +274,17 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract public function setClass($class, $namespace = '', $argv = null) { if (is_string($class) && !class_exists($class)) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Invalid method class', 610); } - $argv = null; + $args = null; if (2 < func_num_args()) { - $argv = func_get_args(); - $argv = array_slice($argv, 2); + $args = func_get_args(); + $args = array_slice($args, 2); } - $dispatchable = Zend_Server_Reflection::reflectClass($class, $argv, $namespace); + $dispatchable = Zend_Server_Reflection::reflectClass($class, $args, $namespace); foreach ($dispatchable->getMethods() as $reflection) { $this->_buildSignature($reflection, $class); } @@ -283,6 +304,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract if (empty($fault)) { $fault = 'Unknown Error'; } + require_once 'Zend/XmlRpc/Server/Exception.php'; $fault = new Zend_XmlRpc_Server_Exception($fault, $code); } @@ -301,6 +323,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract if ((!$request || !$request instanceof Zend_XmlRpc_Request) && (null === ($request = $this->getRequest())) ) { + require_once 'Zend/XmlRpc/Request/Http.php'; $request = new Zend_XmlRpc_Request_Http(); $request->setEncoding($this->getEncoding()); } @@ -341,6 +364,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract } else { $type = gettype($definition); } + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Unable to load server definition; must be an array or Zend_Server_Definition, received ' . $type, 612); } @@ -404,10 +428,12 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract if (is_string($request) && class_exists($request)) { $request = new $request(); if (!$request instanceof Zend_XmlRpc_Request) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Invalid request class'); } $request->setEncoding($this->getEncoding()); } elseif (!$request instanceof Zend_XmlRpc_Request) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Invalid request object'); } @@ -436,6 +462,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract if (!class_exists($class) or ($c = new ReflectionClass($class) and !$c->isSubclassOf('Zend_XmlRpc_Response'))) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Invalid response class'); } $this->_responseClass = $class; @@ -532,6 +559,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract // Check for valid method if (!$this->_table->hasMethod($method)) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Method "' . $method . '" does not exist', 620); } @@ -564,6 +592,7 @@ class Zend_XmlRpc_Server extends Zend_Server_Abstract } } if (!$matched) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Calling parameters do not match signature', 623); } diff --git a/library/vendor/Zend/XmlRpc/Server/Cache.php b/library/vendor/Zend/XmlRpc/Server/Cache.php index 609714441..7c52902b6 100644 --- a/library/vendor/Zend/XmlRpc/Server/Cache.php +++ b/library/vendor/Zend/XmlRpc/Server/Cache.php @@ -15,12 +15,13 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Zend_Server_Cache */ +require_once 'Zend/Server/Cache.php'; /** * Zend_XmlRpc_Server_Cache: cache Zend_XmlRpc_Server server definition @@ -28,7 +29,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Server_Cache extends Zend_Server_Cache diff --git a/library/vendor/Zend/XmlRpc/Server/Exception.php b/library/vendor/Zend/XmlRpc/Server/Exception.php index f8370bbaf..36952623b 100644 --- a/library/vendor/Zend/XmlRpc/Server/Exception.php +++ b/library/vendor/Zend/XmlRpc/Server/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,6 +24,7 @@ /** * Zend_XmlRpc_Exception */ +require_once 'Zend/XmlRpc/Exception.php'; /** @@ -32,7 +33,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Server_Exception extends Zend_XmlRpc_Exception diff --git a/library/vendor/Zend/XmlRpc/Server/Fault.php b/library/vendor/Zend/XmlRpc/Server/Fault.php index e8928d185..8ccb9ba41 100644 --- a/library/vendor/Zend/XmlRpc/Server/Fault.php +++ b/library/vendor/Zend/XmlRpc/Server/Fault.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -23,6 +23,7 @@ /** * Zend_XmlRpc_Fault */ +require_once 'Zend/XmlRpc/Fault.php'; /** @@ -43,7 +44,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Server_Fault extends Zend_XmlRpc_Fault diff --git a/library/vendor/Zend/XmlRpc/Server/System.php b/library/vendor/Zend/XmlRpc/Server/System.php index 15c857937..340eb1cd7 100644 --- a/library/vendor/Zend/XmlRpc/Server/System.php +++ b/library/vendor/Zend/XmlRpc/Server/System.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -26,7 +26,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Server - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Server_System @@ -70,6 +70,7 @@ class Zend_XmlRpc_Server_System { $table = $this->_server->getDispatchTable(); if (!$table->hasMethod($method)) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Method "' . $method . '" does not exist', 640); } @@ -86,6 +87,7 @@ class Zend_XmlRpc_Server_System { $table = $this->_server->getDispatchTable(); if (!$table->hasMethod($method)) { + require_once 'Zend/XmlRpc/Server/Exception.php'; throw new Zend_XmlRpc_Server_Exception('Method "' . $method . '" does not exist', 640); } $method = $table->getMethod($method)->toArray(); diff --git a/library/vendor/Zend/XmlRpc/Value.php b/library/vendor/Zend/XmlRpc/Value.php index 82060de16..6b2244996 100644 --- a/library/vendor/Zend/XmlRpc/Value.php +++ b/library/vendor/Zend/XmlRpc/Value.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -31,7 +31,7 @@ * from PHP variables, XML string or by specifing the exact XML-RPC natvie type * * @package Zend_XmlRpc - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_XmlRpc_Value @@ -106,8 +106,10 @@ abstract class Zend_XmlRpc_Value { if (!self::$_generator) { if (extension_loaded('xmlwriter')) { + require_once 'Zend/XmlRpc/Generator/XmlWriter.php'; self::$_generator = new Zend_XmlRpc_Generator_XmlWriter(); } else { + require_once 'Zend/XmlRpc/Generator/DomDocument.php'; self::$_generator = new Zend_XmlRpc_Generator_DomDocument(); } } @@ -201,40 +203,51 @@ abstract class Zend_XmlRpc_Value case self::XMLRPC_TYPE_I4: // fall through to the next case case self::XMLRPC_TYPE_INTEGER: + require_once 'Zend/XmlRpc/Value/Integer.php'; return new Zend_XmlRpc_Value_Integer($value); case self::XMLRPC_TYPE_I8: // fall through to the next case case self::XMLRPC_TYPE_APACHEI8: + require_once 'Zend/XmlRpc/Value/BigInteger.php'; return new Zend_XmlRpc_Value_BigInteger($value); case self::XMLRPC_TYPE_DOUBLE: + require_once 'Zend/XmlRpc/Value/Double.php'; return new Zend_XmlRpc_Value_Double($value); case self::XMLRPC_TYPE_BOOLEAN: + require_once 'Zend/XmlRpc/Value/Boolean.php'; return new Zend_XmlRpc_Value_Boolean($value); case self::XMLRPC_TYPE_STRING: + require_once 'Zend/XmlRpc/Value/String.php'; return new Zend_XmlRpc_Value_String($value); case self::XMLRPC_TYPE_BASE64: + require_once 'Zend/XmlRpc/Value/Base64.php'; return new Zend_XmlRpc_Value_Base64($value); case self::XMLRPC_TYPE_NIL: // fall through to the next case case self::XMLRPC_TYPE_APACHENIL: + require_once 'Zend/XmlRpc/Value/Nil.php'; return new Zend_XmlRpc_Value_Nil(); case self::XMLRPC_TYPE_DATETIME: + require_once 'Zend/XmlRpc/Value/DateTime.php'; return new Zend_XmlRpc_Value_DateTime($value); case self::XMLRPC_TYPE_ARRAY: + require_once 'Zend/XmlRpc/Value/Array.php'; return new Zend_XmlRpc_Value_Array($value); case self::XMLRPC_TYPE_STRUCT: + require_once 'Zend/XmlRpc/Value/Struct.php'; return new Zend_XmlRpc_Value_Struct($value); default: + require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception('Given type is not a '. __CLASS__ .' constant'); } } @@ -293,6 +306,7 @@ abstract class Zend_XmlRpc_Value return $value; } if ($value instanceof Zend_Crypt_Math_BigInteger) { + require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception( 'Using Zend_Crypt_Math_BigInteger to get an ' . 'instance of Zend_XmlRpc_Value_BigInteger is not ' . @@ -304,30 +318,38 @@ abstract class Zend_XmlRpc_Value switch (self::getXmlRpcTypeByValue($value)) { case self::XMLRPC_TYPE_DATETIME: + require_once 'Zend/XmlRpc/Value/DateTime.php'; return new Zend_XmlRpc_Value_DateTime($value); case self::XMLRPC_TYPE_ARRAY: + require_once 'Zend/XmlRpc/Value/Array.php'; return new Zend_XmlRpc_Value_Array($value); case self::XMLRPC_TYPE_STRUCT: + require_once 'Zend/XmlRpc/Value/Struct.php'; return new Zend_XmlRpc_Value_Struct($value); case self::XMLRPC_TYPE_INTEGER: + require_once 'Zend/XmlRpc/Value/Integer.php'; return new Zend_XmlRpc_Value_Integer($value); case self::XMLRPC_TYPE_DOUBLE: + require_once 'Zend/XmlRpc/Value/Double.php'; return new Zend_XmlRpc_Value_Double($value); case self::XMLRPC_TYPE_BOOLEAN: + require_once 'Zend/XmlRpc/Value/Boolean.php'; return new Zend_XmlRpc_Value_Boolean($value); case self::XMLRPC_TYPE_NIL: + require_once 'Zend/XmlRpc/Value/Nil.php'; return new Zend_XmlRpc_Value_Nil; case self::XMLRPC_TYPE_STRING: // Fall through to the next case default: // If type isn't identified (or identified as string), it treated as string + require_once 'Zend/XmlRpc/Value/String.php'; return new Zend_XmlRpc_Value_String($value); } } @@ -353,32 +375,40 @@ abstract class Zend_XmlRpc_Value case self::XMLRPC_TYPE_I4: // Fall through to the next case case self::XMLRPC_TYPE_INTEGER: + require_once 'Zend/XmlRpc/Value/Integer.php'; $xmlrpcValue = new Zend_XmlRpc_Value_Integer($value); break; case self::XMLRPC_TYPE_APACHEI8: // Fall through to the next case case self::XMLRPC_TYPE_I8: + require_once 'Zend/XmlRpc/Value/BigInteger.php'; $xmlrpcValue = new Zend_XmlRpc_Value_BigInteger($value); break; case self::XMLRPC_TYPE_DOUBLE: + require_once 'Zend/XmlRpc/Value/Double.php'; $xmlrpcValue = new Zend_XmlRpc_Value_Double($value); break; case self::XMLRPC_TYPE_BOOLEAN: + require_once 'Zend/XmlRpc/Value/Boolean.php'; $xmlrpcValue = new Zend_XmlRpc_Value_Boolean($value); break; case self::XMLRPC_TYPE_STRING: + require_once 'Zend/XmlRpc/Value/String.php'; $xmlrpcValue = new Zend_XmlRpc_Value_String($value); break; case self::XMLRPC_TYPE_DATETIME: // The value should already be in a iso8601 format + require_once 'Zend/XmlRpc/Value/DateTime.php'; $xmlrpcValue = new Zend_XmlRpc_Value_DateTime($value); break; case self::XMLRPC_TYPE_BASE64: // The value should already be base64 encoded + require_once 'Zend/XmlRpc/Value/Base64.php'; $xmlrpcValue = new Zend_XmlRpc_Value_Base64($value, true); break; case self::XMLRPC_TYPE_NIL: // Fall through to the next case case self::XMLRPC_TYPE_APACHENIL: // The value should always be NULL + require_once 'Zend/XmlRpc/Value/Nil.php'; $xmlrpcValue = new Zend_XmlRpc_Value_Nil(); break; case self::XMLRPC_TYPE_ARRAY: @@ -393,6 +423,7 @@ abstract class Zend_XmlRpc_Value } if (null === $data) { + require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception('Invalid XML for XML-RPC native '. self::XMLRPC_TYPE_ARRAY .' type: ARRAY tag must contain DATA tag'); } $values = array(); @@ -401,6 +432,7 @@ abstract class Zend_XmlRpc_Value foreach ($data->value as $element) { $values[] = self::_xmlStringToNativeXmlRpc($element); } + require_once 'Zend/XmlRpc/Value/Array.php'; $xmlrpcValue = new Zend_XmlRpc_Value_Array($values); break; case self::XMLRPC_TYPE_STRUCT: @@ -416,9 +448,11 @@ abstract class Zend_XmlRpc_Value } $values[(string)$member->name] = self::_xmlStringToNativeXmlRpc($member->value); } + require_once 'Zend/XmlRpc/Value/Struct.php'; $xmlrpcValue = new Zend_XmlRpc_Value_Struct($values); break; default: + require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception('Value type \''. $type .'\' parsed from the XML string is not a known XML-RPC native type'); break; } @@ -437,6 +471,7 @@ abstract class Zend_XmlRpc_Value $xml = new SimpleXMLElement($xml); } catch (Exception $e) { // The given string is not a valid XML + require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception('Failed to create XML-RPC value from XML string: ' . $e->getMessage(), $e->getCode(), $e); } } diff --git a/library/vendor/Zend/XmlRpc/Value/Array.php b/library/vendor/Zend/XmlRpc/Value/Array.php index 9da17a1e9..60f68b296 100644 --- a/library/vendor/Zend/XmlRpc/Value/Array.php +++ b/library/vendor/Zend/XmlRpc/Value/Array.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value_Collection */ +require_once 'Zend/XmlRpc/Value/Collection.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_Array extends Zend_XmlRpc_Value_Collection diff --git a/library/vendor/Zend/XmlRpc/Value/Base64.php b/library/vendor/Zend/XmlRpc/Value/Base64.php index 0e6224cdf..eee61bae5 100644 --- a/library/vendor/Zend/XmlRpc/Value/Base64.php +++ b/library/vendor/Zend/XmlRpc/Value/Base64.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value_Scalar */ +require_once 'Zend/XmlRpc/Value/Scalar.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_Base64 extends Zend_XmlRpc_Value_Scalar diff --git a/library/vendor/Zend/XmlRpc/Value/BigInteger.php b/library/vendor/Zend/XmlRpc/Value/BigInteger.php index ce7f3e4b5..b636a5814 100644 --- a/library/vendor/Zend/XmlRpc/Value/BigInteger.php +++ b/library/vendor/Zend/XmlRpc/Value/BigInteger.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,12 +24,13 @@ /** * Zend_XmlRpc_Value_Integer */ +require_once 'Zend/XmlRpc/Value/Integer.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_BigInteger extends Zend_XmlRpc_Value_Integer @@ -39,6 +40,7 @@ class Zend_XmlRpc_Value_BigInteger extends Zend_XmlRpc_Value_Integer */ public function __construct($value) { + require_once 'Zend/Crypt/Math/BigInteger.php'; $integer = new Zend_Crypt_Math_BigInteger; $this->_value = $integer->init($value); $this->_type = self::XMLRPC_TYPE_I8; diff --git a/library/vendor/Zend/XmlRpc/Value/Boolean.php b/library/vendor/Zend/XmlRpc/Value/Boolean.php index a8234e7b9..1a91872ca 100644 --- a/library/vendor/Zend/XmlRpc/Value/Boolean.php +++ b/library/vendor/Zend/XmlRpc/Value/Boolean.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value_Scalar */ +require_once 'Zend/XmlRpc/Value/Scalar.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_Boolean extends Zend_XmlRpc_Value_Scalar diff --git a/library/vendor/Zend/XmlRpc/Value/Collection.php b/library/vendor/Zend/XmlRpc/Value/Collection.php index 6375a7b8d..2ef9a9a3d 100644 --- a/library/vendor/Zend/XmlRpc/Value/Collection.php +++ b/library/vendor/Zend/XmlRpc/Value/Collection.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value */ +require_once 'Zend/XmlRpc/Value.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_XmlRpc_Value_Collection extends Zend_XmlRpc_Value diff --git a/library/vendor/Zend/XmlRpc/Value/DateTime.php b/library/vendor/Zend/XmlRpc/Value/DateTime.php index 3140f48ed..18d9991dc 100644 --- a/library/vendor/Zend/XmlRpc/Value/DateTime.php +++ b/library/vendor/Zend/XmlRpc/Value/DateTime.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value_Scalar */ +require_once 'Zend/XmlRpc/Value/Scalar.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_DateTime extends Zend_XmlRpc_Value_Scalar @@ -70,6 +71,7 @@ class Zend_XmlRpc_Value_DateTime extends Zend_XmlRpc_Value_Scalar } else { $timestamp = new DateTime($value); if ($timestamp === false) { // cannot convert the value to a timestamp + require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception('Cannot convert given value \''. $value .'\' to a timestamp'); } diff --git a/library/vendor/Zend/XmlRpc/Value/Double.php b/library/vendor/Zend/XmlRpc/Value/Double.php index 7fba38b55..6251879f0 100644 --- a/library/vendor/Zend/XmlRpc/Value/Double.php +++ b/library/vendor/Zend/XmlRpc/Value/Double.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value_Scalar */ +require_once 'Zend/XmlRpc/Value/Scalar.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_Double extends Zend_XmlRpc_Value_Scalar diff --git a/library/vendor/Zend/XmlRpc/Value/Exception.php b/library/vendor/Zend/XmlRpc/Value/Exception.php index 0fa593d47..3a18f28e7 100644 --- a/library/vendor/Zend/XmlRpc/Value/Exception.php +++ b/library/vendor/Zend/XmlRpc/Value/Exception.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Exception */ +require_once 'Zend/XmlRpc/Exception.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_Exception extends Zend_XmlRpc_Exception diff --git a/library/vendor/Zend/XmlRpc/Value/Integer.php b/library/vendor/Zend/XmlRpc/Value/Integer.php index d48e48783..2ad5c840d 100644 --- a/library/vendor/Zend/XmlRpc/Value/Integer.php +++ b/library/vendor/Zend/XmlRpc/Value/Integer.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value_Scalar */ +require_once 'Zend/XmlRpc/Value/Scalar.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_Integer extends Zend_XmlRpc_Value_Scalar @@ -44,6 +45,7 @@ class Zend_XmlRpc_Value_Integer extends Zend_XmlRpc_Value_Scalar public function __construct($value) { if ($value > PHP_INT_MAX) { + require_once 'Zend/XmlRpc/Value/Exception.php'; throw new Zend_XmlRpc_Value_Exception('Overlong integer given'); } diff --git a/library/vendor/Zend/XmlRpc/Value/Nil.php b/library/vendor/Zend/XmlRpc/Value/Nil.php index 6b6846d31..67305d0d8 100644 --- a/library/vendor/Zend/XmlRpc/Value/Nil.php +++ b/library/vendor/Zend/XmlRpc/Value/Nil.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value_Scalar */ +require_once 'Zend/XmlRpc/Value/Scalar.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_Nil extends Zend_XmlRpc_Value_Scalar diff --git a/library/vendor/Zend/XmlRpc/Value/Scalar.php b/library/vendor/Zend/XmlRpc/Value/Scalar.php index 54916337e..86397d209 100644 --- a/library/vendor/Zend/XmlRpc/Value/Scalar.php +++ b/library/vendor/Zend/XmlRpc/Value/Scalar.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value */ +require_once 'Zend/XmlRpc/Value.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_XmlRpc_Value_Scalar extends Zend_XmlRpc_Value diff --git a/library/vendor/Zend/XmlRpc/Value/String.php b/library/vendor/Zend/XmlRpc/Value/String.php index 923ac06b7..37ac5b832 100644 --- a/library/vendor/Zend/XmlRpc/Value/String.php +++ b/library/vendor/Zend/XmlRpc/Value/String.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,11 +24,12 @@ /** * Zend_XmlRpc_Value_Scalar */ +require_once 'Zend/XmlRpc/Value/Scalar.php'; /** * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_String extends Zend_XmlRpc_Value_Scalar diff --git a/library/vendor/Zend/XmlRpc/Value/Struct.php b/library/vendor/Zend/XmlRpc/Value/Struct.php index 91b3211d5..5272eb508 100644 --- a/library/vendor/Zend/XmlRpc/Value/Struct.php +++ b/library/vendor/Zend/XmlRpc/Value/Struct.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -24,13 +24,14 @@ /** * Zend_XmlRpc_Value_Collection */ +require_once 'Zend/XmlRpc/Value/Collection.php'; /** * @category Zend * @package Zend_XmlRpc * @subpackage Value - * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_XmlRpc_Value_Struct extends Zend_XmlRpc_Value_Collection From e3ea0e5949103ba7076972e4fd8f688cdaca66c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Vikstr=C3=B6m?= Date: Tue, 30 Jun 2015 14:51:54 +0200 Subject: [PATCH 237/280] Use yellow for warning logs in ANSI CLI Signed-off-by: Eric Lippmann --- library/Icinga/Application/Logger/Writer/StdoutWriter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Application/Logger/Writer/StdoutWriter.php b/library/Icinga/Application/Logger/Writer/StdoutWriter.php index e0128e867..da0c7b572 100644 --- a/library/Icinga/Application/Logger/Writer/StdoutWriter.php +++ b/library/Icinga/Application/Logger/Writer/StdoutWriter.php @@ -36,7 +36,7 @@ class StdoutWriter extends LogWriter $color = 'red'; break; case Logger::WARNING: - $color = 'orange'; + $color = 'yellow'; break; case Logger::INFO: $color = 'green'; From 41ab03accb60ab2fb67fd222748d745e645ad7c7 Mon Sep 17 00:00:00 2001 From: Davide Demuru Date: Tue, 1 Sep 2015 23:02:52 +0200 Subject: [PATCH 238/280] Update locale it_IT Signed-off-by: Eric Lippmann --- .../locale/it_IT/LC_MESSAGES/icinga.mo | Bin 30402 -> 32294 bytes .../locale/it_IT/LC_MESSAGES/icinga.po | 56 +- .../locale/it_IT/LC_MESSAGES/monitoring.mo | Bin 57825 -> 55011 bytes .../locale/it_IT/LC_MESSAGES/monitoring.po | 6714 +++++++---------- 4 files changed, 2739 insertions(+), 4031 deletions(-) diff --git a/application/locale/it_IT/LC_MESSAGES/icinga.mo b/application/locale/it_IT/LC_MESSAGES/icinga.mo index 6978a034b95d55f7e5211f549d1a7c0e81ec0ea0..51b3ef930cbff411b3381b935380f91f2440ed7f 100644 GIT binary patch delta 9053 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 diff --git a/application/locale/it_IT/LC_MESSAGES/icinga.po b/application/locale/it_IT/LC_MESSAGES/icinga.po index 73d616bfa..7652766d9 100644 --- a/application/locale/it_IT/LC_MESSAGES/icinga.po +++ b/application/locale/it_IT/LC_MESSAGES/icinga.po @@ -2,33 +2,36 @@ # Copyright (C) 2015 Icinga Development Team # This file is distributed under the same license as Icinga Web 2. # FIRST AUTHOR , YEAR. -# -#, fuzzy +# msgid "" msgstr "" -"Project-Id-Version: Icinga Web 2 (None)\n" +"Project-Id-Version: Icinga Web 2\n" "Report-Msgid-Bugs-To: dev@icinga.org\n" "POT-Creation-Date: 2015-03-13 14:55+0100\n" -"PO-Revision-Date: 2015-03-13 14:51+0100\n" +"PO-Revision-Date: 2015-07-17 10:17+0200\n" "Last-Translator: Davide Demuru \n" "Language: it_IT\n" -"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language-Team: \n" +"X-Generator: Poedit 1.8.2\n" +"X-Poedit-KeywordsList: translate\n" +"X-Poedit-Basepath: ../..\n" +"X-Poedit-SearchPath-0: .\n" #: /usr/share/icingaweb2/library/Icinga/Web/Form/Validator/InArray.php:16 #, php-format msgid "\"%s\" is not in the list of allowed values." -msgstr "" +msgstr "\"%s\" non è tra i valori ammessi." #: /usr/share/icingaweb2/library/Icinga/Web/Form/Validator/InArray.php:19 #, php-format msgid "" "\"%s\" is not in the list of allowed values. Did you mean one of the " "following?: %s" -msgstr "" +msgstr "\"%s\" non è tra i valori ammessi. Intendevi uno dei seguenti?: %s" #: /usr/share/icingaweb2/application/forms/Config/Authentication/ExternalBackendForm.php:56 #: /usr/share/icingaweb2/application/forms/Config/Resource/FileResourceForm.php:50 @@ -38,23 +41,23 @@ msgstr "\"%value%\" non è un'espressione regolare valida" #: /usr/share/icingaweb2/library/Icinga/Web/Menu/MonitoringMenuItemRenderer.php:40 #, php-format msgid "%d unhandled hosts down" -msgstr "" +msgstr "%d host down non gestiti" #: /usr/share/icingaweb2/library/Icinga/Web/Menu/MonitoringMenuItemRenderer.php:41 #, php-format msgid "%d unhandled services critical" -msgstr "" +msgstr "%d servizi down non gestiti" #: /usr/share/icingaweb2/library/Icinga/Web/View/DateTimeRenderer.php:185 msgctxt "timespan" msgid "%im %ss" -msgstr "" +msgstr "%im %ss" #: /usr/share/icingaweb2/library/Icinga/Web/Form/ErrorLabeller.php:47 -#, fuzzy, php-format +#, php-format msgctxt "config.path" msgid "%s does not exist" -msgstr "%s non è scrivibile" +msgstr "%s non esiste" #: /usr/share/icingaweb2/library/Icinga/Web/Form/ErrorLabeller.php:48 #, php-format @@ -81,10 +84,10 @@ msgstr "%s non è nel formato previsto: %%value%%" #: /usr/share/icingaweb2/application/views/scripts/pivottablePagination.phtml:9 #, php-format msgid "%s: %d to %d of %d (on the %s-axis)" -msgstr "%s: %d a %d di %d (nell asse %s)" +msgstr "%s: %d a %d di %d (dell'asse %s)" #: /usr/share/icingaweb2/application/views/scripts/joystickPagination.phtml:9 -#, fuzzy, php-format +#, php-format msgctxt "pagination.joystick" msgid "%s: Show %s %u to %u out of %u" msgstr "%s: Mostra %s %u a %u di %u" @@ -100,7 +103,7 @@ msgstr "...e password" #: /usr/share/icingaweb2/application/layouts/scripts/parts/navigation.phtml:14 msgid "Accessibility Skip Links" -msgstr "" +msgstr "Salta Controllo di Accessibilità" #: /usr/share/icingaweb2/application/controllers/DashboardController.php:69 msgid "Add Dashlet To Dashboard" @@ -112,9 +115,8 @@ msgid "Add To Dashboard" msgstr "Aggiungi alla Dashboard" #: /usr/share/icingaweb2/library/Icinga/Web/Widget/FilterEditor.php:327 -#, fuzzy msgid "Add another filter" -msgstr "Cliccare per aggiungere un altro filtro" +msgstr "Aggiungi un altro filtro" #: /usr/share/icingaweb2/library/Icinga/Web/Widget/FilterWidget.php:80 msgid "Add filter..." @@ -127,7 +129,7 @@ msgstr "Cambia la configurazione generale di Icinga Web 2" #: /usr/share/icingaweb2/application/controllers/PreferenceController.php:28 msgid "Adjust the preferences of Icinga Web 2 according to your needs" -msgstr "" +msgstr "Modifica le preferenze di Icinga Web 2 in base alle tue esigenze" #: /usr/share/icingaweb2/application/controllers/AuthenticationController.php:111 msgid "" @@ -337,11 +339,11 @@ msgstr "" #: /usr/share/icingaweb2/library/Icinga/Chart/GridChart.php:90 msgid "Contains data in a bar or line chart." -msgstr "" +msgstr "Contiene i dati in grafici a barre o linee" #: /usr/share/icingaweb2/library/Icinga/Chart/PieChart.php:56 msgid "Contains data in a pie chart." -msgstr "" +msgstr "Contiene i dati in grafici a torta" #: /usr/share/icingaweb2/application/forms/Config/General/ApplicationConfigForm.php:37 msgid "" @@ -622,7 +624,7 @@ msgstr "Configurazione Generale" #: /usr/share/icingaweb2/library/Icinga/Chart/GridChart.php:89 msgid "Grid Chart" -msgstr "" +msgstr "Grafico a Griglia" #: /usr/share/icingaweb2/application/forms/Security/RoleForm.php:98 #: /usr/share/icingaweb2/application/views/scripts/roles/index.phtml:16 @@ -700,8 +702,8 @@ msgstr "Tipo \"%s\" di risorsa non valido" msgid "" "It appears that you did not configure Icinga Web 2 yet so it's not possible " "to log in without any defined authentication method. Please define a " -"authentication method by following the instructions in the %1$sdocumentation%" -"3$s or by using our %2$sweb-based setup-wizard%3$s." +"authentication method by following the instructions in the %1$sdocumentation" +"%3$s or by using our %2$sweb-based setup-wizard%3$s." msgstr "" "Icinga Web 2 non è stato configurato e quindi non è possibile autenticarsi " "senza aver definito nessun metodo di autenticazione. Si prega di definire un " @@ -951,7 +953,7 @@ msgstr "Permessi" #: /usr/share/icingaweb2/library/Icinga/Chart/PieChart.php:55 msgid "Pie Chart" -msgstr "" +msgstr "Grafico a Torta" #: /usr/share/icingaweb2/application/views/scripts/dashboard/error.phtml:4 msgid "Please copy the following dashboard snippet to " @@ -1007,12 +1009,16 @@ msgid "" "Push this button to update the form to reflect the change that was made in " "the field on the left" msgstr "" +"Premere questo bottone per aggiornare il form e mostrare i cambiamenti " +"effettuati nel campo a sinistra" #: /usr/share/icingaweb2/library/Icinga/Web/Form/Decorator/Autosubmit.php:119 msgid "" "Push this button to update the form to reflect the changes that were made " "below" msgstr "" +"Premere questo bottone per aggiornare il form e mostrare i cambiamenti " +"effettuati sotto" #: /usr/share/icingaweb2/library/Icinga/Web/Widget/SearchDashboard.php:63 msgid "Ready to search" @@ -1533,6 +1539,8 @@ msgid "" "Upon any of this form's fields were changed, this page is being updated " "automatically." msgstr "" +"Cambiando un qualsiasi valore del form la pagina verrà ricaricata " +"automaticamente." #: /usr/share/icingaweb2/library/Icinga/Web/Form.php:693 #: /usr/share/icingaweb2/library/Icinga/Web/Form/Decorator/Autosubmit.php:100 diff --git a/modules/monitoring/application/locale/it_IT/LC_MESSAGES/monitoring.mo b/modules/monitoring/application/locale/it_IT/LC_MESSAGES/monitoring.mo index 996008522c25b75a85379c424782370ba7966a09..10b97e44d5dc3736bb5fb0e499ef6b1f3d27e488 100644 GIT binary patch literal 55011 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 literal 57825 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 N1WK3e5!}oC{{Y1@4c`C& diff --git a/modules/monitoring/application/locale/it_IT/LC_MESSAGES/monitoring.po b/modules/monitoring/application/locale/it_IT/LC_MESSAGES/monitoring.po index bfff260f1..c4d22f8a4 100644 --- a/modules/monitoring/application/locale/it_IT/LC_MESSAGES/monitoring.po +++ b/modules/monitoring/application/locale/it_IT/LC_MESSAGES/monitoring.po @@ -1,1378 +1,327 @@ -# Icinga Web 2 - Head for multiple monitoring backends. -# Copyright (C) 2015 Icinga Development Team -# This file is distributed under the same license as Monitoring Module. -# FIRST AUTHOR , YEAR. -# msgid "" msgstr "" -"Project-Id-Version: Monitoring Module (2.0.0~alpha4)\n" -"Report-Msgid-Bugs-To: dev@icinga.org\n" -"POT-Creation-Date: 2015-03-13 17:04+0100\n" -"PO-Revision-Date: 2015-03-13 17:05+0100\n" -"Last-Translator: Thomas Gelf \n" +"Project-Id-Version: \n" +"POT-Creation-Date: 2015-07-17 10:21+0200\n" +"PO-Revision-Date: 2015-07-17 15:58+0200\n" +"Last-Translator: Davide Demuru \n" +"Language-Team: \n" "Language: it_IT\n" -"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.2\n" +"X-Poedit-Basepath: ../../..\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.5.4\n" +"X-Poedit-KeywordsList: translate\n" +"X-Poedit-SearchPath-0: .\n" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:382 -msgid " Down Hosts (Handled)" -msgstr "Host Down (Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:383 -msgid " Down Hosts (Unhandled)" -msgstr "Host Down (Non Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:350 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:404 -msgid " Down Services (Handled)" -msgstr "Servizi Down (Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:351 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:405 -msgid " Down Services (Unhandled)" -msgstr "Servizi Down (Non Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:386 -msgid " Pending Hosts" -msgstr "Host in Pending" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:354 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:408 -msgid " Pending Services" -msgstr "Servizi in Pending" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:384 -msgid " Unreachable Hosts (Handled)" -msgstr "Host Unreachable (Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:385 -msgid " Unreachable Hosts (Unhandled)" -msgstr "Host Unreachable (Non Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:352 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:406 -msgid " Unreachable Services (Handled)" -msgstr "Servizi Unreachable (Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:353 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:407 -msgid " Unreachable Services (Unhandled)" -msgstr "Servizi Unreachable (Non Gestiti) " - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:381 -msgid " Up Hosts" -msgstr "Host Up" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:401 -msgid " Up Services" -msgstr "Servizi Up" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:348 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:402 -msgid " Warning Services (Handled)" -msgstr "Servizi in Warning (Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:349 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:403 -msgid " Warning Services (Unhandled)" -msgstr "Servizi in Warning (Non Gestiti)" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:73 -#, php-format -msgid "%d Active" -msgid_plural "%d Active" -msgstr[0] "%d Attivo" -msgstr[1] "%d Attivi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:53 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:109 -#, php-format -msgid "%d Disabled" -msgid_plural "%d Disabled" -msgstr[0] "%d Disabilitato" -msgstr[1] "%d Disabilitati" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:35 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:91 -#, php-format -msgid "%d Passive" -msgid_plural "%d Passive" -msgstr[0] "%d Passivo" -msgstr[1] "%d Passivi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventgrid.phtml:43 -#, php-format -msgid "%d hosts down on %s" -msgstr "%d host down in %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventgrid.phtml:21 -#, php-format -msgid "%d hosts ok on %s" -msgstr "%d host ok in %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventgrid.phtml:26 -#, php-format -msgid "%d hosts unreachable on %s" -msgstr "%d host unreachable in %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Perfdata.php:64 -#, php-format -msgid "%d more ..." -msgstr "%d più ..." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventgrid.phtml:31 -#, php-format -msgid "%d services critical on %s" -msgstr "%d servizi critical in %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventgrid.phtml:53 -#, php-format -msgid "%d services ok on %s" -msgstr "%d servizi ok in %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventgrid.phtml:48 -#, php-format -msgid "%d services unknown on %s" -msgstr "%d servizi unknown in %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventgrid.phtml:37 -#, php-format -msgid "%d services warning on %s" -msgstr "%d servizi warning in %s" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Plugin/Perfdata.php:437 -#, php-format -msgid "%s %s (%s%%)" -msgstr "%s %s (%s%%)" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:28 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:32 -#, php-format -msgid "%s ago" -msgstr "%s fa" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.phtml:40 -#, php-format -msgctxt "timespan" -msgid "%s ago" -msgstr "%s fa" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:57 -#, php-format -msgid "%s has been up and running with PID %d since %s" -msgstr "%s è attivo e funzionante con il PID %d da %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml:8 -#, php-format -msgid "%s hosts:" -msgstr "%s host:" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/not-running.phtml:5 -#, php-format -msgid "%s is currently not up and running" -msgstr "%s non è in esecuzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:64 -#, php-format -msgid "%s is not running" -msgstr "%s non è in esecuzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/notifications.phtml:43 -#, php-format -msgid "%s notications have been sent for this issue" -msgstr "%s notifiche inviate per questo problema" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Link.php:54 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:142 -#, php-format -msgctxt "Service running on host" -msgid "%s on %s" -msgstr "%s di %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml:9 -#, php-format -msgid "%s services:" -msgstr "%s servizi:" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:84 -#, php-format -msgid "%u Acknowledged Host Problem" -msgid_plural "%u Acknowledged Host Problems" -msgstr[0] "%u Conferma al Problema dell'Host" -msgstr[1] "%u Conferme ai Problemi dell'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:84 -#, php-format -msgid "%u Acknowledged Service Problem" -msgid_plural "%u Acknowledged Service Problems" -msgstr[0] "%u Conferma al Problema del Servizio" -msgstr[1] "%u Conferma ai Problemi del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:17 -#, fuzzy, php-format -msgid "%u Active" -msgid_plural "%u Active" -msgstr[0] "%d Attivo" -msgstr[1] "%d Attivi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:8 -#, php-format -msgid "%u Host" -msgid_plural "%u Hosts" -msgstr[0] "%u Host" -msgstr[1] "%u Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml:10 -#, fuzzy, php-format -msgid "%u Host DOWN" -msgid_plural "%u Hosts DOWN" -msgstr[0] "%d Host DOWN" -msgstr[1] "%d Host DOWN" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:18 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:139 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:218 -#, fuzzy, php-format -msgid "%u Host Disabled" -msgid_plural "%u Hosts Disabled" -msgstr[0] "%d Host Disabilitato" -msgstr[1] "%d Host Disabilitati" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:48 -#, fuzzy, php-format -msgid "%u Host Flapping" -msgid_plural "%u Hosts Flapping" -msgstr[0] "%d Host Instabile" -msgstr[1] "%d Host Instabili" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml:33 -#, fuzzy, php-format -msgid "%u Host PENDING" -msgid_plural "%u Hosts PENDING" -msgstr[0] "%d Hosts PENDING" -msgstr[1] "%d Host PENDING" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml:29 -#, fuzzy, php-format -msgid "%u Host UNREACHABLE" -msgid_plural "%u Hosts UNREACHABLE" -msgstr[0] "%d Host UNREACHABLE" -msgstr[1] "%d Host UNREACHABLE" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml:15 -#, fuzzy, php-format -msgid "%u Host UP" -msgid_plural "%u Hosts UP" -msgstr[0] "%d Host UP" -msgstr[1] "%d Host UP" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:8 -#, fuzzy, php-format -msgid "%u Service" -msgid_plural "%u Services" -msgstr[0] "Servizio" -msgstr[1] "Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:73 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:173 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:252 -#, fuzzy, php-format -msgid "%u Service Disabled" -msgid_plural "%u Services Disabled" -msgstr[0] "%d Servizio Disabilitato" -msgstr[1] "%d Servizi Disabilitati" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:103 -#, fuzzy, php-format -msgid "%u Service Flapping" -msgid_plural "%u Services Flapping" -msgstr[0] "%d Servizio Instabile" -msgstr[1] "%d Servizi Instabili" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:46 -#, php-format -msgid "%u Unhandled Host Problem" -msgid_plural "%u Unhandled Host Problems" -msgstr[0] "%u Problema all'Host Non Gestito" -msgstr[1] "%u Problemi all'Host Non Gestiti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:46 -#, php-format -msgid "%u Unhandled Service Problem" -msgid_plural "%u Unhandled Service Problems" -msgstr[0] "%u Problema al Servizio Non Gestito" -msgstr[1] "%u Problemi al Servizio Non Gestiti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml:13 -#, fuzzy, php-format -msgid "%u configured service:" -msgid_plural "%u configured services:" -msgstr[0] "%d servizio configurato:" -msgstr[1] "%d servizi configurati:" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:80 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:179 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:278 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:325 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:372 -#, fuzzy, php-format -msgid "%u is not checked at all" -msgid_plural "%u are not checked at all" -msgstr[0] "%d è stato controllato" -msgstr[1] "%d è stato controllato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:53 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:152 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:251 -#, fuzzy, php-format -msgid "%u is passively checked" -msgid_plural "%u are passively checked" -msgstr[0] "%d è controllato passivamente" -msgstr[1] "%d è controllato passivamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:110 -#, fuzzy, php-format -msgid "%u unhandled service" -msgid_plural "%u unhandled services" -msgstr[0] "%d servizio non gestito" -msgstr[1] "%d servizi non gestiti" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:73 -msgid "1 Year" -msgstr "1 Anno" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:74 -msgid "2 Years" -msgstr "2 Anni" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:70 -msgid "3 Months" -msgstr "3 Mesi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:97 -msgid "4 Hours" -msgstr "4 Ore" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:71 -msgid "4 Months" -msgstr "4 Mesi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:72 -msgid "8 Months" -msgstr "8 Mesi" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Plugin/Perfdata.php:437 -#, php-format -msgid "%s %s (%s%%)" -msgstr "%s %s (%s%%)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:453 -msgid "{title}: {value}m max. reaction time" -msgstr "{title}: {value} max. tempo di reazione" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:443 -msgid "{title}: {value}m min. reaction time" -msgstr "{title}: {value} min. tempo di reazione" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:296 -msgid "{title}:
{value} of {sum} hosts are {label}" -msgstr "{title}:
{value} di {sum} host sono {label}" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:247 -msgid "{title}:
{value} of {sum} services are {label}" -msgstr "{title}:
{value} di {sum} servizi sono {label}" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/notifications.phtml:38 -#, php-format -msgid "A notication has been sent for this issue %s ago" -msgstr "Una notifica è stata inviata per questo problema %s fa" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:78 -msgid "Ack removed" -msgstr "Conferma rimossa" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:73 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml:39 -msgid "Acknowledge" -msgstr "Conferma" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:68 -#, php-format -msgid "Acknowledge %u unhandled host problem" -msgid_plural "Acknowledge %u unhandled host problems" -msgstr[0] "Conferma %u Problema dell'Host Non Gestito" -msgstr[1] "Conferma %u Problemi dell'Host Non Gestiti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:68 -#, php-format -msgid "Acknowledge %u unhandled service problem" -msgid_plural "Acknowledge %u unhandled service problems" -msgstr[0] "Conferma %u Problema del Servizio Non Gestito" -msgstr[1] "Conferma %u Problemi del Servizio Non Gestiti" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostController.php:71 -msgid "Acknowledge Host Problem" -msgstr "Conferma il Problema dell'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:184 -msgid "Acknowledge Host Problems" -msgstr "Conferma i Problemi dell'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServiceController.php:48 -msgid "Acknowledge Service Problem" -msgstr "Conferma il Problema del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:233 -msgid "Acknowledge Service Problems" -msgstr "Conferma i Problemi del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:34 -msgid "Acknowledge problem" -msgid_plural "Acknowledge problems" -msgstr[0] "Conferma Problema" -msgstr[1] "Conferma Problemi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml:46 +#: controllers/AlertsummaryController.php:42 msgid "" -"Acknowledge this problem, suppress all future notifications for it and tag " -"it as being handled" +"Show recent alerts and visualize notifications and problems based on their " +"amount and chronological distribution" msgstr "" -"Conferma questo problema, disabilita tutte le notifiche future e marca come " -"gestito" +"Mostra allarmi recenti e visualizza le notifiche e i problemi rispetto alle " +"occorrenze e alla distribuzione cronologica" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:53 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:75 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml:12 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:31 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:130 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:229 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml:9 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/statusicons.phtml:9 -msgid "Acknowledged" -msgstr "Confermato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:39 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:51 -msgid "Acknowledgement" -msgstr "Conferma" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:59 -msgid "Acknowledgements" -msgstr "Conferme" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:157 -msgid "Acknowledging problem.." -msgid_plural "Acknowledging problems.." -msgstr[0] "Conferma in corso.." -msgstr[1] "Conferme in corso.." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/actions.phtml:44 -msgid "Actions" -msgstr "Azioni" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:70 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:98 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml:24 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/statusicons.phtml:24 -msgid "Active And Passive Checks Disabled" -msgstr "Controlli Attivi e Passivi Disabilitati" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php:39 -msgid "Active Checks" -msgstr "Controlli Attivi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:72 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:100 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml:22 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/statusicons.phtml:22 -msgid "Active Checks Disabled" -msgstr "Controlli Attivi Disabilitati" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:88 -msgid "Active Host Checks Being Executed" -msgstr "Esegui Controlli Attivi sugli Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:97 -msgid "Active Service Checks Being Executed" -msgstr "Esegui Controlli Attivi sui Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:120 -msgid "Active checks" -msgstr "Controlli Attivi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostController.php:83 -msgid "Add Host Comment" -msgstr "Aggiungi commento all'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:48 -msgid "Add New Backend" -msgstr "Aggiungi Nuovo Backend" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:164 -msgid "Add New Instance" -msgstr "Aggiungi Nuova Istanza" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServiceController.php:60 -msgid "Add Service Comment" -msgstr "Aggiungi Commento al Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/comments.phtml:14 -msgid "Add a new comment to this host" -msgstr "Aggiungi un nuovo commento all'host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/comments.phtml:25 -msgid "Add a new comment to this service" -msgstr "Aggiungi un nuovo commento al servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php:28 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/comments.phtml:8 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/comments.phtml:19 -#, fuzzy -msgid "Add comment" -msgid_plural "Add comments" -msgstr[0] "Aggiungi commento" -msgstr[1] "Aggiungi commento" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php:83 -msgid "Adding comment.." -msgid_plural "Adding comments.." -msgstr[0] "Aggiunta commento.." -msgstr[1] "Aggiunta commenti.." - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:135 -msgid "Address" -msgstr "Indirizzo" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:201 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:44 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:48 +#: controllers/AlertsummaryController.php:45 +#: controllers/AlertsummaryController.php:49 msgid "Alert Summary" msgstr "Storico Allarmi" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:11 -msgid "Alert summary" -msgstr "Storico Allarmi" +#: controllers/AlertsummaryController.php:176 +msgid "unchanged" +msgstr "invariato" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:377 -msgid "Alias" -msgstr "Alias" +#: controllers/AlertsummaryController.php:178 +msgid "down" +msgstr "down" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:37 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:158 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:237 -msgid "All Hosts Enabled" -msgstr "Tutti gli Host abilitati" +#: controllers/AlertsummaryController.php:180 +msgid "up" +msgstr "up" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostCheckCommandForm.php:26 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php:28 -msgid "All Services" -msgstr "Tutti i Servizi" +#: controllers/AlertsummaryController.php:309 +msgid "Healing Chart" +msgstr "Grafico dei Restore" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:92 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:192 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:271 -msgid "All Services Enabled" -msgstr "Tutti i Servizi Abilitati" +#: controllers/AlertsummaryController.php:310 +msgid "Notifications and average reaction time per hour." +msgstr "Notifiche e media del tempo di reazione per ora" -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php:178 -msgid "All backends are disabled" -msgstr "Tutti i backend sono disabilitati" +#: controllers/AlertsummaryController.php:313 +#: controllers/AlertsummaryController.php:408 +#: controllers/AlertsummaryController.php:451 +#: controllers/AlertsummaryController.php:458 +#: controllers/ListController.php:283 +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:125 +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:70 +#: forms/EventOverviewForm.php:76 views/scripts/host/show.phtml:23 +#: views/scripts/service/show.phtml:23 +#: views/scripts/show/components/notifications.phtml:2 +#: views/scripts/tactical/components/monitoringfeatures.phtml:129 +#: views/scripts/tactical/components/monitoringfeatures.phtml:131 +msgid "Notifications" +msgstr "Notifiche" -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:16 -msgid "Allow acknowledging host and service problems" -msgstr "Consenti la Conferma dei problemi di Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:24 -msgid "Allow adding and deleting host and service comments" -msgstr "Consenti la rimozione di Commenti da Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:8 -msgid "Allow all commands" -msgstr "Consenti tutti i Comandi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:28 -msgid "Allow commenting on hosts and services" -msgstr "Consenti l'aggiunta di Commenti su Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:32 -msgid "Allow deleting host and service comments" -msgstr "Consenti la rimozione di Commenti da Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:44 -msgid "Allow deleting host and service downtimes" -msgstr "Consenti la cancellazione di Manutenzioni da Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:52 -msgid "" -"Allow processing commands for toggling features on an instance-wide basis" -msgstr "Consenti di abilitare/disabilitare funzionalità globali" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:56 -msgid "" -"Allow processing commands for toggling features on host and service objects" -msgstr "Consenti di abilitare/disabilitare funzionalità di host e servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:48 -msgid "Allow processing host and service check results" -msgstr "Consenti l'invio di risultati passivi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:20 -msgid "Allow removing problem acknowledgements" -msgstr "Consenti la rimozione delle Conferme" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:36 -msgid "Allow scheduling and deleting host and service downtimes" -msgstr "Consenti la pianificazione di Manutenzioni su Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:12 -msgid "Allow scheduling host and service checks" -msgstr "Consenti la schedulazione di Controlli su Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:40 -msgid "Allow scheduling host and service downtimes" -msgstr "Consenti la pianificazione di Manutenzioni su Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:60 -msgid "Allow sending custom notifications for hosts and services" -msgstr "Consenti l'invio di notifiche personalizzate per host e servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:21 -msgid "Apply" -msgstr "Applica" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:131 -msgid "Are you sure you want to remove this instance?" -msgstr "Sicuro di voler rimuovere l'istanza?" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:300 -msgid "Author" -msgstr "Autore" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:33 -msgid "Average" -msgstr "Media" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:108 -msgid "Average services per host" -msgstr "Media di Servizi per Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:439 +#: controllers/AlertsummaryController.php:418 msgid "Avg (min)" msgstr "Media (min)" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:78 -#, php-format -msgid "Backend \"%s\" successfully removed." -msgstr "Backend \"%s\" rimosso correttamente." +#: controllers/AlertsummaryController.php:422 +msgid "{title}: {value}m min. reaction time" +msgstr "{title}: {value}m min. tempo di reazione" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:216 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/BackendPage.php:28 -msgid "Backend Name" -msgstr "Nome Backend" +#: controllers/AlertsummaryController.php:428 +msgid "Max (min)" +msgstr "Max (min)" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:226 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/BackendPage.php:44 -msgid "Backend Type" -msgstr "Tipo Backend" +#: controllers/AlertsummaryController.php:432 +msgid "{title}: {value}m max. reaction time" +msgstr "{title}: {value}m max. tempo di reazione" -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:75 -msgid "Backends" -msgstr "Backend" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:77 -msgid "Broadcast" -msgstr "Trasmetti a tutti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:34 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:52 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:34 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:52 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Service.php:184 -msgid "CRITICAL" -msgstr "CRITICAL" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:62 -msgctxt "icinga.state" -msgid "CRITICAL" -msgstr "CRITICAL" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checksource.phtml:4 -msgid "Check Source" -msgstr "Eseguito da" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php:51 -msgid "Check Time" -msgstr "Ora del Controllo" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:61 -msgid "Check attempts" -msgstr "Tentativi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:70 -msgid "Check execution time" -msgstr "Durata " - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:76 -msgid "Check latency" -msgstr "Latenza" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php:37 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php:39 -msgid "Check now" -msgstr "Controlla ora" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php:78 -msgid "" -"Check this to not to validate connectivity with the given Livestatus socket" -msgstr "" -"Spunta questa casella per non verificare la connettività con il socket " -"Livestatus fornito" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/IdoResourcePage.php:77 -msgid "" -"Check this to not to validate connectivity with the given database server" -msgstr "" -"Spunta questa casella per non verificare la connettività con il database " -"fornito" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php:38 -msgid "Child Hosts" -msgstr "Host Figli" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/SecurityConfigForm.php:58 -msgid "" -"Comma separated case insensitive list of protected custom variables. Use * " -"as a placeholder for zero or more wildcard characters. Existance of those " -"custom variables will be shown, but their values will be masked." -msgstr "" -"Lista delle variabili riservate (case insensitive) separate da virgola. " -"Usare * come carattere jolly. Le variabili fornite verranno mostrate ma il " -"loro contenuto sarà mascherato." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/command.phtml:9 -msgid "Command" -msgstr "Comando" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php:30 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php:64 -msgid "Command File" -msgstr "File dei comandi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:49 -msgid "Commands" -msgstr "Comandi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:49 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php:43 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:65 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:52 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:62 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:67 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:46 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:63 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/comments.phtml:54 -msgid "Comment" -msgstr "Commento" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:489 -msgid "Comment Timestamp" -msgstr "Timestamp Commento" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:492 -msgid "Comment Type" -msgstr "Tipo Commento" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:68 -msgid "Comment deleted" -msgstr "Commento rimosso" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:36 -msgid "Comment was caused by a downtime." -msgstr "Commento generato da una manutenzione." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:26 -msgid "Comment was caused by a flapping host or service." -msgstr "Commento generato da un host o servizio instabile." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:40 -msgid "Comment was caused by an acknowledgement." -msgstr "Commento generato dalla conferma di un problema" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:31 -msgid "Comment was created by an user." -msgstr "Commento creato da un utente." - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:163 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:468 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:54 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/EventOverviewForm.php:66 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/comments.phtml:2 -msgid "Comments" -msgstr "Commenti" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php:196 -#, php-format -msgid "Configuration for backend %s is disabled" -msgstr "Configurazione peril backend %s disabilitata" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:79 -msgid "" -"Configure how to protect your monitoring environment against prying eyes" -msgstr "" -"Configura come proteggere l'ambiente di monitoraggio da occhi indiscreti" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:74 -msgid "Configure how to retrieve monitoring information" -msgstr "Configura come recuperare le informazioni di monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:434 -msgid "Contact Groups" -msgstr "Gruppi di Contatti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:4 -msgid "Contact details" -msgstr "Dettagli del Contatto" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:159 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/contacts.phtml:37 -msgid "Contactgroups" -msgstr "Gruppi di Contatti" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:155 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:351 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/contacts.phtml:17 -msgid "Contacts" -msgstr "Contatti" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:299 -msgid "Contains host states of each service group." -msgstr "Contiene gli stati degli host per ogni gruppo di servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:240 -msgid "Contains service states for each service group." -msgstr "Contiene gli stati dei servizi per ogni gruppo di servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:55 -msgid "Could not find any valid monitoring backend resources" -msgstr "Non è stata trovata nessun backend di monitoraggio valido" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:53 -msgid "Create New Instance" -msgstr "Crea una Nuova Istanza" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:9 -msgid "Create New Monitoring Backend" -msgstr "Crea un Nuovo Backend di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:264 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:118 -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Perfdata.php:29 -msgid "Critical" -msgstr "Critical" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:123 -msgid "Current Downtimes" -msgstr "Manutenzioni in corso" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:227 -msgid "Current Host State" -msgstr "Stato Corrente degli Host" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:217 -msgid "Current Incidents" -msgstr "Problemi Correnti" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:223 -msgid "Current Service State" -msgstr "Stato Corrente dei Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:133 -msgid "Current State" -msgstr "Stato Corrente" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Host.php:176 -msgid "DOWN" -msgstr "DOWN" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:57 -msgctxt "icinga.state" -msgid "DOWN" -msgstr "DOWN" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:104 -msgid "Database Name" -msgstr "Nome Database" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:83 -msgid "Database Resource" -msgstr "Risorsa Database" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:92 -msgid "Database Type" -msgstr "Tipo Database" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:643 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:646 -msgid "Day" -msgstr "Giorno" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:468 +#: controllers/AlertsummaryController.php:447 msgid "Defect Chart" msgstr "Grafico dei Problemi" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:489 +#: controllers/AlertsummaryController.php:448 +msgid "Notifications and defects per hour" +msgstr "Notifiche e problemi per ora" + +#: controllers/AlertsummaryController.php:468 msgid "Defects" msgstr "Problemi" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php:46 -msgid "Define what should be done with the child hosts of the hosts." -msgstr "Definire che azione compiere con gli Host figli" +#: controllers/AlertsummaryController.php:516 +msgid "One day" +msgstr "Un giorno" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/DeleteCommentCommandForm.php:64 -msgid "Delete this comment" -msgstr "Cancella questo commento" +#: controllers/AlertsummaryController.php:517 +msgid "One week" +msgstr "Una settimana" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/DeleteDowntimeCommandForm.php:64 -msgid "Delete this downtime" -msgstr "Cancella questa manutenzione" +#: controllers/AlertsummaryController.php:518 +msgid "One month" +msgstr "Un mese" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/DeleteCommentCommandForm.php:89 -msgid "Deleting comment.." -msgstr "Rimozione commento..." +#: controllers/AlertsummaryController.php:519 +msgid "One year" +msgstr "Un anno" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/DeleteDowntimeCommandForm.php:89 -msgid "Deleting downtime.." -msgstr "Cancellazione Manutenzione..." +#: controllers/AlertsummaryController.php:521 +msgid "Report interval" +msgstr "Intervallo del Report" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ProcessController.php:99 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php:24 -msgid "Disable Notifications" -msgstr "Disabilita le Notifiche" +#: controllers/AlertsummaryController.php:604 +msgid "Value for interval not valid" +msgstr "Valore non valido per l'intervallo" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:208 -msgid "Disable This Backend" -msgstr "Disabilita Backend" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:67 -msgid "Disable notifications for a specific time on a program-wide basis" -msgstr "Disabilita le notifiche per un periodo specifico sull'intero sistema" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:69 -msgid "Disable temporarily" -msgstr "Disabilita Temporaneamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php:61 -msgid "Disabling host and service notifications.." -msgstr "Disabilitazione Notifiche di Host e Servizi in corso..." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php:41 -msgid "Do nothing with child hosts" -msgstr "Non applicare agli Host figli" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:314 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:139 -msgid "Down" -msgstr "Down" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:35 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/downtime.phtml:68 -msgid "Downtime" -msgstr "Manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:88 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:120 -msgid "Downtime End" -msgstr "Fine Manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:83 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:115 -msgid "Downtime Start" -msgstr "Inizio Manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:88 -msgid "Downtime removed" -msgstr "Manutenzione cancellata" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:167 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:269 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/EventOverviewForm.php:56 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/downtime.phtml:2 -msgid "Downtimes" -msgstr "Manutenzioni" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:305 -msgid "Duration" -msgstr "Durata" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:33 -msgid "Edit Existing Backend" -msgstr "Modifica Backend Esistente" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:150 -msgid "Edit Existing Instance" -msgstr "Modifica Istanza Esistente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:27 -#, php-format -msgid "Edit monitoring backend %s" -msgstr "Modifica backend di monitoraggio %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:71 -#, php-format -msgid "Edit monitoring instance %s" -msgstr "Modifica istanza di monitoraggio %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:378 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contacts.phtml:28 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:22 -msgid "Email" -msgstr "Email" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:302 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:88 -msgid "End Time" -msgstr "Ora Fine" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:69 -msgid "Ended downtimes" -msgstr "Manutenzioni Completate" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:159 -msgid "" -"Enter here the duration of the downtime. The downtime will be automatically " -"deleted after this time expired." -msgstr "" -"Inserire qui la durata della manutenzione. La manutenzione sarà cancellata " -"automaticamente allo scadere del tempo." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:90 -msgid "" -"Enter the expire date and time for this acknowledgement here. Icinga will " -"delete the acknowledgement after this time expired." -msgstr "" -"Inserire qui la durata della conferma del problema. Icinga cancellerà " -"automaticamente la conferma allo scadere del tempo." - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:299 -msgid "Entry Time" -msgstr "Ora Inserimento" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:183 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:390 -msgid "Event Grid" -msgstr "Griglia Eventi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php:75 -msgid "Event Handler" -msgstr "Gestore Eventi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:206 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:208 -msgid "Event Handlers" -msgstr "Gestori Eventi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:106 -msgid "Event Handlers Enabled" -msgstr "Gestore Eventi Abilitato" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:188 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:613 -msgid "Event Overview" -msgstr "Panoramica Eventi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:187 -msgid "Events" -msgstr "Eventi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:127 -msgid "Execution time" -msgstr "Tempo di Esecuzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:493 -msgid "Expiration" -msgstr "Scadenza" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php:43 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:87 -msgid "Expire Time" -msgstr "Ora Scadenza" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:43 -msgid "Expires" -msgstr "Scade" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:29 -msgid "Feature Commands" -msgstr "Controllo Funzionalità" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:107 -msgid "Fixed" -msgstr "Rigido" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php:84 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:6 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:8 -msgid "Flap Detection" -msgstr "Controllo Instabilità" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:115 -msgid "Flap Detection Enabled" -msgstr "Controllo Instabilità Attivato" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/EventOverviewForm.php:86 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:25 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:61 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:57 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:81 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:93 -msgid "Flapping" -msgstr "Instabile" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:66 -msgid "Flapping Stopped" -msgstr "Instabilità Terminata" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:98 -msgid "Flapping stopped" -msgstr "Instabilità Terminata" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:108 -msgid "Flexible" -msgstr "Flessibile" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:157 -msgid "Flexible Duration" -msgstr "Durata Flessibile" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php:62 -msgid "Force Check" -msgstr "Forza Controllo" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:64 -msgid "Forced" -msgstr "Forzato" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:67 -msgid "From" -msgstr "Da" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:47 -msgid "Global Host Event Handler" -msgstr "Gestore Eventi Host Globale" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:41 -msgid "Global Service Event Handler" -msgstr "Gestore Eventi Servizi Globale" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:49 -msgid "Hard state changes" -msgstr "Cambi di Stato HARD" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:327 -msgid "Healing Chart" -msgstr "Grafico Ripristini" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:180 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:258 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:69 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:233 -msgid "History" -msgstr "Storico" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:297 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:490 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:211 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php:31 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:58 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:63 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.phtml:53 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml:12 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:96 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:186 -msgid "Host" -msgstr "Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/objects-header.phtml:6 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml:21 -#, php-format -msgid "Host (%u)" -msgid_plural "Hosts (%u)" -msgstr[0] "Host (%u)" -msgstr[1] "Host (%u)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:229 -msgid "Host Address" -msgstr "Indirizzo Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:133 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:155 -msgid "Host Checks" -msgstr "Controlli Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:25 -msgid "Host Group" -msgstr "Gruppo di Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:298 -msgid "Host Group Chart" -msgstr "Grafico dei Gruppi di Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:596 -msgid "Host Group Name" -msgstr "Nome del Gruppo di Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:561 -msgid "Host Groups" -msgstr "Gruppi di Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:381 -msgid "Host Notification Timeperiod" -msgstr "Periodo delle Notifiche per l'Host" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:111 -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:227 -msgid "Host Problems" -msgstr "Host con Problemi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:226 -msgid "Host Severity" -msgstr "Impatto Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:64 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:158 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:85 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:207 -msgid "Host State" -msgstr "Stato Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:2 -msgid "Host and Service Checks" -msgstr "Controlli di Host e Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/disable-notifications.phtml:8 -msgid "Host and service notifications are already disabled." -msgstr "Notifiche per Host e Servizi sono già disabilitate." - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostController.php:34 -msgid "Host not found" -msgstr "Host non trovato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contacts.phtml:48 -msgid "Host notification period" -msgstr "Periodo delle Notifiche per l'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:40 -msgid "Host or service not found" -msgstr "Host o Servizio non trovato" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:90 -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:151 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml:16 -msgid "Hostgroups" -msgstr "Gruppi di Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:134 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:228 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:657 -msgid "Hostname" -msgstr "Nome Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php:33 -msgid "Hostname or address of the remote Icinga instance" -msgstr "Nome Host o Indirizzo dell'istanza remota di Icinga" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:88 -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:139 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:302 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:80 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:97 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:101 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:84 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:37 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:7 -msgid "Hosts" -msgstr "Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:640 +#: controllers/AlertsummaryController.php:620 msgid "Hour" msgstr "Ora" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:137 -msgid "Hours" -msgstr "Ore" +#: controllers/AlertsummaryController.php:623 +#: controllers/AlertsummaryController.php:626 +msgid "Day" +msgstr "Giorno" -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/SecurityStep.php:44 -msgid "" -"Icinga Web 2 will protect your monitoring environment against prying eyes " -"using the configuration specified below:" -msgstr "" -"Icinga Web 2 proteggerà il tuo ambiente di monitoraggio da occhi indiscreti " -"con la configurazione seguente:" +#: controllers/AlertsummaryController.php:629 +msgid "Month" +msgstr "Mese" -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:76 +#: controllers/ChartController.php:234 +msgid "Service Group Chart" +msgstr "Grafico dei Gruppi di Servizi" + +#: controllers/ChartController.php:235 +msgid "Contains service states for each service group." +msgstr "Contiene lo stato dei servizi per ogni gruppo di servizi." + +#: controllers/ChartController.php:238 controllers/ListController.php:140 +#: controllers/ServicesController.php:43 forms/StatehistoryForm.php:100 +#: views/scripts/process/info.phtml:111 views/scripts/show/contact.phtml:44 +#: views/scripts/tactical/components/hostservicechecks.phtml:10 +#: views/scripts/tactical/components/ok_hosts.phtml:52 +#: views/scripts/tactical/components/problem_hosts.phtml:50 +msgid "Services" +msgstr "Servizi" + +#: controllers/ChartController.php:242 +msgid "{title}:
{value} of {sum} services are {label}" +msgstr "{title}:
{value} di {sum} servizi sono {label}" + +#: controllers/ChartController.php:245 forms/StatehistoryForm.php:121 +msgid "Ok" +msgstr "Ok" + +#: controllers/ChartController.php:252 forms/StatehistoryForm.php:119 +#: views/helpers/Perfdata.php:40 +msgid "Warning" +msgstr "Warning" + +#: controllers/ChartController.php:259 forms/StatehistoryForm.php:118 +#: views/helpers/Perfdata.php:41 +msgid "Critical" +msgstr "Critical" + +#: controllers/ChartController.php:266 forms/StatehistoryForm.php:120 +msgid "Unknown" +msgstr "Unknown" + +#: controllers/ChartController.php:291 +msgid "{title}:
{value} of {sum} hosts are {label}" +msgstr "{title}:
{value} di {sum} host sono {label}" + +#: controllers/ChartController.php:293 +msgid "Host Group Chart" +msgstr "Grafico dei Gruppi di Host" + +#: controllers/ChartController.php:294 +msgid "Contains host states of each service group." +msgstr "Contiene lo stato dei servizi per ogni gruppo di host." + +#: controllers/ChartController.php:297 controllers/HostsController.php:40 +#: controllers/ListController.php:69 forms/StatehistoryForm.php:101 +#: views/scripts/process/info.phtml:99 views/scripts/show/contact.phtml:39 +#: views/scripts/tactical/components/hostservicechecks.phtml:9 +msgid "Hosts" +msgstr "Host" + +#: controllers/ChartController.php:302 forms/StatehistoryForm.php:138 +msgid "Up" +msgstr "Up" + +#: controllers/ChartController.php:309 forms/StatehistoryForm.php:139 +msgid "Down" +msgstr "Down" + +#: controllers/ChartController.php:316 forms/StatehistoryForm.php:140 +msgid "Unreachable" +msgstr "Unreachable" + +#: controllers/ChartController.php:343 controllers/ChartController.php:397 +msgid " Warning Services (Handled)" +msgstr "Servizi in Warning (Gestiti)" + +#: controllers/ChartController.php:344 controllers/ChartController.php:398 +msgid " Warning Services (Unhandled)" +msgstr "Servizi in Warning (Non Gestiti)" + +#: controllers/ChartController.php:345 controllers/ChartController.php:399 +msgid " Down Services (Handled)" +msgstr "Servizi Down (Gestiti)" + +#: controllers/ChartController.php:346 controllers/ChartController.php:400 +msgid " Down Services (Unhandled)" +msgstr "Servizi Down (Non Gestiti)" + +#: controllers/ChartController.php:347 controllers/ChartController.php:401 +msgid " Unreachable Services (Handled)" +msgstr "Servizi Unreachable (Gestiti)" + +#: controllers/ChartController.php:348 controllers/ChartController.php:402 +msgid " Unreachable Services (Unhandled)" +msgstr "Servizi Unreachable (Non Gestiti) " + +#: controllers/ChartController.php:349 controllers/ChartController.php:403 +msgid " Pending Services" +msgstr "Servizi in Pending" + +#: controllers/ChartController.php:376 +msgid " Up Hosts" +msgstr "Host Up" + +#: controllers/ChartController.php:377 +msgid " Down Hosts (Handled)" +msgstr "Host Down (Gestiti)" + +#: controllers/ChartController.php:378 +msgid " Down Hosts (Unhandled)" +msgstr "Host Down (Non Gestiti)" + +#: controllers/ChartController.php:379 +msgid " Unreachable Hosts (Handled)" +msgstr "Host Unreachable (Gestiti)" + +#: controllers/ChartController.php:380 +msgid " Unreachable Hosts (Unhandled)" +msgstr "Host Unreachable (Non Gestiti)" + +#: controllers/ChartController.php:381 +msgid " Pending Hosts" +msgstr "Host in Pending" + +#: controllers/ChartController.php:396 +msgid " Up Services" +msgstr "Servizi Up" + +#: controllers/CommentController.php:46 controllers/CommentsController.php:51 +msgid "Comment not found" +msgstr "Commento non trovato" + +#: controllers/CommentController.php:53 +msgid "Display detailed information about a comment." +msgstr "Mostra informazioni dettagliate di un commento." + +#: controllers/CommentController.php:56 +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:49 +#: forms/Command/Object/AddCommentCommandForm.php:43 +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:65 +#: forms/Command/Object/SendCustomNotificationCommandForm.php:43 +#: views/scripts/downtime/show.phtml:42 views/scripts/downtime/show.phtml:43 +#: views/scripts/host/history.phtml:63 views/scripts/list/comments.phtml:61 +#: views/scripts/list/downtimes.phtml:78 +#: views/scripts/list/eventhistory.phtml:38 +#: views/scripts/partials/comment/comment-detail.phtml:14 +#: views/scripts/service/history.phtml:61 +#: views/scripts/show/components/comments.phtml:83 +msgid "Comment" +msgstr "Commento" + +#: controllers/CommentsController.php:58 +msgid "Display detailed information about multiple comments." +msgstr "Mostra informazioni dettagliate di più commenti." + +#: controllers/CommentsController.php:61 controllers/ListController.php:420 +#: forms/EventOverviewForm.php:66 views/scripts/hosts/show.phtml:217 +#: views/scripts/list/comments.phtml:7 views/scripts/services/show.phtml:203 +#: views/scripts/show/components/comments.phtml:40 +msgid "Comments" +msgstr "Commenti" + +#: controllers/CommentsController.php:89 +msgid "Remove all Comments" +msgstr "Rimuovi tutti i Commenti" + +#: controllers/CommentsController.php:91 #, php-format -msgid "" -"Icinga Web 2 will retrieve information from your monitoring environment " -"using a backend called \"%s\" and the specified resource below:" -msgstr "" -"Icinga Web 2 recupererà le informazioni dal tuo ambiente di monitoraggio " -"usando il backend chiamato \"%s\" e le seguenti risorse:" +msgid "Confirm removal of %d comments." +msgstr "Conferma la rimozione di %d commenti." -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/InstanceStep.php:75 +#: controllers/ConfigController.php:37 #, php-format -msgid "" -"Icinga Web 2 will use the named pipe located at \"%s\" to send commands to " -"your monitoring instance." -msgstr "" -"Icinga Web 2 utilizzerà la pipe situata in \"%s\" per inviare comandi alla " -"vostra istanza di monitoraggio." +msgid "Edit Monitoring Backend %s" +msgstr "Modifica Backend di Monitoraggio %s" -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/InstanceStep.php:48 +#: controllers/ConfigController.php:65 #, php-format -msgid "" -"Icinga Web 2 will use the named pipe located on a remote machine at \"%s\" " -"to send commands to your monitoring instance by using the connection details " -"listed below:" -msgstr "" -"Icinga Web 2 userà la pipe situata nella macchina remota in \"%s\" per " -"inviare comandi alla vostra istanza di monitoraggio utilizzando i seguenti " -"dettagli:" +msgid "Monitoring backend \"%s\" not found" +msgstr "Backend di Monitoraggio \"%s\" non trovato" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:74 -msgid "If the acknowledgement should expire, check this option." -msgstr "" -"Spuntare questa casella se si vuole dare una scadenza alla Conferma del " -"Problema." +#: controllers/ConfigController.php:79 views/scripts/config/index.phtml:9 +msgid "Create New Monitoring Backend" +msgstr "Crea un Nuovo Backend di Monitoraggio" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:80 -msgid "" -"If you check this option, a notification is sent to all normal and escalated " -"contacts." -msgstr "" -"Selezionando questa opzione verrà inviata una notifica ai contatti " -"configurati." +#: controllers/ConfigController.php:125 +#, php-format +msgid "Remove Monitoring Backend %s" +msgstr "Rimuovi Backend di Monitoraggio %s" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:67 -msgid "" -"If you check this option, a notification is sentregardless of the current " -"time and whether notifications are enabled." -msgstr "" -"Selezionando questa opzione verrà inviata una notifica anche se le notifiche " -"sono disabilitate e ignorando eventuali restrizioni di orario." +#: controllers/ConfigController.php:158 +#, php-format +msgid "Remove Monitoring Instance %s" +msgstr "Rimuovi Istanza di Monitoraggio %s" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:126 -msgid "" -"If you do not want an acknowledgement notification to be sent out to the " -"appropriate contacts, uncheck this option." -msgstr "" -"Deselezionare questa opzione in caso non si voglia inviare una Notifica di " -"Conferma ai contatti configurati." - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:124 +#: controllers/ConfigController.php:160 msgid "" "If you have still any environments or views referring to this instance, you " "won't be able to send commands anymore after deletion." @@ -1380,49 +329,652 @@ msgstr "" "Nel caso qualche altro ambiente o vista faccia riferimento a questa istanza, " "non sarà più possibile inviare comandi dopo la cancellazione." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:101 -msgid "" -"If you select the fixed option, the downtime will be in effect between the " -"start and end times you specify whereas a flexible downtime starts when the " -"host or service enters a problem state sometime between the start and end " -"times you specified and lasts as long as the duration time you enter. The " -"duration fields do not apply for fixed downtimes." -msgstr "" -"Con l'opzione Rigido la manutenzione avrà effetto dall'ora di inizio all'ora " -"di fine specificate. Se si seleziona l'opzione Flessibile la manutenzione " -"partirà quando il servizio raggiungerà uno stato non OK e finirà in base " -"alla durata inserita (anche all'esterno dell'ora di inizio e fine " -"specificata). Il campi della Durata non avranno effetto sulle Manutenzioni " -"Rigide." +#: controllers/ConfigController.php:193 +#, php-format +msgid "Edit Monitoring Instance %s" +msgstr "Modifica Istanza di Monitoraggio %s" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php:64 -msgid "" -"If you select this option, Icinga will force a check regardless of both what " -"time the scheduled check occurs and whether or not checks are enabled." -msgstr "" -"Selezionando questa opzione, Icinga forzerà l'esecuzione del controllo " -"ignorando se controlli attivi sono disabilitati e gli orari di schedulazione." +#: controllers/ConfigController.php:220 +#, php-format +msgid "Monitoring instance \"%s\" not found" +msgstr "Istanza di Monitoraggio \"%s\" non trovata" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php:58 -msgid "" -"If you uncheck this option, the comment will automatically be deleted the " -"next time Icinga is restarted." -msgstr "" -"Selezionando questa opzione il commento verrà automaticamente rimosso al " -"prossimo riavvio di Icinga." +#: controllers/ConfigController.php:234 +msgid "Create New Monitoring Instance" +msgstr "Crea una Nuova Istanza di Monitoraggio" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:114 -msgid "" -"If you want the acknowledgement to disable notifications until the host or " -"service recovers, check this option." -msgstr "" -"Selezionando questa opzione le notifiche verranno disabilitate fino al " -"ripristino dell'host o servizio." +#: controllers/DowntimeController.php:63 +#: controllers/DowntimesController.php:68 +msgid "Downtime not found" +msgstr "Manutenzione non trovata" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:51 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php:45 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:67 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:54 +#: controllers/DowntimeController.php:77 +msgid "Display detailed information about a downtime." +msgstr "Mostra informazioni dettagliate di una manutenzione." + +#: controllers/DowntimeController.php:80 +#: views/scripts/partials/comment/comment-description.phtml:15 +#: views/scripts/show/components/downtime.phtml:109 +msgid "Downtime" +msgstr "Manutenzione" + +#: controllers/DowntimesController.php:76 +msgid "Display detailed information about multiple downtimes." +msgstr "Mostra informazioni dettagliate di più manutenzioni." + +#: controllers/DowntimesController.php:79 controllers/ListController.php:225 +#: forms/EventOverviewForm.php:56 views/scripts/hosts/show.phtml:181 +#: views/scripts/list/downtimes.phtml:11 views/scripts/services/show.phtml:169 +#: views/scripts/show/components/downtime.phtml:45 +msgid "Downtimes" +msgstr "Manutenzioni" + +#: controllers/DowntimesController.php:121 +msgid "Remove all Downtimes" +msgstr "Cancella tutte le Manutenzioni" + +#: controllers/DowntimesController.php:123 +#, php-format +msgid "Confirm removal of %d downtimes." +msgstr "Conferma la rimozione di %d manutenzioni" + +#: controllers/HostController.php:32 +msgid "Host not found" +msgstr "Host non trovato" + +#: controllers/HostController.php:122 +msgid "Acknowledge Host Problem" +msgstr "Conferma il Problema dell'Host" + +#: controllers/HostController.php:134 +msgid "Add Host Comment" +msgstr "Aggiungi commento all'Host" + +#: controllers/HostController.php:146 +msgid "Reschedule Host Check" +msgstr "Rischedula il Controllo dell'Host" + +#: controllers/HostController.php:158 +msgid "Schedule Host Downtime" +msgstr "Pianifica Manutenzione delll'Host" + +#: controllers/HostController.php:170 +msgid "Submit Passive Host Check Result" +msgstr "Invia Risultato Passivo all'Host" + +#: controllers/HostController.php:182 controllers/HostsController.php:241 +msgid "Send Custom Host Notification" +msgstr "Invia Notifica Personalizzata per l'Host" + +#: controllers/HostsController.php:37 +#, php-format +msgid "Show summarized information for %u hosts" +msgstr "Mostra lista informazioni per %u host" + +#: controllers/HostsController.php:169 +msgid "Add Host Comments" +msgstr "Aggiungi Commento all'Host" + +#: controllers/HostsController.php:181 +msgid "Delete Host Comments" +msgstr "Rimuovi Commento dall'Host" + +#: controllers/HostsController.php:193 +msgid "Acknowledge Host Problems" +msgstr "Conferma i Problemi dell'Host" + +#: controllers/HostsController.php:205 +msgid "Reschedule Host Checks" +msgstr "Rischedula i Controlli dell'Host" + +#: controllers/HostsController.php:217 +msgid "Schedule Host Downtimes" +msgstr "Pianifica Manutenzioni dell'Host" + +#: controllers/HostsController.php:229 +msgid "Submit Passive Host Check Results" +msgstr "Invia Risultato Passivo all'Host" + +#: controllers/ListController.php:69 +msgid "List hosts" +msgstr "LIsta host" + +#: controllers/ListController.php:118 controllers/ListController.php:501 +#: controllers/ListController.php:547 +msgid "Severity" +msgstr "Impatto" + +#: controllers/ListController.php:119 +msgid "Current State" +msgstr "Stato Corrente" + +#: controllers/ListController.php:120 controllers/ListController.php:197 +#: controllers/ListController.php:600 +msgid "Hostname" +msgstr "Nome Host" + +#: controllers/ListController.php:121 +msgid "Address" +msgstr "Indirizzo" + +#: controllers/ListController.php:122 +msgid "Last Check" +msgstr "Ultimo Controllo" + +#: controllers/ListController.php:140 +msgid "List services" +msgstr "Lista servizi" + +#: controllers/ListController.php:191 +msgid "Service Severity" +msgstr "Impatto del Servizio" + +#: controllers/ListController.php:192 +msgid "Current Service State" +msgstr "Stato Corrente dei Servizi" + +#: controllers/ListController.php:193 +msgid "Service Name" +msgstr "Nome Servizio" + +#: controllers/ListController.php:194 +msgid "Last Service Check" +msgstr "Ultimo Controllo del Servizio" + +#: controllers/ListController.php:195 +msgid "Host Severity" +msgstr "Impatto Host" + +#: controllers/ListController.php:196 +msgid "Current Host State" +msgstr "Stato Corrente degli Host" + +#: controllers/ListController.php:198 +msgid "Host Address" +msgstr "Indirizzo Host" + +#: controllers/ListController.php:199 +msgid "Last Host Check" +msgstr "Ultimo Controllo dell'Host" + +#: controllers/ListController.php:225 +msgid "List downtimes" +msgstr "Lista manutenzioni" + +#: controllers/ListController.php:258 +msgid "Is In Effect" +msgstr "In Corso" + +#: controllers/ListController.php:259 controllers/ListController.php:448 +#: forms/Config/Instance/RemoteInstanceForm.php:117 +#: views/scripts/comment/show.phtml:29 views/scripts/comment/show.phtml:31 +#: views/scripts/downtime/show.phtml:14 views/scripts/downtime/show.phtml:29 +#: views/scripts/list/comments.phtml:48 +#: views/scripts/list/notifications.phtml:47 +#: views/scripts/partials/comment/comment-detail.phtml:9 +#: views/scripts/partials/downtime/downtimes-header.phtml:23 +msgid "Host" +msgstr "Host" + +#: controllers/ListController.php:260 controllers/ListController.php:449 +#: views/scripts/comment/show.phtml:17 views/scripts/comment/show.phtml:19 +#: views/scripts/downtime/show.phtml:14 views/scripts/downtime/show.phtml:25 +#: views/scripts/list/comments.phtml:34 views/scripts/list/downtimes.phtml:50 +#: views/scripts/list/notifications.phtml:39 +#: views/scripts/partials/comment/comment-detail.phtml:2 +#: views/scripts/partials/downtime/downtimes-header.phtml:15 +#: views/scripts/partials/service/object-header.phtml:32 +msgid "Service" +msgstr "Servizio" + +#: controllers/ListController.php:261 views/scripts/downtime/show.phtml:46 +msgid "Entry Time" +msgstr "Ora Inserimento" + +#: controllers/ListController.php:262 views/scripts/comment/show.phtml:42 +#: views/scripts/downtime/show.phtml:38 +msgid "Author" +msgstr "Autore" + +#: controllers/ListController.php:263 +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:78 +msgid "Start Time" +msgstr "Ora Inizio" + +#: controllers/ListController.php:264 +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:88 +msgid "End Time" +msgstr "Ora Fine" + +#: controllers/ListController.php:265 +msgid "Scheduled Start" +msgstr "Inizio Pianificato" + +#: controllers/ListController.php:266 +msgid "Scheduled End" +msgstr "Fine Pianificata" + +#: controllers/ListController.php:267 views/scripts/downtime/show.phtml:83 +msgid "Duration" +msgstr "Durata" + +#: controllers/ListController.php:284 +msgid "List notifications" +msgstr "Lista notifiche" + +#: controllers/ListController.php:305 +msgid "Notification Start" +msgstr "Inizio Notifica" + +#: controllers/ListController.php:311 +#: views/scripts/show/components/contacts.phtml:17 +msgid "Contacts" +msgstr "Contatti" + +#: controllers/ListController.php:311 +msgid "List contacts" +msgstr "Lista contatti" + +#: controllers/ListController.php:328 +msgid "Name" +msgstr "Nome" + +#: controllers/ListController.php:329 +msgid "Alias" +msgstr "Alias" + +#: controllers/ListController.php:330 views/scripts/list/contacts.phtml:31 +#: views/scripts/show/contact.phtml:24 +msgid "Email" +msgstr "Email" + +#: controllers/ListController.php:331 +msgid "Pager Address / Number" +msgstr "Numero di telefono" + +#: controllers/ListController.php:332 +msgid "Service Notification Timeperiod" +msgstr "Periodo delle Notifiche per il Servizio" + +#: controllers/ListController.php:333 +msgid "Host Notification Timeperiod" +msgstr "Periodo delle Notifiche per l'Host" + +#: controllers/ListController.php:339 +msgid "Event Grid" +msgstr "Griglia Eventi" + +#: controllers/ListController.php:339 +msgid "Show the Event Grid" +msgstr "Mostra Griglia Eventi" + +#: controllers/ListController.php:381 +msgid "Contact Groups" +msgstr "Gruppi di Contatti" + +#: controllers/ListController.php:382 +msgid "List contact groups" +msgstr "Lista gruppi di contatti" + +#: controllers/ListController.php:397 +msgid "Contactgroup Name" +msgstr "Nome Gruppo di Contatti" + +#: controllers/ListController.php:398 +msgid "Contactgroup Alias" +msgstr "Alias Gruppo di Contatti" + +#: controllers/ListController.php:420 +msgid "List comments" +msgstr "Lista commenti" + +#: controllers/ListController.php:447 +msgid "Comment Timestamp" +msgstr "Timestamp Commento" + +#: controllers/ListController.php:450 +msgid "Comment Type" +msgstr "Tipo Commento" + +#: controllers/ListController.php:451 +msgid "Expiration" +msgstr "Scadenza" + +#: controllers/ListController.php:466 +msgid "Service Groups" +msgstr "Gruppi di Servizi" + +#: controllers/ListController.php:467 +msgid "List service groups" +msgstr "Lista gruppi di servizi" + +#: controllers/ListController.php:502 +msgid "Service Group Name" +msgstr "Nome del Gruppo di Servizi" + +#: controllers/ListController.php:503 controllers/ListController.php:550 +#: views/scripts/list/hostgroups.phtml:27 +#: views/scripts/list/servicegroups.phtml:22 +msgid "Total Services" +msgstr "Totale dei Servizi" + +#: controllers/ListController.php:509 +msgid "Host Groups" +msgstr "Gruppi di Host" + +#: controllers/ListController.php:509 +msgid "List host groups" +msgstr "Lista gruppi di host" + +#: controllers/ListController.php:548 +msgid "Host Group Name" +msgstr "Nome Gruppo di Host" + +#: controllers/ListController.php:549 views/scripts/list/hostgroups.phtml:25 +msgid "Total Hosts" +msgstr "Totale Host" + +#: controllers/ListController.php:558 +msgid "Event Overview" +msgstr "Panoramica Eventi" + +#: controllers/ListController.php:559 +msgid "List event records" +msgstr "Lista eventi" + +#: controllers/ListController.php:581 +msgid "Occurence" +msgstr "Occorrenze" + +#: controllers/ListController.php:587 +msgid "Service Grid" +msgstr "Griglia Servizi" + +#: controllers/ListController.php:587 +msgid "Show the Service Grid" +msgstr "Mostra la Griglia Servizi" + +#: controllers/ListController.php:601 +msgid "Service description" +msgstr "Descrizione Servizio" + +#: controllers/ProcessController.php:27 +msgid "" +"Show information about the current monitoring instance's process and it's " +"performance as well as available features" +msgstr "" +"Mostra le informazioni riguardo lo stato del processo dell'istanza attiva, " +"le sue performance e le funzionalità disponibili" + +#: controllers/ProcessController.php:30 controllers/ProcessController.php:41 +msgid "Monitoring Health" +msgstr "Configurazioni Globali" + +#: controllers/ProcessController.php:102 +#: forms/Command/Instance/DisableNotificationsExpireCommandForm.php:24 +msgid "Disable Notifications" +msgstr "Disabilita le Notifiche" + +#: controllers/ServiceController.php:34 +msgid "Service not found" +msgstr "Servizio non trovato" + +#: controllers/ServiceController.php:77 +msgid "Acknowledge Service Problem" +msgstr "Conferma Problema Servizio" + +#: controllers/ServiceController.php:89 +msgid "Add Service Comment" +msgstr "Aggiungi Commento al Servizio" + +#: controllers/ServiceController.php:101 +msgid "Reschedule Service Check" +msgstr "Rischedula Controllo Servizio" + +#: controllers/ServiceController.php:113 +msgid "Schedule Service Downtime" +msgstr "Pianifica Manutenzione Servizio" + +#: controllers/ServiceController.php:125 +msgid "Submit Passive Service Check Result" +msgstr "Invia Risultato Passivo al Servizio" + +#: controllers/ServiceController.php:137 +#: controllers/ServicesController.php:257 +msgid "Send Custom Service Notification" +msgstr "Invia Notifica Personalizzata per il Servizio" + +#: controllers/ServicesController.php:40 +#, php-format +msgid "Show summarized information for %u services" +msgstr "Mostra lista informazioni per %u servizi" + +#: controllers/ServicesController.php:183 +msgid "Add Service Comments" +msgstr "Aggiungi Commento al Servzio" + +#: controllers/ServicesController.php:196 +msgid "Delete Service Comments" +msgstr "Rimuovi Commento dal Servizio" + +#: controllers/ServicesController.php:209 +msgid "Acknowledge Service Problems" +msgstr "Conferma Problemi Servizio" + +#: controllers/ServicesController.php:221 +msgid "Reschedule Service Checks" +msgstr "Rischedula Controlli Servizio" + +#: controllers/ServicesController.php:233 +msgid "Schedule Service Downtimes" +msgstr "Pianifica Manutenzioni Servizio" + +#: controllers/ServicesController.php:245 +msgid "Submit Passive Service Check Results" +msgstr "Invia Risultato Passivo al Servizio" + +#: controllers/ShowController.php:54 +msgid "The parameter `contact_name' is required" +msgstr "Il parametro `contact_name' è richiesto" + +#: controllers/TacticalController.php:16 +msgid "" +"Show an overview of all hosts and services, their current states and " +"monitoring feature utilisation" +msgstr "" +"Mostra una panoramica di tutti gli host e servizi, il loro stato corrente e " +"le funzionalità utilizzate" + +#: controllers/TacticalController.php:19 +msgid "Tactical Overview" +msgstr "Visuale Tattica" + +#: controllers/TimelineController.php:19 +msgid "Show the number of historical event records grouped by time and type" +msgstr "Mostra il numero di eventi dello storico raggruppati per ora e tipo" + +#: controllers/TimelineController.php:20 controllers/TimelineController.php:24 +msgid "Timeline" +msgstr "Cronologia" + +#: forms/Command/Instance/DisableNotificationsExpireCommandForm.php:26 +msgid "" +"This command is used to disable host and service notifications for a " +"specific time." +msgstr "" +"Questo comando serve a disabilitare le notifiche di host e servizi per un " +"periodo di tempo specifico." + +#: forms/Command/Instance/DisableNotificationsExpireCommandForm.php:43 +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:87 +msgid "Expire Time" +msgstr "Ora Scadenza" + +#: forms/Command/Instance/DisableNotificationsExpireCommandForm.php:44 +msgid "Set the expire time." +msgstr "Imposta l'ora di scadenza." + +#: forms/Command/Instance/DisableNotificationsExpireCommandForm.php:61 +msgid "Disabling host and service notifications.." +msgstr "Disabilitazione notifiche di host e servizi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:29 +msgid "Feature Commands" +msgstr "Controllo Funzionalità" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:67 +msgid "Disable notifications for a specific time on a program-wide basis" +msgstr "Disabilita le notifiche per un periodo specifico sull'intero sistema" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:69 +msgid "Disable temporarily" +msgstr "Disabilita Temporaneamente" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:76 +#, php-format +msgid "Notifications will be re-enabled in %s" +msgstr "Le notifiche saranno riabilitate in %s" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:89 +msgid "Active Host Checks" +msgstr "Esegui Controlli degli Host" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:98 +msgid "Active Service Checks" +msgstr "Esegui Controlli dei Servizi" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:107 +#: views/scripts/tactical/components/monitoringfeatures.phtml:208 +#: views/scripts/tactical/components/monitoringfeatures.phtml:210 +msgid "Event Handlers" +msgstr "Gestore Eventi" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:116 +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:88 +#: views/scripts/tactical/components/monitoringfeatures.phtml:8 +#: views/scripts/tactical/components/monitoringfeatures.phtml:10 +msgid "Flap Detection" +msgstr "Controllo Instabilità" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:147 +msgid "Obsessing Over Hosts" +msgstr "Modalità Ossessiva sugli Host" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:156 +msgid "Obsessing Over Services" +msgstr "Modalità Ossessiva sui Servizi" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:165 +msgid "Passive Host Checks" +msgstr "Accetta Controlli Passivi degli Host" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:174 +msgid "Passive Service Checks" +msgstr "Accetta Controlli Passivi dei Servizi" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:185 +#: forms/Command/Object/ProcessCheckResultCommandForm.php:81 +msgid "Performance Data" +msgstr "Dati di Performance" + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:219 +msgid "Enabling active host checks.." +msgstr "Abilitazione controlli host.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:220 +msgid "Disabling active host checks.." +msgstr "Disabilitazione controlli host.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:223 +msgid "Enabling active service checks.." +msgstr "Abilitazione controlli servizi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:224 +msgid "Disabling active service checks.." +msgstr "Disabilitazione controlli.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:227 +msgid "Enabling event handlers.." +msgstr "Abilitazione gestore eventi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:228 +msgid "Disabling event handlers.." +msgstr "Disabilitazione gestore eventi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:231 +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:146 +msgid "Enabling flap detection.." +msgstr "Abilitazione controllo instabilità.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:232 +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:147 +msgid "Disabling flap detection.." +msgstr "Disabilitazione controllo stabilità.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:235 +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:138 +msgid "Enabling notifications.." +msgstr "Abilitazione notifiche.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:236 +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:139 +msgid "Disabling notifications.." +msgstr "Disabilitazione notifiche.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:239 +msgid "Enabling obsessing over hosts.." +msgstr "Abilitazione modalità ossessiva sugli host.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:240 +msgid "Disabling obsessing over hosts.." +msgstr "Disabilitazione modalità ossessiva sui servizi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:243 +msgid "Enabling obsessing over services.." +msgstr "Abilitazione modalità ossessiva sui servizi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:244 +msgid "Disabling obsessing over services.." +msgstr "Disabilitazione modalità ossessiva sui servizi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:247 +msgid "Enabling passive host checks.." +msgstr "Abilitazione controlli passivi host.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:248 +msgid "Disabling passive host checks.." +msgstr "Disabilitazione controlli passivi host.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:251 +msgid "Enabling passive service checks.." +msgstr "Abilitazione controlli passivi servizi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:252 +msgid "Disabling passive service checks.." +msgstr "Disabilitazione controlli passivi servizi.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:255 +msgid "Enabling performance data.." +msgstr "Abilitazione dati di performance.." + +#: forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:256 +msgid "Disabling performance data.." +msgstr "Disabilitazione dati di performance.." + +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:22 +msgid "" +"This command is used to acknowledge host or service problems. When a problem " +"is acknowledged, future notifications about problems are temporarily " +"disabled until the host or service recovers." +msgstr "" +"Questo comando serve per confermare i problemi di host o servizi. Quando un " +"problema è confermato le notifiche saranno temporaneamente disabilitate fino " +"al ripristino dell'host o servizio." + +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:51 +#: forms/Command/Object/AddCommentCommandForm.php:45 +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:67 +#: forms/Command/Object/SendCustomNotificationCommandForm.php:45 msgid "" "If you work with other administrators, you may find it useful to share " "information about the the host or service that is having problems. Make sure " @@ -1432,2080 +984,160 @@ msgstr "" "informazioni riguardo l'host e i servizi che stanno avendo problemi. " "Assicurati di inserire una breve descrizione delle azioni che stai svolgendo." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:63 +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:61 +msgid "Persistent Comment" +msgstr "Commento Persistente" + +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:63 msgid "" "If you would like the comment to remain even when the acknowledgement is " "removed, check this option." msgstr "" -"Selezionando questa opzione il commento rimarrà anche dopo la fine Problema." +"Selezionando questa opzione il commento rimarrà anche dopo la rimozione " +"della conferma." -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:56 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:65 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:89 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:83 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml:17 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/statusicons.phtml:17 -msgid "In Downtime" -msgstr "In Manutenzione" +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:72 +msgid "Use Expire Time" +msgstr "Scadenza" -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:147 -msgid "" -"In case it's desired that a TCP connection is being used by Icinga Web 2 to " -"access a Livestatus interface, the Sockets module for PHP is required." +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:74 +msgid "If the acknowledgement should expire, check this option." msgstr "" -"Il modulo PHP Sockets è richiesto nel caso sia necessaria stabilire una " -"connessione TCP per accedere all'interfaccia Livestatus tramite Icinga Web 2." +"Spuntare questa casella se si vuole dare una scadenza alla conferma del " +"problema." -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:58 -msgid "Instance" -msgstr "Istanza" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:160 -#, php-format -msgid "Instance \"%s\" created successfully." -msgstr "Istanza \"%s\" creata correttamente." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:163 -#, php-format -msgid "Instance \"%s\" edited successfully." -msgstr "Istanza \"%s\" modificata correttamente." - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:114 -#, php-format -msgid "Instance \"%s\" successfully removed." -msgstr "Istanza \"%s\" modificata correttamente." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:191 -msgid "Instance Name" -msgstr "Nome Istanza" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:200 -msgid "Instance Type" -msgstr "Tipo Istanza" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:74 -msgid "Instance already exists" -msgstr "Istanza già esistente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:71 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:119 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:138 -msgid "Instance name missing" -msgstr "Nome istanza mancante" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:50 -#, php-format -msgid "Invalid instance type \"%s\" given" -msgstr "Tipo \"%s\" di Istanza non valido" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:296 -msgid "Is In Effect" -msgstr "In Corso" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/WelcomePage.php:42 +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:90 msgid "" -"It offers various status and reporting views with powerful filter " -"capabilities that allow you to keep track of the most important events in " -"your monitoring environment." +"Enter the expire date and time for this acknowledgement here. Icinga will " +"delete the acknowledgement after this time expired." msgstr "" -"Offre varie viste di reportistica con la capacità di configurare filtri " -"specifici per permettere di tenere traccia degli eventi più importanti degli " -"eventi di monitoraggio." +"Inserire qui data e ora della scadenza della conferma . Icinga cancellerà " +"automaticamente la conferma allo scadere del tempo." -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Perfdata.php:29 -msgid "Label" -msgstr "Etichetta" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:136 -msgid "Last Check" -msgstr "Ultimo Controllo" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:77 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:93 -msgid "Last Comment: " -msgstr "Ultimo Commento: " - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:31 -msgid "Last External Command Check" -msgstr "Ultimo Comando Esterno" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:230 -msgid "Last Host Check" -msgstr "Ultimo Controllo dell'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:35 -msgid "Last Log File Rotation" -msgstr "Ultima Rotazione del File di Log" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:24 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:24 -msgid "Last Problem" -msgstr "Ultimo Problema" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:225 -msgid "Last Service Check" -msgstr "Ultimo Controllo del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:27 -msgid "Last Status Update" -msgstr "Ultimo Aggiornamento di Stato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:18 -msgid "Last check" -msgstr "Ultimo Controllo" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:126 -msgid "Latency" -msgstr "Latenza" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/timeline/index.phtml:16 -msgid "Legend" -msgstr "Legenda" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:292 -#, fuzzy, php-format -msgid "" -"List %s service that is currenlty in state PENDING in service group \"%s\"" -msgid_plural "" -"List %s services which are currently in state PENDING in service group \"%s\"" -msgstr[0] "" -"Mostra %s servizio in stato warning gestito nel gruppo di servizi %s" -msgstr[1] "Mostra %s servizi in stato warning gestiti nel gruppo di servizi %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:157 -#, fuzzy, php-format -msgid "" -"List %s service that is currently in state CRITICAL (Acknowledged) in " -"service group \"%s\"" -msgid_plural "" -"List %s services which are currently in state CRITICAL (Acknowledged) in " -"service group \"%s\"" -msgstr[0] "" -"Mostra %s servizio in stato warning gestito nel gruppo di servizi %s" -msgstr[1] "Mostra %s servizi in stato warning gestiti nel gruppo di servizi %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:133 -#, fuzzy, php-format -msgid "" -"List %s service that is currently in state CRITICAL in service group \"%s\"" -msgid_plural "" -"List %s services which are currently in state CRITICAL in service group \"%s" -"\"" -msgstr[0] "" -"Mostra %s servizio in stato warning gestito nel gruppo di servizi %s" -msgstr[1] "Mostra %s servizi in stato warning gestiti nel gruppo di servizi %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:106 -#, fuzzy, php-format -msgid "List %s service that is currently in state OK in service group \"%s\"" -msgid_plural "" -"List %s services which are currently in state OK in service group \"%s\"" -msgstr[0] "Mostra %s servizio in stato pending nel gruppo di servizi %s" -msgstr[1] "Mostra %s servizi in stato pending nel gruppo di servizi %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:211 -#, fuzzy, php-format -msgid "" -"List %s service that is currently in state UNKNOWN (Acknowledged) in service " -"group \"%s\"" -msgid_plural "" -"List %s services which are currently in state UNKNOWN (Acknowledged) in " -"service group \"%s\"" -msgstr[0] "" -"Mostra %s servizio in stato warning gestito nel gruppo di servizi %s" -msgstr[1] "Mostra %s servizi in stato warning gestiti nel gruppo di servizi %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:187 -#, fuzzy, php-format -msgid "" -"List %s service that is currently in state UNKNOWN in service group \"%s\"" -msgid_plural "" -"List %s services which are currently in state UNKNOWN in service group \"%s\"" -msgstr[0] "" -"Mostra %s servizio in stato warning gestito nel gruppo di servizi %s" -msgstr[1] "Mostra %s servizi in stato warning gestiti nel gruppo di servizi %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:265 -#, fuzzy, php-format -msgid "" -"List %s service that is currently in state WARNING (Acknowledged) in service " -"group \"%s\"" -msgid_plural "" -"List %s services which are currently in state WARNING (Acknowledged) in " -"service group \"%s\"" -msgstr[0] "" -"Mostra %s servizio in stato warning gestito nel gruppo di servizi %s" -msgstr[1] "Mostra %s servizi in stato warning gestiti nel gruppo di servizi %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:241 -#, fuzzy, php-format -msgid "" -"List %s service that is currently in state WARNING in service group \"%s\"" -msgid_plural "" -"List %s services which are currently in state WARNING in service group \"%s\"" -msgstr[0] "" -"Mostra %s servizio in stato warning gestito nel gruppo di servizi %s" -msgstr[1] "Mostra %s servizi in stato warning gestiti nel gruppo di servizi %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:123 -#, fuzzy, php-format -msgid "List %s unhandled service problem on host %s" -msgid_plural "List %s unhandled service problems on host %s" -msgstr[0] "Mostra %s problema ai servizi dell'host %s" -msgstr[1] "Mostra %s problemi ai servizi dell'host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/timeline/index.phtml:111 -#, fuzzy, php-format -msgctxt "timeline.link.title" -msgid "List %u %s registered %s" -msgstr "Mostra %u %s salvati %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:24 -#, fuzzy, php-format -msgid "List %u actively checked host" -msgid_plural "List %u actively checked hosts" -msgstr[0] "%d è controllato passivamente" -msgstr[1] "%d è controllato passivamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:80 -#, fuzzy, php-format -msgid "List %u actively checked service" -msgid_plural "List %u actively checked services" -msgstr[0] "%d è controllato passivamente" -msgstr[1] "%d è controllato passivamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:112 -#, php-format -msgid "List %u host comment" -msgid_plural "List %u host comments" -msgstr[0] "Mostra %u commento dell' host" -msgstr[1] "Mostra %u commenti dell' host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:97 -#, fuzzy, php-format -msgid "List %u host currently in downtime" -msgid_plural "List %u hosts currently in downtime" -msgstr[0] "Mostra %u host in manutenzione" -msgstr[1] "Mostra %u host in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:27 -#, fuzzy, php-format -msgid "List %u host for which flap detection has been disabled" -msgid_plural "List %u hosts for which flap detection has been disabled" -msgstr[0] "Mostra tutti gli host dove il controllo di instabilità è abilitato" -msgstr[1] "Mostra tutti gli host dove il controllo di instabilità è abilitato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:148 -#, fuzzy, php-format -msgid "List %u host for which notifications are suppressed" -msgid_plural "List %u hosts for which notifications are suppressed" -msgstr[0] "Mostra tutti gli host dove le notifiche sono abilitate" -msgstr[1] "Mostra tutti gli host dove le notifiche sono abilitate" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:57 -#, fuzzy, php-format -msgid "List %u host that is currently flapping" -msgid_plural "List %u hosts which are currently flapping" -msgstr[0] "Mostra %u host in manutenzione" -msgstr[1] "Mostra %u host in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml:39 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml:17 -#, fuzzy, php-format -msgid "List %u host that is currently in state DOWN" -msgid_plural "List %u hosts which are currently in state DOWN" -msgstr[0] "Mostra %u host in manutenzione" -msgstr[1] "Mostra %u host in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml:59 -#, fuzzy, php-format -msgid "List %u host that is currently in state DOWN (Acknowledged)" -msgid_plural "List %u hosts which are currently in state DOWN (Acknowledged)" -msgstr[0] "Mostra %u host in manutenzione" -msgstr[1] "Mostra %u host in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml:126 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml:40 -#, fuzzy, php-format -msgid "List %u host that is currently in state PENDING" -msgid_plural "List %u hosts which are currently in state PENDING" -msgstr[0] "Mostra %u host in manutenzione" -msgstr[1] "Mostra %u host in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml:84 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml:39 -#, fuzzy, php-format -msgid "List %u host that is currently in state UNREACHABLE" -msgid_plural "List %u hosts which are currently in state UNREACHABLE" -msgstr[0] "Mostra %u host in manutenzione" -msgstr[1] "Mostra %u host in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml:104 -#, php-format -msgid "List %u host that is currently in state UNREACHABLE (Acknowledged)" -msgid_plural "" -"List %u hosts which are currently in state UNREACHABLE (Acknowledged)" -msgstr[0] "" -msgstr[1] "" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml:18 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml:22 -#, fuzzy, php-format -msgid "List %u host that is currently in state UP" -msgid_plural "List %u hosts which are currently in state UP" -msgstr[0] "Mostra %u host in manutenzione" -msgstr[1] "Mostra %u host in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:60 -#, fuzzy, php-format -msgid "List %u host that is not being checked at all" -msgid_plural "List %u hosts which are not being checked at all" -msgstr[0] "%d è stato controllato" -msgstr[1] "%d è stato controllato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:227 -#, fuzzy, php-format -msgid "List %u host that is not processing any event handlers" -msgid_plural "List %u hosts which are not processing any event handlers" -msgstr[0] "Mostra tutti gli host dove il gestore eventi è abilitato" -msgstr[1] "Mostra tutti gli host dove il gestore eventi è abilitato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:42 -#, fuzzy, php-format -msgid "List %u passively checked host" -msgid_plural "List %u passively checked hosts" -msgstr[0] "%d è controllato passivamente" -msgstr[1] "%d è controllato passivamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:98 -#, fuzzy, php-format -msgid "List %u passively checked service" -msgid_plural "List %u passively checked services" -msgstr[0] "%d è controllato passivamente" -msgstr[1] "%d è controllato passivamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:112 -#, php-format -msgid "List %u service comment" -msgid_plural "List %u service comments" -msgstr[0] "Mostra %u commento del servizio" -msgstr[1] "Mostra %u commenti del servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:97 -#, php-format -msgid "List %u service currently in downtime" -msgid_plural "List %u services currently in downtime" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:82 -#, fuzzy, php-format -msgid "List %u service for which flap detection has been disabled" -msgid_plural "List %u services for which flap detection has been disabled" -msgstr[0] "" -"Mostra tutti i servizi dove il controllo di instabilità è disbilitato" -msgstr[1] "" -"Mostra tutti i servizi dove il controllo di instabilità è disbilitato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:182 -#, fuzzy, php-format -msgid "List %u service for which notifications are suppressed" -msgid_plural "List %u services for which notifications are suppressed" -msgstr[0] "Mostra tutti i servizi dove le notifiche sono disabilitate" -msgstr[1] "Mostra tutti i servizi dove le notifiche sono disabilitate" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:112 -#, fuzzy, php-format -msgid "List %u service that is currently flapping" -msgid_plural "List %u services which are currently flapping" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml:57 -#, fuzzy, php-format -msgid "List %u service that is currently in state %s" -msgid_plural "List %u services which are currently in state %s" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml:82 -#, fuzzy, php-format -msgid "List %u service that is currently in state %s (Acknowledged)" -msgid_plural "List %u services which are currently in state %s (Acknowledged)" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml:108 -#, fuzzy, php-format -msgid "List %u service that is currently in state %s (Acknowledged) on host %s" -msgid_plural "" -"List %u services which are currently in state %s (Acknowledged) on host %s" -msgstr[0] "" -"Mostra %u servizio in stato critical non gestito nel gruppo di host %s" -msgstr[1] "" -"Mostra %u servizi in stato critical non gestiti nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml:82 -#, fuzzy, php-format -msgid "List %u service that is currently in state %s on host %s" -msgid_plural "List %u services which are currently in state %s on host %s" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:20 -#, fuzzy, php-format -msgid "List %u service that is currently in state CRITICAL" -msgid_plural "List %u services which are currently in state CRITICAL" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:41 -#, fuzzy, php-format -msgid "List %u service that is currently in state CRITICAL (Acknowledged)" -msgid_plural "" -"List %u services which are currently in state CRITICAL (Acknowledged)" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:165 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state CRITICAL (Acknowledged) on hosts " -"in the host group \"%s\"" -msgid_plural "" -"List %u services which are currently in state CRITICAL (Acknowledged) on " -"hosts in the host group \"%s\"" -msgstr[0] "" -"Mostra %u servizio in stato critical non gestito nel gruppo di host %s" -msgstr[1] "" -"Mostra %u servizi in stato critical non gestiti nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:95 -#, php-format -msgid "" -"List %u service that is currently in state CRITICAL and not checked at all" -msgid_plural "" -"List %u services which are currently in state CRITICAL and not checked at all" -msgstr[0] "" -msgstr[1] "" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:68 -#, php-format -msgid "" -"List %u service that is currently in state CRITICAL and passively checked" -msgid_plural "" -"List %u services which are currently in state CRITICAL and passively checked" -msgstr[0] "" -msgstr[1] "" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:141 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state CRITICAL on hosts in the host " -"group \"%s\"" -msgid_plural "" -"List %u services which are currently in state CRITICAL on hosts in the host " -"group \"%s\"" -msgstr[0] "Mostra %u servizio in stato ok nel gruppo di host %s" -msgstr[1] "Mostra %u servizi in stato ok nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml:19 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:314 -#, fuzzy, php-format -msgid "List %u service that is currently in state OK" -msgid_plural "List %u services which are currently in state OK" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:340 -#, fuzzy, php-format -msgid "List %u service that is currently in state OK and not checked at all" -msgid_plural "" -"List %u services which are currently in state OK and not checked at all" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml:43 -#, fuzzy, php-format -msgid "List %u service that is currently in state OK on host %s" -msgid_plural "List %u services which are currently in state OK on host %s" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:114 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state OK on hosts in the host group \"%s" -"\"" -msgid_plural "" -"List %u services which are currently in state OK on hosts in the host group " -"\"%s\"" -msgstr[0] "Mostra %u servizio in stato ok nel gruppo di host %s" -msgstr[1] "Mostra %u servizi in stato ok nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml:106 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:361 -#, fuzzy, php-format -msgid "List %u service that is currently in state PENDING" -msgid_plural "List %u services which are currently in state PENDING" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:387 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state PENDING and not checked at all" -msgid_plural "" -"List %u services which are currently in state PENDING and not checked at all" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml:133 -#, fuzzy, php-format -msgid "List %u service that is currently in state PENDING on host %s" -msgid_plural "List %u services which are currently in state PENDING on host %s" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:300 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state PENDING on hosts in the host " -"group \"%s\"" -msgid_plural "" -"List %u services which are currently in state PENDING on hosts in the host " -"group \"%s\"" -msgstr[0] "Mostra %u servizio in stato ok nel gruppo di host %s" -msgstr[1] "Mostra %u servizi in stato ok nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:218 -#, fuzzy, php-format -msgid "List %u service that is currently in state UNKNOWN" -msgid_plural "List %u services which are currently in state UNKNOWN" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:239 -#, fuzzy, php-format -msgid "List %u service that is currently in state UNKNOWN (Acknowledged)" -msgid_plural "" -"List %u services which are currently in state UNKNOWN (Acknowledged)" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:219 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state UNKNOWN (Acknowledged) on hosts " -"in the host group \"%s\"" -msgid_plural "" -"List %u services which are currently in state UNKNOWN (Acknowledged) on " -"hosts in the host group \"%s\"" -msgstr[0] "" -"Mostra %u servizio in stato critical non gestito nel gruppo di host %s" -msgstr[1] "" -"Mostra %u servizi in stato critical non gestiti nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:293 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state UNKNOWN and not checked at all" -msgid_plural "" -"List %u services which are currently in state UNKNOWN and not checked at all" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:266 -#, php-format -msgid "" -"List %u service that is currently in state UNKNOWN and passively checked" -msgid_plural "" -"List %u services which are currently in state UNKNOWN and passively checked" -msgstr[0] "" -msgstr[1] "" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:195 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state UNKNOWN on hosts in the host " -"group \"%s\"" -msgid_plural "" -"List %u services which are currently in state UNKNOWN on hosts in the host " -"group \"%s\"" -msgstr[0] "Mostra %u servizio in stato ok nel gruppo di host %s" -msgstr[1] "Mostra %u servizi in stato ok nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:119 -#, fuzzy, php-format -msgid "List %u service that is currently in state WARNING" -msgid_plural "List %u services which are currently in state WARNING" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:140 -#, fuzzy, php-format -msgid "List %u service that is currently in state WARNING (Acknowledged)" -msgid_plural "" -"List %u services which are currently in state WARNING (Acknowledged)" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:273 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state WARNING (Acknowledged) on hosts " -"in the host group \"%s\"" -msgid_plural "" -"List %u services which are currently in state WARNING (Acknowledged) on " -"hosts in the host group \"%s\"" -msgstr[0] "" -"Mostra %u servizio in stato critical non gestito nel gruppo di host %s" -msgstr[1] "" -"Mostra %u servizi in stato critical non gestiti nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:194 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state WARNING and not checked at all" -msgid_plural "" -"List %u services which are currently in state WARNING and not checked at all" -msgstr[0] "Mostra %u servizio in manutenzione" -msgstr[1] "Mostra %u servizi in manutenzione" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:167 -#, php-format -msgid "" -"List %u service that is currently in state WARNING and passively checked" -msgid_plural "" -"List %u services which are currently in state WARNING and passively checked" -msgstr[0] "" -msgstr[1] "" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:249 -#, fuzzy, php-format -msgid "" -"List %u service that is currently in state WARNING on hosts in the host " -"group \"%s\"" -msgid_plural "" -"List %u services which are currently in state WARNING on hosts in the host " -"group \"%s\"" -msgstr[0] "Mostra %u servizio in stato ok nel gruppo di host %s" -msgstr[1] "Mostra %u servizi in stato ok nel gruppo di host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:116 -#, fuzzy, php-format -msgid "List %u service that is not being checked at all" -msgid_plural "List %u services which are not being checked at all" -msgstr[0] "%d è stato controllato" -msgstr[1] "%d è stato controllato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:261 -#, fuzzy, php-format -msgid "List %u service that is not processing any event handlers" -msgid_plural "List %u services which are not processing any event handlers" -msgstr[0] "Mostra tutti i servizi dove il gestore eventi è abilitato" -msgstr[1] "Mostra tutti i servizi dove il gestore eventi è abilitato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:10 -#, php-format -msgid "List all %u hosts" -msgstr "Mostra tutti %u host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml:23 -#, fuzzy, php-format -msgid "List all %u service on host %s" -msgid_plural "List all %u services on host %s" -msgstr[0] "Mostra tutti i servizi dell'host %s" -msgstr[1] "Mostra tutti i servizi dell'host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:10 -#, php-format -msgid "List all %u services" -msgstr "Mostra tutti %u servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/timeline/index.phtml:73 -#, fuzzy, php-format -msgctxt "timeline.link.title" -msgid "List all event records registered %s" -msgstr "Mostra tutti gli eventi dello storico %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:86 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml:11 -#, php-format -msgid "List all hosts in the group \"%s\"" -msgstr "Mostra tutti gli host del gruppo \"%s\"" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:41 -msgid "List all hosts, for which flap detection is enabled entirely" -msgstr "Mostra tutti gli host dove il controllo di instabilità è abilitato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:162 -msgid "List all hosts, for which notifications are enabled entirely" -msgstr "Mostra tutti gli host dove le notifiche sono abilitate" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:241 -msgid "List all hosts, which are processing event handlers entirely" -msgstr "Mostra tutti gli host dove il gestore eventi è abilitato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegrid.phtml:72 -#, php-format -msgid "List all reported services on host %s" -msgstr "Mostra tutti i servizi riportati nell'host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:86 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml:11 -#, php-format -msgid "List all services in the group \"%s\"" -msgstr "Mostra tutti i servizi del gruppo \"%s\"" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:95 -#, php-format -msgid "List all services of all hosts in host group \"%s\"" -msgstr "Mostra tutti i servizi di tutti gli host del gruppo \"%s\"" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:237 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:212 -#, php-format -msgid "List all services on host %s" -msgstr "Mostra tutti i servizi dell'host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegrid.phtml:53 -#, php-format -msgid "List all services with the name \"%s\" on all reported hosts" -msgstr "Mostra tutti i servizi con il nome \"%s\" negli host riportati" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:96 -msgid "List all services, for which flap detection is enabled entirely" -msgstr "Mostra tutti i servizi dove il controllo di instabilità è disbilitato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:196 -msgid "List all services, for which notifications are enabled entirely" -msgstr "Mostra tutti i servizi dove le notifiche sono disabilitate" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:275 -msgid "List all services, which are processing event handlers entirely" -msgstr "Mostra tutti i servizi dove il gestore eventi è abilitato" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:468 -msgid "List comments" -msgstr "Lista commenti" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:435 -msgid "List contact groups" -msgstr "Lista gruppi di contatti" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:351 -msgid "List contacts" -msgstr "Lista contatti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/contacts.phtml:31 -#, php-format -msgid "List contacts in contact-group \"%s\"" -msgstr "Mostra contatti nel gruppo \"%s\"" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:269 -msgid "List downtimes" -msgstr "Lista manutenzioni" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:614 -msgid "List event records" -msgstr "Lista eventi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:561 -msgid "List host groups" -msgstr "Lista gruppi di host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:97 -msgid "List hosts" -msgstr "LIsta host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:326 -msgid "List notifications" -msgstr "Lista notifiche" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:510 -msgid "List service groups" -msgstr "Lista gruppi di servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:171 -msgid "List services" -msgstr "Lista servizi" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:118 -msgid "Livestatus Resource" -msgstr "Risorsa Livestatus" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:76 -msgid "Local" -msgstr "Locale" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:202 -msgid "Local Command File" -msgstr "Command File locale" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Perfdata.php:29 -msgid "Max" -msgstr "Max" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:449 -msgid "Max (min)" -msgstr "Massimo (min)" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Perfdata.php:29 -msgid "Min" -msgstr "Min" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:147 -msgid "Minutes" -msgstr "Minuti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:14 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:72 -msgid "Monitoring Backend" -msgstr "Backend di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/BackendPage.php:14 -msgctxt "setup.page.title" -msgid "Monitoring Backend" -msgstr "Backend di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:3 -msgid "Monitoring Backends" -msgstr "Backend di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:2 -msgid "Monitoring Features" -msgstr "Funzionalità di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:209 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ProcessController.php:29 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ProcessController.php:40 -msgid "Monitoring Health" -msgstr "Impostazioni Globali" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/IdoResourcePage.php:14 -msgctxt "setup.page.title" -msgid "Monitoring IDO Resource" -msgstr "Risorsa IDO del Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/InstanceStep.php:42 -msgid "Monitoring Instance" -msgstr "Istanza di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/InstancePage.php:14 -msgctxt "setup.page.title" -msgid "Monitoring Instance" -msgstr "Istanza di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:50 -msgid "Monitoring Instances" -msgstr "Istanze di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php:14 -msgctxt "setup.page.title" -msgid "Monitoring Livestatus Resource" -msgstr "Risorsa Livestatus di Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/SecurityStep.php:41 -msgid "Monitoring Security" -msgstr "Sicurezza del Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/SecurityPage.php:14 -msgctxt "setup.page.title" -msgid "Monitoring Security" -msgstr "Sicurezza del Monitoraggio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:146 -#, php-format -msgid "Monitoring backend \"%s\" has been successfully changed" -msgstr "Backend di monitoraggio \"%s\" modificato correttamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:143 -#, php-format -msgid "Monitoring backend \"%s\" has been successfully created" -msgstr "Backend di monitoraggio \"%s\" creato correttamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:79 -msgid "Monitoring backend already exists" -msgstr "Backend di monitoraggio già esistente" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:146 -#, php-format -msgid "" -"Monitoring backend configuration could not be written to: %s; An error " -"occured:" -msgstr "" -"Impossibile scrivere la configurazione del vba del monitoraggio in: %s; " -"Errore:" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:141 -#, php-format -msgid "Monitoring backend configuration has been successfully written to: %s" -msgstr "Configurazione del Backend di monitoraggio scritta correttmente in: %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:77 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:124 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:170 -msgid "Monitoring backend name missing" -msgstr "Nome del backend di monitoraggio mancante" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/InstanceStep.php:93 -#, php-format -msgid "" -"Monitoring instance configuration could not be written to: %s; An error " -"occured:" -msgstr "" -"Impossibile scrivere la configurazione dell'istanza di monitoraggio in: %s; " -"Errore:" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/InstanceStep.php:88 -#, php-format -msgid "Monitoring instance configuration has been successfully created: %s" -msgstr "Configuarzione dell'Istanza di monitoraggio creata correttamente: %s" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/SecurityStep.php:71 -#, php-format -msgid "" -"Monitoring security configuration could not be written to: %s; An error " -"occured:" -msgstr "" -"Impossibile scrivere la configurazione di sicurezza del monitoraggio in: %s; " -"Errore:" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/SecurityStep.php:66 -#, php-format -msgid "Monitoring security configuration has been successfully created: %s" -msgstr "Configurazione di sicurezza creata correttamente: %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:649 -msgid "Month" -msgstr "Mese" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:38 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:44 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:50 -msgid "N/A" -msgstr "N/A" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:376 -msgid "Name" -msgstr "Nome" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:97 -msgid "New instance name missing" -msgstr "Nome nuova istanza mancante" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:102 -msgid "New monitoring backend name missing" -msgstr "Nome del nuovo backend di monitoraggio mancante" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/SecurityConfigForm.php:31 -msgid "New security configuration has successfully been stored" -msgstr "" -"La nuova configurazione di sicurezza del monitoraggio è stata salvata " -"correttamente." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:27 -msgid "Next check" -msgstr "Prossimo Controllo" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checksource.phtml:17 -msgid "No" -msgstr "No" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegrid.phtml:23 -msgid "No Services matching the filter" -msgstr "Nessun Servizio soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:25 -msgid "No active downtimes" -msgstr "Nessuna Manutenzione in corso" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php:176 -msgid "No backend has been configured" -msgstr "Nessun Backend configurato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:14 -msgid "No comments matching the filter" -msgstr "Nessun commento soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php:189 -#, php-format -msgid "No configuration for backend %s" -msgstr "Nessuna configurazione per il backend %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contactgroups.phtml:11 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contacts.phtml:12 -msgid "No contacts matching the filter" -msgstr "Nessun contatto soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:24 -msgid "No history available for this object" -msgstr "Storico non disponibile per questo oggetto" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:26 -msgid "No history events matching the filter" -msgstr "Nessun evento dello storico soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:17 -msgid "No host groups matching the filter" -msgstr "Nessun gruppo di host soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:6 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:27 -msgid "No hosts matching the filter" -msgstr "Nessun host soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/notifications.phtml:53 -msgid "No notification has been sent for this issue" -msgstr "Nessuna notifica è stata inviata per questo problema" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:62 -msgid "No notifications have been sent for this contact" -msgstr "Nessuna notifica è stata inviata a questo contatto" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.phtml:21 -msgid "No notifications matching the filter" -msgstr "Nessuna notifica soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:17 -msgid "No service groups matching the filter" -msgstr "Nessun gruppo di servizi soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml:32 -msgid "No services configured on this host" -msgstr "Nessun servizio configurato per questo host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:39 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:6 -msgid "No services matching the filter" -msgstr "Nessun Servizio soddisfa i criteri di ricerca" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventgrid.phtml:69 -msgid "No state changes in the selected time period." -msgstr "Nessun cambio di stato nel intervallo di tempo selezionato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:10 -msgid "No such contact" -msgstr "Nessun contatto trovato" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/SecurityStep.php:55 -msgid "None" -msgstr "Niente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml:23 -msgid "Not acknowledged" -msgstr "Non Confermato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:41 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:52 -msgid "Notification" -msgstr "Notifica" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:342 -msgid "Notification Start" -msgstr "Partenza Notifica" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:171 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:331 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:429 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:472 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:479 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:325 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:44 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/EventOverviewForm.php:76 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php:66 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/notifications.phtml:2 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:127 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/monitoringfeatures.phtml:129 -msgid "Notifications" -msgstr "Notifiche" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:61 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:85 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml:13 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/statusicons.phtml:13 -msgid "Notifications Disabled" -msgstr "Notifiche Disabilitate" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:124 -msgid "Notifications Enabled" -msgstr "Notifiche Abilitate" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:15 -msgid "Notifications and Problems" -msgstr "Notifiche e Problemi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:328 -#, fuzzy -msgid "Notifications and average reaction time per hour." -msgstr "Notifiche e problemi per ora" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:469 -msgid "Notifications and defects per hour" -msgstr "Notifiche e problemi per ora" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:56 -msgid "Notifications sent to this contact" -msgstr "Notifiche inviate a questo contatto" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:76 -#, php-format -msgid "Notifications will be re-enabled in %s" -msgstr "Le notifiche saranno riabilitate in %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/disable-notifications.phtml:11 -#, php-format -msgid "Notifications will be re-enabled in %s." -msgstr "Le notifiche saranno riabilitate in %s." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:70 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:70 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Service.php:178 -msgid "OK" -msgstr "OK" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:60 -msgctxt "icinga.state" -msgid "OK" -msgstr "OK" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:72 -msgid "Object summaries" -msgstr "Riepilogo Oggetti" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:97 -msgid "Object type" -msgstr "Tipo Oggetto" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php:57 -msgid "Obsessing" -msgstr "Modalità Ossessiva" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:144 -msgid "Obsessing Over Hosts" -msgstr "Modalità Ossessiva sugli Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:153 -msgid "Obsessing Over Services" -msgstr "Modalità Ossessiva sui Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:636 -msgid "Occurence" -msgstr "Occorrenze" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:250 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:121 -msgid "Ok" -msgstr "Ok" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:95 -msgid "Old instance name missing" -msgstr "Nome vecchia istanza mancante" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:100 -msgid "Old monitoring backend name missing" -msgstr "Nome del vecchio backend di monitoraggio mancante" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:536 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:98 -msgid "One day" -msgstr "Un giorno" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:538 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:100 -msgid "One month" -msgstr "Un mese" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:537 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:99 -msgid "One week" -msgstr "Una settimana" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:539 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:101 -msgid "One year" -msgstr "Un anno" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:72 -msgid "Output" -msgstr "Output" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:131 -msgid "Overview" -msgstr "Panoramica" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:76 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:76 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Host.php:182 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Service.php:190 -msgid "PENDING" -msgstr "PENDING" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contacts.phtml:34 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:32 -msgid "Pager" -msgstr "Recapito" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:379 -msgid "Pager Address / Number" -msgstr "Numero di telefono" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php:48 -msgid "Passive Checks" -msgstr "Controlli Passivi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:162 -msgid "Passive Host Checks Being Accepted" -msgstr "Accetta Controlli Passivi sugli Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:171 -msgid "Passive Service Checks Being Accepted" -msgstr "Accetta Controlli Passivi sui Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:150 -msgid "Passive checks" -msgstr "Controlli passivi" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:112 -msgid "Password" -msgstr "Password" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php:66 -msgid "Path to the Icinga command file on the remote Icinga instance" -msgstr "Percorso del command file di Icinga nell'istanza remota" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/LocalInstanceForm.php:32 -msgid "Path to the local Icinga command file" -msgstr "Percorso del command file locale di Icinga" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:81 -msgid "Performance Data" -msgstr "Dati di Performance" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:180 -msgid "Performance Data Being Processed" -msgstr "Accetta i Dati di Performance" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:70 -msgid "Performance Info" -msgstr "Informazioni sulle Performance" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/perfdata.phtml:3 -msgid "Performance data" -msgstr "Dati di Performance" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php:55 -msgid "Persistent" -msgstr "Persistente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:61 -msgid "Persistent Comment" -msgstr "Commento Persistente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/BackendPage.php:16 -msgid "" -"Please configure below how Icinga Web 2 should retrieve monitoring " -"information." -msgstr "" -"Definire di seguito come Icinga Web 2 recupererà le informazioni del " -"monitoraggio." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/InstancePage.php:16 -msgid "Please define the settings specific to your monitoring instance below." -msgstr "" -"Definire di seguito le impostazioni specifiche della vostra istanza di " -"monitoraggio." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/IdoResourcePage.php:16 -msgid "" -"Please fill out the connection details below to access the IDO database of " -"your monitoring environment." -msgstr "" -"Compilare di seguito i dettagli della connessione per accedere al database " -"IDO del vostro ambiente di monitoraggio." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php:16 -msgid "" -"Please fill out the connection details below to access the Livestatus socket " -"interface for your monitoring environment." -msgstr "" -"Compilare di seguito i dettagli della connessione per accedere al socket " -"Livestatus del vostro ambiente di monitoraggio." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/output.phtml:2 -msgid "Plugin Output" -msgstr "Output del Plugin" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php:42 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:100 -msgid "Port" -msgstr "Porta" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/selectioninfo.phtml:2 -msgctxt "multiselection" -msgid "" -"Press and hold the Ctrl key while clicking on rows to select multiple rows " -"or press and hold the Shift key to select a range of rows." -msgstr "" -"Tenere premuto il tasto CTRL durante i Click per selezionare più righe o " -"tenere premuto SHIFT per selezionare righe contigue." - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:96 -msgid "Problems" -msgstr "Problemi " - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:19 -msgid "Process Info" -msgstr "Informazioni sul Processo" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/command.phtml:16 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/command.phtml:27 -msgid "Process check result" -msgstr "Output del risultato" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:111 -msgid "Processing check result.." -msgid_plural "Processing check results.." -msgstr[0] "Invio risultato.." -msgstr[1] "Invio risultati" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:23 -msgid "Program Start Time" -msgstr "Ora Avvio del Programma" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/SecurityConfigForm.php:56 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/SecurityStep.php:52 -msgid "Protected Custom Variables" -msgstr "Variabili Riservate" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checksource.phtml:14 -msgid "Reachable" -msgstr "Raggiungibile" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:223 -msgid "Recently Recovered Services" -msgstr "Servizi Ripristinati Recentemente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:76 -msgid "Remote" -msgstr "Remoto" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:203 -msgid "Remote Command File" -msgstr "Command File Remoto" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/InstanceStep.php:58 -msgid "Remote Host" -msgstr "Host Remoto" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/InstanceStep.php:62 -msgid "Remote SSH Port" -msgstr "Porta SSH Remota" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/InstanceStep.php:66 -msgid "Remote SSH User" -msgstr "Utente SSH Remoto" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:15 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:59 -msgid "Remove" -msgstr "Rimuovi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:86 -msgid "Remove Existing Backend" -msgstr "Rimuovi Backend Esistente" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ConfigController.php:122 -msgid "Remove Existing Instance" -msgstr "Rimuovi Istanza Esistente" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:42 -#, php-format -msgid "Remove monitoring backend %s" -msgstr "Rimuovi backend di monitoraggio %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:86 -#, php-format -msgid "Remove monitoring instance %s" -msgstr "Rimuovi istanza di monitoraggio %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php:30 -msgid "Remove problem acknowledgement" -msgid_plural "Remove problem acknowledgements" -msgstr[0] "Rimuovi la Conferma del Problema" -msgstr[1] "Rimuovi le Conferme del Problema" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/RemoveAcknowledgementCommandForm.php:48 -msgid "Removing problem acknowledgement.." -msgid_plural "Removing problem acknowledgements.." -msgstr[0] "Rimozione Conferma in corso.." -msgstr[1] "Rimozione Conferme in corso.." - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:541 -msgid "Report interval" -msgstr "Intervallo del Report" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:196 -msgid "Reporting" -msgstr "Reportistica" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:32 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:45 -msgid "Reschedule" -msgstr "Rischedula" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostController.php:95 -msgid "Reschedule Host Check" -msgstr "Rischedula il Controllo dell'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:196 -msgid "Reschedule Host Checks" -msgstr "Rischedula i Controlli dell'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServiceController.php:72 -msgid "Reschedule Service Check" -msgstr "Rischedula il Controllo del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:245 -msgid "Reschedule Service Checks" -msgstr "Rischedula i Controlli del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:17 -#, php-format -msgid "Reschedule the next check for all %u hosts" -msgstr "Rischedula il prossimo controllo per tutti i %u host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:17 -#, php-format -msgid "Reschedule the next check for all %u services" -msgstr "Rischedula il prossimo controllo per tutti i %u servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:240 -msgid "Resource" -msgstr "Risorsa" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:88 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:123 -msgid "Resource Name" -msgstr "Nome Risorsa" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:158 -#, php-format -msgid "Resource configuration could not be udpated: %s; An error occured:" -msgstr "La configurazione della risorsa non può essere aggiornata: %s; Errore:" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:155 -#, php-format -msgid "Resource configuration has been successfully updated: %s" -msgstr "Configurazione Risorsa aggiornata correttamente: %s" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:65 -msgid "Restrict hosts view to the hosts that match the filter" -msgstr "Restringi la vista degli host a quelli che soddisfano il filtro" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:70 -msgid "Restrict services view to the services that match the filter" -msgstr "Restringi la vista dei servizi a quelli che soddisfano il filtro" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php:43 -msgid "SSH port to connect to on the remote Icinga instance" -msgstr "Porta SSH da usare per la connessione all'istanza Icinga remota" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:30 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:27 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/SecurityConfigForm.php:20 -msgid "Save Changes" -msgstr "Salva Modifiche" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostController.php:107 -msgid "Schedule Host Downtime" -msgstr "Pianifica Manutenzione all'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:208 -msgid "Schedule Host Downtimes" -msgstr "Pianifica Manutenzioni dell'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServiceController.php:84 -msgid "Schedule Service Downtime" -msgstr "Pianifica Manutenzione al Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:257 -msgid "Schedule Service Downtimes" -msgstr "Pianifica Manutenzioni del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:55 -#, fuzzy, php-format -msgid "Schedule a downtime for %u unhandled host problem" -msgid_plural "Schedule a downtime for %u unhandled host problems" -msgstr[0] "Pianifica Manutenzione per %u Problema dell'Host Non Gestito" -msgstr[1] "Pianifica Manutenzione per %u Problemi degli'Host Non Gestiti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:55 -#, fuzzy, php-format -msgid "Schedule a downtime for %u unhandled service problem" -msgid_plural "Schedule a downtime for %u unhandled service problems" -msgstr[0] "Pianifica Manutenzione per %u Problema del Servizio Non Gestito" -msgstr[1] "Pianifica Manutenzione per %u Problemi del Servizio Non Gestiti" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:23 -#, php-format -msgid "Schedule a downtime for all %u hosts" -msgstr "Pianifica manutenzione per tutti i %u host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:23 -#, php-format -msgid "Schedule a downtime for all %u services" -msgstr "Pianifica manutenzione per tutti i %u servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/downtime.phtml:15 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/downtime.phtml:28 -msgid "" -"Schedule a downtime to suppress all problem notifications within a specific " -"period of time" -msgstr "" -"Pianifica una manutenzione per disabilitare le notifiche per un periodo di " -"tempo specifico" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php:34 -msgid "Schedule check" -msgid_plural "Schedule checks" -msgstr[0] "Rischedula Controllo" -msgstr[1] "Rischedula Controlli" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostCheckCommandForm.php:28 -msgid "Schedule check for all services on the hosts and the hosts themselves." -msgstr "Schedula Controllo per l'host e tutti i suoi servizi." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:47 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/downtime.phtml:8 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/downtime.phtml:21 -msgid "Schedule downtime" -msgid_plural "Schedule downtimes" -msgstr[0] "Pianifica Manutenzione" -msgstr[1] "Pianifica Manutenzioni" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php:30 -msgid "" -"Schedule downtime for all services on the hosts and the hosts themselves." -msgstr "PIanifica Manutenzione per l'host e tutti i suoi servizi." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php:43 -msgid "Schedule non-triggered downtime for all child hosts" -msgstr "Pianifica Manutenzione non dipendente per tutti gli Host figli" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:39 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:52 -msgid "Schedule the next active check at a different time than the current one" -msgstr "Schedula il prossimo controllo ad un orario diverso da quello corrente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php:43 -msgid "Schedule the next active check to run immediately" -msgstr "Schedula il prossimo controllo per essere eseguito immediatamente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php:42 -msgid "Schedule triggered downtime for all child hosts" -msgstr "Pianifica Manutenzione dipendente per tutti gli Host figli" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:304 -msgid "Scheduled End" -msgstr "Fine" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:303 -msgid "Scheduled Start" -msgstr "Inizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php:72 -msgid "Scheduling check.." -msgid_plural "Scheduling checks.." -msgstr[0] "Schedulando Controllo.." -msgstr[1] "Schedulando Controlli.." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostCheckCommandForm.php:51 -msgid "Scheduling host check.." -msgid_plural "Scheduling host checks.." -msgstr[0] "Schedulando Controllo dell'Host.." -msgstr[1] "Schedulando Controlli dell'Host.." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php:86 -msgid "Scheduling host downtime.." -msgid_plural "Scheduling host downtimes.." -msgstr[0] "Pianificando Manutenzione Host.." -msgstr[1] "Pianificando Manutenzioni Host.." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php:100 -msgid "Scheduling service check.." -msgid_plural "Scheduling service checks.." -msgstr[0] "Schedulando Controllo del Servizio.." -msgstr[1] "Schedulando Controlli del Servizio.." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:207 -msgid "Scheduling service downtime.." -msgid_plural "Scheduling service downtimes.." -msgstr[0] "Pianifica Manutenzione Sevizio.." -msgstr[1] "Pianifica Manutenzione Sevizi.." - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:80 -msgid "Security" -msgstr "Sicurezza" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostController.php:131 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:232 -msgid "Send Custom Host Notification" -msgstr "Invia Notifica Personalizzata per l'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServiceController.php:108 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:281 -msgid "Send Custom Service Notification" -msgstr "Invia Notifica Personalizzata per il Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:123 -msgid "Send Notification" -msgstr "Invia Notifica" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:36 -#, php-format -msgid "Send a custom notification for all %u hosts" -msgstr "Invia notifica personalizzata per tutti i %u host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:36 -#, php-format -msgid "Send a custom notification for all %u services" -msgstr "Invia notifica personalizzata per tutti i %u servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/notifications.phtml:25 -msgid "" -"Send a custom notification, share information about the object to contacts." -msgstr "" -"Invia una notifica personalizzata, condividi le informazioni dell'oggetto " -"con i contatti." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contacts.phtml:28 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:24 -#, php-format -msgid "Send a mail to %s" -msgstr "Invia e-mail a %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:34 -msgid "Send custom notification" -msgid_plural "Send custom notifications" -msgstr[0] "Invia Notifica Personalizzata" -msgstr[1] "Invia Notifica Personalizzata" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:106 -msgid "Send custom notification.." -msgid_plural "Send custom notifications.." -msgstr[0] "Invia Notifica Personalizzata.." -msgstr[1] "Invia Notifica Personalizzata.." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/notifications.phtml:18 -msgid "Send notification" -msgstr "Invia Notifica" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.phtml:62 -#, php-format -msgid "Sent to %s" -msgstr "Inviata a %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:298 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:491 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:226 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:53 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:58 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.phtml:45 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml:13 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/object-header.phtml:34 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:201 -msgid "Service" -msgstr "Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/objects-header.phtml:7 -#, php-format -msgid "Service (%u)" -msgid_plural "Services (%u)" -msgstr[0] "Servizio (%u)" -msgstr[1] "Servizi (%u)" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:141 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:161 -msgid "Service Checks" -msgstr "Controlli Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:119 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:646 -msgid "Service Grid" -msgstr "Griglia Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:25 -msgid "Service Group" -msgstr "Gruppo di Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:239 -msgid "Service Group Chart" -msgstr "Grafico dei Gruppi di Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:546 -msgid "Service Group Name" -msgstr "Nome del Gruppo di Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:509 -msgid "Service Groups" -msgstr "Gruppi di Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:224 -msgid "Service Name" -msgstr "Nome Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:380 -msgid "Service Notification Timeperiod" -msgstr "Periodo per le Notifiche del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:115 -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:219 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml:77 -msgid "Service Problems" -msgstr "Servizi con Problemi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:222 -msgid "Service Severity" -msgstr "Impatto" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:80 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:202 -msgid "Service State" -msgstr "Stato Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:27 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:27 -msgid "Service States" -msgstr "Stati Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:658 -msgid "Service description" -msgstr "Descrizione Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/service/show.phtml:3 -msgid "Service detail information" -msgstr "Dettagli Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServiceController.php:33 -msgid "Service not found" -msgstr "Servizio non trovato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contacts.phtml:42 -msgid "Service notification period" -msgstr "Periodo per le Notifiche del Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:91 -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:147 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/servicegroups.phtml:17 -msgid "Servicegroups" -msgstr "Gruppi di Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:89 -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:143 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:243 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:171 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:101 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:240 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:100 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:96 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/contact.phtml:42 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/hostservicechecks.phtml:8 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/ok_hosts.phtml:50 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/tactical/components/problem_hosts.phtml:48 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:215 -msgid "Services" -msgstr "Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:550 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:600 -msgid "Services CRITICAL" -msgstr "Servizi CRITICAL" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:548 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:598 -msgid "Services OK" -msgstr "Servizi OK" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:552 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:602 -msgid "Services PENDING" -msgstr "Servizi in ATTESA" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:549 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:599 -msgid "Services UNKNOWN" -msgstr "Servizi UNKNOWN" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:551 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:601 -msgid "Services WARNING" -msgstr "Servizi WARNING" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php:53 -msgid "Set the date and time when the check should be scheduled." -msgstr "Impostare la data e l'ora dell'esecuzione del controllo." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:89 -msgid "Set the end date and time for the downtime." -msgstr "Impostare la data e l'ora della fine della manutenzione." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php:44 -msgid "Set the expire time." -msgstr "Impostare l'ora di scadenza." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:79 -msgid "Set the start date and time for the downtime." -msgstr "Impostare la date e l'ora d'inizio della manutenzione." - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:97 -msgid "Setup the monitoring module for Icinga Web 2" -msgstr "Configura il modulo di monitoraggio per Icinga Web 2!" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:132 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:545 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:595 -msgid "Severity" -msgstr "Impatto" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:256 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:231 -#, php-format -msgid "Show all event records of host %s" -msgstr "Mostra tutti gli eventi dell'host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:252 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:227 -#, php-format -msgid "Show all event records of service %s on host %s" -msgstr "Mostra tutti gli eventi del servizio %s dell'host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TacticalController.php:15 -msgid "" -"Show an overview of all hosts and services, their current states and " -"monitoring feature utilisation" -msgstr "" -"Mostra una panoramica di tutti gli host e servizi, il loro stato corrente e " -"le funzionalità utilizzate" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contactgroups.phtml:29 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/contacts.phtml:23 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:36 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/contacts.phtml:11 -#, php-format -msgid "Show detailed information about %s" -msgstr "Mostra informazioni dettagliate per %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:208 -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Link.php:37 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:104 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:120 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:183 -#, php-format -msgid "Show detailed information for host %s" -msgstr "Mostra informazioni dettagliate per l'host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:222 -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Link.php:60 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegrid.phtml:93 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:112 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:151 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php:197 -#, php-format -msgid "Show detailed information for service %s on host %s" -msgstr "Mostra informazioni dettagliate per il servizio %s dell'host %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ProcessController.php:26 -msgid "" -"Show information about the current monitoring instance's process and it's " -"performance as well as available features" -msgstr "" -"Mostra le informazioni riguardo lo stato del processo dell'istanza attiva, " -"le sue performance e le funzionalità disponibili" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:41 -msgid "" -"Show recent alerts and visualize notifications and problems based on their " -"amount and chronological distribution" -msgstr "" -"Mostra allarmi recenti e visualizza le notifiche e i problemi rispetto alle " -"occorrenze e alla distribuzione cronologica" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:259 -msgid "Show resource configuration" -msgstr "Mostra la configurazione della risorsa" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:77 -#, php-format -msgid "Show summarized information for %u hosts" -msgstr "Mostra lista informazioni per %u host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:98 -#, php-format -msgid "Show summarized information for %u services" -msgstr "Mostra lista informazioni per %u servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:390 -msgid "Show the Event Grid" -msgstr "Mostra Griglia Eventi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:646 -msgid "Show the Service Grid" -msgstr "Mostra la Griglia Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:258 -#, php-format -msgid "Show the configuration of the %s resource" -msgstr "Mostra configurazione per la risorsa %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:21 -msgid "Show the number of historical event records grouped by time and type" -msgstr "Mostra il numero di eventi dello storico raggruppati per ora e tipo" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/IdoResourcePage.php:75 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/LivestatusResourcePage.php:76 -msgid "Skip Validation" -msgstr "Salta la Verifica" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:127 -msgid "Socket" -msgstr "Socket" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:5 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:12 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/eventhistory.phtml:13 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:7 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:12 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.phtml:12 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegrid.phtml:10 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:7 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:14 -msgid "Sort by" -msgstr "Ordina per" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:94 -msgctxt "setup.welcome.btn.next" -msgid "Start" -msgstr "Inizia" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:301 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:78 -msgid "Start Time" -msgstr "Ora Inizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:64 -msgid "Started downtimes" -msgstr "Manutenzione iniziate" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:43 -msgid "Starts" -msgstr "Inizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:115 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:135 -msgid "State" -msgstr "Stato" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/EventOverviewForm.php:46 -msgid "State Changes" -msgstr "Cambi di Stato" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:53 -msgid "Status" -msgstr "Stato" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:111 +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:111 msgid "Sticky Acknowledgement" msgstr "Commento Permanente" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:31 -msgid "Submit Passive Check Result" -msgid_plural "Submit Passive Check Results" -msgstr[0] "Invia Risultato Passivo all'Host" -msgstr[1] "Invia Risultati Passivo all'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostController.php:119 -msgid "Submit Passive Host Check Result" -msgstr "Invia Risultato Passivo all'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/HostsController.php:220 -msgid "Submit Passive Host Check Results" -msgstr "Invia Risultato Passivo all'Host" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServiceController.php:96 -msgid "Submit Passive Service Check Result" -msgstr "Invia Risultato Passivo al Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ServicesController.php:269 -msgid "Submit Passive Service Check Results" -msgstr "Invia Risultato Passivo al Servizio" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/command.phtml:13 -#, php-format -msgid "Submit a one time or so called passive result for the %s check" -msgstr "Invia risultato passivo per %s controlli" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/hosts/show.phtml:29 -#, php-format -msgid "Submit a passive check result for all %u hosts" -msgstr "Invia risultato passivo per tutti i %u host" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml:29 -#, php-format -msgid "Submit a passive check result for all %u services" -msgstr "Invia risultato passivo per tutti i %u servizi" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:208 -msgid "System" -msgstr "Sistema" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:135 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TacticalController.php:18 -msgid "Tactical Overview" -msgstr "Visuale Tattica" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:169 +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:114 msgid "" -"The Zend database adapter for MySQL is required to access a MySQL database." +"If you want the acknowledgement to disable notifications until the host or " +"service recovers, check this option." msgstr "" +"Selezionando questa opzione le notifiche verranno disabilitate fino al " +"ripristino dell'host o servizio." -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:189 +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:123 +msgid "Send Notification" +msgstr "Invia Notifica" + +#: forms/Command/Object/AcknowledgeProblemCommandForm.php:126 msgid "" -"The Zend database adapter for PostgreSQL is required to access a PostgreSQL " -"database." +"If you do not want an acknowledgement notification to be sent out to the " +"appropriate contacts, uncheck this option." msgstr "" +"Deselezionando questa opzione non verrà inviata nessuna notifica di conferma " +"ai contatti configurati." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:227 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/BackendPage.php:46 -msgid "The data source used for retrieving monitoring information" +#: forms/Command/Object/AddCommentCommandForm.php:19 +msgid "This command is used to add host or service comments." +msgstr "Questo comando serve ad aggiungere commenti a host o servizi." + +#: forms/Command/Object/AddCommentCommandForm.php:55 +#: views/scripts/comment/show.phtml:47 +msgid "Persistent" +msgstr "Persistente" + +#: forms/Command/Object/AddCommentCommandForm.php:58 +msgid "" +"If you uncheck this option, the comment will automatically be deleted the " +"next time Icinga is restarted." msgstr "" -"La sorgente dei dati usati per recuperare le informazioni di monitoraggio" +"Deselezionando questa opzione il commento verrà automaticamente rimosso al " +"prossimo riavvio di Icinga." -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/DataView/DataView.php:338 -#, php-format -msgid "The filter column \"%s\" is not allowed here." -msgstr "Il filtro \"%s\" non è ammesso." +#: forms/Command/Object/CheckNowCommandForm.php:37 +#: forms/Command/Object/CheckNowCommandForm.php:39 +msgid "Check now" +msgstr "Controlla ora" -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:60 -msgid "The given resource name is already in use." -msgstr "Il nome risorsa fornito è già in uso." +#: forms/Command/Object/CheckNowCommandForm.php:43 +msgid "Schedule the next active check to run immediately" +msgstr "Schedula il prossimo controllo immediatamente" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:217 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/BackendPage.php:29 -msgid "The identifier of this backend" -msgstr "L'identificatore per questo backend" +#: forms/Command/Object/DeleteCommentCommandForm.php:76 +msgid "Delete this comment" +msgstr "Rimuovi Commento" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/notifications.phtml:46 -#, php-format -msgid "The last one occured %s ago" -msgstr "L'ultimo si è verificato %s fa" +#: forms/Command/Object/DeleteCommentCommandForm.php:97 +#: forms/Command/Object/DeleteCommentsCommandForm.php:72 +msgid "Deleting comment.." +msgstr "Rimozione commento.." -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ShowController.php:122 -msgid "The parameter `contact' is required" -msgstr "Il parametro `contatto' è richiesto" +#: forms/Command/Object/DeleteDowntimeCommandForm.php:76 +msgid "Delete this downtime" +msgstr "Cancella Manutenzione" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:83 +#: forms/Command/Object/DeleteDowntimeCommandForm.php:98 +#: forms/Command/Object/DeleteDowntimesCommandForm.php:72 +msgid "Deleting downtime." +msgstr "Cancellazione manutenzione.." + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:20 +msgid "This command is used to submit passive host or service check results." +msgstr "Questo comando serve ad inviare risultati passivi a host o servizi." + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:53 +msgid "Status" +msgstr "Stato" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:54 +msgid "The state this check result should report" +msgstr "Stato da riportare nel risultato del controllo" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:56 +msgid "UP" +msgstr "UP" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:57 +msgid "DOWN" +msgstr "DOWN" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:58 +msgid "UNREACHABLE" +msgstr "UNREACHABLE" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:60 +#: views/scripts/list/servicegroups.phtml:66 +msgid "OK" +msgstr "OK" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:61 +#: views/scripts/list/servicegroups.phtml:42 +#: views/scripts/list/servicegroups.phtml:60 +msgid "WARNING" +msgstr "WARNING" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:62 +#: views/scripts/list/servicegroups.phtml:30 +#: views/scripts/list/servicegroups.phtml:48 +msgid "CRITICAL" +msgstr "CRITICAL" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:63 +#: views/scripts/list/servicegroups.phtml:36 +#: views/scripts/list/servicegroups.phtml:54 +msgid "UNKNOWN" +msgstr "UNKNOWN" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:72 +msgid "Output" +msgstr "Output" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:73 +msgid "The plugin output of this check result" +msgstr "Output del risultato del controllo" + +#: forms/Command/Object/ProcessCheckResultCommandForm.php:83 msgid "" "The performance data of this check result. Leave empty if this check result " "has no performance data" @@ -3513,55 +1145,71 @@ msgstr "" "Dati di performance per questo controllo. Lasciare vuoto se il controllo non " "ha dati performance." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:73 -msgid "The plugin output of this check result" -msgstr "Output del risultato del controllo" +#: forms/Command/Object/ScheduleHostCheckCommandForm.php:26 +#: forms/Command/Object/ScheduleHostDowntimeCommandForm.php:28 +msgid "All Services" +msgstr "Tutti i Servizi" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:241 -msgid "The resource to use" -msgstr "La risorsa da usare" +#: forms/Command/Object/ScheduleHostCheckCommandForm.php:28 +msgid "Schedule check for all services on the hosts and the hosts themselves." +msgstr "Schedula Controllo per l'host e tutti i suoi servizi." -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/DataView/DataView.php:247 -#, php-format -msgid "The sort column \"%s\" is not allowed in \"%s\"." -msgstr "Non è possibile oridinare per colonna \"%s\" in \"%s\"." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:54 -msgid "The state this check result should report" -msgstr "Stato da riportare nel risultato del controllo" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php:91 -#, php-format -msgid "There is no \"%s\" monitoring backend" -msgstr "Backend di Monitoraggio \"%s\" non trovato" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/history.phtml:17 -msgid "This Object's Event History" -msgstr "Storico degli Eventi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:22 +#: forms/Command/Object/ScheduleHostDowntimeCommandForm.php:30 msgid "" -"This command is used to acknowledge host or service problems. When a problem " -"is acknowledged, future notifications about problems are temporarily " -"disabled until the host or service recovers." -msgstr "" -"Questo comando serve per confermare i problemi di host o servizi. Quando un " -"problema è Confermato le notifiche saranno temporaneamente disabilitate fino " -"al ripristino dell'host o servizio." +"Schedule downtime for all services on the hosts and the hosts themselves." +msgstr "PIanifica Manutenzione per l'host e tutti i suoi servizi." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php:19 -msgid "This command is used to add host or service comments." -msgstr "Questo comando serve ad aggiungere commenti agli host o ai servizi." +#: forms/Command/Object/ScheduleHostDowntimeCommandForm.php:38 +msgid "Child Hosts" +msgstr "Host Figli" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php:26 +#: forms/Command/Object/ScheduleHostDowntimeCommandForm.php:41 +msgid "Do nothing with child hosts" +msgstr "Non applicare agli Host figli" + +#: forms/Command/Object/ScheduleHostDowntimeCommandForm.php:42 +msgid "Schedule triggered downtime for all child hosts" +msgstr "Pianifica Manutenzione dipendente per tutti gli Host figli" + +#: forms/Command/Object/ScheduleHostDowntimeCommandForm.php:43 +msgid "Schedule non-triggered downtime for all child hosts" +msgstr "Pianifica Manutenzione indipendente per tutti gli Host figli" + +#: forms/Command/Object/ScheduleHostDowntimeCommandForm.php:46 +msgid "Define what should be done with the child hosts of the hosts." +msgstr "Definire che azione compiere con gli Host figli" + +#: forms/Command/Object/ScheduleServiceCheckCommandForm.php:23 msgid "" -"This command is used to disable host and service notifications for a " -"specific time." +"This command is used to schedule the next check of hosts or services. Icinga " +"will re-queue the hosts or services to be checked at the time you specify." msgstr "" -"Questo comando serve a disabilitare le notifiche di host e servizi per un " -"periodo di tempo specifico." +"Questo comando serve a schedulare l'esecuzione del prossimo controllo " +"dell'host o servizio. Icinga pianificherà ed eseguirà il controllo per " +"l'host o servizio all'orario specificato." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:33 +#: forms/Command/Object/ScheduleServiceCheckCommandForm.php:51 +msgid "Check Time" +msgstr "Ora Controllo" + +#: forms/Command/Object/ScheduleServiceCheckCommandForm.php:53 +msgid "Set the date and time when the check should be scheduled." +msgstr "Impostare la data e l'ora dell'esecuzione del controllo." + +#: forms/Command/Object/ScheduleServiceCheckCommandForm.php:62 +msgid "Force Check" +msgstr "Forza Controllo" + +#: forms/Command/Object/ScheduleServiceCheckCommandForm.php:64 +msgid "" +"If you select this option, Icinga will force a check regardless of both what " +"time the scheduled check occurs and whether or not checks are enabled." +msgstr "" +"Selezionando questa opzione, Icinga forzerà l'esecuzione del controllo " +"ignorando se i controlli attivi sono disabilitati e gli orari di " +"schedulazione." + +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:33 msgid "" "This command is used to schedule host and service downtimes. During the " "specified downtime, Icinga will not send notifications out about the hosts " @@ -3572,685 +1220,1737 @@ msgstr "" "Questo comando serve a pianificare la manutenzione di un host o servizio. " "Durante la Manutenzione, Icinga sopprimerà eventuali notifiche. Allo scadere " "della Manutenzione Icinga invierà le notifche per host e servizi come " -"farebbe normalmente. Le Manutenzioni schedulate saranno preservate da " +"farebbe normalmente. Le Manutenzioni pianificate saranno preservate da " "eventuali arresti o riavvii dell'ambiente." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php:23 -msgid "" -"This command is used to schedule the next check of hosts or services. Icinga " -"will re-queue the hosts or services to be checked at the time you specify." -msgstr "" -"Questo comando serve a schedulare l'esecuzione del prossimo controllo " -"dell'host o servizio. Icinga eseguirà il controllo per l'host o servizio " -"all'orario specificato." +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:79 +msgid "Set the start date and time for the downtime." +msgstr "Impostare la date e l'ora d'inizio della manutenzione." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/SendCustomNotificationCommandForm.php:21 -msgid "" -"This command is used to send custom notifications for hosts or services." -msgstr "" -"Questo comando serve ad inviare notifiche personalizzate per host o servizi." +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:89 +msgid "Set the end date and time for the downtime." +msgstr "Impostare la data e l'ora della fine della manutenzione." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:20 -msgid "This command is used to submit passive host or service check results." -msgstr "" -"Questo comando serve ad inviare risultati passivi all'host o al servizio." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:76 -msgid "This comment does not expire." -msgstr "Questo commento ha scadenza." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:73 -#, php-format -msgid "This comment expires on %s at %s." -msgstr "Questo commento scade il %s alle %s." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:69 -msgid "This comment is not persistent." -msgstr "Questo Commento non è permanente." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:68 -msgid "This comment is persistent." -msgstr "Questo Commento è permanente." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:107 -#, php-format -msgid "" -"This fixed host downtime has been scheduled to start on %s at %s and to end " -"on %s at %s." -msgstr "" -"Questa Manutenzione Rigida dell'Host è stata pianificata per iniziare il %s " -"alle %s e finire il %s alle %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:97 -#, php-format -msgid "" -"This fixed host downtime was started on %s at %s and expires on %s at %s." -msgstr "" -"Questa Manutenzione Rigida dell'Host è iniziata il %s alle %s e finirà il %s " -"alle %s." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:106 -#, php-format -msgid "" -"This fixed service downtime has been scheduled to start on %s at %s and to " -"end on %s at %s." -msgstr "" -"Questa Manutenzione Rigida del Servizio è stata pianificata per iniziare il " -"%s alle %s e finire il %s alle %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:96 -#, php-format -msgid "" -"This fixed service downtime was started on %s at %s and expires on %s at %s." -msgstr "" -"Questa Manutenzione Rigida del Servizio è iniziata il %s alle %s e finirà il " -"%s alle %s." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:86 -#, php-format -msgid "" -"This flexible host downtime has been scheduled to start between %s - %s and " -"to last for %s." -msgstr "" -"Questa Manutenzione Flessibile dell'Host è stata pianificata per iniziare " -"tra %s -%s e durare per %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:75 -#, php-format -msgid "" -"This flexible host downtime was started on %s at %s and lasts for %s until " -"%s at %s." -msgstr "" -"Questa Manutenzione Flessibile dell'Host è iniziata il %s alle %s e durerà " -"per %s fino al %s alle %s." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:85 -#, php-format -msgid "" -"This flexible service downtime has been scheduled to start between %s - %s " -"and to last for %s." -msgstr "" -"Questa Manutenzione Flessibile del Servizio è stata pianificata per iniziare " -"tra %s -%s e durare per %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:74 -#, php-format -msgid "" -"This flexible service downtime was started on %s at %s and lasts for %s " -"until %s at %s." -msgstr "" -"Questa Manutenzione Flessibile del Servizio è iniziata il %s alle %s e " -"durerà per %s fino al %s alle %s." - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/WelcomePage.php:33 -msgid "This is the core module for Icinga Web 2." -msgstr "Questo è il modulo principale per Icinga Web 2." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:22 -msgid "Time to Reaction (Ack, Recover)" -msgstr "Tempo di Reazione (Conferma, Ripristino)" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:103 -msgid "TimeLine interval" -msgstr "Intervallo" - -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:191 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:22 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/TimelineController.php:26 -msgid "Timeline" -msgstr "Cronologia" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:83 -msgid "To" -msgstr "A" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:160 -msgid "" -"To access the IDO stored in a MySQL database the PDO-MySQL module for PHP is " -"required." -msgstr "" - -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:180 -msgid "" -"To access the IDO stored in a PostgreSQL database the PDO-PostgreSQL module " -"for PHP is required." -msgstr "" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/SecurityPage.php:16 -msgid "" -"To protect your monitoring environment against prying eyes please fill out " -"the settings below." -msgstr "" -"Per proteggere il tuo ambiente di monitoraggio da occhi indiscreti si prega " -"di compilare i dettagli seguenti:" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:86 -msgid "Today" -msgstr "Oggi" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php:219 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php:133 -msgid "Toggling feature.." -msgstr "Comando inviato..." - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:56 -msgid "Top 5 Recent Alerts" -msgstr "Ultimi 5 Allarmi" - -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:547 -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ListController.php:597 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:26 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:26 -msgid "Total Services" -msgstr "Totale dei Servizi" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:29 -msgid "Trend" -msgstr "Trend" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:39 -msgid "Trend for the last 24h" -msgstr "Trend nelle ultime 24 ore" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:99 +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:99 msgid "Type" msgstr "Tipo" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:31 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/config/index.phtml:75 +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:101 +msgid "" +"If you select the fixed option, the downtime will be in effect between the " +"start and end times you specify whereas a flexible downtime starts when the " +"host or service enters a problem state sometime between the start and end " +"times you specified and lasts as long as the duration time you enter. The " +"duration fields do not apply for fixed downtimes." +msgstr "" +"Con l'opzione Fissa la manutenzione avrà effetto dall'ora di inizio all'ora " +"di fine specificate. Se si seleziona l'opzione Flessibile la manutenzione " +"partirà quando il servizio raggiungerà uno stato non OK e finirà in base " +"alla durata definita. Il campi della Durata non avranno effetto sulle " +"Manutenzioni Fisse." + +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:107 +#: views/scripts/downtime/show.phtml:52 +msgid "Fixed" +msgstr "Fissa" + +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:108 +#: views/scripts/downtime/show.phtml:52 +msgid "Flexible" +msgstr "Flessibile" + +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:137 +msgid "Hours" +msgstr "Ore" + +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:147 +msgid "Minutes" +msgstr "Minuti" + +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:157 +msgid "Flexible Duration" +msgstr "Durata Flessibile" + +#: forms/Command/Object/ScheduleServiceDowntimeCommandForm.php:159 +msgid "" +"Enter here the duration of the downtime. The downtime will be automatically " +"deleted after this time expired." +msgstr "" +"Inserire qui la durata della manutenzione. La manutenzione sarà cancellata " +"automaticamente allo scadere del tempo." + +#: forms/Command/Object/SendCustomNotificationCommandForm.php:20 +msgid "" +"This command is used to send custom notifications about hosts or services." +msgstr "" +"Questo comando serve ad inviare notifiche personalizzate per host o servizi." + +#: forms/Command/Object/SendCustomNotificationCommandForm.php:55 +msgid "Forced" +msgstr "Forzato" + +#: forms/Command/Object/SendCustomNotificationCommandForm.php:58 +msgid "" +"If you check this option, the notification is sent out regardless of time " +"restrictions and whether or not notifications are enabled." +msgstr "" +"Selezionando questa opzione la notifica verrà inviata ignorando se le " +"notifiche sono abilitate ed eventuali restrizioni sugli orari." + +#: forms/Command/Object/SendCustomNotificationCommandForm.php:67 +msgid "Broadcast" +msgstr "Diffondere" + +#: forms/Command/Object/SendCustomNotificationCommandForm.php:70 +msgid "" +"If you check this option, the notification is sent out to all normal and " +"escalated contacts." +msgstr "" +"Selezionando questa opzione la notifica verrà inviata a tutti i contatti " +"configurati." + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:39 +msgid "Active Checks" +msgstr "Controlli Attivi" + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:48 +msgid "Passive Checks" +msgstr "Controlli Passivi" + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:59 +msgid "Obsessing" +msgstr "Modalità Ossessiva" + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:79 +msgid "Event Handler" +msgstr "Gestore Eventi" + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:109 +msgid "changed" +msgstr "modificato" + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:126 +msgid "Enabling active checks.." +msgstr "Abilitazione controlli attivi.." + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:127 +msgid "Disabling active checks.." +msgstr "Disabilitazione controlli attivi.." + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:130 +msgid "Enabling passive checks.." +msgstr "Abilitazione controlli passivi.." + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:131 +msgid "Disabling passive checks.." +msgstr "Disabilitazione controlli passivi.." + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:134 +msgid "Enabling obsessing.." +msgstr "Abilitazione modalità ossessiva.." + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:135 +msgid "Disabling obsessing.." +msgstr "Disabilitazione modalità ossessiva.." + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:142 +msgid "Enabling event handler.." +msgstr "Abilitazione gestore eventi.." + +#: forms/Command/Object/ToggleObjectFeaturesCommandForm.php:143 +msgid "Disabling event handler.." +msgstr "Disabilitazione gestore eventi.." + +#: forms/Config/BackendConfigForm.php:42 +#: forms/Config/InstanceConfigForm.php:33 +#: forms/Config/SecurityConfigForm.php:20 +msgid "Save Changes" +msgstr "Salva Modifiche" + +#: forms/Config/BackendConfigForm.php:65 +msgid "" +"Could not find any valid monitoring backend resources. Please configure a " +"database resource first." +msgstr "" +"Non è stato trovata nessuna risorsa utilizzabile come backend di " +"monitoraggio. Si prega di configurare una risorsa database." + +#: forms/Config/BackendConfigForm.php:182 +msgid "Disable This Backend" +msgstr "Disabilita Backend" + +#: forms/Config/BackendConfigForm.php:190 forms/Setup/BackendPage.php:28 +msgid "Backend Name" +msgstr "Nome Backend" + +#: forms/Config/BackendConfigForm.php:192 +msgid "" +"The name of this monitoring backend that is used to differentiate it from " +"others" +msgstr "" +"Nome del backend di monitoraggio che verrà usato per differenziarlo dagli " +"altri" + +#: forms/Config/BackendConfigForm.php:202 +#: forms/Config/InstanceConfigForm.php:180 +msgid "The name cannot contain '[', ']' or ':'." +msgstr "Il nome non può contenere i caratteri: '[' , ']' , ':'." + +#: forms/Config/BackendConfigForm.php:232 forms/Setup/BackendPage.php:44 +msgid "Backend Type" +msgstr "Tipo Backend" + +#: forms/Config/BackendConfigForm.php:234 +msgid "The type of data source used for retrieving monitoring information" +msgstr "" +"Il tipo di sorgente di dati usata per recuperare le informazioni di " +"monitoraggio" + +#: forms/Config/BackendConfigForm.php:247 +msgid "Resource" +msgstr "Risorsa" + +#: forms/Config/BackendConfigForm.php:248 +#: forms/Config/Instance/RemoteInstanceForm.php:87 +msgid "The resource to use" +msgstr "La risorsa da usare" + +#: forms/Config/BackendConfigForm.php:265 +#: forms/Config/Instance/RemoteInstanceForm.php:104 #, php-format -msgid "Type: %s" -msgstr "Tipo: %s" +msgid "Show the configuration of the %s resource" +msgstr "Mostra configurazione per la risorsa %s" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:40 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:58 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:40 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:58 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Service.php:187 -msgid "UNKNOWN" -msgstr "UNKNOWN" +#: forms/Config/BackendConfigForm.php:266 +#: forms/Config/Instance/RemoteInstanceForm.php:105 +msgid "Show resource configuration" +msgstr "Mostra la configurazione della risorsa" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:63 -msgctxt "icinga.state" -msgid "UNKNOWN" -msgstr "UNKNOWN" +#: forms/Config/BackendConfigForm.php:333 forms/Setup/IdoResourcePage.php:112 +#: forms/Setup/LivestatusResourcePage.php:76 +msgid "Skip Validation" +msgstr "Salta Verifica" -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Host.php:179 -msgid "UNREACHABLE" -msgstr "UNREACHABLE" +#: forms/Config/BackendConfigForm.php:335 +msgid "Check this to not to validate the IDO schema of the chosen resource." +msgstr "" +"Selezionare questa opzione per saltare la validazione dello schema IDO della " +"risorsa selezionata." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:58 -msgctxt "icinga.state" -msgid "UNREACHABLE" -msgstr "UNREACHABLE" +#: forms/Config/BackendConfigForm.php:356 +msgid "" +"Cannot find the IDO schema. Please verify that the given database contains " +"the schema and that the configured user has access to it." +msgstr "" +"Non è stato trovato nessuno schema IDO. Si prega di verificare che il " +"database selezionato contenga lo schema e che l'utente configurato abbia " +"accesso." -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Host.php:173 -msgid "UP" -msgstr "UP" +#: forms/Config/BackendConfigForm.php:381 +msgid "" +"There is currently no icinga instance writing to the IDO. Make sure that a " +"icinga instance is configured and able to write to the IDO." +msgstr "" +"Nessuna istanza Icinga sta scrivendo nel database. Controllare che Icinga " +"riesca a scrivere correttamente del database IDO." -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:56 -msgctxt "icinga.state" -msgid "UP" -msgstr "UP" +#: forms/Config/BackendConfigForm.php:387 +msgid "" +"There is currently more than one icinga instance writing to the IDO. You'll " +"see all objects from all instances without any differentation. If this is " +"not desired, consider setting up a separate IDO for each instance." +msgstr "" +"Più istanze di Icinga stanno scrivendo attualmento dell'IDO. Verranno " +"visualizzati tutti gli oggetti senza nessuna differenziazione. Nel caso " +"questo non sia il risultato desiderato si suggerisce di definire IDO " +"separati per ogni istanza." -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hosts.phtml:49 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/services.phtml:71 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml:5 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/partials/service/statusicons.phtml:5 -msgid "Unhandled" -msgstr "Non Gestiti" +#: forms/Config/Instance/LocalInstanceForm.php:30 +#: forms/Config/Instance/RemoteInstanceForm.php:155 +msgid "Command File" +msgstr "File dei comandi" -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:101 -msgid "Unhandled Hosts" -msgstr "Host Non Gestiti" +#: forms/Config/Instance/LocalInstanceForm.php:32 +msgid "Path to the local Icinga command file" +msgstr "Percorso locale del command file di Icinga" -#: /usr/local/icingaweb2/modules/monitoring/configuration.php:106 -msgid "Unhandled Services" -msgstr "Servizi Non Gestiti" +#: forms/Config/Instance/RemoteInstanceForm.php:47 +msgid "Could not find any valid monitoring instance resources" +msgstr "Non è stata trovata nessuna istanza di monitoraggio valida" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:271 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:120 -msgid "Unknown" -msgstr "Unknown" +#: forms/Config/Instance/RemoteInstanceForm.php:67 +msgid "Use SSH Identity" +msgstr "Usa Identità SSH" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:141 -msgid "Unknown instance name given" -msgstr "Nome Istanza sconosciuto" +#: forms/Config/Instance/RemoteInstanceForm.php:68 +msgid "Make use of the ssh identity resource" +msgstr "Fai uso dell'autenticazione tramite scambio di chiavi ssh" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:99 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/InstanceConfigForm.php:121 -msgid "Unknown instance name provided" -msgstr "Nome istanza sconosciuto" +#: forms/Config/Instance/RemoteInstanceForm.php:86 +msgid "SSH Identity" +msgstr "Identità SSH" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:104 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:126 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/BackendConfigForm.php:172 -msgid "Unknown monitoring backend provided" -msgstr "Backend di monitoraggio sconosciuto" +#: forms/Config/Instance/RemoteInstanceForm.php:119 +msgid "Hostname or address of the remote Icinga instance" +msgstr "Nome Host o Indirizzo dell'istanza di Icinga remota" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:321 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:140 -msgid "Unreachable" -msgstr "Unreachable" +#: forms/Config/Instance/RemoteInstanceForm.php:128 +msgid "Port" +msgstr "Porta" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:307 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:138 -msgid "Up" -msgstr "Up" +#: forms/Config/Instance/RemoteInstanceForm.php:129 +msgid "SSH port to connect to on the remote Icinga instance" +msgstr "Porta SSH da usare per la connessione all'istanza Icinga remota" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php:72 -msgid "Use Expire Time" -msgstr "Scadenza" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php:52 +#: forms/Config/Instance/RemoteInstanceForm.php:141 +#: views/scripts/comment/show.phtml:43 views/scripts/downtime/show.phtml:39 msgid "User" msgstr "Utente" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/comments.phtml:30 -msgid "User Comment" -msgstr "Commento dell'Utente" - -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Config/Instance/RemoteInstanceForm.php:54 +#: forms/Config/Instance/RemoteInstanceForm.php:143 msgid "" "User to log in as on the remote Icinga instance. Please note that key-based " "SSH login must be possible for this user" msgstr "" "Utente per la connessione all'istanza remota di Icinga. Si fa notare che è " -"l'utente può effettuare una autenticazione con chiave SSH." +"l'utente deve poter effettuare una autenticazione con chiave SSH." -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/BackendStep.php:108 -msgid "Username" -msgstr "Utente" +#: forms/Config/Instance/RemoteInstanceForm.php:157 +msgid "Path to the Icinga command file on the remote Icinga instance" +msgstr "Percorso del command file di Icinga nell'istanza remota" -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Perfdata.php:29 -msgid "Value" -msgstr "Valore" +#: forms/Config/InstanceConfigForm.php:54 +#, php-format +msgid "Invalid monitoring instance type \"%s\" given" +msgstr "Tipo \"%s\" di Istanza non valido" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:624 -msgid "Value for interval not valid" -msgstr "Intervallo non valido" +#: forms/Config/InstanceConfigForm.php:168 +msgid "Instance Name" +msgstr "Nome Istanza" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:46 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/hostgroups.phtml:64 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:46 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/servicegroups.phtml:64 -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/Object/Service.php:181 -msgid "WARNING" -msgstr "WARNING" +#: forms/Config/InstanceConfigForm.php:170 +msgid "" +"The name of this monitoring instance that is used to differentiate it from " +"others" +msgstr "" +"Nome dell'istanza di monitoraggio che verrà usato per differenziarla dagli " +"altri" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ProcessCheckResultCommandForm.php:61 -msgctxt "icinga.state" -msgid "WARNING" -msgstr "WARNING" +#: forms/Config/InstanceConfigForm.php:190 +msgid "Local Command File" +msgstr "Command File locale" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/ChartController.php:257 -#: /usr/local/icingaweb2/modules/monitoring/application/forms/StatehistoryForm.php:119 -#: /usr/local/icingaweb2/modules/monitoring/application/views/helpers/Perfdata.php:29 -msgid "Warning" -msgstr "Warning" +#: forms/Config/InstanceConfigForm.php:191 +msgid "Remote Command File" +msgstr "Command File Remoto" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Setup/WelcomePage.php:21 +#: forms/Config/InstanceConfigForm.php:206 +msgid "Instance Type" +msgstr "Tipo Istanza" + +#: forms/Config/InstanceConfigForm.php:207 +msgid "The type of transport to use for this monitoring instance" +msgstr "Il tipo di trasporto da utilizzare per questa istanza" + +#: forms/Config/SecurityConfigForm.php:31 +msgid "New security configuration has successfully been stored" +msgstr "La nuova configurazione di sicurezza è stata salvata correttamente." + +#: forms/Config/SecurityConfigForm.php:56 +msgid "Protected Custom Variables" +msgstr "Variabili Riservate" + +#: forms/Config/SecurityConfigForm.php:58 +msgid "" +"Comma separated case insensitive list of protected custom variables. Use * " +"as a placeholder for zero or more wildcard characters. Existance of those " +"custom variables will be shown, but their values will be masked." +msgstr "" +"Lista delle variabili riservate (case insensitive) separate da virgola. " +"Usare * come carattere jolly. Le variabili fornite verranno mostrate ma il " +"loro contenuto sarà mascherato." + +#: forms/EventOverviewForm.php:46 +msgid "State Changes" +msgstr "Cambi di Stato" + +#: forms/EventOverviewForm.php:86 views/helpers/HostFlags.php:19 +#: views/helpers/ServiceFlags.php:17 views/scripts/host/history.phtml:87 +#: views/scripts/list/eventhistory.phtml:50 +#: views/scripts/partials/comment/comment-description.phtml:5 +#: views/scripts/service/history.phtml:85 +msgid "Flapping" +msgstr "Instabile" + +#: forms/Setup/BackendPage.php:14 views/scripts/config/index.phtml:14 +msgid "Monitoring Backend" +msgstr "Backend di Monitoraggio" + +#: forms/Setup/BackendPage.php:16 +msgid "" +"Please configure below how Icinga Web 2 should retrieve monitoring " +"information." +msgstr "" +"Definire di seguito come Icinga Web 2 recupererà le informazioni del " +"monitoraggio." + +#: forms/Setup/BackendPage.php:29 +msgid "The identifier of this backend" +msgstr "L'identificatore per questo backend" + +#: forms/Setup/BackendPage.php:46 +msgid "The data source used for retrieving monitoring information" +msgstr "" +"La sorgente dei dati usati per recuperare le informazioni di monitoraggio" + +#: forms/Setup/IdoResourcePage.php:19 +msgid "Monitoring IDO Resource" +msgstr "Risorsa IDO" + +#: forms/Setup/IdoResourcePage.php:21 +msgid "" +"Please fill out the connection details below to access the IDO database of " +"your monitoring environment." +msgstr "" +"Compilare di seguito i dettagli della connessione per accedere al database " +"IDO del vostro ambiente di monitoraggio." + +#: forms/Setup/IdoResourcePage.php:77 +msgid "" +"Check this to not to validate connectivity with the given database server." +msgstr "" +"Spunta questa casella per non verificare la connettività con il server del " +"database definito." + +#: forms/Setup/IdoResourcePage.php:85 +msgid "Check this to not to validate the IDO schema in the given database." +msgstr "" +"Selezionare questa opzione per saltare la validazione dello schema IDO del " +"database definito." + +#: forms/Setup/IdoResourcePage.php:103 +msgid "Proceed without any further (custom) validation." +msgstr "Procedi senza nessuna validazione." + +#: forms/Setup/InstancePage.php:14 +msgid "Monitoring Instance" +msgstr "Istanza di Monitoraggio" + +#: forms/Setup/InstancePage.php:16 +msgid "Please define the settings specific to your monitoring instance below." +msgstr "" +"Definire di seguito le impostazioni specifiche della vostra istanza di " +"monitoraggio." + +#: forms/Setup/LivestatusResourcePage.php:14 +msgid "Monitoring Livestatus Resource" +msgstr "Risorsa Livestatus" + +#: forms/Setup/LivestatusResourcePage.php:16 +msgid "" +"Please fill out the connection details below to access the Livestatus socket " +"interface for your monitoring environment." +msgstr "" +"Compilare di seguito i dettagli della connessione per accedere al socket " +"Livestatus del vostro ambiente di monitoraggio." + +#: forms/Setup/LivestatusResourcePage.php:78 +msgid "" +"Check this to not to validate connectivity with the given Livestatus socket" +msgstr "" +"Spunta questa casella per non verificare la connettività con il socket " +"Livestatus definito" + +#: forms/Setup/SecurityPage.php:14 +msgid "Monitoring Security" +msgstr "Sicurezza del Monitoraggio" + +#: forms/Setup/SecurityPage.php:16 +msgid "" +"To protect your monitoring environment against prying eyes please fill out " +"the settings below." +msgstr "" +"Per proteggere il tuo ambiente di monitoraggio da occhi indiscreti si prega " +"di compilare i dettagli seguenti." + +#: forms/Setup/WelcomePage.php:21 msgid "Welcome to the configuration of the monitoring module for Icinga Web 2!" msgstr "" "Benvenuto nella configurazione del modulo di monitoraggio per Icinga Web 2!" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checksource.phtml:17 -msgid "Yes" -msgstr "Si" +#: forms/Setup/WelcomePage.php:33 +msgid "This is the core module for Icinga Web 2." +msgstr "Questo è il modulo principale per Icinga Web 2." -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:166 -msgid "Zend database adapter for MySQL" +#: forms/Setup/WelcomePage.php:42 +msgid "" +"It offers various status and reporting views with powerful filter " +"capabilities that allow you to keep track of the most important events in " +"your monitoring environment." msgstr "" +"Offre varie viste di stato e reportistica con la capacità di configurare " +"potenti filtri che permettono di tenere traccia degli eventi più importanti " +"del vostro ambiente di monitoraggio." -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:186 -msgid "Zend database adapter for PostgreSQL" -msgstr "" +#: forms/StatehistoryForm.php:21 +msgid "Apply" +msgstr "Applica" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:51 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.phtml:39 +#: forms/StatehistoryForm.php:67 +msgid "From" +msgstr "Da" + +#: forms/StatehistoryForm.php:70 +msgid "3 Months" +msgstr "3 Mesi" + +#: forms/StatehistoryForm.php:71 +msgid "4 Months" +msgstr "4 Mesi" + +#: forms/StatehistoryForm.php:72 +msgid "8 Months" +msgstr "8 Mesi" + +#: forms/StatehistoryForm.php:73 +msgid "1 Year" +msgstr "1 Anno" + +#: forms/StatehistoryForm.php:74 +msgid "2 Years" +msgstr "2 Anni" + +#: forms/StatehistoryForm.php:83 +msgid "To" +msgstr "A" + +#: forms/StatehistoryForm.php:86 +msgid "Today" +msgstr "Oggi" + +#: forms/StatehistoryForm.php:97 +msgid "Object type" +msgstr "Tipo Oggetto" + +#: forms/StatehistoryForm.php:115 forms/StatehistoryForm.php:135 +msgid "State" +msgstr "Stato" + +#: views/helpers/HostFlags.php:13 views/helpers/ServiceFlags.php:9 +#: views/scripts/partials/host/statusicons.phtml:5 +#: views/scripts/partials/service/statusicons.phtml:5 +msgid "Unhandled" +msgstr "Non Gestito" + +#: views/helpers/HostFlags.php:16 views/helpers/ServiceFlags.php:12 +#: views/scripts/partials/host/statusicons.phtml:9 +#: views/scripts/partials/service/statusicons.phtml:9 +#: views/scripts/show/components/acknowledgement.phtml:12 +#: views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:31 +#: views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:130 +#: views/scripts/tactical/components/parts/servicestatesummarybyhoststate.phtml:229 +msgid "Acknowledged" +msgstr "Confermato" + +#: views/helpers/HostFlags.php:22 views/helpers/ServiceFlags.php:20 +#: views/scripts/partials/host/statusicons.phtml:13 +#: views/scripts/partials/service/statusicons.phtml:13 +msgid "Notifications Disabled" +msgstr "Notifiche Disabilitate" + +#: views/helpers/HostFlags.php:25 views/helpers/ServiceFlags.php:23 +#: views/scripts/host/history.phtml:79 +#: views/scripts/list/eventhistory.phtml:46 +#: views/scripts/partials/host/statusicons.phtml:17 +#: views/scripts/partials/service/statusicons.phtml:17 +#: views/scripts/service/history.phtml:77 +msgid "In Downtime" +msgstr "In Manutenzione" + +#: views/helpers/HostFlags.php:29 views/helpers/ServiceFlags.php:33 +#: views/scripts/partials/host/statusicons.phtml:24 +#: views/scripts/partials/service/statusicons.phtml:24 +msgid "Active And Passive Checks Disabled" +msgstr "Controlli Attivi e Passivi Disabilitati" + +#: views/helpers/HostFlags.php:31 views/helpers/ServiceFlags.php:35 +#: views/scripts/partials/host/statusicons.phtml:22 +#: views/scripts/partials/service/statusicons.phtml:22 +msgid "Active Checks Disabled" +msgstr "Controlli Attivi Disabilitati" + +#: views/helpers/HostFlags.php:35 views/helpers/ServiceFlags.php:28 +msgid "Last Comment: " +msgstr "Ultimo Commento: " + +#: views/helpers/Link.php:37 views/scripts/list/hosts.phtml:63 +#: views/scripts/list/services.phtml:69 #, php-format -msgctxt "time" -msgid "at %s" -msgstr "alle %s" +msgid "Show detailed information for host %s" +msgstr "Mostra informazioni dettagliate per l'host %s" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/timeline/index.phtml:59 +#: views/helpers/Link.php:63 views/scripts/host/history.phtml:139 +#: views/scripts/list/servicegrid.phtml:93 +#: views/scripts/list/services.phtml:77 #, php-format -msgctxt "timeline.link.title.datetime.twice" -msgid "between %s and %s" -msgstr "tra %s e %s" +msgid "Show detailed information for service %s on host %s" +msgstr "Mostra informazioni dettagliate per il servizio %s dell'host %s" -#: /usr/local/icingaweb2/modules/monitoring/application/forms/Command/Object/ToggleObjectFeaturesCommandForm.php:107 -msgid "changed" -msgstr "modificato" +#: views/helpers/Perfdata.php:36 +msgid "Label" +msgstr "Etichetta" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:182 -msgid "down" -msgstr "down" +#: views/helpers/Perfdata.php:37 +msgid "Value" +msgstr "Valore" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:65 -msgid "hard state" -msgstr "hard" +#: views/helpers/Perfdata.php:38 +msgid "Min" +msgstr "Min" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/timeline/index.phtml:47 -#, fuzzy, php-format -msgctxt "timeline.link.title.month.and.year" -msgid "in %s" -msgstr "il %s" +#: views/helpers/Perfdata.php:39 +msgid "Max" +msgstr "Max" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/timeline/index.phtml:53 -#, fuzzy, php-format -msgctxt "timeline.link.title.year" -msgid "in %s" -msgstr "il %s" - -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:52 +#: views/helpers/Perfdata.php:96 #, php-format -msgctxt "timespan" -msgid "in %s" -msgstr "in %s" +msgid "%d more ..." +msgstr "%d più ..." -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:37 -msgid "in the last hour" -msgstr "nell'ultima ora" +#: views/scripts/alertsummary/index.phtml:12 +msgid "Alert summary" +msgstr "Storico Allarmi" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/timeline/index.phtml:40 -#, fuzzy, php-format -msgctxt "timeline.link.title.week.and.year" -msgid "in week %s of %s" -msgstr "nella settimana %s di %s" +#: views/scripts/alertsummary/index.phtml:16 +msgid "Notifications and Problems" +msgstr "Notifiche e Problemi" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/alertsummary/index.phtml:35 +#: views/scripts/alertsummary/index.phtml:23 +msgid "Time to Reaction (Ack, Recover)" +msgstr "Tempo di Reazione (Conferma, Ripristino)" + +#: views/scripts/alertsummary/index.phtml:30 +msgid "Trend" +msgstr "Andamento" + +#: views/scripts/alertsummary/index.phtml:34 +msgid "Average" +msgstr "Media" + +#: views/scripts/alertsummary/index.phtml:36 msgid "notifications per hour" msgstr "notifiche per ora" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/downtimes.phtml:50 -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/notifications.phtml:38 +#: views/scripts/alertsummary/index.phtml:38 +msgid "in the last hour" +msgstr "nell'ultima ora" + +#: views/scripts/alertsummary/index.phtml:40 +msgid "Trend for the last 24h" +msgstr "Andamento nelle ultime 24 ore" + +#: views/scripts/alertsummary/index.phtml:57 +msgid "Top 5 Recent Alerts" +msgstr "Ultimi 5 Allarmi" + +#: views/scripts/alertsummary/index.phtml:69 +msgid "History" +msgstr "Storico" + +#: views/scripts/comment/show.phtml:12 +msgid "Comment detail information" +msgstr "Dettagli del commento" + +#: views/scripts/comment/show.phtml:48 views/scripts/downtime/show.phtml:103 +#: views/scripts/show/components/checksource.phtml:17 +msgid "Yes" +msgstr "Si" + +#: views/scripts/comment/show.phtml:48 views/scripts/downtime/show.phtml:103 +#: views/scripts/show/components/checksource.phtml:17 +msgid "No" +msgstr "No" + +#: views/scripts/comment/show.phtml:52 +msgid "Created" +msgstr "Creato" + +#: views/scripts/comment/show.phtml:57 views/scripts/list/downtimes.phtml:44 +#: views/scripts/partials/downtime/downtime-header.phtml:4 +#: views/scripts/partials/downtime/downtimes-header.phtml:9 +msgid "Expires" +msgstr "Scade" + +#: views/scripts/comment/show.phtml:60 #, php-format -msgctxt "datetime" -msgid "on %s" -msgstr "il %s" +msgid "This comment expires on %s at %s." +msgstr "Questo commento scade il %s alle %s." -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/timeline/index.phtml:34 -#, fuzzy, php-format -msgctxt "timeline.link.title.time" -msgid "on %s" -msgstr "di %s" +#: views/scripts/comment/show.phtml:63 views/scripts/list/comments.phtml:74 +msgid "This comment does not expire." +msgstr "Questo commento non ha scadenza." -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:77 -msgid "overall" -msgstr "complessivo" +#: views/scripts/comment/show.phtml:70 views/scripts/comments/show.phtml:12 +#: views/scripts/downtime/show.phtml:111 views/scripts/downtimes/show.phtml:11 +#: views/scripts/hosts/show.phtml:14 views/scripts/services/show.phtml:14 +#: views/scripts/show/contact.phtml:51 +msgid "Commands" +msgstr "Comandi" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/list/components/selectioninfo.phtml:5 -msgctxt "multiselection" +#: views/scripts/comments/show.phtml:15 +#, php-format +msgid "Remove %d comments" +msgstr "Rimuovi %d commenti" + +#: views/scripts/comments/show.phtml:22 +msgid "Remove all selected comments." +msgstr "Rimuovi tutti i commenti selezionati" + +#: views/scripts/config/index.phtml:3 +msgid "Monitoring Backends" +msgstr "Backend di Monitoraggio" + +#: views/scripts/config/index.phtml:15 views/scripts/config/index.phtml:59 +msgid "Remove" +msgstr "Rimuovi" + +#: views/scripts/config/index.phtml:27 +#, php-format +msgid "Edit monitoring backend %s" +msgstr "Modifica backend di monitoraggio %s" + +#: views/scripts/config/index.phtml:31 views/scripts/config/index.phtml:75 +#, php-format +msgid "Type: %s" +msgstr "Tipo: %s" + +#: views/scripts/config/index.phtml:42 +#, php-format +msgid "Remove monitoring backend %s" +msgstr "Rimuovi backend di monitoraggio %s" + +#: views/scripts/config/index.phtml:50 +msgid "Monitoring Instances" +msgstr "Istanze di Monitoraggio" + +#: views/scripts/config/index.phtml:53 +msgid "Create New Instance" +msgstr "Crea Nuova Istanza" + +#: views/scripts/config/index.phtml:58 +msgid "Instance" +msgstr "Istanza" + +#: views/scripts/config/index.phtml:71 +#, php-format +msgid "Edit monitoring instance %s" +msgstr "Modifica istanza di monitoraggio %s" + +#: views/scripts/config/index.phtml:76 +msgid "Remote" +msgstr "Remoto" + +#: views/scripts/config/index.phtml:76 +msgid "Local" +msgstr "Locale" + +#: views/scripts/config/index.phtml:86 +#, php-format +msgid "Remove monitoring instance %s" +msgstr "Rimuovi istanza di monitoraggio %s" + +#: views/scripts/downtime/show.phtml:9 +msgid "Downtime detail information" +msgstr "Dettagli della manutenzione" + +#: views/scripts/downtime/show.phtml:37 +msgid "The name of the person who scheduled this downtime" +msgstr "Nome dell'utente che ha pianificato questa manutenzione" + +#: views/scripts/downtime/show.phtml:41 +msgid "" +"A comment, as entered by the author, associated with the scheduled downtime" +msgstr "" +"Un commento, come inserito dall'autore, associato alla manutenzione " +"pianificata" + +#: views/scripts/downtime/show.phtml:45 +msgid "Date and time this downtime was entered" +msgstr "Data e ora di inserimento della manutenzione" + +#: views/scripts/downtime/show.phtml:57 +msgid "" +"Flexible downtimes have a hard start and end time, but also an additional " +"restriction on the duration in which the host or service may actually be " +"down." +msgstr "" +"Le manutenzioni flessibili hanno uno stato hard all'inizio e alla fine, ma " +"anche una durata limitata alla sola fase down dell'host o servizio coinvolto." + +#: views/scripts/downtime/show.phtml:60 +msgid "Fixed downtimes have a static start and end time." +msgstr "Le manutenzioni fisse hanno orari di inizio è fine ben definiti." + +#: views/scripts/downtime/show.phtml:64 +msgid "" +"The date/time the scheduled downtime is supposed to start. If this is a " +"flexible (non-fixed) downtime, this refers to the earliest possible time " +"that the downtime can start" +msgstr "" +"Data/ora nella quale dovrebbe partire la manutenzione. In caso di una " +"manutenzione flessibile (non fissa), si riferisce all'inizio dell'intervallo " +"in cui può partire attività." + +#: views/scripts/downtime/show.phtml:68 +msgid "Scheduled start" +msgstr "Inizio Pianificato" + +#: views/scripts/downtime/show.phtml:71 +msgid "" +"The date/time the scheduled downtime is supposed to end. If this is a " +"flexible (non-fixed) downtime, this refers to the last possible time that " +"the downtime can start" +msgstr "" +"Data/ora nella quale dovrebbe finire la manutenzione. In caso di una " +"manutenzione flessibile (non fissa), si riferisce alla fine dell'intervallo " +"in cui può partire attività." + +#: views/scripts/downtime/show.phtml:75 +msgid "Scheduled end" +msgstr "Fine Pianificata" + +#: views/scripts/downtime/show.phtml:79 +msgid "" +"Indicates the number of seconds that the scheduled downtime should last. " +"This is usually only needed if this is a flexible downtime, which can start " +"at a variable time, but lasts for the specified duration" +msgstr "" +"Indica il numero di secondi che la manutenzione dovrebbe durare. Solitamente " +"è necessario solo in caso di manutenzioni flessibili, che possono iniziare " +"in momento non esattamente definito, ma durare per il tempo specificato." + +#: views/scripts/downtime/show.phtml:86 +msgid "he date/time the scheduled downtime was actually started" +msgstr "Data/ora in cui la manutenzione è effettivamente iniziata" + +#: views/scripts/downtime/show.phtml:88 +msgid "Actual start time" +msgstr "Ora di inizio effettiva" + +#: views/scripts/downtime/show.phtml:91 +msgid "The date/time the scheduled downtime actually ended" +msgstr "Data/ora in cui la manutenzione è effettivamente finita" + +#: views/scripts/downtime/show.phtml:93 +msgid "Actual end time" +msgstr "Ora di fine effettiva" + +#: views/scripts/downtime/show.phtml:99 +msgid "In effect" +msgstr "Effettiva" + +#: views/scripts/downtimes/show.phtml:14 +#, php-format +msgid "Remove all %d scheduled downtimes" +msgstr "Cancella tutte le %d manutenzioni pianificate" + +#: views/scripts/host/history.phtml:11 +msgid "This Host's Event History" +msgstr "Storico degli Eventi per quest'Host" + +#: views/scripts/host/history.phtml:22 +#: views/scripts/list/eventhistory.phtml:17 +#: views/scripts/service/history.phtml:21 +msgid "No history events found matching the filter" +msgstr "Nessun evento nello storico soddisfa i criteri di ricerca" + +#: views/scripts/host/history.phtml:35 +#: views/scripts/list/contactgroups.phtml:36 +#: views/scripts/list/contacts.phtml:26 views/scripts/service/history.phtml:34 +#: views/scripts/show/components/contacts.phtml:11 +#, php-format +msgid "Show detailed information about %s" +msgstr "Mostra informazioni dettagliate riguardo %s" + +#: views/scripts/host/history.phtml:52 +#: views/scripts/list/eventhistory.phtml:33 +#: views/scripts/service/history.phtml:50 +msgid "Notification" +msgstr "Notifica" + +#: views/scripts/host/history.phtml:59 +#: views/scripts/list/eventhistory.phtml:34 +#: views/scripts/list/notifications.phtml:65 +#: views/scripts/service/history.phtml:57 +msgid "This notification was not sent out to any contact." +msgstr "Questa notifica non è stata inviata a a nessun contatto." + +#: views/scripts/host/history.phtml:67 views/scripts/service/history.phtml:65 +msgid "Comment deleted" +msgstr "Commento rimosso" + +#: views/scripts/host/history.phtml:71 views/scripts/service/history.phtml:69 +#: views/scripts/show/components/acknowledgement.phtml:39 +msgid "Acknowledge" +msgstr "Conferma" + +#: views/scripts/host/history.phtml:75 views/scripts/service/history.phtml:73 +msgid "Ack removed" +msgstr "Conferma rimossa" + +#: views/scripts/host/history.phtml:83 views/scripts/service/history.phtml:81 +msgid "Downtime removed" +msgstr "Manutenzione cancellata" + +#: views/scripts/host/history.phtml:91 views/scripts/service/history.phtml:89 +msgid "Flapping stopped" +msgstr "Instabilità Terminata" + +#: views/scripts/host/history.phtml:105 +#: views/scripts/list/eventhistory.phtml:68 +#: views/scripts/service/history.phtml:103 +msgid "Downtime Start" +msgstr "Inizio Manutenzione" + +#: views/scripts/host/history.phtml:109 +#: views/scripts/list/eventhistory.phtml:72 +#: views/scripts/service/history.phtml:107 +msgid "Downtime End" +msgstr "Fine Manutenzione" + +#: views/scripts/host/history.phtml:130 +#: views/scripts/service/history.phtml:127 +#, php-format +msgid "%s on %s" +msgstr "%s nel %s" + +#: views/scripts/host/show.phtml:14 views/scripts/service/show.phtml:14 +msgid "Problem handling" +msgstr "Gestione problema" + +#: views/scripts/host/show.phtml:26 views/scripts/service/show.phtml:26 +msgid "Check execution" +msgstr "Esecuzione controllo" + +#: views/scripts/hosts/show.phtml:26 views/scripts/list/hosts.phtml:21 +msgid "No hosts found matching the filter" +msgstr "Nessun host soddisfa i criteri di ricerca" + +#: views/scripts/hosts/show.phtml:32 views/scripts/services/show.phtml:30 +msgid "Reschedule next checks" +msgstr "Rischedula i prossimi controlli" + +#: views/scripts/hosts/show.phtml:40 views/scripts/services/show.phtml:38 +msgid "Schedule downtimes" +msgstr "Pianifica manutenzione" + +#: views/scripts/hosts/show.phtml:48 views/scripts/services/show.phtml:46 +msgid "Submit passive check results" +msgstr "Invia risultato passivo" + +#: views/scripts/hosts/show.phtml:56 views/scripts/services/show.phtml:54 +msgid "Add comments" +msgstr "Aggiungi commenti" + +#: views/scripts/hosts/show.phtml:65 +#, php-format +msgid "Send a custom notification for all %u hosts" +msgstr "Invia notifica personalizzata per tutti i %u host" + +#: views/scripts/hosts/show.phtml:163 views/scripts/services/show.phtml:153 +msgid "Acknowledgements" +msgstr "Conferme" + +#: views/scripts/hosts/show.phtml:195 views/scripts/hosts/show.phtml:231 +msgid "on all selected hosts." +msgstr "in tutti gli host selezionati." + +#: views/scripts/hosts/show.phtml:212 views/scripts/services/show.phtml:197 +msgid "are currently in downtime." +msgstr "sono attualmente in manutenzione." + +#: views/scripts/list/comments.phtml:18 +msgid "No comments found matching the filter" +msgstr "Nessun commento soddisfa i criteri di ricerca" + +#: views/scripts/list/comments.phtml:40 +#, php-format +msgid "Show detailed information for this comment about service %s on host %s" +msgstr "" +"Mostra informazioni dettagliate per questo commento riguardo il servizio %s " +"dell'host %s" + +#: views/scripts/list/comments.phtml:54 +#, php-format +msgid "Show detailed information for this comment about host %s" +msgstr "Mostra informazioni dettagliate per questo commento riguardo l'host %s" + +#: views/scripts/list/comments.phtml:67 +msgid "This comment is persistent." +msgstr "Questo Commento è permanente." + +#: views/scripts/list/comments.phtml:68 +msgid "This comment is not persistent." +msgstr "Questo Commento non è permanente." + +#: views/scripts/list/comments.phtml:72 +#, php-format +msgid "This comment expires %s." +msgstr "Questo commento scade il %s." + +#: views/scripts/list/components/selectioninfo.phtml:2 +msgid "" +"Press and hold the Ctrl key while clicking on rows to select multiple rows " +"or press and hold the Shift key to select a range of rows." +msgstr "" +"Tenere premuto il tasto CTRL durante i click per selezionare più righe o " +"tenere premuto SHIFT per selezionare righe contigue." + +#: views/scripts/list/components/selectioninfo.phtml:5 msgid "row(s) selected" msgstr "righe selezionate" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/process/info.phtml:78 +#: views/scripts/list/contactgroups.phtml:14 +msgid "No contactgroups found matching the filter" +msgstr "Nessun gruppo di contatti soddisfa i criteri di ricerca" + +#: views/scripts/list/contacts.phtml:14 +msgid "No contacts found matching the filter" +msgstr "Nessun contatto soddisfa i criteri di ricerca" + +#: views/scripts/list/contacts.phtml:31 views/scripts/show/contact.phtml:26 +#, php-format +msgid "Send a mail to %s" +msgstr "Invia una e-mail a %s" + +#: views/scripts/list/contacts.phtml:37 views/scripts/show/contact.phtml:34 +msgid "Pager" +msgstr "Numero" + +#: views/scripts/list/contacts.phtml:45 +msgid "Service notification period" +msgstr "Periodo notifiche servizi" + +#: views/scripts/list/contacts.phtml:51 +msgid "Host notification period" +msgstr "Periodo notifiche host" + +#: views/scripts/list/downtimes.phtml:22 +msgid "" +"No downtimes found matching the filter, maybe the downtime already expired." +msgstr "" +"Nessuna manutenzione soddisfa i criteri di ricerca, forse la manutenzione è " +"già finita." + +#: views/scripts/list/downtimes.phtml:44 +#: views/scripts/partials/downtime/downtime-header.phtml:4 +#: views/scripts/partials/downtime/downtimes-header.phtml:9 +msgid "Starts" +msgstr "Inizio" + +#: views/scripts/list/downtimes.phtml:56 +#, php-format +msgid "" +"Show detailed information for this downtime scheduled for service %s on host " +"%s" +msgstr "" +"Mostra informazioni dettagliate per questa manutenzione pianificata per il " +"servizio %s dell'host %s" + +#: views/scripts/list/downtimes.phtml:64 +msgid "host" +msgstr "host" + +#: views/scripts/list/downtimes.phtml:70 +#, php-format +msgid "Show detailed information for this downtime scheduled for host %s" +msgstr "" +"Mostra informazioni dettagliate per questa manutenzione pianificata per " +"l'host %s" + +#: views/scripts/list/downtimes.phtml:85 +#: views/scripts/partials/downtime/downtime-header.phtml:14 +#: views/scripts/partials/downtime/downtimes-header.phtml:31 +#, php-format +msgid "" +"This flexible service downtime was started on %s at %s and lasts for %s " +"until %s at %s." +msgstr "" +"Questa manutenzione flessibile del servizio è iniziata il %s alle %s e " +"durerà per %s fino al %s alle %s." + +#: views/scripts/list/downtimes.phtml:86 +#: views/scripts/partials/downtime/downtime-header.phtml:15 +#: views/scripts/partials/downtime/downtimes-header.phtml:32 +#, php-format +msgid "" +"This flexible host downtime was started on %s at %s and lasts for %s until " +"%s at %s." +msgstr "" +"Questa manutenzione flessibile dell'host è iniziata il %s alle %s e durerà " +"per %s fino al %s alle %s." + +#: views/scripts/list/downtimes.phtml:96 +#: views/scripts/partials/downtime/downtime-header.phtml:25 +#: views/scripts/partials/downtime/downtimes-header.phtml:42 +#, php-format +msgid "" +"This flexible service downtime has been scheduled to start between %s - %s " +"and to last for %s." +msgstr "" +"Questa manutenzione flessibile del servizio è stata pianificata per iniziare " +"tra %s -%s e durare per %s." + +#: views/scripts/list/downtimes.phtml:97 +#: views/scripts/partials/downtime/downtime-header.phtml:26 +#: views/scripts/partials/downtime/downtimes-header.phtml:43 +#, php-format +msgid "" +"This flexible host downtime has been scheduled to start between %s - %s and " +"to last for %s." +msgstr "" +"Questa manutenzione flessibile dell'host è stata pianificata per iniziare " +"tra %s -%s e durare per %s." + +#: views/scripts/list/downtimes.phtml:107 +#: views/scripts/partials/downtime/downtime-header.phtml:36 +#: views/scripts/partials/downtime/downtimes-header.phtml:53 +#, php-format +msgid "" +"This fixed service downtime was started on %s at %s and expires on %s at %s." +msgstr "" +"Questa manutenzione fissa del servizio è iniziata il %s alle %s e finirà il " +"%s alle %s." + +#: views/scripts/list/downtimes.phtml:108 +#: views/scripts/partials/downtime/downtime-header.phtml:37 +#: views/scripts/partials/downtime/downtimes-header.phtml:54 +#, php-format +msgid "" +"This fixed host downtime was started on %s at %s and expires on %s at %s." +msgstr "" +"Questa manutenzione fissa dell'host è iniziata il %s alle %s e finirà il %s " +"alle %s." + +#: views/scripts/list/downtimes.phtml:117 +#: views/scripts/partials/downtime/downtime-header.phtml:46 +#: views/scripts/partials/downtime/downtimes-header.phtml:63 +#, php-format +msgid "" +"This fixed service downtime has been scheduled to start on %s at %s and to " +"end on %s at %s." +msgstr "" +"Questa manutenzione fissa del servizio è stata pianificata per iniziare il " +"%s alle %s e finire il %s alle %s." + +#: views/scripts/list/downtimes.phtml:118 +#: views/scripts/partials/downtime/downtime-header.phtml:47 +#: views/scripts/partials/downtime/downtimes-header.phtml:64 +#, php-format +msgid "" +"This fixed host downtime has been scheduled to start on %s at %s and to end " +"on %s at %s." +msgstr "" +"Questa manutenzione fissa dell'host è stata pianificata per iniziare il %s " +"alle %s e finire il %s alle %s." + +#: views/scripts/list/eventgrid.phtml:19 +msgid "No state changes in the selected time period." +msgstr "Nessun cambio di stato nel intervallo di tempo selezionato." + +#: views/scripts/list/eventgrid.phtml:25 +#, php-format +msgid "%d hosts ok on %s" +msgstr "%d host ok in %s" + +#: views/scripts/list/eventgrid.phtml:30 +#, php-format +msgid "%d hosts unreachable on %s" +msgstr "%d host unreachable in %s" + +#: views/scripts/list/eventgrid.phtml:35 +#, php-format +msgid "%d services critical on %s" +msgstr "%d servizi critical in %s" + +#: views/scripts/list/eventgrid.phtml:41 +#, php-format +msgid "%d services warning on %s" +msgstr "%d servizi warning in %s" + +#: views/scripts/list/eventgrid.phtml:47 +#, php-format +msgid "%d hosts down on %s" +msgstr "%d host down in %s" + +#: views/scripts/list/eventgrid.phtml:52 +#, php-format +msgid "%d services unknown on %s" +msgstr "%d servizi unknown in %s" + +#: views/scripts/list/eventgrid.phtml:57 +#, php-format +msgid "%d services ok on %s" +msgstr "%d servizi ok in %s" + +#: views/scripts/list/eventhistory.phtml:42 +#: views/scripts/partials/comment/comment-description.phtml:20 +msgid "Acknowledgement" +msgstr "Conferma" + +#: views/scripts/list/eventhistory.phtml:54 +msgid "Flapping Stopped" +msgstr "Instabilità Terminata" + +#: views/scripts/list/hostgroups.phtml:17 +msgid "No hostgroups found matching the filter" +msgstr "Nessun gruppo di host soddisfa i criteri di ricerca" + +#: views/scripts/list/hostgroups.phtml:23 +#: views/scripts/list/servicegroups.phtml:20 +msgid "Last Problem" +msgstr "Ultimo Problema" + +#: views/scripts/list/hostgroups.phtml:24 +msgid "Host Group" +msgstr "Gruppo di Host" + +#: views/scripts/list/hostgroups.phtml:26 +msgid "Host States" +msgstr "Stati Host" + +#: views/scripts/list/hostgroups.phtml:28 +#: views/scripts/list/servicegroups.phtml:23 +msgid "Service States" +msgstr "Stati Servizio" + +#: views/scripts/list/hostgroups.phtml:70 +#: views/scripts/show/components/hostgroups.phtml:11 +#, php-format +msgid "List all hosts in the group \"%s\"" +msgstr "Mostra tutti gli host del gruppo \"%s\"" + +#: views/scripts/list/hostgroups.phtml:79 +#, php-format +msgid "List all hosts in host group \"%s\"" +msgstr "Mostra tutti gli host del gruppo di host \"%s\"" + +#: views/scripts/list/hostgroups.phtml:246 +#, php-format +msgid "List all services of all hosts in host group \"%s\"" +msgstr "Mostra tutti i servizi di tutti gli host del gruppo \"%s\"" + +#: views/scripts/list/notifications.phtml:18 +msgid "No notifications found matching the filter" +msgstr "Nessuna notifica soddisfa i criteri di ricerca" + +#: views/scripts/list/notifications.phtml:57 +#, php-format +msgid "Sent to %s" +msgstr "Inviata a %s" + +#: views/scripts/list/servicegrid.phtml:19 +#: views/scripts/list/services.phtml:24 views/scripts/services/show.phtml:18 +msgid "No services found matching the filter" +msgstr "Nessun servizio soddisfa i criteri di ricerca" + +#: views/scripts/list/servicegrid.phtml:53 +#, php-format +msgid "List all services with the name \"%s\" on all reported hosts" +msgstr "Mostra tutti i servizi con il nome \"%s\" negli host riportati" + +#: views/scripts/list/servicegrid.phtml:72 +#, php-format +msgid "List all reported services on host %s" +msgstr "Mostra tutti i servizi riportati nell'host %s" + +#: views/scripts/list/servicegroups.phtml:14 +msgid "No servicegroups found matching the filter" +msgstr "Nessun gruppo di servizi soddisfa i criteri di ricerca" + +#: views/scripts/list/servicegroups.phtml:21 +msgid "Service Group" +msgstr "Gruppo di Servizi" + +#: views/scripts/list/servicegroups.phtml:72 +msgid "PENDING" +msgstr "PENDING" + +#: views/scripts/list/servicegroups.phtml:82 +#: views/scripts/show/components/servicegroups.phtml:11 +#, php-format +msgid "List all services in the group \"%s\"" +msgstr "Mostra tutti i servizi nel gruppo \"%s\"" + +#: views/scripts/partials/comment/comment-description.phtml:6 +msgid "Comment was caused by a flapping host or service." +msgstr "Commento generato da un host o servizio instabile." + +#: views/scripts/partials/comment/comment-description.phtml:10 +msgid "User Comment" +msgstr "Commento Utente" + +#: views/scripts/partials/comment/comment-description.phtml:11 +msgid "Comment was created by an user." +msgstr "Commento creato da un utente." + +#: views/scripts/partials/comment/comment-description.phtml:16 +msgid "Comment was caused by a downtime." +msgstr "Commento generato da una manutenzione." + +#: views/scripts/partials/comment/comment-description.phtml:21 +msgid "Comment was caused by an acknowledgement." +msgstr "Commento generato dalla conferma di un problema" + +#: views/scripts/partials/comment/comments-header.phtml:23 +#, php-format +msgid "show all %d comments" +msgstr "mostra tutti i %d commenti" + +#: views/scripts/partials/downtime/downtimes-header.phtml:81 +#, php-format +msgid "List all %d downtimes" +msgstr "Mostra tutte le %d manutenzioni" + +#: views/scripts/partials/host/objects-header.phtml:33 +#, php-format +msgid "show all %d hosts" +msgstr "mostra tutti i %d host" + +#: views/scripts/partials/host/servicesummary.phtml:43 +msgid "No services configured on this host" +msgstr "Nessun servizio configurato per questo host" + +#: views/scripts/partials/service/objects-header.phtml:33 +#, php-format +msgid "show all %d services" +msgstr "mostra tutti i %d servizi" + +#: views/scripts/process/disable-notifications.phtml:10 +msgid "Host and service notifications are already disabled." +msgstr "Notifiche per Host e Servizi sono già disabilitate." + +#: views/scripts/process/disable-notifications.phtml:13 +#, php-format +msgid "Notifications will be re-enabled in %s." +msgstr "Le notifiche saranno riabilitate in %s." + +#: views/scripts/process/info.phtml:19 +msgid "Process Info" +msgstr "Informazioni sul Processo" + +#: views/scripts/process/info.phtml:23 +msgid "Program Version" +msgstr "Versione" + +#: views/scripts/process/info.phtml:26 views/scripts/process/info.phtml:44 +#: views/scripts/process/info.phtml:50 views/scripts/process/info.phtml:56 +#: views/scripts/process/info.phtml:62 +msgid "N/A" +msgstr "N/A" + +#: views/scripts/process/info.phtml:29 +msgid "Program Start Time" +msgstr "Ora Avvio del Programma" + +#: views/scripts/process/info.phtml:33 +msgid "Last Status Update" +msgstr "Ultimo Aggiornamento di Stato" + +#: views/scripts/process/info.phtml:37 +msgid "Last External Command Check" +msgstr "Ultimo Comando Esterno" + +#: views/scripts/process/info.phtml:41 +msgid "Last Log File Rotation" +msgstr "Ultima Rotazione del File di Log" + +#: views/scripts/process/info.phtml:47 +msgid "Global Service Event Handler" +msgstr "Gestore Eventi Servizi Globale" + +#: views/scripts/process/info.phtml:53 +msgid "Global Host Event Handler" +msgstr "Gestore Eventi Host Globale" + +#: views/scripts/process/info.phtml:59 +msgid "Active Endpoint" +msgstr "Nodo Attivo" + +#: views/scripts/process/info.phtml:70 +#, php-format +msgid "%1$s has been up and running with PID %2$d %3$s" +msgstr "%1$s in esecuzione con il PID %2$d %3$s" + +#: views/scripts/process/info.phtml:79 +#, php-format +msgid "Backend %s is not running" +msgstr "Backend %s non è in esecuzione" + +#: views/scripts/process/info.phtml:85 +msgid "Performance Info" +msgstr "Informazioni sulle performance" + +#: views/scripts/process/info.phtml:87 +msgid "Object summaries" +msgstr "Riepilogo oggetti" + +#: views/scripts/process/info.phtml:92 +msgid "overall" +msgstr "complessivo" + +#: views/scripts/process/info.phtml:93 msgid "scheduled" msgstr "schedulato" -#: /usr/local/icingaweb2/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml:63 +#: views/scripts/process/info.phtml:123 +msgid "Average services per host" +msgstr "Media servizi per host" + +#: views/scripts/process/info.phtml:135 +msgid "Active checks" +msgstr "Controlli attivi" + +#: views/scripts/process/info.phtml:141 +msgid "Latency" +msgstr "Latenza" + +#: views/scripts/process/info.phtml:142 +msgid "Execution time" +msgstr "Tempo di esecuzione" + +#: views/scripts/process/info.phtml:148 views/scripts/process/info.phtml:170 +msgid "Host Checks" +msgstr "Controlli Host" + +#: views/scripts/process/info.phtml:156 views/scripts/process/info.phtml:176 +msgid "Service Checks" +msgstr "Controlli Servizi" + +#: views/scripts/process/info.phtml:165 +msgid "Passive checks" +msgstr "Controlli Passivi" + +#: views/scripts/process/not-running.phtml:7 +#, php-format +msgid "%s is currently not up and running" +msgstr "%s non è in esecuzione" + +#: views/scripts/service/history.phtml:10 +msgid "This Service's Event History" +msgstr "Storico degli Eventi" + +#: views/scripts/service/show.phtml:6 +msgid "Service detail information" +msgstr "Dettagli Servizio" + +#: views/scripts/services/show.phtml:63 +#, php-format +msgid "Send a custom notification for all %u services" +msgstr "Invia notifica personalizzata per tutti i %u servizi" + +#: views/scripts/services/show.phtml:80 +msgid "Problems" +msgstr "Problemi" + +#: views/scripts/services/show.phtml:128 +#, php-format +msgid "" +"There are %s unhandled problem services. Issue commands to the problematic " +"services:" +msgstr "" +"Ci sono %s problemi non gestiti sui servizi. Esegui comando sui servizi in " +"errore:" + +#: views/scripts/services/show.phtml:183 views/scripts/services/show.phtml:215 +msgid "on all selected services." +msgstr "su tutti i servizi selezionati." + +#: views/scripts/show/components/acknowledgement.phtml:23 +msgid "Not acknowledged" +msgstr "Non Confermato" + +#: views/scripts/show/components/acknowledgement.phtml:46 +msgid "" +"Acknowledge this problem, suppress all future notifications for it and tag " +"it as being handled" +msgstr "" +"Conferma questo problema, disabilita tutte le notifiche future e marca come " +"gestito" + +#: views/scripts/show/components/actions.phtml:4 +#: views/scripts/show/components/notes.phtml:16 +msgid "opens in new window" +msgstr "apri in una nuova finestra" + +#: views/scripts/show/components/actions.phtml:23 +msgid "Actions" +msgstr "Azioni" + +#: views/scripts/show/components/checksource.phtml:4 +msgid "Check Source" +msgstr "Eseguito da" + +#: views/scripts/show/components/checksource.phtml:14 +msgid "Reachable" +msgstr "Raggiungibile" + +#: views/scripts/show/components/checkstatistics.phtml:18 +msgid "Last check" +msgstr "Ultimo Controllo" + +#: views/scripts/show/components/checkstatistics.phtml:27 +msgid "Next check" +msgstr "Prossimo Controllo" + +#: views/scripts/show/components/checkstatistics.phtml:32 +#: views/scripts/show/components/checkstatistics.phtml:45 +msgid "Reschedule" +msgstr "Rischedula" + +#: views/scripts/show/components/checkstatistics.phtml:39 +#: views/scripts/show/components/checkstatistics.phtml:52 +msgid "Schedule the next active check at a different time than the current one" +msgstr "Schedula il prossimo controllo ad un orario diverso da quello corrente" + +#: views/scripts/show/components/checkstatistics.phtml:62 +msgid "Check attempts" +msgstr "Tentativi" + +#: views/scripts/show/components/checkstatistics.phtml:64 msgid "soft state" msgstr "soft" -#: /usr/local/icingaweb2/modules/monitoring/library/Monitoring/MonitoringWizard.php:50 -msgid "the monitoring module" -msgstr "il modulo di monitoraggio" +#: views/scripts/show/components/checkstatistics.phtml:66 +msgid "hard state" +msgstr "hard" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:180 -msgid "unchanged" -msgstr "invariato" +#: views/scripts/show/components/checkstatistics.phtml:71 +msgid "Check execution time" +msgstr "Durata" -#: /usr/local/icingaweb2/modules/monitoring/application/controllers/AlertsummaryController.php:184 -msgid "up" -msgstr "up" +#: views/scripts/show/components/checkstatistics.phtml:79 +msgid "Check latency" +msgstr "Latenza" -#~ msgid "Send Custom Notification" -#~ msgstr "Invia Notifica Personalizzata" +#: views/scripts/show/components/command.phtml:9 +msgid "Command" +msgstr "Comando" -#~ msgid "Monitoring IDO Resource" -#~ msgstr "Risorsa IDO" +#: views/scripts/show/components/command.phtml:13 +#, php-format +msgid "Submit a one time or so called passive result for the %s check" +msgstr "Invia risultato passivo per %s controlli" -#~ msgid "Monitoring Livestatus Resource" -#~ msgstr "Risorsa Livestatus" +#: views/scripts/show/components/command.phtml:16 +#: views/scripts/show/components/command.phtml:27 +msgid "Process check result" +msgstr "Forza Output Controllo" -#~ msgid "%s on %s" -#~ msgstr "%s di %s" +#: views/scripts/show/components/comments.phtml:9 +#: views/scripts/show/components/comments.phtml:20 +msgid "Add comment" +msgstr "Aggiungi commento" -#~ msgid "" -#~ "Press and hold the Ctrl key while clicking on rows to select multiple " -#~ "rows or press and hold the Shift key to select a range of rows." -#~ msgstr "" -#~ "Tenere premuto il tasto CTRL durante i Click per selezionare più righe o " -#~ "tenere premuto SHIFT per selezionare righe contigue." +#: views/scripts/show/components/comments.phtml:15 +msgid "Add a new comment to this host" +msgstr "Aggiungi un nuovo commento all'host" -#~ msgid "row(s) selected" -#~ msgstr "righe selezionate" +#: views/scripts/show/components/comments.phtml:26 +msgid "Add a new comment to this service" +msgstr "Aggiungi un nuovo commento al servizio" -#~ msgid "at %s" -#~ msgstr "alle %s" +#: views/scripts/show/components/contacts.phtml:30 +#, php-format +msgid "List contacts in contact-group \"%s\"" +msgstr "Mostra contatti nel gruppo \"%s\"" -#~ msgid "Timeline Navigation" -#~ msgstr "Navigazione della Cronologia" +#: views/scripts/show/components/contacts.phtml:36 +msgid "Contactgroups" +msgstr "Gruppi di Contatti" -#~ msgctxt "icinga.state" -#~ msgid "%d CRITICAL" -#~ msgid_plural "%d CRITICAL" -#~ msgstr[0] "%d CRITICAL" -#~ msgstr[1] "%d CRITICAL" +#: views/scripts/show/components/customvars.phtml:4 +msgid "Custom variables" +msgstr "Variabili Riservate" -#~ msgctxt "icinga.state" -#~ msgid "%d PENDING" -#~ msgid_plural "%d PENDING" -#~ msgstr[0] "%d Host PENDING" -#~ msgstr[1] "%d Host PENDING" +#: views/scripts/show/components/downtime.phtml:9 +#: views/scripts/show/components/downtime.phtml:22 +msgid "Schedule downtime" +msgstr "Pianifica Manutenzione" -#~ msgctxt "icinga.state" -#~ msgid "%d UNKNOWN" -#~ msgid_plural "%d UNKNOWN" -#~ msgstr[0] "%d UNKNOWN" -#~ msgstr[1] "%d UNKNOWN" +#: views/scripts/show/components/downtime.phtml:16 +#: views/scripts/show/components/downtime.phtml:29 +msgid "" +"Schedule a downtime to suppress all problem notifications within a specific " +"period of time" +msgstr "" +"Pianifica una manutenzione per disabilitare le notifiche per un periodo di " +"tempo specifico" -#~ msgid "%d are not checked at all" -#~ msgstr "%d non sono stati controllati" +#: views/scripts/show/components/downtime.phtml:70 +#, php-format +msgid "in downtime %s" +msgstr "in manutenzione %s" -#~ msgid "%d are passively checked" -#~ msgstr "%d sono controllati passivamente" +#: views/scripts/show/components/downtime.phtml:76 +#, php-format +msgid "scheduled %s" +msgstr "pianificate %s" -#~ msgid "%d critical on %s" -#~ msgstr "%d critical il %s" +#: views/scripts/show/components/downtime.phtml:81 +#, php-format +msgid "scheduled flexible %s" +msgstr "flessibili pianificate %s" -#~ msgid "%d down on %s" -#~ msgstr "%d down di %s" +#: views/scripts/show/components/hostgroups.phtml:16 +msgid "Hostgroups" +msgstr "Gruppi di Host" -#~ msgid "%d ok on %s" -#~ msgstr "%d ok di %s" +#: views/scripts/show/components/notes.phtml:7 +msgid "Notes" +msgstr "Note" -#~ msgid "%d unknown on %s" -#~ msgstr "%d unknown di %s" +#: views/scripts/show/components/notifications.phtml:10 +#: views/scripts/show/components/notifications.phtml:24 +msgid "Send notification" +msgstr "Invia Notifica" -#~ msgid "%d unreachable on %s" -#~ msgstr "%d unreachable di %s" +#: views/scripts/show/components/notifications.phtml:17 +msgid "Send a custom notification to contacts responsible for this host" +msgstr "" +"Invia una notifica personalizzata ai contatti responsabili per questo host" -#~ msgid "%d warning on %s" -#~ msgstr "%d warning di %s" +#: views/scripts/show/components/notifications.phtml:31 +msgid "Send a custom notification to contacts responsible for this service" +msgstr "" +"Invia una notifica personalizzata ai contatti responsabili per questo " +"servizio" -#~ msgid "%s notifications have been sent for this issue" -#~ msgstr "%s notifiche inviate per questo problema" +#: views/scripts/show/components/notifications.phtml:47 +#, php-format +msgid "A notification has been sent for this issue %s." +msgstr "Una notifica è stata inviata per questo problema %s ." -#~ msgid "A notification has been sent for this issue %s ago" -#~ msgstr "Una notifica è stata inviata per questo problema %s fa" +#: views/scripts/show/components/notifications.phtml:52 +#, php-format +msgid "%d notifications have been sent for this issue." +msgstr "%d notifiche inviate per questo problema" -#~ msgid "Acknowledge unhandled host problem" -#~ msgid_plural "Acknowledge unhandled host problems" -#~ msgstr[0] "Conferma il Problema dell'Host Non Gestito" -#~ msgstr[1] "Conferma i Problemi dell'Host Non Gestiti" +#: views/scripts/show/components/notifications.phtml:55 +#, php-format +msgid "The last one was sent %s." +msgstr "L'ultima è stata inviata %s." -#~ msgid "Acknowledge unhandled service problem" -#~ msgid_plural "Acknowledge unhandled service problems" -#~ msgstr[0] "Conferma il Problema del Servizio Non Gestito" -#~ msgstr[1] "Conferma i Problemi del Servizio Non Gestiti" +#: views/scripts/show/components/notifications.phtml:60 +msgid "No notification has been sent for this issue." +msgstr "Nessuna notifica è stata inviata per questo problema." -#~ msgid "Delete comment" -#~ msgstr "Rimuovi Commento" +#: views/scripts/show/components/output.phtml:2 +msgid "Plugin Output" +msgstr "Output del Plugin" -#~ msgid "Delete downtime" -#~ msgstr "Cancella Manutenzione" +#: views/scripts/show/components/perfdata.phtml:4 +msgid "Performance data" +msgstr "Dati di Performance" -#~ msgid "Handled hosts with state DOWN" -#~ msgstr "Host Gestiti in stato DOWN" +#: views/scripts/show/components/servicegroups.phtml:17 +msgid "Servicegroups" +msgstr "Gruppi di Servizi" -#~ msgid "Handled hosts with state UNREACHABLE" -#~ msgstr "Host Gestiti con stato UNREACHABLE" +#: views/scripts/show/contact.phtml:6 +msgid "Contact details" +msgstr "Dettagli Contatto" -#~ msgid "Handled services with state %s" -#~ msgstr "Servizi Gestiti con stato %s" +#: views/scripts/show/contact.phtml:12 +msgid "No such contact" +msgstr "Nessun contatto trovato" -#~ msgid "Hosts with state PENDING" -#~ msgstr "Host in stato PENDING" +#: views/scripts/show/contact.phtml:58 +msgid "Notifications sent to this contact" +msgstr "Notifiche inviate a questo contatto" -#~ msgid "Hosts with state UP" -#~ msgstr "Host in stato UP" +#: views/scripts/show/contact.phtml:69 +msgid "No notifications have been sent for this contact" +msgstr "Nessuna notifica è stata inviata a questo contatto" -#~ msgid "List %s service with status critical handled in service group %s" -#~ msgid_plural "" -#~ "List %s services with status critical handled in service group %s" -#~ msgstr[0] "" -#~ "Mostra %s servizio in stato critical gestito nel gruppo di servizi %s" -#~ msgstr[1] "" -#~ "Mostra %s servizi in stato critical gestiti nel gruppo di servizi %s" +#: views/scripts/tactical/components/hostservicechecks.phtml:3 +msgid "Host and Service Checks" +msgstr "Controlli di Host e Servizi" -#~ msgid "List %s service with status critical unhandled in service group %s" -#~ msgid_plural "" -#~ "List %s Services with status critical unhandled in service group %s" -#~ msgstr[0] "" -#~ "Mostra %s servizio in stato critical non gestito nel gruppo di servizi %s" -#~ msgstr[1] "" -#~ "Mostra %s servizi in stato critical non gestiti nel gruppo di servizi %s" +#: views/scripts/tactical/components/monitoringfeatures.phtml:3 +msgid "Monitoring Features" +msgstr "Funzionalità di Monitoraggio" -#~ msgid "List %s service with status ok in service group %s" -#~ msgid_plural "List %s Services with status ok in service group %s" -#~ msgstr[0] "Mostra %s servizio in stato ok nel gruppo di servizi %s" -#~ msgstr[1] "Mostra %s servizi in stato ok nel gruppo di servizi %s" +#: views/scripts/tactical/components/monitoringfeatures.phtml:39 +#: views/scripts/tactical/components/monitoringfeatures.phtml:160 +#: views/scripts/tactical/components/monitoringfeatures.phtml:239 +msgid "All Hosts Enabled" +msgstr "Tutti gli Host abilitati" -#~ msgid "List %s service with status unknown handled in service group %s" -#~ msgid_plural "" -#~ "List %s services with status unknown handled in service group %s" -#~ msgstr[0] "" -#~ "Mostra %s servizio in stato unknown gestito nel gruppo di servizi %s" -#~ msgstr[1] "" -#~ "Mostra %s servizi in stato unknown gestiti nel gruppo di servizi %s" +#: views/scripts/tactical/components/monitoringfeatures.phtml:43 +msgid "List all hosts, for which flap detection is enabled entirely" +msgstr "Mostra tutti gli host dove il controllo di instabilità è abilitato" -#~ msgid "List %s service with status unknown unhandled in service group %s" -#~ msgid_plural "" -#~ "List %s services with status unknown unhandled in service group %s" -#~ msgstr[0] "" -#~ "Mostra %s servizio in stato unknown non gestito nel gruppo di servizi %s" -#~ msgstr[1] "" -#~ "Mostra %s servizi in stato unknown non gestiti nel gruppo di servizi %s" +#: views/scripts/tactical/components/monitoringfeatures.phtml:94 +#: views/scripts/tactical/components/monitoringfeatures.phtml:194 +#: views/scripts/tactical/components/monitoringfeatures.phtml:273 +msgid "All Services Enabled" +msgstr "Tutti i Servizi Abilitati" -#~ msgid "List %s service with status warning unhandled in service group %s" -#~ msgid_plural "" -#~ "List %s services with status warning unhandled in service group %s" -#~ msgstr[0] "" -#~ "Mostra %s servizio in stato warning non gestito nel gruppo di servizi %s" -#~ msgstr[1] "" -#~ "Mostra %s servizi in stato warning non gestiti nel gruppo di servizi %s" +#: views/scripts/tactical/components/monitoringfeatures.phtml:98 +msgid "List all services, for which flap detection is enabled entirely" +msgstr "Mostra tutti i servizi dove il controllo di instabilità è disbilitato" -#~ msgid "List %u host which is in downtime" -#~ msgid_plural "List %u hosts which are in downtime" -#~ msgstr[0] "Mostra %u host in manutenzione" -#~ msgstr[1] "Mostra %u host in manutenzione" +#: views/scripts/tactical/components/monitoringfeatures.phtml:164 +msgid "List all hosts, for which notifications are enabled entirely" +msgstr "Mostra tutti gli host dove le notifiche sono abilitate" -#~ msgid "List %u service with status critical handled in host group %s" -#~ msgid_plural "" -#~ "List %u services with status critical handled in host group %s" -#~ msgstr[0] "" -#~ "Mostra %u servizio in stato critical gestito nel gruppo di host %s" -#~ msgstr[1] "" -#~ "Mostra %u servizi in stato critical gestiti nel gruppo di host %s" +#: views/scripts/tactical/components/monitoringfeatures.phtml:198 +msgid "List all services, for which notifications are enabled entirely" +msgstr "Mostra tutti i servizi dove le notifiche sono disabilitate" -#~ msgid "List %u service with status pending in host group %s" -#~ msgid_plural "List %u services with status pending in host group %s" -#~ msgstr[0] "Mostra %u servizio in stato pending nel gruppo di host %s" -#~ msgstr[1] "Mostra %u servizi in stato pending nel gruppo di host %s" +#: views/scripts/tactical/components/monitoringfeatures.phtml:243 +msgid "List all hosts, which are processing event handlers entirely" +msgstr "Mostra tutti gli host dove il gestore eventi è abilitato" -#~ msgid "List %u service with status unknown handled in host group %s" -#~ msgid_plural "List %u services with status unknown handled in host group %s" -#~ msgstr[0] "" -#~ "Mostra %u servizio in stato unknown gestito nel gruppo di host %s" -#~ msgstr[1] "Mostra %u servizi in stato unknown gestiti nel gruppo di host %s" +#: views/scripts/tactical/components/monitoringfeatures.phtml:277 +msgid "List all services, which are processing event handlers entirely" +msgstr "Mostra tutti i servizi dove il gestore eventi è abilitato" -#~ msgid "List %u service with status unknown unhandled in host group %s" -#~ msgid_plural "" -#~ "List %u services with status unknown unhandled in host group %s" -#~ msgstr[0] "" -#~ "Mostra %u servizio in stato unknown non gestito nel gruppo di host %s" -#~ msgstr[1] "" -#~ "Mostra %u servizi in stato unknown non gestiti nel gruppo di host %s" +#: views/scripts/tactical/components/ok_hosts.phtml:79 +msgid "Service Problems" +msgstr "Servizi con Problemi" -#~ msgid "List %u service with status warning handled in host group %s" -#~ msgid_plural "List %u services with status warning handled in host group %s" -#~ msgstr[0] "" -#~ "Mostra %u servizio in stato warning gestito nel gruppo di host %s" -#~ msgstr[1] "Mostra %u servizi in stato warning gestiti nel gruppo di host %s" +#: views/scripts/timeline/index.phtml:15 +msgid "Legend" +msgstr "Legenda" -#~ msgid "List %u service with status warning unhandled in host group %s" -#~ msgid_plural "" -#~ "List %u services with status warning unhandled in host group %s" -#~ msgstr[0] "" -#~ "Mostra %u servizio in stato warning non gestito nel gruppo di host %s" -#~ msgstr[1] "" -#~ "Mostra %u servizi in stato warning non gestiti nel gruppo di host %s" +#: views/scripts/timeline/index.phtml:35 +#, php-format +msgid "on %s" +msgstr "il %s" -#~ msgid "List all" -#~ msgstr "Mostra tutto" +#: views/scripts/timeline/index.phtml:41 +#, php-format +msgid "in week %s of %s" +msgstr "nella settimana %s di %s" -#~ msgid "PHP Module: Sockets" -#~ msgstr "Modulo PHP: Sockets" +#: views/scripts/timeline/index.phtml:48 views/scripts/timeline/index.phtml:54 +#, php-format +msgid "in %s" +msgstr "in %s" -#~ msgid "Reschedule host checks" -#~ msgstr "Rischedula i Controlli dell'Host" +#: views/scripts/timeline/index.phtml:60 +#, php-format +msgid "between %s and %s" +msgstr "tra %s e %s" -#~ msgid "Reschedule service checks" -#~ msgstr "Rischedula i Controlli del Servizio" +#: views/scripts/timeline/index.phtml:74 +#, php-format +msgid "List all event records registered %s" +msgstr "Mostra tutti gli eventi dello storico %s" -#~ msgid "Schedule downtime for unhandled host problem" -#~ msgid_plural "Schedule downtimes for unhandled host problems" -#~ msgstr[0] "Pianifica Manutenzione per il Problema dell'Host Non Gestito" -#~ msgstr[1] "Pianifica Manutenzione per i Problemi degli Host Non Gestiti" - -#~ msgid "Schedule downtime for unhandled service problem" -#~ msgid_plural "Schedule downtimes for unhandled service problems" -#~ msgstr[0] "Pianifica Manutenzione per il Problema del Servizio Non Gestito" -#~ msgstr[1] "Pianifica Manutenzione per i Problemi del Servizio Non Gestiti" - -#~ msgid "Schedule host downtimes" -#~ msgstr "Pianifica Manutenzione Host" - -#~ msgid "Schedule service downtimes" -#~ msgstr "Pianifica Manutenzione Sevizio" - -#~ msgid "Services with state %s" -#~ msgstr "Servizi in stato %s" - -#~ msgid "Submit passive check results" -#~ msgstr "Invia Risultato Passivo" - -#~ msgid "The PHP Module sockets is available." -#~ msgstr "Il modulo PHP Sockets è disponibile" - -#~ msgid "The PHP Module sockets is not available." -#~ msgstr "Il modulo PHP Sockets non è disponibile" - -#~ msgid "Unhandled hosts with state DOWN" -#~ msgstr "Host Non Gestiti in stato DOWN" - -#~ msgid "Unhandled hosts with state UNREACHABLE" -#~ msgstr "Host Non Gestiti in stato UNREACHABLE" - -#~ msgid "Unhandled services with state %s" -#~ msgstr "Servizi Non Gestiti in stato %s" - -#~ msgid "Comment: " -#~ msgstr "Commento: " +#: views/scripts/timeline/index.phtml:112 +#, php-format +msgid "List %u %s registered %s" +msgstr "Mostra %u %s salvati %s" From d2a4b880b170ea96ae54c13bd50a449fa0d1218b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 23:05:34 +0200 Subject: [PATCH 239/280] Revert "Accept DbUserBackends with only one single user" This reverts commit c8d065b3e0197b8c96dba436a5c04cebca704568. There's a PR on GitHub open that was contributed earlier than this fix. Thus giving credit to the PR's author. refs #9739 --- library/Icinga/Authentication/User/DbUserBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/User/DbUserBackend.php b/library/Icinga/Authentication/User/DbUserBackend.php index f9a9cb5f8..01798a8ff 100644 --- a/library/Icinga/Authentication/User/DbUserBackend.php +++ b/library/Icinga/Authentication/User/DbUserBackend.php @@ -284,7 +284,7 @@ class DbUserBackend extends DbRepository implements UserBackendInterface, Inspec $insp->write($this->ds->inspect()); try { $users = $this->select()->where('is_active', true)->count(); - if ($users >= 1) { + if ($users > 1) { $insp->write(sprintf('%s active users', $users)); } else { return $insp->error('0 active users', $users); From 056ab0c96cb90c1a52b9c563517e6161fd04dfec Mon Sep 17 00:00:00 2001 From: Russell Kubik Date: Wed, 22 Jul 2015 08:55:41 -0600 Subject: [PATCH 240/280] Fix that DbUserBackend::inspect() reports 0 users when only one exists refs #9739 Signed-off-by: Eric Lippmann --- library/Icinga/Authentication/User/DbUserBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/User/DbUserBackend.php b/library/Icinga/Authentication/User/DbUserBackend.php index 01798a8ff..c0c949fd7 100644 --- a/library/Icinga/Authentication/User/DbUserBackend.php +++ b/library/Icinga/Authentication/User/DbUserBackend.php @@ -284,7 +284,7 @@ class DbUserBackend extends DbRepository implements UserBackendInterface, Inspec $insp->write($this->ds->inspect()); try { $users = $this->select()->where('is_active', true)->count(); - if ($users > 1) { + if ($users > 0) { $insp->write(sprintf('%s active users', $users)); } else { return $insp->error('0 active users', $users); From a331b04157d25be92942e3bed5008a939d8030df Mon Sep 17 00:00:00 2001 From: Alexander Wirt Date: Fri, 24 Jul 2015 09:44:53 +0200 Subject: [PATCH 241/280] doc: Don't suggest to install icingacli on Debian On Debian icingacli is part of the icingaweb2 package. fixes #9837 Signed-off-by: Eric Lippmann --- doc/installation.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/installation.md b/doc/installation.md index f47d9b0b7..e3e00a93e 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -101,12 +101,11 @@ The packages for Debian wheezy depend on other packages which are distributed as ### Installing Icinga Web 2 You can install Icinga Web 2 by using your distribution's package manager to install the `icingaweb2` package. -Below is a list with examples for various distributions. The additional package `icingacli` is necessary -for being able to follow further steps in this guide. +Below is a list with examples for various distributions. The additional package `icingacli` is necessary on RPM based systems for being able to follow further steps in this guide. In DEB based systems, the icingacli binary is included in the icingaweb2 package. **Debian and Ubuntu**: ```` -apt-get install icingaweb2 icingacli +apt-get install icingaweb2 ```` For Debian wheezy please read the [package repositories notes](#package-repositories-wheezy-notes). From 029aeda164a7bdd7f2092f2216d7dcf9382cafc2 Mon Sep 17 00:00:00 2001 From: bradynathan Date: Wed, 26 Aug 2015 11:21:51 -0400 Subject: [PATCH 242/280] Document filter option for LDAP/AD auth refs #9612 Signed-off-by: Eric Lippmann --- doc/authentication.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/authentication.md b/doc/authentication.md index 2b4452042..21f5a8b9f 100644 --- a/doc/authentication.md +++ b/doc/authentication.md @@ -43,6 +43,7 @@ Directive | Description **resource** | The name of the LDAP resource defined in [resources.ini](resources.md#resources). **user_class** | LDAP user class. **user_name_attribute** | LDAP attribute which contains the username. +**filter** | LDAP search filter. **Example:** @@ -52,6 +53,7 @@ backend = ldap resource = my_ldap user_class = inetOrgPerson user_name_attribute = uid +filter = "memberOf=cn=icinga_users,cn=groups,cn=accounts,dc=icinga,dc=org" ``` Note that in case the set *user_name_attribute* holds multiple values it is required that all of its From 95fb00ac8d51b0587206dd3d2678e842e9269e9c Mon Sep 17 00:00:00 2001 From: realitygaps Date: Wed, 17 Jun 2015 16:19:00 +0200 Subject: [PATCH 243/280] Don't show password when creating or updating a user Signed-off-by: Eric Lippmann --- application/forms/Config/User/UserForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/forms/Config/User/UserForm.php b/application/forms/Config/User/UserForm.php index 765b95882..2f25415d4 100644 --- a/application/forms/Config/User/UserForm.php +++ b/application/forms/Config/User/UserForm.php @@ -34,7 +34,7 @@ class UserForm extends RepositoryForm ) ); $this->addElement( - 'text', + 'password', 'password', array( 'required' => true, @@ -56,7 +56,7 @@ class UserForm extends RepositoryForm $this->createInsertElements($formData); $this->addElement( - 'text', + 'password', 'password', array( 'label' => $this->translate('Password') From fd49b18bf4e14dd56ee148f21952a112dc3b0d6f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 23:30:30 +0200 Subject: [PATCH 244/280] Add description to the password input when updating a user --- application/forms/Config/User/UserForm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/forms/Config/User/UserForm.php b/application/forms/Config/User/UserForm.php index 2f25415d4..09c89d948 100644 --- a/application/forms/Config/User/UserForm.php +++ b/application/forms/Config/User/UserForm.php @@ -59,7 +59,8 @@ class UserForm extends RepositoryForm 'password', 'password', array( - 'label' => $this->translate('Password') + 'description' => $this->translate('Leave empty for not updating the user\'s password'), + 'label' => $this->translate('Password'), ) ); From 8f545dd0d66b76d25022d2f68be779e86de2739a Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Wed, 2 Sep 2015 11:25:52 +0200 Subject: [PATCH 245/280] Fix acknowledgement query for PGSQL refs #10032 --- .../controllers/AcknowledgementController.php | 1 - .../views/scripts/acknowledgement/index.phtml | 2 +- .../Backend/Ido/Query/AcknowledgementQuery.php | 11 +++++------ .../library/Monitoring/DataView/Acknowledgement.php | 2 -- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/monitoring/application/controllers/AcknowledgementController.php b/modules/monitoring/application/controllers/AcknowledgementController.php index 55e003c49..684111fde 100644 --- a/modules/monitoring/application/controllers/AcknowledgementController.php +++ b/modules/monitoring/application/controllers/AcknowledgementController.php @@ -31,7 +31,6 @@ class Monitoring_AcknowledgementController extends Controller 'acknowledgement_id', 'instance_id', 'entry_time', - 'acknowledgement_type', 'object_id', 'state', 'author_name', diff --git a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml b/modules/monitoring/application/views/scripts/acknowledgement/index.phtml index 83d41e4c1..42ccc262e 100644 --- a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml +++ b/modules/monitoring/application/views/scripts/acknowledgement/index.phtml @@ -9,7 +9,7 @@ use Icinga\Module\Monitoring\Object\Host;

render('list/components/selectioninfo.phtml'); ?>
-

translate('Acknowledgements') ?>

+

translate('Acknowledgements') ?>

sortBox; ?> limiter; ?> paginator; ?> diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php index 77782ec09..ac46fd36a 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php @@ -18,7 +18,6 @@ class AcknowledgementQuery extends IdoQuery 'acknowledgement_id' => 'a.acknowledgement_id', 'instance_id' => 'a.instance_id', 'entry_time' => 'UNIX_TIMESTAMP(a.entry_time)', - 'acknowledgement_type' => 'IF (a.acknowledgement_type = 0, \'host\', \'service\')', 'object_id' => 'a.object_id', 'state' => 'a.state', 'author_name' => 'a.author_name', @@ -31,9 +30,9 @@ class AcknowledgementQuery extends IdoQuery 'endpoint_object_id' => 'a.endpoint_object_id' ), 'objects' => array( - 'acknowledgement_is_service' => 'IF (o.objecttype_id = 2, 1, 0)', - 'host' => 'o.name1', - 'service' => 'o.name2' + 'acknowledgement_is_service' => '(CASE WHEN o.objecttype_id = 2 THEN 1 ELSE 0 END)', + 'host' => 'o.name1', + 'service' => 'o.name2' ) ); @@ -67,8 +66,8 @@ class AcknowledgementQuery extends IdoQuery $this->select->join( array('a' => $ackTable), 'o.object_id = a.object_id ' . - 'AND ((o.objecttype_id = 2 AND ss.problem_has_been_acknowledged AND ss.acknowledgement_type = 2) ' . - ' OR (o.objecttype_id = 1 AND hs.problem_has_been_acknowledged AND hs.acknowledgement_type = 2)) ' . + 'AND ((o.objecttype_id = 2 AND ss.problem_has_been_acknowledged = 1 AND ss.acknowledgement_type = 2) ' . + ' OR (o.objecttype_id = 1 AND hs.problem_has_been_acknowledged = 1 AND hs.acknowledgement_type = 2)) ' . 'AND o.is_active = 1 AND a.acknowledgement_id = ' . $subQuery, array() ); diff --git a/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php b/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php index 2ed457af4..fb3bb85df 100644 --- a/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php +++ b/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php @@ -17,7 +17,6 @@ class Acknowledgement extends DataView 'acknowledgement_id', 'instance_id', 'entry_time', - 'acknowledgement_type', 'object_id', 'state', 'author_name', @@ -39,7 +38,6 @@ class Acknowledgement extends DataView return array( 'acknowledgement_id', 'entry_time', - 'acknowledgement_type', 'state', 'author_name', 'comment_data', From fde51fe27bfacd9b7bf69c0fc6c3fa4ee5a79d15 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Wed, 2 Sep 2015 11:29:46 +0200 Subject: [PATCH 246/280] Display message on empty result sets refs #10032 --- .../application/views/scripts/acknowledgement/index.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml b/modules/monitoring/application/views/scripts/acknowledgement/index.phtml index 42ccc262e..728b83f5b 100644 --- a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml +++ b/modules/monitoring/application/views/scripts/acknowledgement/index.phtml @@ -98,7 +98,7 @@ use Icinga\Module\Monitoring\Object\Host; - + translate('No comments found matching the filter'); ?>
From 96f8afa6f127f7feb8dca76e6fbe56c7c42c11a3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 10:41:47 +0200 Subject: [PATCH 247/280] monitoring/menu: Move Notifications beneath History resolves #8884 --- modules/monitoring/configuration.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 4d915c123..6172fa39f 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -180,10 +180,6 @@ $section->add($this->translate('Downtimes'), array( 'url' => 'monitoring/list/downtimes', 'priority' => 80 )); -$section->add($this->translate('Notifications'), array( - 'url' => 'monitoring/list/notifications', - 'priority' => 80 -)); $section->add($this->translate('Acknowledgements'), array( 'url' => 'monitoring/acknowledgement', 'priority' => 90 @@ -193,17 +189,24 @@ $section->add($this->translate('Acknowledgements'), array( * History Section */ $section = $this->menuSection($this->translate('History'), array( - 'icon' => 'rewind' + 'icon' => 'rewind' )); $section->add($this->translate('Event Grid'), array( - 'url' => 'monitoring/list/eventgrid', - 'priority' => 50 + 'priority' => 10, + 'url' => 'monitoring/list/eventgrid' )); -$section->add($this->translate('Events'), array( - 'title' => $this->translate('Event Overview'), - 'url' => 'monitoring/list/eventhistory?timestamp>=-7%20days' +$section->add($this->translate('Event Overview'), array( + 'priority' => 20, + 'url' => 'monitoring/list/eventhistory?timestamp>=-7%20days' +)); +$section->add($this->translate('Notifications'), array( + 'priority' => 30, + 'url' => 'monitoring/list/notifications', +)); +$section->add($this->translate('Timeline'), array( + 'priority' => 40, + 'url' => 'monitoring/timeline' )); -$section->add($this->translate('Timeline'))->setUrl('monitoring/timeline'); /* * Reporting Section From e5c9eb1d2067949484f9b0342f274a5ac80fa9ba Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 10:52:05 +0200 Subject: [PATCH 248/280] monitoring: Don't show ack comments in the comments area of a host or service refs #9674 --- .../monitoring/library/Monitoring/Object/MonitoredObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 502a1a2d1..83b893192 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -252,7 +252,7 @@ abstract class MonitoredObject implements Filterable 'comment' => 'comment_data', 'type' => 'comment_type', )) - ->where('comment_type', array('comment', 'ack')) + ->where('comment_type', array('comment')) ->where('object_type', $this->type); if ($this->type === self::TYPE_SERVICE) { $comments From 4d2675659cf1dafbef65bfb8ee63e52fa45aaf0b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 13:47:51 +0200 Subject: [PATCH 249/280] monitoring: Optimize imports in MonitoredObject --- .../monitoring/library/Monitoring/Object/MonitoredObject.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 83b893192..4d9d675c2 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -5,9 +5,9 @@ namespace Icinga\Module\Monitoring\Object; use InvalidArgumentException; use Icinga\Application\Config; -use Icinga\Exception\InvalidPropertyException; use Icinga\Data\Filter\Filter; use Icinga\Data\Filterable; +use Icinga\Exception\InvalidPropertyException; use Icinga\Module\Monitoring\Backend\MonitoringBackend; use Icinga\Web\UrlParams; @@ -517,9 +517,11 @@ abstract class MonitoredObject implements Filterable ->fetchContactgroups() ->fetchCustomvars() ->fetchDowntimes(); + // Call fetchHostgroups or fetchServicegroups depending on the object's type $fetchGroups = 'fetch' . ucfirst($this->type) . 'groups'; $this->$fetchGroups(); + return $this; } From dc5e86002b373088fc9c4f8ef850913b786ca791 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 14:07:38 +0200 Subject: [PATCH 250/280] monitoring: Reorder code in MonitoredObject --- .../Monitoring/Object/MonitoredObject.php | 591 +++++++++--------- 1 file changed, 304 insertions(+), 287 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 4d9d675c2..469b988dc 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -34,11 +34,60 @@ abstract class MonitoredObject implements Filterable protected $backend; /** - * Type of the Icinga object, i.e. 'host' or 'service' + * Comments * - * @var string + * @var array */ - protected $type; + protected $comments; + + /** + * Custom variables + * + * @var array + */ + protected $customvars; + + /** + * Contact groups + * + * @var array + */ + protected $contactgroups; + + /** + * Contacts + * + * @var array + */ + protected $contacts; + + /** + * Downtimes + * + * @var array + */ + protected $downtimes; + + /** + * Event history + * + * @var \Icinga\Module\Monitoring\DataView\EventHistory + */ + protected $eventhistory; + + /** + * Filter + * + * @var Filter + */ + protected $filter; + + /** + * Host groups + * + * @var array + */ + protected $hostgroups; /** * Prefix of the Icinga object, i.e. 'host_' or 'service_' @@ -54,27 +103,6 @@ abstract class MonitoredObject implements Filterable */ protected $properties; - /** - * Comments - * - * @var array - */ - protected $comments; - - /** - * Downtimes - * - * @var array - */ - protected $downtimes; - - /** - * Host groups - * - * @var array - */ - protected $hostgroups; - /** * Service groups * @@ -83,32 +111,11 @@ abstract class MonitoredObject implements Filterable protected $servicegroups; /** - * Contacts + * Type of the Icinga object, i.e. 'host' or 'service' * - * @var array + * @var string */ - protected $contacts; - - /** - * Contact groups - * - * @var array - */ - protected $contactgroups; - - /** - * Custom variables - * - * @var array - */ - protected $customvars; - - /** - * Event history - * - * @var \Icinga\Module\Monitoring\DataView\EventHistory - */ - protected $eventhistory; + protected $type; /** * Stats @@ -117,13 +124,6 @@ abstract class MonitoredObject implements Filterable */ protected $stats; - /** - * Filter - * - * @var Filter - */ - protected $filter; - /** * Create a monitored object, i.e. host or service * @@ -141,35 +141,82 @@ abstract class MonitoredObject implements Filterable */ abstract protected function getDataView(); - public function applyFilter(Filter $filter) - { - $this->getFilter()->addFilter($filter); - return $this; - } + /** + * Get the notes for this monitored object + * + * @return string The notes as a string + */ + public abstract function getNotes(); - public function setFilter(Filter $filter) - { - // Left out on purpose. Interface is deprecated. - } - - public function getFilter() - { - if ($this->filter === null) { - $this->filter = Filter::matchAll(); - } - return $this->filter; - } + /** + * Get all note urls configured for this monitored object + * + * @return array All note urls as a string + */ + public abstract function getNotesUrls(); + /** + * {@inheritdoc} + */ public function addFilter(Filter $filter) { // Left out on purpose. Interface is deprecated. } + /** + * {@inheritdoc} + */ + public function applyFilter(Filter $filter) + { + $this->getFilter()->addFilter($filter); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFilter() + { + if ($this->filter === null) { + $this->filter = Filter::matchAll(); + } + + return $this->filter; + } + + /** + * {@inheritdoc} + */ + public function setFilter(Filter $filter) + { + // Left out on purpose. Interface is deprecated. + } + + /** + * {@inheritdoc} + */ public function where($condition, $value = null) { // Left out on purpose. Interface is deprecated. } + /** + * Require the object's type to be one of the given types + * + * @param array $oneOf + * + * @return bool + * @throws InvalidArgumentException If the object's type is not one of the given types. + */ + public function assertOneOf(array $oneOf) + { + if (! in_array($this->type, $oneOf)) { + throw new InvalidArgumentException; + } + return true; + } + /** * Fetch the object's properties * @@ -195,45 +242,6 @@ abstract class MonitoredObject implements Filterable return true; } - /** - * Get the type of the object - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Require the object's type to be one of the given types - * - * @param array $oneOf - * - * @return bool - * @throws InvalidArgumentException If the object's type is not one of the given types. - */ - public function assertOneOf(array $oneOf) - { - if (! in_array($this->type, $oneOf)) { - throw new InvalidArgumentException; - } - return true; - } - - /** - * Set the object's properties - * - * @param object $properties - * - * @return $this - */ - public function setProperties($properties) - { - $this->properties = (object) $properties; - return $this; - } - /** * Fetch the object's comments * @@ -266,54 +274,58 @@ abstract class MonitoredObject implements Filterable } /** - * Fetch the object's downtimes + * Fetch the object's contact groups * * @return $this */ - public function fetchDowntimes() + public function fetchContactgroups() { - $downtimes = $this->backend->select()->from('downtime', array( - 'id' => 'downtime_internal_id', - 'objecttype' => 'object_type', - 'comment' => 'downtime_comment', - 'author_name' => 'downtime_author_name', - 'start' => 'downtime_start', - 'scheduled_start' => 'downtime_scheduled_start', - 'scheduled_end' => 'downtime_scheduled_end', - 'end' => 'downtime_end', - 'duration' => 'downtime_duration', - 'is_flexible' => 'downtime_is_flexible', - 'is_fixed' => 'downtime_is_fixed', - 'is_in_effect' => 'downtime_is_in_effect', - 'entry_time' => 'downtime_entry_time' - )) - ->where('object_type', $this->type) - ->order('downtime_is_in_effect', 'DESC') - ->order('downtime_scheduled_start', 'ASC'); + if ($this->backend->is('livestatus')) { + $this->contactgroups = array(); + return $this; + } + + $contactsGroups = $this->backend->select()->from('contactgroup', array( + 'contactgroup_name', + 'contactgroup_alias' + )); if ($this->type === self::TYPE_SERVICE) { - $downtimes + $contactsGroups ->where('service_host_name', $this->host_name) ->where('service_description', $this->service_description); } else { - $downtimes - ->where('host_name', $this->host_name); + $contactsGroups->where('host_name', $this->host_name); } - $this->downtimes = $downtimes->getQuery()->fetchAll(); + $this->contactgroups = $contactsGroups->applyFilter($this->getFilter())->getQuery()->fetchAll(); return $this; } /** - * Fetch the object's host groups + * Fetch the object's contacts * * @return $this */ - public function fetchHostgroups() + public function fetchContacts() { - $this->hostgroups = $this->backend->select() - ->from('hostgroup', array('hostgroup_name', 'hostgroup_alias')) - ->where('host_name', $this->host_name) - ->applyFilter($this->getFilter()) - ->fetchPairs(); + if ($this->backend->is('livestatus')) { + $this->contacts = array(); + return $this; + } + + $contacts = $this->backend->select()->from('contact', array( + 'contact_name', + 'contact_alias', + 'contact_email', + 'contact_pager', + )); + if ($this->type === self::TYPE_SERVICE) { + $contacts + ->where('service_host_name', $this->host_name) + ->where('service_description', $this->service_description); + } else { + $contacts->where('host_name', $this->host_name); + } + $this->contacts = $contacts->applyFilter($this->getFilter())->getQuery()->fetchAll(); return $this; } @@ -372,74 +384,39 @@ abstract class MonitoredObject implements Filterable } /** - * Fetch the object's contacts + * Fetch the object's downtimes * * @return $this */ - public function fetchContacts() + public function fetchDowntimes() { - if ($this->backend->is('livestatus')) { - $this->contacts = array(); - return $this; - } - - $contacts = $this->backend->select()->from('contact', array( - 'contact_name', - 'contact_alias', - 'contact_email', - 'contact_pager', - )); + $downtimes = $this->backend->select()->from('downtime', array( + 'id' => 'downtime_internal_id', + 'objecttype' => 'object_type', + 'comment' => 'downtime_comment', + 'author_name' => 'downtime_author_name', + 'start' => 'downtime_start', + 'scheduled_start' => 'downtime_scheduled_start', + 'scheduled_end' => 'downtime_scheduled_end', + 'end' => 'downtime_end', + 'duration' => 'downtime_duration', + 'is_flexible' => 'downtime_is_flexible', + 'is_fixed' => 'downtime_is_fixed', + 'is_in_effect' => 'downtime_is_in_effect', + 'entry_time' => 'downtime_entry_time' + )) + ->where('object_type', $this->type) + ->order('downtime_is_in_effect', 'DESC') + ->order('downtime_scheduled_start', 'ASC'); if ($this->type === self::TYPE_SERVICE) { - $contacts + $downtimes ->where('service_host_name', $this->host_name) ->where('service_description', $this->service_description); } else { - $contacts->where('host_name', $this->host_name); + $downtimes + ->where('host_name', $this->host_name); } - $this->contacts = $contacts->applyFilter($this->getFilter())->getQuery()->fetchAll(); - return $this; - } - - /** - * Fetch the object's service groups - * - * @return $this - */ - public function fetchServicegroups() - { - $this->servicegroups = $this->backend->select() - ->from('servicegroup', array('servicegroup_name', 'servicegroup_alias')) - ->where('host_name', $this->host_name) - ->where('service_description', $this->service_description) - ->applyFilter($this->getFilter()) - ->fetchPairs(); - return $this; - } - - /** - * Fetch the object's contact groups - * - * @return $this - */ - public function fetchContactgroups() - { - if ($this->backend->is('livestatus')) { - $this->contactgroups = array(); - return $this; - } - - $contactsGroups = $this->backend->select()->from('contactgroup', array( - 'contactgroup_name', - 'contactgroup_alias' - )); - if ($this->type === self::TYPE_SERVICE) { - $contactsGroups - ->where('service_host_name', $this->host_name) - ->where('service_description', $this->service_description); - } else { - $contactsGroups->where('host_name', $this->host_name); - } - $this->contactgroups = $contactsGroups->applyFilter($this->getFilter())->getQuery()->fetchAll(); + $this->downtimes = $downtimes->getQuery()->fetchAll(); return $this; } @@ -477,6 +454,37 @@ abstract class MonitoredObject implements Filterable return $this; } + /** + * Fetch the object's host groups + * + * @return $this + */ + public function fetchHostgroups() + { + $this->hostgroups = $this->backend->select() + ->from('hostgroup', array('hostgroup_name', 'hostgroup_alias')) + ->where('host_name', $this->host_name) + ->applyFilter($this->getFilter()) + ->fetchPairs(); + return $this; + } + + /** + * Fetch the object's service groups + * + * @return $this + */ + public function fetchServicegroups() + { + $this->servicegroups = $this->backend->select() + ->from('servicegroup', array('servicegroup_name', 'servicegroup_alias')) + ->where('host_name', $this->host_name) + ->where('service_description', $this->service_description) + ->applyFilter($this->getFilter()) + ->fetchPairs(); + return $this; + } + /** * Fetch stats * @@ -504,84 +512,6 @@ abstract class MonitoredObject implements Filterable return $this; } - /** - * Fetch all available data of the object - * - * @return $this - */ - public function populate() - { - $this - ->fetchComments() - ->fetchContacts() - ->fetchContactgroups() - ->fetchCustomvars() - ->fetchDowntimes(); - - // Call fetchHostgroups or fetchServicegroups depending on the object's type - $fetchGroups = 'fetch' . ucfirst($this->type) . 'groups'; - $this->$fetchGroups(); - - return $this; - } - - public function __get($name) - { - if (property_exists($this->properties, $name)) { - return $this->properties->$name; - } elseif (property_exists($this, $name) && $this->$name !== null) { - return $this->$name; - } elseif (property_exists($this, $name)) { - $fetchMethod = 'fetch' . ucfirst($name); - $this->$fetchMethod(); - return $this->$name; - } - if (substr($name, 0, strlen($this->prefix)) !== $this->prefix) { - $prefixedName = $this->prefix . strtolower($name); - if (property_exists($this->properties, $prefixedName)) { - return $this->properties->$prefixedName; - } - } - throw new InvalidPropertyException('Can\'t access property \'%s\'. Property does not exist.', $name); - } - - public function __isset($name) - { - if (property_exists($this->properties, $name)) { - return isset($this->properties->$name); - } elseif (property_exists($this, $name)) { - return isset($this->$name); - } - return false; - } - - /** - * @deprecated - */ - public static function fromParams(UrlParams $params) - { - if ($params->has('service') && $params->has('host')) { - return new Service(MonitoringBackend::instance(), $params->get('host'), $params->get('service')); - } elseif ($params->has('host')) { - return new Host(MonitoringBackend::instance(), $params->get('host')); - } - return null; - } - - /** - * The notes for this monitored object - * - * @return string The notes as a string - */ - public abstract function getNotes(); - - /** - * Get all note urls configured for this monitored object - * - * @return array All note urls as a string - */ - public abstract function getNotesUrls(); - /** * Get all action urls configured for this monitored object * @@ -595,17 +525,13 @@ abstract class MonitoredObject implements Filterable } /** - * Resolve macros in all given strings in the current object context + * Get the type of the object * - * @param array $strs An array of urls as string - * @return type + * @return string */ - protected function resolveAllStrings(array $strs) + public function getType() { - foreach ($strs as $i => $str) { - $strs[$i] = Macro::resolveMacros($str, $this); - } - return $strs; + return $this->type; } /** @@ -636,4 +562,95 @@ abstract class MonitoredObject implements Filterable } return $links; } + + /** + * Fetch all available data of the object + * + * @return $this + */ + public function populate() + { + $this + ->fetchComments() + ->fetchContacts() + ->fetchContactgroups() + ->fetchCustomvars() + ->fetchDowntimes(); + + // Call fetchHostgroups or fetchServicegroups depending on the object's type + $fetchGroups = 'fetch' . ucfirst($this->type) . 'groups'; + $this->$fetchGroups(); + + return $this; + } + + /** + * Resolve macros in all given strings in the current object context + * + * @param array $strs An array of urls as string + * @return type + */ + protected function resolveAllStrings(array $strs) + { + foreach ($strs as $i => $str) { + $strs[$i] = Macro::resolveMacros($str, $this); + } + return $strs; + } + + /** + * Set the object's properties + * + * @param object $properties + * + * @return $this + */ + public function setProperties($properties) + { + $this->properties = (object) $properties; + return $this; + } + + public function __isset($name) + { + if (property_exists($this->properties, $name)) { + return isset($this->properties->$name); + } elseif (property_exists($this, $name)) { + return isset($this->$name); + } + return false; + } + + public function __get($name) + { + if (property_exists($this->properties, $name)) { + return $this->properties->$name; + } elseif (property_exists($this, $name) && $this->$name !== null) { + return $this->$name; + } elseif (property_exists($this, $name)) { + $fetchMethod = 'fetch' . ucfirst($name); + $this->$fetchMethod(); + return $this->$name; + } + if (substr($name, 0, strlen($this->prefix)) !== $this->prefix) { + $prefixedName = $this->prefix . strtolower($name); + if (property_exists($this->properties, $prefixedName)) { + return $this->properties->$prefixedName; + } + } + throw new InvalidPropertyException('Can\'t access property \'%s\'. Property does not exist.', $name); + } + + /** + * @deprecated + */ + public static function fromParams(UrlParams $params) + { + if ($params->has('service') && $params->has('host')) { + return new Service(MonitoringBackend::instance(), $params->get('host'), $params->get('service')); + } elseif ($params->has('host')) { + return new Host(MonitoringBackend::instance(), $params->get('host')); + } + return null; + } } From 54a45ff338a1d731a1660bdd3963e25e24500418 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 14:08:43 +0200 Subject: [PATCH 251/280] monitoring: Fix PHPDoc of MonitoredObject::resolveAllStrings() --- .../monitoring/library/Monitoring/Object/MonitoredObject.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 469b988dc..72511f765 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -588,7 +588,8 @@ abstract class MonitoredObject implements Filterable * Resolve macros in all given strings in the current object context * * @param array $strs An array of urls as string - * @return type + * + * @return array */ protected function resolveAllStrings(array $strs) { From 6a684a97df07b76b31296cb8c0fc0a388948e1ef Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 14:09:16 +0200 Subject: [PATCH 252/280] monitoring: Fix missing parameter initialization in MonitoredObject::parseAttributeUrls() --- modules/monitoring/library/Monitoring/Object/MonitoredObject.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 72511f765..1def5b6e7 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -550,6 +550,7 @@ abstract class MonitoredObject implements Filterable if (empty($urlString)) { return array(); } + $links = array(); if (strpos($urlString, "' ") === false) { $links[] = $urlString; } else { From ddde37e225dbc270f2b99b6c5bf3daee8bb4ab1a Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 3 Sep 2015 16:08:55 +0200 Subject: [PATCH 253/280] Remove acknowledgement view temporarily Implementation of acknowledgement view temporarily delayed until v2.1.0. refs #10032 --- .../controllers/AcknowledgementController.php | 77 ------------- .../views/scripts/acknowledgement/index.phtml | 104 ------------------ modules/monitoring/configuration.php | 4 - .../Ido/Query/AcknowledgementQuery.php | 80 -------------- .../Monitoring/DataView/Acknowledgement.php | 52 --------- 5 files changed, 317 deletions(-) delete mode 100644 modules/monitoring/application/controllers/AcknowledgementController.php delete mode 100644 modules/monitoring/application/views/scripts/acknowledgement/index.phtml delete mode 100644 modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php delete mode 100644 modules/monitoring/library/Monitoring/DataView/Acknowledgement.php diff --git a/modules/monitoring/application/controllers/AcknowledgementController.php b/modules/monitoring/application/controllers/AcknowledgementController.php deleted file mode 100644 index 684111fde..000000000 --- a/modules/monitoring/application/controllers/AcknowledgementController.php +++ /dev/null @@ -1,77 +0,0 @@ -getTabs()->add( - 'acknowledgement', - array( - 'title' => $this->translate( - 'Show acknowledgements' - ), - 'label' => $this->translate('Acknowledgements'), - 'url' => Url::fromRequest() - ) - )->extend(new DashboardAction())->activate('acknowledgement'); - $this->view->title = $this->translate('Acknowledgement'); - $this->setAutorefreshInterval(15); - $query = $this->backend->select()->from( - 'acknowledgement', - array( - 'acknowledgement_id', - 'instance_id', - 'entry_time', - 'object_id', - 'state', - 'author_name', - 'comment_data', - 'is_sticky', - 'persistent_comment', - 'acknowledgement_id', - 'notify_contacts', - 'end_time', - 'endpoint_object_id', - 'acknowledgement_is_service', - 'service', - 'host' - ) - ); - - $this->applyRestriction('monitoring/filter/objects', $query); - $this->filterQuery($query); - $this->view->acknowledgements = $query; - - $this->setupLimitControl() - ->setupPaginationControl($this->view->acknowledgements) - ->setupSortControl(array( - 'entry_time' => $this->translate('Entry Time'), - 'end_time' => $this->translate('End Time'), - 'state' => $this->translate('Object State'), - 'author_name' => $this->translate('Author Name') - ), $this->view->acknowledgements); - } - - /** - * Apply filters on a DataView - * - * @param DataView $dataView The DataView to apply filters on - * - * @return DataView $dataView - */ - protected function filterQuery(DataView $dataView) - { - $this->setupFilterControl($dataView); - $this->handleFormatRequest($dataView); - return $dataView; - } -} diff --git a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml b/modules/monitoring/application/views/scripts/acknowledgement/index.phtml deleted file mode 100644 index 728b83f5b..000000000 --- a/modules/monitoring/application/views/scripts/acknowledgement/index.phtml +++ /dev/null @@ -1,104 +0,0 @@ - - -compact): ?> -
- tabs; ?> -
- render('list/components/selectioninfo.phtml'); ?> -
-

translate('Acknowledgements') ?>

- sortBox; ?> - limiter; ?> - paginator; ?> - filterEditor; ?> -
- -
- - - - acknowledgement_is_service ? - Service::getStateText($acknowledgement->state) : Host::getStateText($acknowledgement->state); - ?> - - - - - - - -
- icon('ok') ?> - timeAgo($acknowledgement->entry_time, $this->compact); ?> -
- translate( - 'State was %s.', - 'Describes the past host or service state when an acknowledgement was set.' - ), $state) ?> -
- acknowledgement_is_service): ?> - icon('service', $this->translate('Service Acknowledgement')) ?> - qlink( - $this->escape($acknowledgement->host) . ': ' . $this->escape($acknowledgement->service), - 'monitoring/service/show', - array( - 'service' => $acknowledgement->service, - 'host' => $acknowledgement->host - ), - array( - 'title' => sprintf( - $this->translate( - 'Show detailed information for this acknowledgement about service %s on host %s' - ), - $acknowledgement->service, - $acknowledgement->host - ), - 'class' => 'rowaction' - ) - ); ?> - - icon('host', $this->translate('Host Acknowledgement')) ?> - qlink( - $this->escape($acknowledgement->host), - 'monitoring/host/show', - array( - 'host' => $acknowledgement->host - ), - array( - 'title' => sprintf( - $this->translate('Show detailed information for this acknowledgement on host %s'), - $acknowledgement->host - ), - 'class' => 'rowaction' - ) - ); ?> - - -
- icon('comment_data', $this->translate('Comment')); ?> - author_name) ? '[' . $this->escape($acknowledgement->author_name) . '] ' : ''; ?> - escape($acknowledgement->comment_data); ?> - -
- is_sticky ? $this->icon( - 'attach', - $this->translate('Sticky, all notifications are disabled until the host or services recovers' - )) : ''; ?> - notify_contacts ? $this->icon( - 'bell', - $this->translate('Contacts are being notified about this acknowledgement.' - )) : ''; ?> - end_time ? sprintf( - $this->translate('Expires %s.'), - '' . $this->timeUntil($acknowledgement->end_time) . '' - ) : $this->translate('Does not expire.'); ?> -
- - - translate('No comments found matching the filter'); ?> - -
diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 6172fa39f..c68ef6522 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -180,10 +180,6 @@ $section->add($this->translate('Downtimes'), array( 'url' => 'monitoring/list/downtimes', 'priority' => 80 )); -$section->add($this->translate('Acknowledgements'), array( - 'url' => 'monitoring/acknowledgement', - 'priority' => 90 -)); /* * History Section diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php deleted file mode 100644 index ac46fd36a..000000000 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/AcknowledgementQuery.php +++ /dev/null @@ -1,80 +0,0 @@ - array( - 'acknowledgement_id' => 'a.acknowledgement_id', - 'instance_id' => 'a.instance_id', - 'entry_time' => 'UNIX_TIMESTAMP(a.entry_time)', - 'object_id' => 'a.object_id', - 'state' => 'a.state', - 'author_name' => 'a.author_name', - 'comment_data' => 'a.comment_data', - 'is_sticky' => 'a.is_sticky', - 'persistent_comment' => 'a.persistent_comment', - 'acknowledgement_id' => 'a.acknowledgement_id', - 'notify_contacts' => 'a.notify_contacts', - 'end_time' => 'UNIX_TIMESTAMP(a.end_time)', - 'endpoint_object_id' => 'a.endpoint_object_id' - ), - 'objects' => array( - 'acknowledgement_is_service' => '(CASE WHEN o.objecttype_id = 2 THEN 1 ELSE 0 END)', - 'host' => 'o.name1', - 'service' => 'o.name2' - ) - ); - - /** - * @var Zend_Db_Select - */ - protected $acknowledgementQuery; - - /** - * {@inheritdoc} - */ - protected function joinBaseTables() - { - $this->acknowledgementQuery = $this->db->select(); - $this->select->from( - array('o' => $this->prefix . 'objects'), - array() - ); - $this->select->joinLeft( - array('hs' => $this->prefix . 'hoststatus'), - 'hs.host_object_id = o.object_id AND o.is_active = 1', - array() - ); - $this->select->joinLeft( - array('ss' => $this->prefix . 'servicestatus'), - 'ss.service_object_id = o.object_id AND o.is_active = 1', - array() - ); - $ackTable = $this->prefix . 'acknowledgements'; - $subQuery = '(SELECT MAX(acknowledgement_id) FROM ' . $ackTable . ' WHERE object_id = a.object_id)'; - $this->select->join( - array('a' => $ackTable), - 'o.object_id = a.object_id ' . - 'AND ((o.objecttype_id = 2 AND ss.problem_has_been_acknowledged = 1 AND ss.acknowledgement_type = 2) ' . - ' OR (o.objecttype_id = 1 AND hs.problem_has_been_acknowledged = 1 AND hs.acknowledgement_type = 2)) ' . - 'AND o.is_active = 1 AND a.acknowledgement_id = ' . $subQuery, - array() - ); - - $this->joinedVirtualTables['objects'] = true; - $this->joinedVirtualTables['acknowledgements'] = true; - $this->joinedVirtualTables['hoststatus'] = true; - $this->joinedVirtualTables['servicestatus'] = true; - } -} diff --git a/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php b/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php deleted file mode 100644 index fb3bb85df..000000000 --- a/modules/monitoring/library/Monitoring/DataView/Acknowledgement.php +++ /dev/null @@ -1,52 +0,0 @@ - Date: Thu, 3 Sep 2015 16:20:29 +0200 Subject: [PATCH 254/280] lib: Fix PHPDoc of DbConnection::getDbApdater() --- library/Icinga/Data/Db/DbConnection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Data/Db/DbConnection.php b/library/Icinga/Data/Db/DbConnection.php index ba7a3c6f0..1e39ebf3f 100644 --- a/library/Icinga/Data/Db/DbConnection.php +++ b/library/Icinga/Data/Db/DbConnection.php @@ -112,7 +112,7 @@ class DbConnection implements Selectable, Extensible, Updatable, Reducible, Insp /** * Getter for the Zend_Db_Adapter * - * @return Zend_Db_Adapter_Abstract + * @return \Zend_Db_Adapter_Abstract */ public function getDbAdapter() { From 620c1fa6e0cbaa6f841cf3650cd0e2536d40cbcc Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 16:21:01 +0200 Subject: [PATCH 255/280] monitoring: Fix alphabetical order of query columns in the CommentQuery --- .../library/Monitoring/Backend/Ido/Query/CommentQuery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentQuery.php index ea2a656fa..337021792 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/CommentQuery.php @@ -25,8 +25,8 @@ class CommentQuery extends IdoQuery 'comment_is_persistent' => 'c.comment_is_persistent', 'comment_timestamp' => 'c.comment_timestamp', 'comment_type' => 'c.comment_type', - 'object_type' => 'c.object_type', - 'instance_name' => 'c.instance_name' + 'instance_name' => 'c.instance_name', + 'object_type' => 'c.object_type' ), 'hosts' => array( 'host_display_name' => 'c.host_display_name', From df72825617bd2c99f919e84bf49345a52fd4ea06 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 16:23:04 +0200 Subject: [PATCH 256/280] monitoring/host: Fetch acknowledgement type refs #9674 --- modules/monitoring/library/Monitoring/Object/Host.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring/library/Monitoring/Object/Host.php b/modules/monitoring/library/Monitoring/Object/Host.php index 8a8c032b5..6fe058972 100644 --- a/modules/monitoring/library/Monitoring/Object/Host.php +++ b/modules/monitoring/library/Monitoring/Object/Host.php @@ -93,6 +93,7 @@ class Host extends MonitoredObject 'host_icon_image', 'host_icon_image_alt', 'host_acknowledged', + 'host_acknowledgement_type', 'host_action_url', 'host_active_checks_enabled', 'host_active_checks_enabled_changed', From a14b1ce8f7539bff38f436af8cb87bc5e9588575 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 16:23:27 +0200 Subject: [PATCH 257/280] monitoring/service: Fetch acknowledgement type refs #9674 --- modules/monitoring/library/Monitoring/Object/Service.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring/library/Monitoring/Object/Service.php b/modules/monitoring/library/Monitoring/Object/Service.php index 72341306f..72cd1c1db 100644 --- a/modules/monitoring/library/Monitoring/Object/Service.php +++ b/modules/monitoring/library/Monitoring/Object/Service.php @@ -124,6 +124,7 @@ class Service extends MonitoredObject 'service_icon_image', 'service_icon_image_alt', 'service_acknowledged', + 'service_acknowledgement_type', 'service_action_url', 'service_active_checks_enabled', 'service_active_checks_enabled_changed', From 8a1592fd126d25c6c8c501c09d1825a60ad42a82 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 16:27:50 +0200 Subject: [PATCH 258/280] monitoring/lib: Add Acknowledgement object refs #9674 --- .../Monitoring/Object/Acknowledgement.php | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 modules/monitoring/library/Monitoring/Object/Acknowledgement.php diff --git a/modules/monitoring/library/Monitoring/Object/Acknowledgement.php b/modules/monitoring/library/Monitoring/Object/Acknowledgement.php new file mode 100644 index 000000000..de405823b --- /dev/null +++ b/modules/monitoring/library/Monitoring/Object/Acknowledgement.php @@ -0,0 +1,215 @@ +setProperties($properties); + } + } + + /** + * Get the author of the acknowledgement + * + * @return string + */ + public function getAuthor() + { + return $this->author; + } + + /** + * Set the author of the acknowledgement + * + * @param string $author + * + * @return $this + */ + public function setAuthor($author) + { + $this->author = (string) $author; + return $this; + } + + /** + * Get the comment of the acknowledgement + * + * @return string + */ + public function getComment() + { + return $this->comment; + } + + /** + * Set the comment of the acknowledgement + * + * @param string $comment + * + * @return $this + */ + public function setComment($comment) + { + $this->comment = (string) $comment; + + return $this; + } + + /** + * Get the entry time of the acknowledgement + * + * @return int + */ + public function getEntryTime() + { + return $this->entryTime; + } + + /** + * Set the entry time of the acknowledgement + * + * @param int $entryTime + * + * @return $this + */ + public function setEntryTime($entryTime) + { + $this->entryTime = (int) $entryTime; + + return $this; + } + + /** + * Get the expiration time of the acknowledgement + * + * @return int|null + */ + public function getExpirationTime() + { + return $this->expirationTime; + } + + /** + * Set the expiration time of the acknowledgement + * + * @param int|null $expirationTime Unix timestamp + * + * @return $this + */ + public function setExpirationTime($expirationTime = null) + { + $this->expirationTime = $expirationTime !== null ? (int) $expirationTime : null; + + return $this; + } + + /** + * Get whether the acknowledgement is sticky + * + * @return bool + */ + public function getSticky() + { + return $this->sticky; + } + + /** + * Set whether the acknowledgement is sticky + * + * @param bool $sticky + * + * @return $this + */ + public function setSticky($sticky = true) + { + $this->sticky = (bool) $sticky; + return $this; + } + + /** + * Get whether the acknowledgement expires + * + * @return bool + */ + public function expires() + { + return $this->expirationTime !== null; + } + + /** + * Set the properties of the acknowledgement + * + * @param array|object|Traversable $properties + * + * @return $this + * @throws InvalidArgumentException If the type of the given properties is invalid + */ + public function setProperties($properties) + { + if (! is_array($properties) && ! is_object($properties) && ! $properties instanceof Traversable) { + throw new InvalidArgumentException('Properties must be either an array or an instance of Traversable'); + } + foreach ($properties as $name => $value) { + $setter = 'set' . ucfirst(String::cname($name)); + if (method_exists($this, $setter)) { + $this->$setter($value); + } + } + return $this; + } +} From f0e8340fbdbbeb0d9e95875a3f23a48717a8fbc1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 16:38:46 +0200 Subject: [PATCH 259/280] monitoring/detail: Don't display the comment of the active acknowledgement in the comment list refs #9674 --- .../Monitoring/Object/MonitoredObject.php | 87 +++++++++++++++---- 1 file changed, 70 insertions(+), 17 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 1def5b6e7..1bd8431a2 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -26,6 +26,13 @@ abstract class MonitoredObject implements Filterable */ const TYPE_SERVICE = 'service'; + /** + * Acknowledgement of the host or service if any + * + * @var object + */ + protected $acknowledgement; + /** * Backend to fetch object information from * @@ -224,13 +231,15 @@ abstract class MonitoredObject implements Filterable */ public function fetch() { - $this->properties = $this->getDataView()->applyFilter($this->getFilter())->getQuery()->fetchRow(); - if ($this->properties === false) { + $properties = $this->getDataView()->applyFilter($this->getFilter())->getQuery()->fetchRow(); + + if ($properties === false) { return false; } - if (isset($this->properties->host_contacts)) { + + if (isset($properties->host_contacts)) { $this->contacts = array(); - foreach (preg_split('~,~', $this->properties->host_contacts) as $contact) { + foreach (preg_split('~,~', $properties->host_contacts) as $contact) { $this->contacts[] = (object) array( 'contact_name' => $contact, 'contact_alias' => $contact, @@ -239,9 +248,24 @@ abstract class MonitoredObject implements Filterable ); } } + + $this->properties = $properties; + return true; } + /** + * Fetch the object's acknowledgement + */ + public function fetchAcknowledgement() + { + if ($this->comments === null) { + $this->fetchComments(); + } + + return $this; + } + /** * Fetch the object's comments * @@ -253,23 +277,52 @@ abstract class MonitoredObject implements Filterable $this->comments = array(); return $this; } - $comments = $this->backend->select()->from('comment', array( - 'id' => 'comment_internal_id', - 'timestamp' => 'comment_timestamp', - 'author' => 'comment_author_name', - 'comment' => 'comment_data', - 'type' => 'comment_type', - )) - ->where('comment_type', array('comment')) - ->where('object_type', $this->type); + + $commentsView = $this->backend->select()->from('comment', array( + 'author' => 'comment_author_name', + 'comment' => 'comment_data', + 'expiration' => 'comment_expiration', + 'id' => 'comment_internal_id', + 'timestamp' => 'comment_timestamp', + 'type' => 'comment_type' + )); if ($this->type === self::TYPE_SERVICE) { - $comments + $commentsView ->where('service_host_name', $this->host_name) ->where('service_description', $this->service_description); } else { - $comments->where('host_name', $this->host_name); + $commentsView->where('host_name', $this->host_name); } - $this->comments = $comments->getQuery()->fetchAll(); + $commentsView + ->where('comment_type', array('ack', 'comment')) + ->where('object_type', $this->type); + + $comments = $commentsView->fetchAll(); + + if ((bool) $this->properties->{$this->prefix . 'acknowledged'}) { + $ackCommentIdx = null; + + foreach ($comments as $i => $comment) { + if ($comment->type === 'ack') { + $this->acknowledgement = new Acknowledgement(array( + 'author' => $comment->author, + 'comment' => $comment->comment, + 'entry_time' => $comment->timestamp, + 'expiration_time' => $comment->expiration, + 'sticky' => (int) $this->properties->{$this->prefix . 'acknowledgement_type'} === 2 + )); + $ackCommentIdx = $i; + break; + } + } + + if ($ackCommentIdx !== null) { + unset($comments[$ackCommentIdx]); + } + } + + $this->comments = $comments; + return $this; } @@ -573,8 +626,8 @@ abstract class MonitoredObject implements Filterable { $this ->fetchComments() - ->fetchContacts() ->fetchContactgroups() + ->fetchContacts() ->fetchCustomvars() ->fetchDowntimes(); From 2da49ad697a7d45a2d06b98481b4b08fe8630f42 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 16:39:56 +0200 Subject: [PATCH 260/280] monitoring/detail: Display the comment of the ack next to the ack refs #9674 --- .../show/components/acknowledgement.phtml | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml index e7b79354d..0743b6103 100644 --- a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml +++ b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml @@ -8,14 +8,32 @@ if (in_array((int) $object->state, array(0, 99))) { } if ($object->acknowledged): ?> + acknowledgement; + /** @var \Icinga\Module\Monitoring\Object\Acknowledgement $acknowledgement */ + ?> translate('Acknowledged') ?> - +
    +
  • +

    + translate('%s acknowledged %s'), + '' . $this->escape($acknowledgement->getAuthor()) . '', + $this->timeAgo($acknowledgement->getEntryTime()) + ) ?> + +

    +

    + (translate('Comment') ?>): + createTicketLinks($acknowledgement->getComment()), false) ?> +

    +
  • +
From c19e850df356a8c3cde8ed8ef3c560001828bc06 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 16:57:21 +0200 Subject: [PATCH 261/280] Fix erroneous CSS statements --- modules/doc/public/css/module.less | 1 - modules/monitoring/public/css/module.less | 2 +- public/css/icinga/controls.less | 1 - public/css/icinga/defaults.less | 4 ++-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/doc/public/css/module.less b/modules/doc/public/css/module.less index 2bb5a44ff..d935f6a3d 100644 --- a/modules/doc/public/css/module.less +++ b/modules/doc/public/css/module.less @@ -85,7 +85,6 @@ pre > code { background-color: #666; display: block; padding: 1em; - .box-shadow; } ul.toc { diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 5c52ebacd..a239862c3 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -177,7 +177,7 @@ table.avp { } a, button.link-like { - color: @mainLayoutColor; + color: @colorMainForeground; } .go-ahead { diff --git a/public/css/icinga/controls.less b/public/css/icinga/controls.less index 06178146b..953a1bcb6 100644 --- a/public/css/icinga/controls.less +++ b/public/css/icinga/controls.less @@ -1,7 +1,6 @@ /*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ div.sort-control { - .dontprint; float: right; label { diff --git a/public/css/icinga/defaults.less b/public/css/icinga/defaults.less index 5b5a0f805..aacb1a30b 100644 --- a/public/css/icinga/defaults.less +++ b/public/css/icinga/defaults.less @@ -69,7 +69,7 @@ body { } a { - @colorMainLink; + color: @colorMainLink; text-decoration: none; &:hover { @@ -81,7 +81,7 @@ h1, h2, h3, h4, h5, h6 { font-size: 1em; padding: 0.3em 0em; margin: 0.7em 0 0.5em 0; - color: @textColor; + color: @colorMainForeground; border-bottom: 1px dotted #aaa; a { From 5651392ce712fc68a1274ea02320d1274db18cc0 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 17:03:33 +0200 Subject: [PATCH 262/280] monitoring/config: Rename URL paramter backend to backend-name Else the parameter conflicts w/ the module-wide paramter backend for choosing the data source. --- .../monitoring/application/controllers/ConfigController.php | 4 ++-- .../monitoring/application/views/scripts/config/index.phtml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index 8c5322f4d..ab3e029d4 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -34,7 +34,7 @@ class ConfigController extends Controller */ public function editbackendAction() { - $backendName = $this->params->getRequired('backend'); + $backendName = $this->params->getRequired('backend-name'); $form = new BackendConfigForm(); $form->setRedirectUrl('monitoring/config'); @@ -120,7 +120,7 @@ class ConfigController extends Controller */ public function removebackendAction() { - $backendName = $this->params->getRequired('backend'); + $backendName = $this->params->getRequired('backend-name'); $backendForm = new BackendConfigForm(); $backendForm->setIniConfig($this->Config('backends')); diff --git a/modules/monitoring/application/views/scripts/config/index.phtml b/modules/monitoring/application/views/scripts/config/index.phtml index d0e75c0ff..8f5e49427 100644 --- a/modules/monitoring/application/views/scripts/config/index.phtml +++ b/modules/monitoring/application/views/scripts/config/index.phtml @@ -21,7 +21,7 @@ qlink( $backendName, '/monitoring/config/editbackend', - array('backend' => $backendName), + array('backend-name' => $backendName), array( 'icon' => 'edit', 'title' => sprintf($this->translate('Edit monitoring backend %s'), $backendName) @@ -36,7 +36,7 @@ qlink( '', '/monitoring/config/removebackend', - array('backend' => $backendName), + array('backend-name' => $backendName), array( 'icon' => 'trash', 'title' => sprintf($this->translate('Remove monitoring backend %s'), $backendName) From 70a6157631bb36a8a0d1afa54f50abd5495bc4f9 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 17:11:56 +0200 Subject: [PATCH 263/280] lib/ldap: Call getConnection before bind Looks more natural --- library/Icinga/Protocol/Ldap/LdapConnection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index 13036f847..3b090d9c7 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -538,9 +538,9 @@ class LdapConnection implements Selectable, Inspectable */ public function hasDn($dn) { + $ds = $this->getConnection(); $this->bind(); - $ds = $this->getConnection(); $result = ldap_read($ds, $dn, '(objectClass=*)', array('objectClass')); return ldap_count_entries($ds, $result) > 0; } @@ -556,9 +556,9 @@ class LdapConnection implements Selectable, Inspectable */ public function deleteRecursively($dn) { + $ds = $this->getConnection(); $this->bind(); - $ds = $this->getConnection(); $result = @ldap_list($ds, $dn, '(objectClass=*)', array('objectClass')); if ($result === false) { if (ldap_errno($ds) === self::LDAP_NO_SUCH_OBJECT) { @@ -591,9 +591,9 @@ class LdapConnection implements Selectable, Inspectable */ public function deleteDn($dn) { + $ds = $this->getConnection(); $this->bind(); - $ds = $this->getConnection(); $result = @ldap_delete($ds, $dn); if ($result === false) { if (ldap_errno($ds) === self::LDAP_NO_SUCH_OBJECT) { From 00e5bbe91c88ce0d5f52936ebdeda98482c8cbda Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 17:47:54 +0200 Subject: [PATCH 264/280] lib/ldap: Fix LdapConnection::encodeSortRules() refs #9364 --- .../Icinga/Protocol/Ldap/LdapConnection.php | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index 3b090d9c7..a6a587a8f 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -910,28 +910,29 @@ class LdapConnection implements Selectable, Inspectable * * @param array $sortRules * - * @return string - * @throws ProgrammingError - * - * @todo Produces an invalid stream, obviously + * @return string Binary representation of the octet stream */ protected function encodeSortRules(array $sortRules) { - if (count($sortRules) > 127) { - throw new ProgrammingError( - 'Cannot encode more than 127 sort rules. Only length octets in short form are supported' - ); - } + // TODO(el): Indefinite form of length octet + $sequenceOf = ''; - $seq = '30' . str_pad(dechex(count($sortRules)), 2, '0', STR_PAD_LEFT); foreach ($sortRules as $rule) { - $hexdAttribute = unpack('H*', $rule[0]); - $seq .= '3002' - . '04' . str_pad(dechex(strlen($rule[0])), 2, '0', STR_PAD_LEFT) . $hexdAttribute[1] - . '0101' . ($rule[1] === Sortable::SORT_DESC ? 'ff' : '00'); - } + $reversed = '0101' . ($rule[1] === Sortable::SORT_DESC ? 'ff' : '00'); - return $seq; + $attributeType = unpack('H*', $rule[0]); + $attributeType = $attributeType[1]; + $attributeType = '04' . str_pad(dechex(strlen($attributeType) / 2), 2, '0', STR_PAD_LEFT) . $attributeType; + $sequence = '30' + . str_pad(dechex(strlen($attributeType . $reversed) / 2), 2, '0', STR_PAD_LEFT) + . $attributeType + . $reversed; + $sequenceOf .= $sequence; + } + $sequenceOf = '30' + . str_pad(dechex(strlen($sequenceOf) / 2), 2, '0', STR_PAD_LEFT) + . $sequenceOf; + return hex2bin($sequenceOf); } /** From 9e11d539fd31a01cbe81ce00febc173448a88022 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 17:48:53 +0200 Subject: [PATCH 265/280] lib/ldap: Enable server side sorting if supported by the server refs #9364 --- library/Icinga/Protocol/Ldap/LdapConnection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index a6a587a8f..32f8b1cea 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -646,7 +646,7 @@ class LdapConnection implements Selectable, Inspectable $ds = $this->getConnection(); - $serverSorting = false;//$this->capabilities->hasOid(Capability::LDAP_SERVER_SORT_OID); + $serverSorting = $this->capabilities->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID); if ($serverSorting && $query->hasOrder()) { ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array( array( @@ -741,7 +741,7 @@ class LdapConnection implements Selectable, Inspectable $ds = $this->getConnection(); - $serverSorting = false;//$this->capabilities->hasOid(Capability::LDAP_SERVER_SORT_OID); + $serverSorting = $this->capabilities->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID); if ($serverSorting && $query->hasOrder()) { ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array( array( From fa25ce7f2f31af03d86c3c6a049785d88c2e746d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 3 Sep 2015 17:50:24 +0200 Subject: [PATCH 266/280] lib/ldap: Set server side sorting after calling ldap_control_paged_result() ldap_control_paged_result() seems to override already set server controls. refs #9364 --- .../Icinga/Protocol/Ldap/LdapConnection.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index 32f8b1cea..5f1a7b728 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -742,14 +742,7 @@ class LdapConnection implements Selectable, Inspectable $ds = $this->getConnection(); $serverSorting = $this->capabilities->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID); - if ($serverSorting && $query->hasOrder()) { - ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array( - array( - 'oid' => LdapCapabilities::LDAP_SERVER_SORT_OID, - 'value' => $this->encodeSortRules($query->getOrder()) - ) - )); - } elseif ($query->hasOrder()) { + if (! $serverSorting && $query->hasOrder()) { foreach ($query->getOrder() as $rule) { if (! in_array($rule[0], $fields)) { $fields[] = $rule[0]; @@ -765,6 +758,15 @@ class LdapConnection implements Selectable, Inspectable // server to return results even if the paged search request cannot be satisfied ldap_control_paged_result($ds, $pageSize, false, $cookie); + if ($serverSorting) { + ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array( + array( + 'oid' => LdapCapabilities::LDAP_SERVER_SORT_OID, + 'value' => $this->encodeSortRules($query->getOrder()) + ) + )); + } + $results = @ldap_search( $ds, $base, From 9b22b245619b804f3e3543029f09cea0dc5b716f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 4 Sep 2015 09:57:04 +0200 Subject: [PATCH 267/280] lib/ldap: Use ldap_count_entries for counting the result set --- .../Icinga/Protocol/Ldap/LdapConnection.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index 5f1a7b728..3d30f9852 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -358,10 +358,30 @@ class LdapConnection implements Selectable, Inspectable */ public function count(LdapQuery $query) { + $ds = $this->getConnection(); $this->bind(); - $res = $this->runQuery($query, array()); - return count($res); + $results = @ldap_search( + $ds, + $query->getBase() ?: $this->getDn(), + (string) $query, + array('dn'), + 0, + 0 + ); + + if ($results === false) { + if (ldap_errno($ds) !== self::LDAP_NO_SUCH_OBJECT) { + throw new LdapException( + 'LDAP count query "%s" (base %s) failed: %s', + (string) $query, + $query->getBase() ?: $this->getDn(), + ldap_error($ds) + ); + } + } + + return ldap_count_entries($ds, $results); } /** From 297a4333cd731e92d9781ca260d7ec00512a18fa Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 4 Sep 2015 11:58:11 +0200 Subject: [PATCH 268/280] lib/ldap: Use the indefinite form of the length octets for encoded sort rules where appropriate I guess we may never need this, but hey :) refs #9364 --- .../Icinga/Protocol/Ldap/LdapConnection.php | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index 3d30f9852..57b1fe90d 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -936,24 +936,44 @@ class LdapConnection implements Selectable, Inspectable */ protected function encodeSortRules(array $sortRules) { - // TODO(el): Indefinite form of length octet $sequenceOf = ''; foreach ($sortRules as $rule) { - $reversed = '0101' . ($rule[1] === Sortable::SORT_DESC ? 'ff' : '00'); + if (false && $rule[1] === Sortable::SORT_DESC) { + $reversed = '0101ff'; + } else { + $reversed = ''; + } $attributeType = unpack('H*', $rule[0]); $attributeType = $attributeType[1]; - $attributeType = '04' . str_pad(dechex(strlen($attributeType) / 2), 2, '0', STR_PAD_LEFT) . $attributeType; - $sequence = '30' - . str_pad(dechex(strlen($attributeType . $reversed) / 2), 2, '0', STR_PAD_LEFT) - . $attributeType - . $reversed; + $attributeOctets = strlen($attributeType) / 2; + if ($attributeOctets >= 127) { + // Use the indefinite form of the length octets (the long form would be another option) + $attributeType = '0440' . $attributeType . '0000'; + + } else { + $attributeType = '04' . str_pad(dechex($attributeOctets), 2, '0', STR_PAD_LEFT) . $attributeType; + } + + $sequence = $attributeType . $reversed; + $sequenceOctects = strlen($sequence) / 2; + if ($sequenceOctects >= 127) { + $sequence = '3040' . $sequence . '0000'; + } else { + $sequence = '30' . str_pad(dechex($sequenceOctects), 2, '0', STR_PAD_LEFT) . $sequence; + } + $sequenceOf .= $sequence; } - $sequenceOf = '30' - . str_pad(dechex(strlen($sequenceOf) / 2), 2, '0', STR_PAD_LEFT) - . $sequenceOf; + + $sequenceOfOctets = strlen($sequenceOf) / 2; + if ($sequenceOfOctets >= 127) { + $sequenceOf = '3040' . $sequenceOf . '0000'; + } else { + $sequenceOf = '30' . str_pad(dechex($sequenceOfOctets), 2, '0', STR_PAD_LEFT) . $sequenceOf; + } + return hex2bin($sequenceOf); } From 331c01c371112388e3a3e1f874a662594cff27a4 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 4 Sep 2015 12:13:43 +0200 Subject: [PATCH 269/280] fontello: Add icon-pin for sticky acknowledgements refs #9674 --- application/fonts/fontello-ifont/config.json | 6 ++++++ .../fonts/fontello-ifont/css/ifont-codes.css | 3 ++- .../fontello-ifont/css/ifont-embedded.css | 15 ++++++++------- .../fontello-ifont/css/ifont-ie7-codes.css | 3 ++- .../fonts/fontello-ifont/css/ifont-ie7.css | 3 ++- .../fonts/fontello-ifont/css/ifont.css | 15 ++++++++------- application/fonts/fontello-ifont/demo.html | 11 ++++++----- public/font/ifont.eot | Bin 29952 -> 30472 bytes public/font/ifont.svg | 7 ++++++- public/font/ifont.ttf | Bin 29796 -> 30316 bytes public/font/ifont.woff | Bin 18220 -> 18512 bytes 11 files changed, 40 insertions(+), 23 deletions(-) diff --git a/application/fonts/fontello-ifont/config.json b/application/fonts/fontello-ifont/config.json index 3a7894589..83a7a4e1f 100644 --- a/application/fonts/fontello-ifont/config.json +++ b/application/fonts/fontello-ifont/config.json @@ -672,6 +672,12 @@ "code": 59492, "src": "entypo" }, + { + "uid": "p57wgnf4glngbchbucdi029iptu8oxb8", + "css": "pin", + "code": 59513, + "src": "typicons" + }, { "uid": "c16a63e911bc47b46dc2a7129d2f0c46", "css": "down-small", diff --git a/application/fonts/fontello-ifont/css/ifont-codes.css b/application/fonts/fontello-ifont/css/ifont-codes.css index 78c477ddb..c63f3d67b 100644 --- a/application/fonts/fontello-ifont/css/ifont-codes.css +++ b/application/fonts/fontello-ifont/css/ifont-codes.css @@ -119,4 +119,5 @@ .icon-down-small:before { content: '\e875'; } /* '' */ .icon-left-small:before { content: '\e876'; } /* '' */ .icon-right-small:before { content: '\e877'; } /* '' */ -.icon-up-small:before { content: '\e878'; } /* '' */ \ No newline at end of file +.icon-up-small:before { content: '\e878'; } /* '' */ +.icon-pin:before { content: '\e879'; } /* '' */ \ No newline at end of file diff --git a/application/fonts/fontello-ifont/css/ifont-embedded.css b/application/fonts/fontello-ifont/css/ifont-embedded.css index c069e28e6..be3bd9f5f 100644 --- a/application/fonts/fontello-ifont/css/ifont-embedded.css +++ b/application/fonts/fontello-ifont/css/ifont-embedded.css @@ -1,15 +1,15 @@ @font-face { font-family: 'ifont'; - src: url('../font/ifont.eot?12843713'); - src: url('../font/ifont.eot?12843713#iefix') format('embedded-opentype'), - url('../font/ifont.svg?12843713#ifont') format('svg'); + src: url('../font/ifont.eot?94758086'); + src: url('../font/ifont.eot?94758086#iefix') format('embedded-opentype'), + url('../font/ifont.svg?94758086#ifont') format('svg'); font-weight: normal; font-style: normal; } @font-face { font-family: 'ifont'; - src: url('data:application/octet-stream;base64,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') format('woff'), - url('data:application/octet-stream;base64,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BjYGFQ4BFS4BNx4BFxYHBgcGFxQGFgGtdMZycsboyG4GerwBEgEIAwECBAMRFRMKAQwEDAMBBwYEBAoFBgQBCAEGAQQEBAIEBgEGAggJBQQFBQMBCAwBBRwHAgIBCAEOAQIHCQMEBAEEAgMBBwoCBAUNBAIUDhMECAYBAgECBQkCARMJAgQGBQYKAwgEBwUDAgYJBAYBBQkEBQMDAgUEAQ4HCw8EEAMDAQgECAEIAwEIBAQEAwMEAgQSBQMMDAEDAwIMGRsDAwgFEwUDCwQNCwEEAgYECAQJBFEyBAUCBgUDARgKAQIHBQQDBAQEAQIBAQECCgcHEgQHCQQDCAQCDgEBAgIOAgQCAg8IAwQDAgMFAQQKCgEECAQFDAcCAwgDCQcWBgYFCAgQBBQKAQIEAgYDDgMEAQoFCBEKAgICAgEFAgQBCgIDDAMCCAECCAMBAwIHCwQBAgIIFAMICgECAQQCAwUCAQIBBAECAgQYAwkDAQEBAw0CDgQCAwEEAwUCBggEAgIBCAQEBwgFBwwEBAICAgYBBQQDAgMFBwQDAhIBBAICBQwCCQICCggFCQIIBAIKCQ0JaXJRAQwBDQEEAxUBAwUCAwICAQUMCAMEBQEKAQMBAQQIBAoBBwYCCgIEAQwBAQICBAsPAQIJCgEDC3TE6sR0dMTqxHT+3QEIAgYGAQQIAwULAQwCAgQMAQoHAgMEAgQBAgYMBQYDCgEGBAEBAgICAQMDAgEDCAQCBgIDAwQFBAYHBAYICgcEBQYFDAMBAgQCAQMMCQ4DBAUHCAUDEQIDDgcGDAMBAwkCBwoDBgEOBAoEAQIFAgIGCgQHBwcBCQUIBwgDAgcDAgQCBgIEBQoDAw4CBQEBAgUEBwIBCggPAQMCAgcEAw4DAgQDBwMGBAQBAS1PBAEIBAMEBg8KAgYEBQQFDgkUCwIBBhoCARcFBAYDBRQDAxAFAgEECAUIBAELFw4FDAICBAQMCA4EDgEKCxQHCAEFAw0CAQIBEgMKBAQJBQYCAwoDAgMFDAIQCRMDAwQEBgIECgcOAQUCBAEEAgIQBQ8FAgUDAgsCCAQEAgIEGA4JDgUJAQQGAQIDAQEBBAMGBwYFAg8KAQQBAgMBAgMIBRcEAggIAwQPAgoKBQECAwQLCQUCAgICBgIKBwYFBAQEAwEECgQGAQcCAQcGBQMEAQEBBQQC/g0VVQIC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AXABcQFyAXMBdAF1AXYBdwF4AXkBeglkYXNoYm9hcmQEdXNlcgV1c2VycwJvawZjYW5jZWwEcGx1cwVtaW51cwxmb2xkZXItZW1wdHkIZG93bmxvYWQGdXBsb2FkA2dpdAVjdWJlcwhkYXRhYmFzZQVnYXVnZQdzaXRlbWFwDHNvcnQtbmFtZS11cA5zb3J0LW5hbWUtZG93bgltZWdhcGhvbmUDYnVnBXRhc2tzBmZpbHRlcgNvZmYEYm9vawVwYXN0ZQhzY2lzc29ycwVnbG9iZQVjbG91ZAVmbGFzaAhiYXJjaGFydAhkb3duLWRpcgZ1cC1kaXIIbGVmdC1kaXIJcmlnaHQtZGlyCWRvd24tb3BlbgpyaWdodC1vcGVuB3VwLW9wZW4JbGVmdC1vcGVuBnVwLWJpZwlyaWdodC1iaWcIbGVmdC1iaWcIZG93bi1iaWcPcmVzaXplLWZ1bGwtYWx0C3Jlc2l6ZS1mdWxsDHJlc2l6ZS1zbWFsbARtb3ZlEXJlc2l6ZS1ob3Jpem9udGFsD3Jlc2l6ZS12ZXJ0aWNhbAd6b29tLWluBWJsb2NrCHpvb20tb3V0CWxpZ2h0YnVsYgVjbG9jawl2b2x1bWUtdXALdm9sdW1lLWRvd24Kdm9sdW1lLW9mZgRtdXRlA21pYwdlbmR0aW1lCXN0YXJ0dGltZQ5jYWxlbmRhci1lbXB0eQhjYWxlbmRhcgZ3cmVuY2gHc2xpZGVycwhzZXJ2aWNlcwdzZXJ2aWNlBXBob25lCGZpbGUtcGRmCWZpbGUtd29yZApmaWxlLWV4Y2VsCGRvYy10ZXh0BXRyYXNoDWNvbW1lbnQtZW1wdHkHY29tbWVudARjaGF0CmNoYXQtZW1wdHkEYmVsbAhiZWxsLWFsdA1hdHRlbnRpb24tYWx0BXByaW50BGVkaXQHZm9yd2FyZAVyZXBseQlyZXBseS1hbGwDZXllA3RhZwR0YWdzDWxvY2stb3Blbi1hbHQJbG9jay1vcGVuBGxvY2sEaG9tZQRpbmZvBGhlbHAGc2VhcmNoCGZsYXBwaW5nBnJld2luZApjaGFydC1saW5lCGJlbGwtb2ZmDmJlbGwtb2ZmLWVtcHR5BHBsdWcHZXllLW9mZgpyZXNjaGVkdWxlAmN3BGhvc3QJdGh1bWJzLXVwC3RodW1icy1kb3duB3Nw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') format('truetype'); + src: url('data:application/octet-stream;base64,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') format('woff'), + url('data:application/octet-stream;base64,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BjYGFQ4BFS4BNx4BFxYHBgcGFxQGFgGtdMZycsboyG4GerwBEgEIAwECBAMRFRMKAQwEDAMBBwYEBAoFBgQBCAEGAQQEBAIEBgEGAggJBQQFBQMBCAwBBRwHAgIBCAEOAQIHCQMEBAEEAgMBBwoCBAUNBAIUDhMECAYBAgECBQkCARMJAgQGBQYKAwgEBwUDAgYJBAYBBQkEBQMDAgUEAQ4HCw8EEAMDAQgECAEIAwEIBAQEAwMEAgQSBQMMDAEDAwIMGRsDAwgFEwUDCwQNCwEEAgYECAQJBFEyBAUCBgUDARgKAQIHBQQDBAQEAQIBAQECCgcHEgQHCQQDCAQCDgEBAgIOAgQCAg8IAwQDAgMFAQQKCgEECAQFDAcCAwgDCQcWBgYFCAgQBBQKAQIEAgYDDgMEAQoFCBEKAgICAgEFAgQBCgIDDAMCCAECCAMBAwIHCwQBAgIIFAMICgECAQQCAwUCAQIBBAECAgQYAwkDAQEBAw0CDgQCAwEEAwUCBggEAgIBCAQEBwgFBwwEBAICAgYBBQQDAgMFBwQDAhIBBAICBQwCCQICCggFCQIIBAIKCQ0JaXJRAQwBDQEEAxUBAwUCAwICAQUMCAMEBQEKAQMBAQQIBAoBBwYCCgIEAQwBAQICBAsPAQIJCgEDC3TE6sR0dMTqxHT+3QEIAgYGAQQIAwULAQwCAgQMAQoHAgMEAgQBAgYMBQYDCgEGBAEBAgICAQMDAgEDCAQCBgIDAwQFBAYHBAYICgcEBQYFDAMBAgQCAQMMCQ4DBAUHCAUDEQIDDgcGDAMBAwkCBwoDBgEOBAoEAQIFAgIGCgQHBwcBCQUIBwgDAgcDAgQCBgIEBQoDAw4CBQEBAgUEBwIBCggPAQMCAgcEAw4DAgQDBwMGBAQBAS1PBAEIBAMEBg8KAgYEBQQFDgkUCwIBBhoCARcFBAYDBRQDAxAFAgEECAUIBAELFw4FDAICBAQMCA4EDgEKCxQHCAEFAw0CAQIBEgMKBAQJBQYCAwoDAgMFDAIQCRMDAwQEBgIECgcOAQUCBAEEAgIQBQ8FAgUDAgsCCAQEAgIEGA4JDgUJAQQGAQIDAQEBBAMGBwYFAg8KAQQBAgMBAgMIBRcEAggIAwQPAgoKBQECAwQLCQUCAgICBgIKBwYFBAQEAwEECgQGAQcCAQcGBQMEAQEBBQQC/g0VVQIC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ATwBPQE+AT8BQAFBAUIBQwFEAUUBRgFHAUgBSQFKAUsBTAFNAU4BTwFQAVEBUgFTAVQBVQFWAVcBWAFZAVoBWwFcAV0BXgFfAWABYQFiAWMBZAFlAWYBZwFoAWkBagFrAWwBbQFuAW8BcAFxAXIBcwF0AXUBdgF3AXgBeQF6AXsJZGFzaGJvYXJkBHVzZXIFdXNlcnMCb2sGY2FuY2VsBHBsdXMFbWludXMMZm9sZGVyLWVtcHR5CGRvd25sb2FkBnVwbG9hZANnaXQFY3ViZXMIZGF0YWJhc2UFZ2F1Z2UHc2l0ZW1hcAxzb3J0LW5hbWUtdXAOc29ydC1uYW1lLWRvd24JbWVnYXBob25lA2J1ZwV0YXNrcwZmaWx0ZXIDb2ZmBGJvb2sFcGFzdGUIc2Npc3NvcnMFZ2xvYmUFY2xvdWQFZmxhc2gIYmFyY2hhcnQIZG93bi1kaXIGdXAtZGlyCGxlZnQtZGlyCXJpZ2h0LWRpcglkb3duLW9wZW4KcmlnaHQtb3Blbgd1cC1vcGVuCWxlZnQtb3BlbgZ1cC1iaWcJcmlnaHQtYmlnCGxlZnQtYmlnCGRvd24tYmlnD3Jlc2l6ZS1mdWxsLWFsdAtyZXNpemUtZnVsbAxyZXNpemUtc21hbGwEbW92ZRFyZXNpemUtaG9yaXpvbnRhbA9yZXNpemUtdmVydGljYWwHem9vbS1pbgVibG9jawh6b29tLW91dAlsaWdodGJ1bGIFY2xvY2sJdm9sdW1lLXVwC3ZvbHVtZS1kb3duCnZvbHVtZS1vZmYEbXV0ZQNtaWMHZW5kdGltZQlzdGFydHRpbWUOY2FsZW5kYXItZW1wdHkIY2FsZW5kYXIGd3JlbmNoB3NsaWRlcnMIc2VydmljZXMHc2VydmljZQVwaG9uZQhmaWxlLXBkZglmaWxlLXdvcmQKZmlsZS1leGNlbAhkb2MtdGV4dAV0cmFzaA1jb21tZW50LWVtcHR5B2NvbW1lbnQEY2hhdApjaGF0LWVtcHR5BGJlbGwIYmVsbC1hbHQNYXR0ZW50aW9uLWFsdAVwcmludARlZGl0B2ZvcndhcmQFcmVwbHkJcmVwbHktYWxsA2V5ZQN0YWcEdGFncw1sb2NrLW9wZW4tYWx0CWxvY2stb3BlbgRsb2NrBGhvbWUEaW5mbwRoZWxwBnNlYXJjaAhm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') format('truetype'); } /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ @@ -17,7 +17,7 @@ @media screen and (-webkit-min-device-pixel-ratio:0) { @font-face { font-family: 'ifont'; - src: url('../font/ifont.svg?12843713#ifont') format('svg'); + src: url('../font/ifont.svg?94758086#ifont') format('svg'); } } */ @@ -172,4 +172,5 @@ .icon-down-small:before { content: '\e875'; } /* '' */ .icon-left-small:before { content: '\e876'; } /* '' */ .icon-right-small:before { content: '\e877'; } /* '' */ -.icon-up-small:before { content: '\e878'; } /* '' */ \ No newline at end of file +.icon-up-small:before { content: '\e878'; } /* '' */ +.icon-pin:before { content: '\e879'; } /* '' */ \ No newline at end of file diff --git a/application/fonts/fontello-ifont/css/ifont-ie7-codes.css b/application/fonts/fontello-ifont/css/ifont-ie7-codes.css index 4f30af4af..133ae3d3d 100644 --- a/application/fonts/fontello-ifont/css/ifont-ie7-codes.css +++ b/application/fonts/fontello-ifont/css/ifont-ie7-codes.css @@ -119,4 +119,5 @@ .icon-down-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } .icon-left-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } .icon-right-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } -.icon-up-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } \ No newline at end of file +.icon-up-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } +.icon-pin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } \ No newline at end of file diff --git a/application/fonts/fontello-ifont/css/ifont-ie7.css b/application/fonts/fontello-ifont/css/ifont-ie7.css index c0047b50a..017aa95d9 100644 --- a/application/fonts/fontello-ifont/css/ifont-ie7.css +++ b/application/fonts/fontello-ifont/css/ifont-ie7.css @@ -130,4 +130,5 @@ .icon-down-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } .icon-left-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } .icon-right-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } -.icon-up-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } \ No newline at end of file +.icon-up-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } +.icon-pin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } \ No newline at end of file diff --git a/application/fonts/fontello-ifont/css/ifont.css b/application/fonts/fontello-ifont/css/ifont.css index 971bf44b3..cec41bbe9 100644 --- a/application/fonts/fontello-ifont/css/ifont.css +++ b/application/fonts/fontello-ifont/css/ifont.css @@ -1,10 +1,10 @@ @font-face { font-family: 'ifont'; - src: url('../font/ifont.eot?54745533'); - src: url('../font/ifont.eot?54745533#iefix') format('embedded-opentype'), - url('../font/ifont.woff?54745533') format('woff'), - url('../font/ifont.ttf?54745533') format('truetype'), - url('../font/ifont.svg?54745533#ifont') format('svg'); + src: url('../font/ifont.eot?612849'); + src: url('../font/ifont.eot?612849#iefix') format('embedded-opentype'), + url('../font/ifont.woff?612849') format('woff'), + url('../font/ifont.ttf?612849') format('truetype'), + url('../font/ifont.svg?612849#ifont') format('svg'); font-weight: normal; font-style: normal; } @@ -14,7 +14,7 @@ @media screen and (-webkit-min-device-pixel-ratio:0) { @font-face { font-family: 'ifont'; - src: url('../font/ifont.svg?54745533#ifont') format('svg'); + src: url('../font/ifont.svg?612849#ifont') format('svg'); } } */ @@ -174,4 +174,5 @@ .icon-down-small:before { content: '\e875'; } /* '' */ .icon-left-small:before { content: '\e876'; } /* '' */ .icon-right-small:before { content: '\e877'; } /* '' */ -.icon-up-small:before { content: '\e878'; } /* '' */ \ No newline at end of file +.icon-up-small:before { content: '\e878'; } /* '' */ +.icon-pin:before { content: '\e879'; } /* '' */ \ No newline at end of file diff --git a/application/fonts/fontello-ifont/demo.html b/application/fonts/fontello-ifont/demo.html index 5cfd8dbf8..5dd0dd304 100644 --- a/application/fonts/fontello-ifont/demo.html +++ b/application/fonts/fontello-ifont/demo.html @@ -229,11 +229,11 @@ body { } @font-face { font-family: 'ifont'; - src: url('./font/ifont.eot?11424534'); - src: url('./font/ifont.eot?11424534#iefix') format('embedded-opentype'), - url('./font/ifont.woff?11424534') format('woff'), - url('./font/ifont.ttf?11424534') format('truetype'), - url('./font/ifont.svg?11424534#ifont') format('svg'); + src: url('./font/ifont.eot?91269362'); + src: url('./font/ifont.eot?91269362#iefix') format('embedded-opentype'), + url('./font/ifont.woff?91269362') format('woff'), + url('./font/ifont.ttf?91269362') format('truetype'), + url('./font/ifont.svg?91269362#ifont') format('svg'); font-weight: normal; font-style: normal; } @@ -482,6 +482,7 @@ body {
icon-up-small0xe878
+
icon-pin0xe879
diff --git a/public/font/ifont.eot b/public/font/ifont.eot index d249dc858a0a8ca823f797e153d4462539005cfb..ebb59302202aa7439bda37ccd48f133152432a20 100644 GIT binary patch delta 1156 zcmYk4UuauZ9LImZbJN=_U3-(7n{;AtlW5a&b8lACG^t&eZbe4O!w?ITmC+_^(_}M$ zu4~%duDI+$rEDrKdD(-5%?B|cGRVM(G4Y|3J@~MRAd2FHNQVURCE^}T{hc%glY7qj z{X3uYJ->Ue|AAY7qG&AxyXOanu`R{<^( z5IlucKE3O__MH5CbV$u8u9hlK-~0_AeF31W*SL~4etAoH4`A&ts^0_@iq#Kr1~;nT z;%VHd_c3#>0FLSwG1c!K9FV0Rky-V?uv7H; z!;z4yi;N&f6hvnqc8qq4M>;h;<&WY2BD5=rQNADj>Iqeys%YpOjrlFX$XKhSPLDEe zGRQvWsp-*w_ri%VJ?ukuN@G;jx*eO3(SxIjOakNCM0`-?r8~6n3cRee0iv(!#Uv z90|wIU~}zV71~DFLsZqHda%r~2gj`waDTr8pB^v77$vq!O^# zT8|o^4V*pN=ezy({K+E`_Y=AASVf;4b}RN;15ec4UeBxgwE?^Q)Ezl8bH31SEw$G@ z)_kxiO*f%Oc*dLkofMZ3*1_Ma$%QCx)^9D;5T8|Nlfiyw<=yKHvW3}dA^GFT7phhL zJ8&lOSR2q1T2A{!`$?bGZ|L{+pMzpB7)-WL+pMpo_84wf&n`D?SVj{!@G9}A(z`;) pwp=V1^woSSm$T*4E2RUo=gOr_wqsk@jDw(HTq=;ndMnG0{s$MD4afih delta 631 zcmXX?OK1~O6utK)9i!12OB!ov(>SJSOebR*(=n7VCMDEb)P>cemfBA9#U$-uVu%Vx z7r_V$E!pU%fxKLCm*o8ubf*(r3-$Inco8W`{?m6e3doH}v7T)}d99#j2 zWLG#@U#|qUmB3Qr765EgO^4H}_NKV+DFBA3Cd0X`opd^h6kR)FT0C7^UOrDe4`9^d zYDOd7L_9*>5Kmo=-MK&h3Vl(m(jktYLO-F0y8^4Kf(2|O_l*#^icy<&Z zObhjE+U2PBA*m|@WImJsI-o9JzKcgOTYiZ_%vL*DeyY%HHlOHbbRrmF4_M&<2rvQ) z9E0va*LcwHJABAJ$oKV_O-7CxJVOI!PGquV*=y!_5f!u`0jGje8~j%~QAF8>4e0_9Wu|HlB*$(p7t^SDFrcbPGMtb zLg=xHHpaX8oYmRGdU;!9|1gRnQM_k!w`1`5fY&?e^)^0Q9S*O9x$ynLR)nAV#ypC0 zK~Wlu7Q0=r+c&y;S&z%Y@zv7wvu*tdpam=Sx!wL>VAQpK3*K(;8)$ii2EL3V&jlD_dimRa3mC Jt8z)U^B;P9oR9zj diff --git a/public/font/ifont.svg b/public/font/ifont.svg index e712cc6d6..38195f793 100644 --- a/public/font/ifont.svg +++ b/public/font/ifont.svg @@ -111,7 +111,7 @@ - + @@ -123,6 +123,11 @@ + + + + + \ No newline at end of file diff --git a/public/font/ifont.ttf b/public/font/ifont.ttf index e222d9669d61df8958676d197d075499686c9cc5..adf4527fb33e8ea159016c204e697fa5992aa3eb 100644 GIT binary patch delta 1170 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 Date: Fri, 4 Sep 2015 13:01:49 +0200 Subject: [PATCH 270/280] monitoring/lib: Add translate parameter to MonitoredObject::getType() --- .../Monitoring/Object/MonitoredObject.php | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 1bd8431a2..0896cd266 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -580,11 +580,27 @@ abstract class MonitoredObject implements Filterable /** * Get the type of the object * - * @return string + * @param bool $translate + * + * @return string */ - public function getType() + public function getType($translate = false) { - return $this->type; + if ($translate !== false) { + switch ($this->type) { + case self::TYPE_HOST: + $type = mt('montiroing', 'host'); + break; + case self::TYPE_SERVICE: + $type = mt('monitoring', 'service'); + break; + default: + throw new InvalidArgumentException('Invalid type ' . $this->type); + } + } else { + $type = $this->type; + } + return $type; } /** From ca33e71f2d62ca6419787578efe71284366d867a Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 13:02:57 +0200 Subject: [PATCH 271/280] Deduplicate and clean up service summary component Remove redundant component view script and streamline subFilter handling in all views that render it. Remove heading from component to allow embedding in different types of views. refs #10033 --- library/Icinga/Web/Url.php | 22 ++- .../views/scripts/host/services.phtml | 10 +- .../application/views/scripts/host/show.phtml | 10 +- .../views/scripts/hosts/show.phtml | 4 +- .../list/components/hostssummary.phtml | 29 ++-- .../list/components/servicesummary.phtml | 26 ++- .../views/scripts/list/hosts.phtml | 4 +- .../views/scripts/list/services.phtml | 4 +- .../command/object-command-form.phtml | 10 +- .../command/objects-command-form.phtml | 10 +- .../partials/host/servicesummary.phtml | 150 ------------------ .../views/scripts/services/show.phtml | 5 +- 12 files changed, 91 insertions(+), 193 deletions(-) delete mode 100644 modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml diff --git a/library/Icinga/Web/Url.php b/library/Icinga/Web/Url.php index 7c3829537..237c8988a 100644 --- a/library/Icinga/Web/Url.php +++ b/library/Icinga/Web/Url.php @@ -6,7 +6,7 @@ namespace Icinga\Web; use Icinga\Application\Icinga; use Icinga\Cli\FakeRequest; use Icinga\Exception\ProgrammingError; -use Icinga\Web\UrlParams; +use Icinga\Data\Filter\Filter; /** * Url class that provides convenient access to parameters, allows to modify query parameters and @@ -156,6 +156,26 @@ class Url return $urlObject; } + /** + * Create a new filter that needs to fullfill the base filter and the optional filter (if it exists) + * + * @param string $url The url to apply the new filter to + * @param Filter $filter The base filter + * @param Filter $optional The optional filter + * + * @return Url The altered URL containing the new filter + * @throws ProgrammingError + */ + public static function urlAddFilterOptional($url, $filter, $optional) + { + $url = Url::fromPath($url); + $f = $filter; + if (isset($optional)) { + $f = Filter::matchAll($filter, $optional); + } + return $url->setQueryString($f->toQueryString()); + } + /** * Overwrite the baseUrl * diff --git a/modules/monitoring/application/views/scripts/host/services.phtml b/modules/monitoring/application/views/scripts/host/services.phtml index 11166f8fa..fd69d88ad 100644 --- a/modules/monitoring/application/views/scripts/host/services.phtml +++ b/modules/monitoring/application/views/scripts/host/services.phtml @@ -1,9 +1,17 @@ + +
compact): ?> tabs; ?> render('partials/host/object-header.phtml') ?> - render('partials/host/servicesummary.phtml') ?> +

compact ? ' data-base-target="col1"' : ''; ?> + baseFilter = Filter::where('host', $object->host_name); + $this->stats = $object->stats; + echo $this->render('list/components/servicesummary.phtml'); + ?> +

partial( 'list/services.phtml', diff --git a/modules/monitoring/application/views/scripts/host/show.phtml b/modules/monitoring/application/views/scripts/host/show.phtml index a612ae1af..12de39a78 100644 --- a/modules/monitoring/application/views/scripts/host/show.phtml +++ b/modules/monitoring/application/views/scripts/host/show.phtml @@ -1,9 +1,17 @@ + +
compact): ?> tabs; ?> render('partials/host/object-header.phtml') ?> - render('partials/host/servicesummary.phtml') ?> +

compact ? ' data-base-target="col1"' : ''; ?>> + stats = $object->stats; + $this->baseFilter = Filter::where('host', $object->host_name); + echo $this->render('list/components/servicesummary.phtml'); + ?> +

render('show/components/output.phtml') ?> diff --git a/modules/monitoring/application/views/scripts/hosts/show.phtml b/modules/monitoring/application/views/scripts/hosts/show.phtml index 3dbb0673f..053c44520 100644 --- a/modules/monitoring/application/views/scripts/hosts/show.phtml +++ b/modules/monitoring/application/views/scripts/hosts/show.phtml @@ -3,7 +3,9 @@ - render('list/components/hostssummary.phtml') ?> +

compact ? ' data-base-target="col1"' : ''; ?> + render('list/components/hostssummary.phtml') ?> +

render('partials/host/objects-header.phtml'); ?>
diff --git a/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml b/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml index 22f84b583..3fe11bcca 100644 --- a/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml +++ b/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml @@ -3,20 +3,16 @@ use Icinga\Web\Url; use Icinga\Data\Filter\Filter; -function urlAddFilterOptional($url, $filter, $optional) { - $url = Url::fromPath($url); - $f = $filter; - if (isset($optional)) { - $f = Filter::matchAll($filter, $optional); - } - return $url->setQueryString($f->toQueryString()); -} $this->baseFilter = isset($this->baseFilter) ? $this->baseFilter : null; -$stats = $stats->fetchRow(); +// don't fetch rows until they are actually needed to improve dashlet performance +if (!$stats instanceof stdClass) { + $stats = $stats->fetchRow(); +} + $selfUrl = 'monitoring/list/hosts'; $currentUrl = Url::fromRequest()->getRelativeUrl(); -?>

compact ? ' data-base-target="col1"' : ''; ?>> +?> qlink( sprintf($this->translatePlural('%u Host', '%u Hosts', $stats->hosts_total), $stats->hosts_total), $selfUrl, @@ -31,7 +27,7 @@ $currentUrl = Url::fromRequest()->getRelativeUrl(); qlink( $stats->hosts_up, - urlAddFilterOptional( + Url::urlAddFilterOptional( $selfUrl, Filter::where('host_state', 0), $this->baseFilter @@ -54,7 +50,7 @@ $currentUrl = Url::fromRequest()->getRelativeUrl(); qlink( $stats->hosts_down_unhandled, - urlAddFilterOptional( + Url::urlAddFilterOptional( $selfUrl, Filter::matchAll(Filter::where('host_state', 1), Filter::where('host_unhandled', 1)), $this->baseFilter @@ -75,7 +71,7 @@ $currentUrl = Url::fromRequest()->getRelativeUrl(); qlink( $stats->hosts_down_handled, - urlAddFilterOptional( + Url::urlAddFilterOptional( $selfUrl, Filter::matchAll(Filter::where('host_state', 1), Filter::where('host_unhandled', 0)), $this->baseFilter @@ -101,7 +97,7 @@ $currentUrl = Url::fromRequest()->getRelativeUrl(); qlink( $stats->hosts_unreachable_unhandled, - urlAddFilterOptional( + Url::urlAddFilterOptional( $selfUrl, Filter::matchAll(Filter::where('host_state', 2), Filter::where('host_unhandled', 1)), $this->baseFilter @@ -122,7 +118,7 @@ $currentUrl = Url::fromRequest()->getRelativeUrl(); qlink( $stats->hosts_unreachable_handled, - urlAddFilterOptional( + Url::urlAddFilterOptional( $selfUrl, Filter::matchAll(Filter::where('host_state', 2), Filter::where('host_unhandled', 0)), $this->baseFilter @@ -148,7 +144,7 @@ $currentUrl = Url::fromRequest()->getRelativeUrl(); qlink( $stats->hosts_pending, - urlAddFilterOptional( + Url::urlAddFilterOptional( $selfUrl, Filter::where('host_state', 99), $this->baseFilter @@ -166,4 +162,3 @@ $currentUrl = Url::fromRequest()->getRelativeUrl(); -

diff --git a/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml b/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml index 9fd798a0d..1f401004d 100644 --- a/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml +++ b/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml @@ -4,21 +4,16 @@ use Icinga\Data\Filter\Filter; use Icinga\Web\Url; use Icinga\Module\Monitoring\Object\Service; -function urlAddFilterOptional($url, $filter, $optional) { - $url = Url::fromPath($url); - $f = $filter; - if (isset($optional)) { - $f = Filter::matchAll($filter, $optional); - } - return $url->setQueryString($f->toQueryString()); -} $this->baseFilter = isset($this->baseFilter) ? $this->baseFilter : null; -$stats = $stats->fetchRow(); +// don't fetch rows until they are actually needed, to improve dashlet performance +if (!$stats instanceof stdClass) { + $stats = $stats->fetchRow(); +}; $selfUrl = 'monitoring/list/services'; $currentUrl = Url::fromRequest()->getRelativeUrl(); -?>

compact ? ' data-base-target="col1"' : ''; ?>> -qlink( + +echo $this->qlink( sprintf($this->translatePlural( '%u Service', '%u Services', $stats->services_total), $stats->services_total @@ -36,7 +31,7 @@ $currentUrl = Url::fromRequest()->getRelativeUrl(); qlink( $stats->services_ok, - urlAddFilterOptional($selfUrl, Filter::where('service_state', 0), $this->baseFilter), + Url::urlAddFilterOptional($selfUrl, Filter::where('service_state', 0), $this->baseFilter), null, array('title' => sprintf( $this->translatePlural( @@ -81,7 +76,7 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $ echo $this->qlink( $stats->$unhandled, - urlAddFilterOptional($selfUrl, $paramsUnhandled, $this->baseFilter), + Url::urlAddFilterOptional($selfUrl, $paramsUnhandled, $this->baseFilter), null, array('title' => sprintf( $this->translatePlural( @@ -106,7 +101,7 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $ } echo $this->qlink( $stats->$handled, - urlAddFilterOptional($selfUrl, $paramsHandled, $this->baseFilter), + Url::urlAddFilterOptional($selfUrl, $paramsHandled, $this->baseFilter), null, array('title' => sprintf( $this->translatePlural( @@ -130,7 +125,7 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $ qlink( $stats->services_pending, - urlAddFilterOptional($selfUrl, Filter::where('service_state', 99), $this->baseFilter), + Url::urlAddFilterOptional($selfUrl, Filter::where('service_state', 99), $this->baseFilter), null, array('title' => sprintf( $this->translatePlural( @@ -144,4 +139,3 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $ -

diff --git a/modules/monitoring/application/views/scripts/list/hosts.phtml b/modules/monitoring/application/views/scripts/list/hosts.phtml index 62ca65121..859f01aec 100644 --- a/modules/monitoring/application/views/scripts/list/hosts.phtml +++ b/modules/monitoring/application/views/scripts/list/hosts.phtml @@ -8,7 +8,9 @@ if (! $this->compact): ?> tabs; ?>
render('list/components/selectioninfo.phtml'); ?> - render('list/components/hostssummary.phtml'); ?> +

compact ? ' data-base-target="col1"' : ''; ?> + render('list/components/hostssummary.phtml'); ?> +

sortBox; ?> limiter; ?> diff --git a/modules/monitoring/application/views/scripts/list/services.phtml b/modules/monitoring/application/views/scripts/list/services.phtml index d2dfb250a..9b5dd1ec1 100644 --- a/modules/monitoring/application/views/scripts/list/services.phtml +++ b/modules/monitoring/application/views/scripts/list/services.phtml @@ -10,7 +10,9 @@ if (! $this->compact): ?> tabs ?>
render('list/components/selectioninfo.phtml') ?> - render('list/components/servicesummary.phtml') ?> +

compact ? ' data-base-target="col1"' : ''; ?>> + render('list/components/servicesummary.phtml') ?> +

sortBox ?> limiter ?> diff --git a/modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml b/modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml index ab14b1b2a..095d9a4c4 100644 --- a/modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml +++ b/modules/monitoring/application/views/scripts/partials/command/object-command-form.phtml @@ -1,10 +1,18 @@ + +
compact): ?> tabs; ?> getType() === $object::TYPE_HOST): ?> render('partials/host/object-header.phtml'); ?> - render('partials/host/servicesummary.phtml'); ?> +

compact ? ' data-base-target="col1"' : ''; ?>"> + baseFilter = Filter::where('host', $object->host_name); + $this->stats = $object->stats; + echo $this->render('list/components/servicesummary.phtml'); + ?> +

render('partials/service/object-header.phtml'); ?>
diff --git a/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml b/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml index 42c6e73cd..6a209e159 100644 --- a/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml +++ b/modules/monitoring/application/views/scripts/partials/command/objects-command-form.phtml @@ -1,3 +1,5 @@ + +
compact): ?> @@ -5,10 +7,14 @@ - render('list/components/servicesummary.phtml') ?> +

compact ? ' data-base-target="col1"' : ''; ?> + render('list/components/servicesummary.phtml'); ?> +

render('partials/service/objects-header.phtml'); ?> - render('list/components/hostssummary.phtml') ?> +

compact ? ' data-base-target="col1"' : ''; ?> + render('list/components/hostssummary.phtml') ?> +

render('partials/host/objects-header.phtml'); ?>
diff --git a/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml b/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml deleted file mode 100644 index be146acbe..000000000 --- a/modules/monitoring/application/views/scripts/partials/host/servicesummary.phtml +++ /dev/null @@ -1,150 +0,0 @@ -setQueryString($f->toQueryString()); -} - -$selfUrl = Url::fromPath('monitoring/list/services', array('host' => $object->host_name)); -?>

compact ? ' data-base-target="col1"' : ''; ?>> -stats->services_total): ?> -qlink( - sprintf( - $this->translatePlural( - '%u configured service:', - '%u configured services:', - $object->stats->services_total - ), - $object->stats->services_total - ), - $selfUrl, - null, - array( - 'title' => sprintf( - $this->translatePlural( - 'List all %u service on host %s', - 'List all %u services on host %s', - $object->stats->services_total - ), - $object->stats->services_total, - $object->host_name - ), - 'data-base-target' => '_next' - ) -); ?> - -translate('No services configured on this host'); ?> - - - -stats->services_ok): ?> - - qlink( - $object->stats->services_ok, - $selfUrl, - array('service_state' => 0), - array( - 'title' => sprintf( - $this->translatePlural( - 'List %u service that is currently in state OK on host %s', - 'List %u services which are currently in state OK on host %s', - $object->stats->services_ok - ), - $object->stats->services_ok, - $object->host_name - ), - 'data-base-target' => '_next' - ) - ); ?> - - - 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $state) { - $pre = 'services_' . $state; - if ($object->stats->$pre) { - $handled = $pre . '_handled'; - $unhandled = $pre . '_unhandled'; - $paramsHandled = array('service_state' => $stateId, 'service_handled' => 1); - $paramsUnhandled = array('service_state' => $stateId, 'service_handled' => 0); - echo ''; - if ($object->stats->$unhandled) { - - echo $this->qlink( - $object->stats->$unhandled, - $selfUrl, - $paramsUnhandled, - array( - 'title' => sprintf( - $this->translatePlural( - 'List %u service that is currently in state %s on host %s', - 'List %u services which are currently in state %s on host %s', - $object->stats->$unhandled - ), - $object->stats->$unhandled, - Service::getStateText($stateId, true), - $object->host_name - ), - 'data-base-target' => '_next' - ) - ); - } - if ($object->stats->$handled) { - if ($object->stats->$unhandled) { - echo ''; - } - echo $this->qlink( - $object->stats->$handled, - $selfUrl, - $paramsHandled, - array( - 'title' => sprintf( - $this->translatePlural( - 'List %u service that is currently in state %s (Acknowledged) on host %s', - 'List %u services which are currently in state %s (Acknowledged) on host %s', - $object->stats->$handled - ), - $object->stats->$handled, - Service::getStateText($stateId, true), - $object->host_name - ), - 'data-base-target' => '_next' - ) - ); - if ($object->stats->$unhandled) { - echo "\n"; - } - } - echo "\n"; - } -} -?> -stats->services_pending): ?> - - qlink( - $object->stats->services_pending, - $selfUrl, - array('service_state' => 99), - array( - 'title' => sprintf( - $this->translatePlural( - 'List %u service that is currently in state PENDING on host %s', - 'List %u services which are currently in state PENDING on host %s', - $object->stats->services_pending - ), - $object->stats->services_pending, - $object->host_name - ), - 'data-base-target' => '_next' - ) - ) ?> - - - -

diff --git a/modules/monitoring/application/views/scripts/services/show.phtml b/modules/monitoring/application/views/scripts/services/show.phtml index d2ad21bca..be8cf5a8b 100644 --- a/modules/monitoring/application/views/scripts/services/show.phtml +++ b/modules/monitoring/application/views/scripts/services/show.phtml @@ -4,7 +4,10 @@ - render('list/components/servicesummary.phtml') ?> + +

compact ? ' data-base-target="col1"' : ''; ?> + render('list/components/servicesummary.phtml') ?> +

render('partials/service/objects-header.phtml'); ?>
From 90f606fbd4b85a144f510ef95c26a326160aa8e0 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 4 Sep 2015 13:03:28 +0200 Subject: [PATCH 272/280] monitoring: Fix tooltip of the sticky flag for acks --- .../forms/Command/Object/AcknowledgeProblemCommandForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php b/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php index ef6d626b3..3503253ef 100644 --- a/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php @@ -111,8 +111,8 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm 'label' => $this->translate('Sticky Acknowledgement'), 'value' => true, 'description' => $this->translate( - 'If you want the acknowledgement to disable notifications until the host or service recovers,' - . ' check this option.' + 'If you want the acknowledgement to remain until the host or service recovers even if the host' + . ' or service changes state, check this option.' ) ) ), From 56e495049ca6f1ed760093f408006243339e0c10 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 4 Sep 2015 13:04:14 +0200 Subject: [PATCH 273/280] monitoring/detail: Indicate whether an ack is sticky refs #9674 --- .../scripts/show/components/acknowledgement.phtml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml index 0743b6103..d32fd81c9 100644 --- a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml +++ b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml @@ -23,10 +23,21 @@ if ($object->acknowledged): ?> '' . $this->escape($acknowledgement->getAuthor()) . '', $this->timeAgo($acknowledgement->getEntryTime()) ) ?> - getSticky()) { + echo $this->icon('pin', sprintf( + $this->translate( + 'Acknowledgement remains until the %1$s recovers even if the %1$s changes state' + ), + $object->getType(true) + )); + } + if (isset($removeAckForm)) { + // Form is unset if the current user lacks the respective permission // Form is unset if the current user lacks the respective permission echo $removeAckForm; - } ?> + } + ?>

(translate('Comment') ?>): From daa23a4edd45646ce65e39aa53b1da5d78cdc2f1 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 13:06:13 +0200 Subject: [PATCH 274/280] Use correct filters in multi-object command views --- modules/monitoring/application/controllers/HostsController.php | 2 +- .../monitoring/application/controllers/ServicesController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/HostsController.php b/modules/monitoring/application/controllers/HostsController.php index 036b78c32..3c576fbc8 100644 --- a/modules/monitoring/application/controllers/HostsController.php +++ b/modules/monitoring/application/controllers/HostsController.php @@ -32,6 +32,7 @@ class HostsController extends Controller $this->applyRestriction('monitoring/filter/objects', $hostList); $hostList->addFilter(Filter::fromQueryString((string) $this->params)); $this->hostList = $hostList; + $this->view->baseFilter = $this->hostList->getFilter(); $this->getTabs()->add( 'show', array( @@ -152,7 +153,6 @@ class HostsController extends Controller ->toQueryString() ); $this->view->commentsLink = Url::fromRequest()->setPath('monitoring/list/comments'); - $this->view->baseFilter = $this->hostList->getFilter(); $this->view->sendCustomNotificationLink = Url::fromRequest()->setPath('monitoring/hosts/send-custom-notification'); } diff --git a/modules/monitoring/application/controllers/ServicesController.php b/modules/monitoring/application/controllers/ServicesController.php index deee364fa..26561f8ff 100644 --- a/modules/monitoring/application/controllers/ServicesController.php +++ b/modules/monitoring/application/controllers/ServicesController.php @@ -33,6 +33,7 @@ class ServicesController extends Controller (string) $this->params->without(array('service_problem', 'service_handled', 'view')) )); $this->serviceList = $serviceList; + $this->view->baseFilter = $this->serviceList->getFilter(); $this->view->listAllLink = Url::fromRequest()->setPath('monitoring/list/services'); $this->getTabs()->add( 'show', @@ -163,7 +164,6 @@ class ServicesController extends Controller ); $this->view->commentsLink = Url::fromRequest() ->setPath('monitoring/list/comments'); - $this->view->baseFilter = $this->serviceList->getFilter(); $this->view->sendCustomNotificationLink = Url::fromRequest()->setPath( 'monitoring/services/send-custom-notification' ); From 89ff47e761881fa9dabb829f8743ce0ddaa51baf Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 4 Sep 2015 13:07:37 +0200 Subject: [PATCH 275/280] monitoring: Remove duplicate array key 'service_last_hard_state_change' --- .../library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php index 21cc09baa..b1f3591ad 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php @@ -206,7 +206,6 @@ class ServicestatusQuery extends IdoQuery 'service_hard_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE CASE WHEN ss.state_type = 1 THEN ss.current_state ELSE ss.last_hard_state END END', 'service_is_flapping' => 'ss.is_flapping', 'service_is_passive_checked' => 'CASE WHEN ss.active_checks_enabled = 0 AND ss.passive_checks_enabled = 1 THEN 1 ELSE 0 END', - 'service_last_hard_state_change' => 'UNIX_TIMESTAMP(ss.last_hard_state_change)', 'service_last_state_change' => 'UNIX_TIMESTAMP(ss.last_state_change)', 'service_notifications_enabled' => 'ss.notifications_enabled', 'service_notifications_enabled_changed' => 'CASE WHEN ss.notifications_enabled=s.notifications_enabled THEN 0 ELSE 1 END', From fff9bf7b2b0e58b0bdddec3b36954f9e1c1b7776 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 14:11:56 +0200 Subject: [PATCH 276/280] Implement view to display stats about checks and monitored objects refs #10033 --- ...essController.php => HealthController.php} | 70 ++++++- .../ToggleInstanceFeaturesCommandForm.php | 2 +- .../disable-notifications.phtml | 0 .../views/scripts/health/info.phtml | 84 ++++++++ .../{process => health}/not-running.phtml | 0 .../views/scripts/health/stats.phtml | 106 ++++++++++ .../views/scripts/process/info.phtml | 185 ------------------ modules/monitoring/configuration.php | 2 +- 8 files changed, 256 insertions(+), 193 deletions(-) rename modules/monitoring/application/controllers/{ProcessController.php => HealthController.php} (63%) rename modules/monitoring/application/views/scripts/{process => health}/disable-notifications.phtml (100%) create mode 100644 modules/monitoring/application/views/scripts/health/info.phtml rename modules/monitoring/application/views/scripts/{process => health}/not-running.phtml (100%) create mode 100644 modules/monitoring/application/views/scripts/health/stats.phtml delete mode 100644 modules/monitoring/application/views/scripts/process/info.phtml diff --git a/modules/monitoring/application/controllers/ProcessController.php b/modules/monitoring/application/controllers/HealthController.php similarity index 63% rename from modules/monitoring/application/controllers/ProcessController.php rename to modules/monitoring/application/controllers/HealthController.php index 84a1a15f5..c6f239d0c 100644 --- a/modules/monitoring/application/controllers/ProcessController.php +++ b/modules/monitoring/application/controllers/HealthController.php @@ -11,7 +11,7 @@ use Icinga\Web\Widget\Tabextension\DashboardAction; /** * Display process and performance information of the monitoring host and program-wide commands */ -class ProcessController extends Controller +class HealthController extends Controller { /** * Add tabs @@ -29,10 +29,21 @@ class ProcessController extends Controller 'Show information about the current monitoring instance\'s process' . ' and it\'s performance as well as available features' ), - 'label' => $this->translate('Monitoring Health'), - 'url' =>'monitoring/process/info' + 'label' => $this->translate('Process Information'), + 'url' =>'monitoring/health/info' ) - )->extend(new DashboardAction()); + ) + ->add( + 'stats', + array( + 'title' => $this->translate( + 'Show statistics about the monitored objects' + ), + 'label' => $this->translate('Stats'), + 'url' =>'monitoring/health/stats' + ) + ) + ->extend(new DashboardAction()); } /** @@ -40,7 +51,7 @@ class ProcessController extends Controller */ public function infoAction() { - $this->view->title = $this->translate('Monitoring Health'); + $this->view->title = $this->translate('Process Information'); $this->getTabs()->activate('info'); $this->setAutorefreshInterval(10); $this->view->backendName = $this->backend->getName(); @@ -95,6 +106,53 @@ class ProcessController extends Controller ->getQuery()->fetchAll(); } + /** + * Display stats about current checks and monitored objects + */ + public function statsAction() + { + $this->getTabs()->activate('stats'); + + $servicestats = $this->backend->select()->from('servicestatussummary', array( + 'services_critical', + 'services_critical_handled', + 'services_critical_unhandled', + 'services_ok', + 'services_pending', + 'services_total', + 'services_unknown', + 'services_unknown_handled', + 'services_unknown_unhandled', + 'services_warning', + 'services_warning_handled', + 'services_warning_unhandled' + )); + $this->applyRestriction('monitoring/filter/objects', $servicestats); + $this->view->servicestats = $servicestats->fetchRow(); + + $hoststats = $this->backend->select()->from('hoststatussummary', array( + 'hosts_total', + 'hosts_up', + 'hosts_down', + 'hosts_down_handled', + 'hosts_down_unhandled', + 'hosts_unreachable', + 'hosts_unreachable_handled', + 'hosts_unreachable_unhandled', + 'hosts_pending', + )); + $this->applyRestriction('monitoring/filter/objects', $hoststats); + $this->view->hoststats = $hoststats; + + $this->view->runtimevariables = (object) $this->backend->select() + ->from('runtimevariables', array('varname', 'varvalue')) + ->getQuery()->fetchPairs(); + + $this->view->checkperformance = $this->backend->select() + ->from('runtimesummary') + ->getQuery()->fetchAll(); + } + /** * Disable notifications w/ an optional expire time */ @@ -119,7 +177,7 @@ class ProcessController extends Controller } else { $form = new DisableNotificationsExpireCommandForm(); $form - ->setRedirectUrl('monitoring/process/info') + ->setRedirectUrl('monitoring/health/info') ->handleRequest(); $this->view->form = $form; } diff --git a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php index d487647e2..6f727232f 100644 --- a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php +++ b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php @@ -65,7 +65,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm $notificationDescription = sprintf( '%3$s', $this->translate('Disable notifications for a specific time on a program-wide basis'), - $this->getView()->href('monitoring/process/disable-notifications'), + $this->getView()->href('monitoring/health/disable-notifications'), $this->translate('Disable temporarily') ); } else { diff --git a/modules/monitoring/application/views/scripts/process/disable-notifications.phtml b/modules/monitoring/application/views/scripts/health/disable-notifications.phtml similarity index 100% rename from modules/monitoring/application/views/scripts/process/disable-notifications.phtml rename to modules/monitoring/application/views/scripts/health/disable-notifications.phtml diff --git a/modules/monitoring/application/views/scripts/health/info.phtml b/modules/monitoring/application/views/scripts/health/info.phtml new file mode 100644 index 000000000..78a58d525 --- /dev/null +++ b/modules/monitoring/application/views/scripts/health/info.phtml @@ -0,0 +1,84 @@ +runtimeVariables()->create($this->runtimevariables); +$cp = $this->checkPerformance()->create($this->checkperformance); + +if (! $this->compact): ?> +

+ tabs; ?> +
+ + +
+
+
+

translate('Process Info') ?>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
translate('Program Version') ?>programStatus->program_version + ? $this->programStatus->program_version + : $this->translate('N/A') ?>
translate('Program Start Time') ?>formatDateTime($this->programStatus->program_start_time) ?>
translate('Last Status Update'); ?>timeAgo($this->programStatus->status_update_time); ?>
translate('Last External Command Check'); ?>timeAgo($this->programStatus->last_command_check); ?>
translate('Last Log File Rotation'); ?>programStatus->last_log_rotation + ? $this->timeSince($this->programStatus->last_log_rotation) + : $this->translate('N/A') ?>
translate('Global Service Event Handler'); ?>programStatus->global_service_event_handler + ? $this->programStatus->global_service_event_handler + : $this->translate('N/A'); ?>
translate('Global Host Event Handler'); ?>programStatus->global_host_event_handler + ? $this->programStatus->global_host_event_handler + : $this->translate('N/A'); ?>
translate('Active Endpoint'); ?>programStatus->endpoint_name + ? $this->programStatus->endpoint_name + : $this->translate('N/A') ?>
+ programStatus->is_currently_running === true): ?> +
+ translate( + '%1$s has been up and running with PID %2$d %3$s', + 'Last format parameter represents the time running' + ), + $this->backendName, + $this->programStatus->process_id, + $this->timeSince($this->programStatus->program_start_time)) ?> +
+ +
+ translate('Backend %s is not running'), $this->backendName) ?> +
+ +
+ +
+
+ toggleFeaturesForm; ?> +
+
+
diff --git a/modules/monitoring/application/views/scripts/process/not-running.phtml b/modules/monitoring/application/views/scripts/health/not-running.phtml similarity index 100% rename from modules/monitoring/application/views/scripts/process/not-running.phtml rename to modules/monitoring/application/views/scripts/health/not-running.phtml diff --git a/modules/monitoring/application/views/scripts/health/stats.phtml b/modules/monitoring/application/views/scripts/health/stats.phtml new file mode 100644 index 000000000..30828cec7 --- /dev/null +++ b/modules/monitoring/application/views/scripts/health/stats.phtml @@ -0,0 +1,106 @@ +runtimeVariables()->create($this->runtimevariables); +$cp = $this->checkPerformance()->create($this->checkperformance); + +if (! $this->compact): ?> +
+ tabs ?> +
+ + +
+ +
+ +
+

+ stats = $hoststats ?> + render('list/components/hostssummary.phtml') ?> +

+ + + + + + + + + + + + +
translate('Total') ?> total_scheduled_hosts ?>
translate('Scheduled') ?> total_scheduled_hosts ?>
+ +

+ stats = $servicestats ?> + render('list/components/servicesummary.phtml') ?> +

+ + + + + + + + + + + + + + + + + + + + + + + + +
translate('Amount') ?>translate('Per Host') ?>
translate('Total') ?> total_services ?> average_services_per_host) ?>
translate('Scheduled') ?> total_scheduled_services ?> average_scheduled_services_per_host) ?>
+ +

translate('Active checks') ?>

+ + + + + + + + + + + + + + + + + + + + + + + +
translate('Checks') ?>translate('Latency') ?>translate('Execution time') ?>
translate('Host Checks') ?>host_active_count; ?>host_active_latency_avg) ?>shost_active_execution_avg) ?>s
translate('Service Checks') ?>service_active_count; ?>service_active_latency_avg) ?>sservice_active_execution_avg) ?>s
+ +

translate('Passive checks') ?>

+ + + + + + + + + + + +
translate('Host Checks') ?>host_passive_count ?>
translate('Service Checks') ?>service_passive_count ?>
+
+ +
+
diff --git a/modules/monitoring/application/views/scripts/process/info.phtml b/modules/monitoring/application/views/scripts/process/info.phtml deleted file mode 100644 index 85e576116..000000000 --- a/modules/monitoring/application/views/scripts/process/info.phtml +++ /dev/null @@ -1,185 +0,0 @@ -runtimeVariables()->create($this->runtimevariables); -$cp = $this->checkPerformance()->create($this->checkperformance); - -if (! $this->compact): ?> -
- tabs; ?> -
- - -
-
- -
- toggleFeaturesForm; ?> -
- -
-

translate('Process Info') ?>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
translate('Program Version') ?>programStatus->program_version - ? $this->programStatus->program_version - : $this->translate('N/A') ?>
translate('Program Start Time') ?>formatDateTime($this->programStatus->program_start_time) ?>
translate('Last Status Update'); ?>timeAgo($this->programStatus->status_update_time); ?>
translate('Last External Command Check'); ?>timeAgo($this->programStatus->last_command_check); ?>
translate('Last Log File Rotation'); ?>programStatus->last_log_rotation - ? $this->timeSince($this->programStatus->last_log_rotation) - : $this->translate('N/A') ?>
translate('Global Service Event Handler'); ?>programStatus->global_service_event_handler - ? $this->programStatus->global_service_event_handler - : $this->translate('N/A'); ?>
translate('Global Host Event Handler'); ?>programStatus->global_host_event_handler - ? $this->programStatus->global_host_event_handler - : $this->translate('N/A'); ?>
translate('Active Endpoint'); ?>programStatus->endpoint_name - ? $this->programStatus->endpoint_name - : $this->translate('N/A') ?>
- programStatus->is_currently_running === true): ?> -
- translate( - '%1$s has been up and running with PID %2$d %3$s', - 'Last format parameter represents the time running' - ), - $this->backendName, - $this->programStatus->process_id, - $this->timeSince($this->programStatus->program_start_time)) ?> -
- -
- translate('Backend %s is not running'), $this->backendName) ?> -
- -
- -
-

translate('Performance Info') ?>

- -

translate('Object summaries') ?>

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
translate('overall') ?>translate('scheduled') ?>
- translate('Hosts') ?> - - total_hosts; ?> - - total_scheduled_hosts; ?> -
- translate('Services') ?> - - total_services; ?> - - total_scheduled_services; ?> -
- translate('Average services per host') ?> - - average_services_per_host); ?> - - average_scheduled_services_per_host); ?> -
- -

translate('Active checks') ?>

- - - - - - - - - - - - - - - - - - - - - - - -
translate('Latency') ?>translate('Execution time') ?>
- translate('Host Checks') ?> - host_active_count; ?>host_active_latency_avg); ?>shost_active_execution_avg); ?>s
- translate('Service Checks') ?> - service_active_count; ?>service_active_latency_avg); ?>sservice_active_execution_avg); ?>s
- -

translate('Passive checks') ?>

- - - - - - - - - - - -
- translate('Host Checks') ?> - host_passive_count; ?>
- translate('Service Checks') ?> - service_passive_count; ?>
-
- -
-
diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 4d915c123..49c616a1f 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -222,7 +222,7 @@ $section->add($this->translate('Alert Summary'), array( */ $section = $this->menuSection($this->translate('System')); $section->add($this->translate('Monitoring Health'), array( - 'url' => 'monitoring/process/info', + 'url' => 'monitoring/health/info', 'priority' => 720, 'renderer' => 'Icinga\Module\Monitoring\Web\Menu\BackendAvailabilityMenuItemRenderer' )); From 39c68dd5ce34d4bf5d5cbbcdb426ee8fc4b0523b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 4 Sep 2015 15:01:05 +0200 Subject: [PATCH 277/280] LDAP Auth: Fix Fatal error: Call to a member function hasOid() on a non-object --- library/Icinga/Protocol/Ldap/LdapConnection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index 57b1fe90d..d78b4a147 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -666,7 +666,7 @@ class LdapConnection implements Selectable, Inspectable $ds = $this->getConnection(); - $serverSorting = $this->capabilities->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID); + $serverSorting = $this->getCapabilities()->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID); if ($serverSorting && $query->hasOrder()) { ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array( array( @@ -761,7 +761,7 @@ class LdapConnection implements Selectable, Inspectable $ds = $this->getConnection(); - $serverSorting = $this->capabilities->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID); + $serverSorting = $this->getCapabilities()->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID); if (! $serverSorting && $query->hasOrder()) { foreach ($query->getOrder() as $rule) { if (! in_array($rule[0], $fields)) { From a630869bcf528468ced70db9c8d3b2095e67fe3a Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 15:17:28 +0200 Subject: [PATCH 278/280] Provide stats for unhandled problems and improve layout refs #10033 --- .../controllers/HealthController.php | 10 ++- .../views/scripts/health/stats.phtml | 64 +++++++++++++++++-- public/css/icinga/widgets.less | 5 ++ 3 files changed, 71 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/controllers/HealthController.php b/modules/monitoring/application/controllers/HealthController.php index c6f239d0c..bbfdcb030 100644 --- a/modules/monitoring/application/controllers/HealthController.php +++ b/modules/monitoring/application/controllers/HealthController.php @@ -129,6 +129,9 @@ class HealthController extends Controller )); $this->applyRestriction('monitoring/filter/objects', $servicestats); $this->view->servicestats = $servicestats->fetchRow(); + $this->view->unhandledServiceProblems = $this->view->servicestats->services_critical_unhandled + + $this->view->servicestats->services_unknown_unhandled + + $this->view->servicestats->services_warning_unhandled; $hoststats = $this->backend->select()->from('hoststatussummary', array( 'hosts_total', @@ -142,7 +145,12 @@ class HealthController extends Controller 'hosts_pending', )); $this->applyRestriction('monitoring/filter/objects', $hoststats); - $this->view->hoststats = $hoststats; + $this->view->hoststats = $hoststats->fetchRow(); + $this->view->unhandledhostProblems = $this->view->hoststats->hosts_down_unhandled + + $this->view->hoststats->hosts_unreachable_unhandled; + + $this->view->unhandledProblems = $this->view->unhandledhostProblems + + $this->view->unhandledServiceProblems; $this->view->runtimevariables = (object) $this->backend->select() ->from('runtimevariables', array('varname', 'varvalue')) diff --git a/modules/monitoring/application/views/scripts/health/stats.phtml b/modules/monitoring/application/views/scripts/health/stats.phtml index 30828cec7..275fbf4f8 100644 --- a/modules/monitoring/application/views/scripts/health/stats.phtml +++ b/modules/monitoring/application/views/scripts/health/stats.phtml @@ -9,16 +9,56 @@ if (! $this->compact): ?>
-
-
+

unhandledProblems ?> translate('Unhandled Problems:') ?> + unhandledProblems ?> +

+ + + + + + + + + + + +
translate('Service Problems:') ?> + + qlink( + $this->unhandledServiceProblems, + 'monitoring/list/services?service_problem=1&service_handled=0&sort=service_severity' + ) + ?> + +
translate('Host Problems:') ?> + + qlink( + $this->unhandledhostProblems, + 'monitoring/list/hosts?host_problem=1&host_handled=0' + ) + ?> + +
+
+

stats = $hoststats ?> render('list/components/hostssummary.phtml') ?>

- + + + + + + + + @@ -30,17 +70,17 @@ if (! $this->compact): ?>
translate('Runtime Variables') ?>translate('Host Checks') ?>
translate('Total') ?>
+

stats = $servicestats ?> render('list/components/servicesummary.phtml') ?>

- - - + + @@ -60,12 +100,13 @@ if (! $this->compact): ?>
translate('Amount') ?> translate('Runtime Variables') ?> translate('Service Checks') ?> translate('Per Host') ?>
+

translate('Active checks') ?>

- + @@ -86,9 +127,18 @@ if (! $this->compact): ?>
translate('Check Performance') ?> translate('Checks') ?> translate('Latency') ?> translate('Execution time') ?>
+

translate('Passive checks') ?>

+ + + + + + + + diff --git a/public/css/icinga/widgets.less b/public/css/icinga/widgets.less index 95b64429a..9f884e746 100644 --- a/public/css/icinga/widgets.less +++ b/public/css/icinga/widgets.less @@ -234,6 +234,11 @@ li li .badge-container { background-color: @colorInvalid; } +.badge a[href] { + color: white; + text-decoration: none; +} + #menu nav ul .badge { margin-right: 0em; top: 0.3em; From 8837004fca1c462b18cced63b378dd7b84bd3558 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 15:24:26 +0200 Subject: [PATCH 279/280] Fix base target in problem badges The stats view is always a main pane, so it makes sense to open the badge links in col2. refs #10033 --- .../application/views/scripts/health/stats.phtml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/health/stats.phtml b/modules/monitoring/application/views/scripts/health/stats.phtml index 275fbf4f8..792b5a050 100644 --- a/modules/monitoring/application/views/scripts/health/stats.phtml +++ b/modules/monitoring/application/views/scripts/health/stats.phtml @@ -23,7 +23,9 @@ if (! $this->compact): ?> qlink( $this->unhandledServiceProblems, - 'monitoring/list/services?service_problem=1&service_handled=0&sort=service_severity' + 'monitoring/list/services?service_problem=1&service_handled=0&sort=service_severity', + null, + array('data-base-target' => '_next') ) ?> @@ -36,7 +38,9 @@ if (! $this->compact): ?> qlink( $this->unhandledhostProblems, - 'monitoring/list/hosts?host_problem=1&host_handled=0' + 'monitoring/list/hosts?host_problem=1&host_handled=0', + null, + array('data-base-target' => '_next') ) ?> From 354bd0dd788942fd46d53593e20bd4a94a04402d Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 15:35:50 +0200 Subject: [PATCH 280/280] Fix badge link color in avp tables --- modules/monitoring/public/css/module.less | 4 ++++ public/css/icinga/widgets.less | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index a239862c3..e27817613 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -180,6 +180,10 @@ table.avp { color: @colorMainForeground; } + .badge a[href] { + color: @colorGray; + } + .go-ahead { a, button.link-like { color: #222; diff --git a/public/css/icinga/widgets.less b/public/css/icinga/widgets.less index 9f884e746..c0d9d7b89 100644 --- a/public/css/icinga/widgets.less +++ b/public/css/icinga/widgets.less @@ -235,7 +235,7 @@ li li .badge-container { } .badge a[href] { - color: white; + color: @colorGray; text-decoration: none; }
translate('Check Performance') ?> translate('Passive Checks') ?>
translate('Host Checks') ?>